on 01-21-2016 2:44 PM
hi,
does anybody know how i can read out the currently used web dynpro application name at runtime ? is there any function module/method
for that ?
I have a user exit in travel management which is used by backend transaction and many web dynpro applications. i only want to run trough the coding of the user exit when the calling web dynpro application is a specific one, and NOT call the exit when it is called from backend/ or other web dynpro applications.
there is nothing like sy-tcode for name of current web dynpro application ?!?
somebody told me to use this:
data lv_name type string.
lv_name = cl_wdr_task=>application->name.
but when using this coding i get dump in ST22 with runtime error "OBJECTS_OBJREF_NOT_ASSIGNED".
br Martin
For anyone reaching this post in 2023 or onwards. Shortdump OBJECTS_OBJREF_NOT_ASSIGNED is triggered because following code is executed from SAP GUI Tcode IW32:
data lv_name type string.
lv_name = cl_wdr_task=>application->name.
The explanation behind that error is that cl_wdr_task=>application is an Object Reference which is never created when the exit is called from Tcode IW32. Such object reference is only created when the exit is called from a Web Dynpro.
So the solution I found was the following:
DATA: lv_wd_app_name type string.
IF sy-tcode IS INITIAL.
IF cl_wdr_task=>application IS BOUND.
lv_wd_app_name = cl_wdr_task=>application->name.
ENDIF.
ENDIF.
I hope this helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try below code.This might help you.
DATA:
lr_ctrl_api TYPE REF TO if_wd_controller,
lr_comp_api TYPE REF TO if_wd_component,
lr_appl_api TYPE REF TO if_wd_application,
lr_appl_info TYPE REF TO if_wd_rr_application,
l_appl_name TYPE string.
* get app name
lr_ctrl_api = wd_this->wd_get_api( ).
lr_comp_api = lr_ctrl_api->get_component( ).
lr_appl_api = lr_comp_api->get_application( ).
lr_appl_info = lr_appl_api->get_application_info( ).
l_appl_name = lr_appl_info->get_name( ).
Thanks
KH
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
this is not working, it says that field "wd_this" is not known. what is this "wd_this" ????
when i comment this one line with the "wd_this" and leave the rest of the code i again get the runtime error.
We are outside the web dynpro application with my user exit, i don't think this can be used here !
br Martin
Hi Martin,
Rather than finding out the application/component, can you not use SET PARAMETER and GET PARAMETER? I mean, you set a TPARA parameter(New parameter) from the calling application and read its value in the EXIT, if the value is set then the called application is yours.
I hope this works.
Regards
Mohit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey,
Can't we do enhancement? enhance the standard webdynpro component by writing POST/PRE EXIT to the method from where the exit is called.
We oftenly do enhancements in standard webdynpro components in SRM, not too sure about your application.
Another alternative-
Read system call stack where you will have to focus on classes with format /1BCWDY/0O2TIFC6GG2TO5CG1RT8==CP (here /1BCWDY/0O2TIFC6GG2TO5CG1RT8 will be the class name)
Then you need to check database table WDY_WB_GENINFO with GUID = CLASSNAME+8 (Class name leaving first 8 charcaters). in this case we should be passing 0O2TIFC6GG2TO5CG1RT8 in the GUID field and controller name must be SPACE. The query will give COMPONENT_NAME and then you can find application(which may not really be needed I guess).
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.