Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in calling abap editor with the program name in Web Dynpro ABAP

Former Member
0 Kudos
150

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

2 REPLIES 2

Kiran_Valluru
Active Contributor
0 Kudos
69

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

0 Kudos
69

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