on 04-01-2010 11:36 AM
Hello Experts,
I am calling the standard transactions using Web dynpro via ITS.
I am able to reach to the initial screen of the standard transactions say VA03 and populate the sales order number through Web dynpro.
My requirement is to skip the first screen of the transaction.
I tried passing the screen number in the URL link but still it is showing the initial screen.
Please suggest me solution for this.
Thanks and Regards,
Rahul Sinha
Please use DYNP_OKCODE=SHOW instead of OKCODE.
Check the code below
*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=300&~TRANSACTION=*VA03 VBAK-VBELN=' l_vbeln '&DYNP_OKCODE=SHOW'
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
lo_window_manager->create_external_window(
exporting
url = url
receiving
window = lo_window ).
lo_window->open( ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
the code Ajay gave you should work - but you will want to use "FCODE=ENT2" as the code to get you to the next screen.
edit - my bad - I believe that the code as given should work very well just as it is... the two codes (ENT2 and SHOW) are equivilant in this app.
Cheers,
Chris
Edited by: Chris Paine on Apr 8, 2010 3:09 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rahul,
While calling the URL you need to pass "&~OKCODE=SHOW" as value in the URL. Please find below code snippet which does a similar functionality for SU01D transaction.
data: lr_node type ref to if_wd_context_node,
lt_event_properties type table of IF_MAIN=>element_event_properties,
ls_event_properties type IF_MAIN=>element_event_properties.
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.
DATA : FINAL_URL TYPE STRING.
field-symbols: <l_value> type any.
*fill internal table
ls_event_properties-name = 'COLUMN_ID'.
ls_event_properties-value = r_param->column.
append ls_event_properties to lt_event_properties.
ls_event_properties-name = 'INDEX'.
ls_event_properties-value = r_param->index.
append ls_event_properties to lt_event_properties.
ls_event_properties-name = 'ATTRIBUTE'.
ls_event_properties-value = r_param->attribute.
append ls_event_properties to lt_event_properties.
assign r_param->value->* to <l_value>.
ls_event_properties-name = 'VALUE'.
ls_event_properties-value = <l_value>.
append ls_event_properties to lt_event_properties.
* navigate to context node EVENT_PROPERTIES
lr_node = wd_context->get_child_node( 'EVENT_PROPERTIES' ).
* bind internal table to context node
lr_node->bind_table( lt_event_properties ).
FINAL_URL = 'http://<url>:portno/sap/bc/gui/sap/its/webgui?~TRANSACTION=SU01D%20USR02-BNAME='.
CONCATENATE FINAL_URL ls_event_properties-value INTO FINAL_URL.
CONCATENATE FINAL_URL '&~OKCODE=SHOW' INTO FINAL_URL.
lo_api_component = wd_comp_controller->wd_get_api( ).
lo_window_manager = lo_api_component->get_window_manager( ).
ld_url = FINAL_URL.
CALL METHOD lo_window_manager->CREATE_EXTERNAL_WINDOW
EXPORTING URL = ld_url
RECEIVING WINDOW = lo_window.
lo_window->open( ).
Thanks
Ajay
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.