2011 Mar 30 7:37 AM
Hi,
I have to caal ABAP Editor screen with the display of program after clicking a button from web dynpro abap application.
I am able to call the ABAP Editor initial screen, but i want the editor display screen with a program.
How to do that?
Please find my code below:
DATA : FINAL_URL TYPE STRING,
URL TYPE STRING.
DATA: LV_HOST TYPE STRING,
LV_PORT TYPE STRING.
DATA V_TCODE TYPE TCODE.
DATA: LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA: LO_WINDOW TYPE REF TO IF_WD_WINDOW.
DATA: LD_URL TYPE STRING.
V_TCODE = 'SE38'.
*Call below method to get host and port
CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
IMPORTING
HOST = LV_HOST
PORT = LV_PORT ).
CONCATENATE 'http'
'://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?sap-client=&transaction=' V_TCODE '&OKCODE=SHOW'
INTO URL.
LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LD_URL = URL.
CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = LD_URL
RECEIVING
WINDOW = LO_WINDOW.
LO_WINDOW->OPEN( ).
Now, how to pass my Zprogram name into the URL.
I need to get the editor screen with the display of the program.
Thanks,
Radhika
2011 Mar 30 9:55 AM
Hi Radhika,
U have to pass the field name for program name.., the field name for program name is RS38M-PROGRAMM and the okcode for display is SHOP and for change is CHAP
so in url u have to do like this..
CONCATENATE 'http'
'://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?&transaction=se38&RS38M-PROGRAMM=ztest&~okcode=shop
INTO URL.
revert if u need some more clarifications.,
Thanks & Regards
Kiran
2011 Mar 30 10:36 AM
Hi Kiran,
Please find my code below:
DATA : URL TYPE STRING.
DATA: LV_HOST TYPE STRING,
LV_PORT TYPE STRING.
DATA: LO_WINDOW_MANAGER TYPE REF TO IF_WD_WINDOW_MANAGER.
DATA: LO_API_COMPONENT TYPE REF TO IF_WD_COMPONENT.
DATA: LO_WINDOW TYPE REF TO IF_WD_WINDOW.
DATA: LD_URL TYPE STRING.
*Call below method to get host and port
CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
IMPORTING
HOST = LV_HOST
PORT = LV_PORT ).
CONCATENATE 'http'
'://' LV_HOST ':' LV_PORT '/sap/bc/gui/sap/its/webgui/?&transaction=se38&RS38M-PROGRAMM=Y2PSOLTREE&~okcode=shop'
INTO URL.
LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
LD_URL = URL.
CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = LD_URL
RECEIVING
WINDOW = LO_WINDOW.
LO_WINDOW->OPEN( ).
Here,, Y2PSOLTREE is the program, that should show in SE38 screen.
I used the above code, but still it is showing the SE38 initial screen.
Thanks,
Radhika