on 04-25-2012 6:00 AM
Hi all,
I have a scenario like lead Selecting the PR number in the table and when clicked on display button the ME53N transaction must be called
with PR Number and related details.
**Create URL
Concatenate 'http'
'://' HOST ' : ' PORT
'/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=ME53N' '%20MEPO_SELECT-BANFN=' lv_banfn
'&~OKCODE=SHOW'
'sap-config-mode=true'
into URL.
I have used the above code, The transaction ME53N is Getting called but the Selected PR number Details are not shown.
can anybody help me out for this.
Thanks in advance
Hi Vani,
You can you the below code to call a T code from webdynpro ABAP:
1: Call below method to get host, port and protocol
cl_http_server=>if_http_server~get_location
2: Get the value from lead selection from table
DATA lo_nd_fileup TYPE REF TO if_wd_context_node.
DATA lo_el_fileup TYPE REF TO if_wd_context_element.
DATA ls_fileup TYPE wd_this->element_fileup.
lo_nd_fileup = wd_context->get_child_node( name = wd_this->wdctx_fileup ).
lo_el_fileup = lo_nd_fileup->get_element( ).
lo_el_fileup->get_static_attributes(
IMPORTING
static_attributes = ls_fileup ).
ls_fileup holds the lead selection value.....Read PR number similarly
3: concatenate protocol '://' host ':' port '/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction='your tcode name' 'Pass the PR number' into url
4: get the window manager as we are opening t code in external window.
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.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
5: Call the url which we created above
lo_window_manager->create_external_window(
EXPORTING
url = url
RECEIVING
window = lo_window ).
The T code will be executed using the integrated ITS
Regards,
Farooq
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vani,
Have u done all the ITS activations in SICF. If not do that.
Refer this link : http://scn.sap.com/message/8230919#8230919http://scn.sap.com/message/8230919#8230919
Regards,
Farooq
Hi Farooq,
Transaction is opening but the PR no details is not displaying
check the below code, let me know if any changes has to be done.
LO_EL_CHN_LIST_REP_OUTPUT->GET_STATIC_ATTRIBUTES(
IMPORTING
STATIC_ATTRIBUTES = LS_CHN_LIST_REP_OUTPUT ).
LV_BANFN = LS_CHN_LIST_REP_OUTPUT-BANFN.
** OKCODE = show.
*Call below method to get host and port
CL_HTTP_SERVER=>IF_HTTP_SERVER~GET_LOCATION(
IMPORTING HOST = HOST
PORT = PORT ).
*create URL
CONCATENATE 'http'
'://' HOST ':' PORT
'/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=ME53N'" LV_BANFN
'&~OKCODE=SHOW'
'sap-config-mode=true'
INTO URL.
*get the window manager as we are opening t code in external window.
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.
LO_API_COMPONENT = WD_COMP_CONTROLLER->WD_GET_API( ).
LO_WINDOW_MANAGER = LO_API_COMPONENT->GET_WINDOW_MANAGER( ).
* call the url which we created above
CALL METHOD LO_WINDOW_MANAGER->CREATE_EXTERNAL_WINDOW
EXPORTING
URL = URL
* TITLE =
* MODAL = ABAP_FALSE
* HAS_MENUBAR = ABAP_TRUE
* IS_RESIZABLE = ABAP_TRUE
* HAS_SCROLLBARS = ABAP_TRUE
* HAS_STATUSBAR = ABAP_TRUE
* HAS_TOOLBAR = ABAP_TRUE
* HAS_LOCATION = ABAP_TRUE
RECEIVING
WINDOW = LO_WINDOW.
LO_WINDOW->OPEN( ).
Hi Vani,
Try like this may be it will work...?
*create URL
CONCATENATE 'http'
'://' HOST ':' PORT
'/sap/bc/gui/sap/its/webgui/?sap-client=&~transaction=ME53N'''' INTO URL.
call method cl_http_server=>append_field_url
exporting
name = 'LV_BANFN'
value = url
changing
url = w_url.
concatenate w_url
'&~OKCODE=SHOW'
'sap-config-mode=true'
INTO F_URL.
pass F_URL in create_external_window.
Regards,
Farooq
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.