Skip to content

Instantly share code, notes, and snippets.

@weiserman
Created March 16, 2014 14:24
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weiserman/9584017 to your computer and use it in GitHub Desktop.
Save weiserman/9584017 to your computer and use it in GitHub Desktop.
Example to call a Web Dynpro from within ABAP passing a paramter. Note this will launch the Web Dynpro application within SAPGUI
DATA: lt_param TYPE tihttpnvp,
ls_param TYPE ihttpnvp,
ls_url TYPE string.
* Set up configuration ID for calling the Web Dynpro
MOVE 'WDCONFIGURATIONID' TO ls_param-name.
MOVE 'ZSD_SD_INV_REQ_CREATE' TO ls_param-value.
APPEND ls_param TO lt_param.
* Set up the parameter that need to be passed into Web Dynpro
MOVE 'VBELN_IR' TO ls_param-name.
MOVE '0000000001' TO ls_param-value.
APPEND ls_param TO lt_param.
CALL FUNCTION 'WDY_EXECUTE_IN_PLACE'
EXPORTING
internalmode = 'X'
application = 'ZSD_SD_INV_REQ_CREATE'
parameters = lt_param
IMPORTING
out_url = ls_url
EXCEPTIONS
invalid_application = 1
browser_not_started = 2
action_cancelled = 3
OTHERS = 4.
IF sy-subrc <> 0.
* Implement suitable error handling here
ENDIF.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment