Skip to Content
0
Sep 24, 2013 at 09:18 AM

How to navigate into dev. object WDYA

459 Views

Dear reader,

I have the following problem: I need my development tool to navigate to SE80/ development object type WDYA. Which is webDynpro ABAP application.

What I need is something like one of the following (to give the impression I tried before asking 😊):

a) option A I tried: use TR_OBJECT_JUMP_TO_TOOL for object WDYA is not supported (try single test the thing). Interestingly it works for object type WDCA (which is web dynpro configuration) and from there one could (via on-click on app.) jump to the application. That is where I got the code for the option B below.

b) option B: I tried to hack the editor and jump to the screen I want directly using the workbench classes. It is dirty and it does not always work. If you're interested, check my code:

What I need is something like RS_FUNCTION_SHOW function module to display a function module. There must be such thing for webdynpros too.

Thanks for reading that far, I will be glad if you have any pointers for me.

Have a nice day, Otto

DATA lo_wb TYPE REF TO cl_wb_request.
DATA lo_wda TYPE REF TO cl_wdy_wb_appl_editor.
DATA lo_state TYPE REF TO if_wb_program_state.
DATA lv_object TYPE rseuap-obj_name.

lv_object = iv_name.

CALL METHOD cl_wb_request=>create_from_encl_name
EXPORTING
p_object_type = 'YY'
p_encl_object_name = ''
p_object_name = lv_object
p_operation = 'DISPLAY'
p_in_new_window = ''
RECEIVING
p_wb_request = lo_wb
EXCEPTIONS
illegal_object_type = 1
illegal_operation = 2
cancelled = 3.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
EXIT.
ENDIF.

CREATE OBJECT lo_wda.

lo_wda->if_wb_program~process_wb_request(
p_wb_request = lo_wb
p_wb_program_state = lo_state
).