Created
May 26, 2014 04:25
-
-
Save js1972/b395eed3e42f3669da68 to your computer and use it in GitHub Desktop.
Sample ABAP code to launch a SAPGUI transaction from WebDynpro. This is similar to how its done with FPM (if_fpm_navigate_to). See the example GIST on that.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ls_transaction-tcode = 'BSSP_BOR_OBJECT'. | |
ls_transaction-gui_type = 'WIN_GUI'. | |
ls_transaction-system_alias = 'SAP_LocalSystem'. | |
ls_lpd_tx_para-key = 'SWO_TYPEID'. "'OBJKEY'. | |
ls_lpd_tx_para-value = ld_string+6(70). | |
INSERT ls_lpd_tx_para INTO TABLE ls_transaction-parameter. | |
ls_lpd_tx_para-key = 'OJ_NAME'. "'OBJTYPE'. | |
ls_lpd_tx_para-value = ld_string+76. | |
INSERT ls_lpd_tx_para INTO TABLE ls_transaction-parameter. | |
ls_lpd_tx_para-key = 'RFCDEST'. | |
ls_lpd_tx_para-value = ms_object_info-rfcdest. | |
INSERT ls_lpd_tx_para INTO TABLE ls_transaction-parameter. | |
ls_lpd_param-navigation_mode = 'EXT_HEAD'. | |
ls_lpd_param-parameter_forwarding = 'P'. | |
* ls_lpd_param-batch_input_program = | |
* 'BSSP_BOR_OBJECT_DISPLAY'. | |
* ls_lpd_param-batch_input_dynnr = '1000'. | |
* ls_lpd_param-batch_input_ok_code = 'ONLI'. | |
ls_lpd_param-skip_init_screen_if_possible = 'X'. | |
CREATE OBJECT lo_navigate TYPE cl_apb_launchpad_launch_api | |
EXPORTING | |
ir_wd_component = io_component. | |
lo_navigate->launch_transaction( | |
EXPORTING | |
is_transaction_fields = ls_transaction | |
is_additional_parameters = ls_lpd_param | |
IMPORTING | |
et_message = lt_message_ ). | |
LOOP AT lt_message_ INTO ls_message_. | |
mo_msg_manager->report_t100_message( | |
msgid = ls_message_-id | |
msgno = ls_message_-number | |
msgty = ls_message_-type | |
p1 = ls_message_-message_v1 | |
p2 = ls_message_-message_v2 | |
p3 = ls_message_-message_v3 | |
p4 = ls_message_-message_v4 ). | |
ENDLOOP. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment