1. COMPONENTCONTROLLER method get_api_name . data: lo_api_componentcontroller type ref to if_wd_component, lo_ap type ref to if_wd_application, lo_rp type ref to if_wd_rr_application. lo_api_componentcontroller = wd_this->wd_get_api( ). lo_ap = lo_api_componentcontroller->get_application( ). lo_rp = lo_ap->get_application_info( ). wd_this->zwd_api_name = lo_rp->get_name( ). endmethod. 2. View method get_api_name . data: lo_componentcontroller type ref to ig_componentcontroller, lo_api_componentcontroller type ref to if_wd_component, lo_ap type ref to if_wd_application, lo_rp type ref to if_wd_rr_application. lo_componentcontroller = wd_this->get_componentcontroller_ctr( ). lo_api_componentcontroller = lo_componentcontroller->wd_get_api( ). lo_ap = lo_api_componentcontroller->get_application( ). lo_rp = lo_ap->get_application_info( ). wd_this->zwd_api_name = lo_rp->get_name( ). endmethod.
本文介绍了两种在ABAP环境中获取API名称的方法:通过组件控制器和视图。这两种方法都涉及到了组件控制器、应用程序和运行时注册表的应用信息等关键对象。
102

被折叠的 条评论
为什么被折叠?



