What is this about?

 

This is a solution for triggering of the navigation from backend side in ABAP based application, not for the client side. The good thing about it, it works transparently for a consumer in most of the SAP shells (NWBC, SAP GUI, Portal). There is no need to check for some environment flags, implement fallbacks etc. The same code works everywhere and behaves in the standard for the hosting shell way. The caller can control the way how the target shall be open: in a new tab (for NWBC) / window or in-place. Location URLs may be of different kinds: plain, OBNs, ABAP Launchpad (LPD_CUST) links or PFCG nodes – proper resolving of targets will be ensured in the best way supported by the current environment.

 

The most common use cases, when the solution shall be used:

  • OBN or absolute navigation in WebDynpro running in NWBC
  • OBN or absolute navigation from SAP GUI application embedded in NWBC
  • Calling WebDynpro from SAP GUI transaction

 

 

Environment/Application matrix

SAP GUI WebDynpro BSP (pure HTML)
NWBC https://www.sap.com
ls-navigation://
ls-obn://
ls-tr:// – native SAP GUI
ABAP LPD Links
https://www.sap.com/
ls-navigation://
ls-obn://
ls-tr:// – native SAP GUI
ABAP LPD Links
https://www.sap.com
ls-navigation://
ls-obn://
ls-tr:// – Web GUI
ABAP LPD Links
Portal https://www.sap.com
ls-obn://
ls-tr:// – Web GUI
ABAP LPD Links
https://www.sap.com
ls-obn://
ls-tr:// – Web GUI
ABAP LPD Links
Standalone https://www.sap.com
ls-navigation://
ls-obn://
ls-tr:// – native SAP GUI
ABAP LPD Links (only new window
navigation or Transaction Native)
https://www.sap.com
ls-navigation://
ls-obn://
ls-tr:// – Web GUI
ABAP LPD Links (only new window
navigation or Transactions as WebGUI)

 

Navigation protocol extensions

 

 

Protocol Example Description
https://www.sap.com Direct absolute navigation of any kind, which does not need any additional resolving
ls-navigation:// ls-navigation://yi3~sap_dal_demo_role_1:23?usr02-bname=xyz Navigation to specific node (nodeid 23) in specific PFCG role (sap_dal_demo_role_1). Indirect, need resolving to find out target application.
ls-obn:// ls-obn://yi3.sflight.display?resolvingMode=Default&obnParameters=name%3dvalue Navigation to specific OBN target (sflight.display) defined in one (or several) user assigned roles with support of parameter mapping. Indirect, need resolving to find out target application.
ls-tr:// ls-tr://se38?rs38m-programm=nwbc_sapgui_lsapi_test&dynp_okcode=strt Navigation to specific transaction (SE38) in any system (need SM59 alias/destination for remote case). Support as adaptive SA GUI UI selection (native or WebGUI) based on client support as “force” mode, to start native SAP GUI even if client can not directly embed native SAP GUI app (with help of SAP GUI shortcut service)
ABAP LPD (Launch Pad) links

OBN://BOTechnicalName=purchaserequisition/

BOSystemAlias=SAP_ERP_Procurement/

Operation=crtpurreq?HistoryMode=1&windowId=WID1238756457255&NavMode=0

ROLES://portal_content/com.sap.pct/every_user/

com.sap.pct.erp.common.bp_folder/

com.sap.pct.erp.common.roles/
com.sap.pct.erp.common.erp_common/

com.sap.pct.erp.common.lpd_start_wd_abap…

or …lpd_start_url… or …lpd_start_transaction… or …lpd_start_bw_7x… etc

ABAP LaunchPad links, defined in LPD repository. Indirect, need resolving to find out target application.

 

ls-tr:// protocol extension for IF_LSAPI=>NAVIGATE

 

This protocol extension allows easy way definition of navigation target, that will lead to calling of SAP GUI transaction.

 

Format:ls-tr://~?&

  • If the SM59 destination is not defined (~ can be skipped in this case), the local system (system where navigation has been triggered) will be used. Both as SM59 destination alias as transaction name shall be URL encoded.
  • Transaction parameters can be added as standard URL parameters after ? sign. Parameters with sap- in the beginning of the parameter name will be automatically skipped.
  • The transaction will be executed in native SAP GUI or in WebGUI, depending on client implementation. To force starting of the transaction always in native SAP GUI mode, use sap-force_sapgui URL parameter, in addition to transaction parameters (&sap-force_sapgui=X). The transaction will be started in native mode using NWBC SAP GUI shortcut service instead of WebGUI, if client not able not start SAP GUI natively.

 

Example: ls-tr://Y3S100~SE38?sap-force_sapgui=X&rs38m-programm=nwbc_sapgui_lsapi_test&dynp_okcode=strt


Parameters:

  • Y3S100 – SM59 alias for system Y3S with client 100 (shall be defined in source system SM59)
  • SE38 – transaction to start
  • sap-force_sapgui=X – URL parameter, telling the engine to always use native SAP GUI for starting of the transaction. The parameter is not passed to the transaction.
  • rs38m-programm=nwbc_sapgui_lsapi_test&dynp_okcode=strt – transaction parameters telling to prefill some fields and execute OKCODE (dynp_okcode parameter).

 

To check, if the client supports native SAP GUI, engine checks for feature IF_LSAPI=>MC_FEATURE_NWBC_NATIVE_SAPGUI (3) with IF_LSAPI->IS_SUPPORTED method.

 

NWBC SAP GUI Shortcut service

 

