cancel
Showing results for 
Search instead for 
Did you mean: 

Create Travel Request

Former Member
0 Kudos

Dear.

I have the following requirement.

I want that When the enduser are "Creating Travel Request" in the portal ESS and the enduser press the button Save, the system open other window with a transaction of SAP.

In the image I details the steps:

[Steps for Reproduce the issye|http://www.imagegratis.com/free/uploads/dc3ad7193b.jpg]

Thanks in advance

Regards

Wilman S.

Accepted Solutions (0)

Answers (1)

Answers (1)

P1029777
Explorer
0 Kudos

Hi Wilman.Santiago ,

Do you want to call a SAP TRANSACTION in webdynpro before displaying other page??

if yes, then you can write code in WD_MODIFY method

here id code

Problem Description

It will help to call SAP Tcode from the Webbrowser using webdynpro for ABAP.

Solution Description

SAP Internet Transaction Server (ITS) u2013 The ITS is the interface between the Internet and R/3 and is the runtime engine that links Web server to the R/3 Application server. So to display a standard tcode in your webdynpro application you can use ITS.

Setting needs to be Done.

Go to SE80 : In the top menu choose u201CUtilities(M)u201D u2013> u201Csettingsu201D. Right-click on the tab-arrow until you come to tab u201CInternet Transaction Serveru201D.

Make sure that u201CPublishu201D tabe and check mark u201CIntegrated ITSu201D is selected.

Start transaction u201CSE80u2033. Choose u201CInternet Serviceu201D from the first drop down box Enter u201CSYSTEMu201D in the input field. You will see the ITS service SYSTEM and its components in a tree structure. Right click on u201CSYSTEMu201D in the tree and select u201CPublishu201D u2013> u201CComplete Serviceu201D to publish the service. once the publishing is completed the system will issue a message u201CObject published successfully; site INTERNALu201D.

Repeat the previous step with u201CSHUFFLERu201D and u201CWEBGUIu201D instead of u201CSYSTEMu201D to publish both, too.

How to test it::

Enter Tcode SICF.

Select the path as : /sap/bc/gui/sap/its/webgui

Right click on webgui and click on u201Ctestu201D to execute the servies.it will open the sap screen in web browser.

Now itu2019s time for some coding. create LINK to URL or LINK TO ACTION according to requirement. the code below is develop having scinario ::

Users are displyed creating link to userid coloumn. Whenever end user click on the any of the user id. on_click method will be called wih open the user details in SU01D Befor that get the path of the application server. you can find it in webdynpro application. doble clcik on webdynpro application in that you can find the URL in Administrative data.

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 = u2018COLUMN_IDu2019.

ls_event_properties-value = r_param->column.

append ls_event_properties to lt_event_properties.

ls_event_properties-name = u2018INDEXu2019.

ls_event_properties-value = r_param->index.

append ls_event_properties to lt_event_properties.

ls_event_properties-name = u2018ATTRIBUTEu2019.

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 = u2018VALUEu2019.

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( u2018EVENT_PROPERTIESu2019 ).

  • bind internal table to context node

lr_node->bind_table( lt_event_properties ).

FINAL_URL = u2018http://<url>:portno/sap/bc/gui/sap/its/webgui?~TRANSACTION=SU01D%20USR02-BNAME=u2019.

CONCATENATE FINAL_URL ls_event_properties-value INTO FINAL_URL.

CONCATENATE FINAL_URL u2018&~OKCODE=SHOWu2019 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( ).

I hope it will work and help you.

Regards.

Gyanendra.