ABAP-穿透跳转
1.输入想要跳转的事务代码进入页面,如VA03,选中输入框,按F1。(注意:MIGO凭证的跳转有专用的函数,这个方法对MIGO凭证无效)
2.然后再点击红色的框
3.找到参数ID
4.参数ID在代码中会用到
1 FORM alv_user_command USING r_ucomm LIKE sy-ucomm 2 rs_selfield TYPE slis_selfield. 3 DATA:ref_grid TYPE REF TO cl_gui_alv_grid. 4 CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR' "调用函数 5 IMPORTING 6 e_grid = ref_grid. 7 CALL METHOD ref_grid->check_changed_data."更改数据 8 CASE r_ucomm. 9 WHEN '&IC1'."双击 10 READ TABLE gt_out INTO DATA(gs_data) INDEX rs_selfield-tabindex. 11 IF sy-subrc = 0. 12 "可以通过IF来判断点击了那个字段从而跳转不同页面 13 IF rs_selfield-fieldname = 'VBELN'. 14 SET PARAMETER ID: 'AUN' FIELD gs_data-vbeln. 15 CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN. 16 CLEAR gs_data. 17 ENDIF. 18 19 IF rs_selfield-fieldname = 'MATNR'. 20 SET PARAMETER ID: 'MAT' FIELD gs_data-matnr. 21 CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN. 22 CLEAR gs_data. 23 ENDIF. 24 25 ENDIF. 26 ENDCASE. 27 CALL METHOD ref_grid->refresh_table_display."刷新内表 28 ENDFORM.