With note 1835643, NWBC ABAP runtime was extended with new service, allowing you to start standalone native SAP GUI by using the URL.

 

Format: https:///nwbc/~sapguilink?transaction=&parameters=

Following URL parameters are supported:

  • transaction – transaction code (can be provided either transaction code or report)
  • destination – destination (SM59 alias or directly RFC destination)
  • user – user for which shortcut shall be generated, BASE64 encoded
  • parameters – parameters name-value pairs, in the form of a query string, URL encoded. For example par1=%20A&par2=123
  • title – SAP GUI window title
  • system_id – system id
  • report – report name to start (can be provided either transaction code or report)
  • report_var – report variant, if report is provided
  • sap-client – client (MANDT)
  • app_server – application server name (sys_number shall be also provided then)
  • sys_number – system number for application server
  • language – language, as SAP GUI language but not web form (E instead of EN)
  • skip_sel_screen – skip selection screen parameter if calling transaction

 

Example: https://www.sap.corp:57801/nwbc/~sapguilink?transaction=se38&parameters=RS38M-PROGRAMM%3DNWBC_SAPGUI_LSAPI_TEST

 

  • abcd2.dcd.sap.corp:57801 – server and port
  • SE38 – transaction code
  • RS38M-PROGRAMM%3DNWBC_SAPGUI_LSAPI_TEST – encoded RS38M-PROGRAMM=NWBC_SAPGUI_LSAPI_TEST, that means put in field RS38M-PROGRAMM value NWBC_SAPGUI_LSAPI_TEST.

 

This service is used internally in ls-tr:// protocol extension for calling native SAP GUI transaction if the client does not support this feature natively.

 

Example navigation targets

  • https://www.google.com
  • /sap/bc/webdynpro/sap/s_epm_ux_po_gaf?WDCONFIGURATIONID=S_EPM_UX_PO_GAF&sap-client=111&sap-language=EN
  • ls-tr://se38?RS38M-PROGRAMM=NWBC_SAPGUI_LSAPI_TEST
  • ls-obn://.NWBC.NAVIGATION_TEST
  • ls-tr://se38?rs38m-programm=nwbc_sapgui_lsapi_test&dynp_okcode=strt
  • ls-tr://se38?sap-force_sapgui=X&rs38m-programm=nwbc_sapgui_lsapi_test&dynp_okcode=strt

 

 General call snippet

lv_location = 'ls-tr://se38?rs38m-programm=nwbc_sapgui_lsapi_test&dynp_okcode=strt'. cl_lsapi_manager=>get_instance( )->navigate(location = lv_location mode = 1 " in new window parameters = it_parameters ).

 Call WebDynpro Application

DATA: lv_wda_url TYPE string, lt_param TYPE tihttpnvp, ls_param LIKE LINE OF lt_param, lo_url TYPE REF TO cl_url. CREATE OBJECT lo_url. ls_param-name = cl_url=>mc_par_wda_config2. ls_param-value = `S_EPM_UX_PO_GAF`. APPEND ls_param TO lt_param. lv_wda_url = lo_url->wda( application = `S_EPM_UX_PO_GAF` query_parms = lt_param ). " open WDA => /sap/bc/webdynpro/sap/s_epm_ux_po_gaf?WDCONFIGURATIONID=S_EPM_UX_PO_GAF&sap-client=111&sap-language=EN " in new tab or window cl_lsapi_manager=>get_instance( )->navigate( location = lv_wda_url mode = 1 ).

 

Helper functions for generating URLs + triggering navigation:

 

  • CL_LSAPI_MANAGER=>NAVIGATE_TO_OBJECT – generates ls-obn:// call
  • CL_LSAPI_MANAGER=>NAVIGATE_TO_TRANSACTION – generates ls-tr:// call

 

 More info about IF_LSAPI=>NAVIGATE method

More info about NAVIGATE method can be found in the documentation of interface IF_LSAPI, available in development systems with SAP_BASIS >= 7.31. In lower SAP_BASIS releases only interface itself is available. Documentation was not downported.

How to call transaction with parameters in native SAP GUI by link (using SAP Shortcut service from NWBC):

 

#NWBC SAP GUI Shortcut service

 

Availability:

 

Recommended: use the UI2 addon and corresponding UI2 classes (/UI2/CL_LSAPI_MANAGER), if possible. SAP_BASIS version is not in development anymore.

SAP_BASIS Limited Support Full Support
700 SP22 SP28
701 SP07 SP12
702 SP05 SP12
711 SP07 SP11
720 SP04 SP08
730 SP01 SO09
731 SP03 SP03
740 SP00 SP02
741 SP00 SP00
> 741 SP00 SP00

Some of the functionality (ls-obn://, ls-navigation://) requires NWBC Runtime 35, which is available only with later SP.
So Limited Support – is navigation using NWBC Runtime 30, and Full Support navigation using NWBC Runtime 35 with all features available.

 

Functionality is available after implementing of the following notes:

  • 1820764 – SAP NWBC ABAP Runtime Patch 28 (contains base functionality, released)
  • 1835643 – SAP NWBC ABAP Runtime Patch 29 (SAP GUI shortcut service + extension for ls-tr:// protocol, not yet released

Recommended: do not install patch 29 note, but use latest NWBC Runtime patch note. It will install all prerequisites (as of patch 28 and 29) and will ensure you have up to date NWBC state. Latest patch note can be that can be found in consulting note 1353538.

New NetWeaver Information at SAP.com

Very Helpfull

User Rating: Be the first one !