Fiori URL Generation and Navigation Using CL_LSAPI_MANAGER
Hello Everyone!👋
Fiori URL Generation and Navigation Using CL_LSAPI_MANAGER
CL_LSAPI_MANAGER - This class allows you to easily generate SAP Fiori Launchpad URLs or trigger intent-based navigation.
You’ll find it useful when you need to:
- Launch Fiori apps from the SAP GUI
- Generate dynamic Fiori URLs using semantic objects, actions, and parameters
- Share specific Fiori app links via email
- Navigate directly to transactions, and more
DATA(lo_lsapi) = cl_lsapi_manager=>get_instance( ).
" Generate URL to launch a Fiori app
DATA(lv_flp_app_url) = cl_lsapi_manager=>create_flp_url(
object = 'MaintenanceObject' " Semantic Object
action = 'listFunctionalLocStructure' " Action
system_alias = 'LOCAL' " SM59 Alias for FES
parameters = VALUE #( name = 'DY_TPLNR' value = '0001' )
).
" Generate URL to launch a transaction code
DATA(lv_tcode_url) = cl_lsapi_manager=>create_flp_url(
system_alias = 'LOCAL'
parameters = VALUE #( ( name = 'DY_TPLNR' value = '0001' ) )
transaction = 'IH01' " Transaction
).
" Navigate to URL
lo_lsapi->navigate(
location = lv_flp_app_url
mode = lo_lsapi->gc_s_navigation_mode-inplace
).
" Open URL directly
cl_lsapi_manager=>open_url( url = lv_tcode_url ).
For more information, check the offcial link:
SAP Help Documentation
Comments
Post a Comment