on 11-18-2014 8:57 AM
Like sy-tcode gives the transaction name in ABAP ...i want to know the application name in webdynpro or the transaction name in webdynpro.
Pleae help.
Thanks
Syed
Hi,
You can get the WDA application name at runtime as follows.
Data lv_wd_app type string.
lv_wd_app = cl_wdr_task=>application->name
Hope this helps,
Regards,
Kiran
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In both the cases, the Web Dynpro application is running in browser?
If not, you can get find if the application is running in SAP GUI by using the below code in DOINIT method of component controller:
DATA lr_api TYPE REF TO if_wd_component.
DATA lr_application TYPE REF TO if_wd_application.
* Get component API.
lr_api = wd_this->wd_get_api( ).
* Get the application.
lr_application = lr_api->get_application( ).
* Determine if called from SAP GUI.
IF lr_application->get_client_environment( ) EQ
if_wd_application=>co_client_environment-sapgui.
* Web Dynpro was called from SAP GUI.
ENDIF.
Regards,
Kiran
Hi,
You can create a custom report and then construct the WDA application url using cl_wd_utilities=>construct_wd_url and then call the application. Now create a T-CODE for this custom report instead of using WDYID.
Write the below code in your custom report.
* Get Web Dynpro Appplication URL
CALL METHOD cl_wd_utilities=>construct_wd_url
EXPORTING
application_name = 'ZWD_COMP_NAME' " Application Name
IMPORTING
out_absolute_url = lv_url.
CALL METHOD cl_http_server=>append_field_url
EXPORTING
name = 'ISGUI'
value = 'X'
CHANGING
url = lv_url.
CALL METHOD cl_gui_frontend_services=>execute
EXPORTING
document = lv_url .
hope this helps,
Regards,
Kiran
Instead of using:
lv_wd_app = cl_wdr_task=>application->name.
I believe it is better to use:
lv_wd_app = cl_wdr_task=>application_name.
As the former can lead to a short dump with runtime error OBJECTS_OBJREF_NOT_ASSIGNED, in case no webdynpro app is being run. In the second option, the class attribute is just blank.
Best regards,
Martín Borda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
Please use GET_CONFIGURATION_ID method instead of get_application.
lr_api->get_configuration_id.
Thanks and Regards,
Sriranjani Chimakurthy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.