Get the WebDynpro Application Name
We should use API methods .
In you application ,create a method named GET_APP_NAME with returning parameter WEB_NAME(char30 ex.)
-----------------code-------------------------------------------------------
method GET_APP_NAME .
DATA lo_COMPONENTCONTROLLER TYPE REF TO IG_COMPONENTCONTROLLER .
lo_COMPONENTCONTROLLER = wd_this->get_componentcontroller_ctr( ).
DATA lo_api_componentcontroller TYPE REF TO if_wd_component.
lo_api_componentcontroller = lo_componentcontroller->wd_get_api( ).
DATA: AP TYPE REF TO IF_WD_APPLICATION.
AP = lo_api_componentcontroller->GET_APPLICATION( ).
DATA: RP TYPE REF TO IF_WD_RR_APPLICATION.
RP = AP->GET_APPLICATION_INFO( ).
WEB_NAME = RP->GET_NAME( ).
endmethod.
-------------------------------------------------------------------------------
we can use this name to do the authority check or something else. :-)
阅读(729) | 评论(0) | 转发(0) |