当前位置:   article > 正文

SAP SD VT01N,VT02N,VT03N 创建运输单屏幕增强

vt01n

客户要求,在VT02N和VT03N的主屏幕上增强客制化字段,经查阅资料得知,标准的屏幕增强只供SAP内部使用,所以只能换一种方式实现。

最终我的实现方法是,在VT02N,VT03N复制标准GUI增加客制化的按钮,点击按钮跳转到克制化屏幕,具体实现步骤如下:

用户出口:EXIT_SAPMV56A_004    创建INCLUDE : EXIT_SAPMV56A_004

添加代码如下:

  1. DATA: L_TA_CONTROL LIKE LINE OF C_TA_CONTROL.
  2. FIELD-SYMBOLS <CUA> LIKE LINE OF C_CUA_CONTROL.
  3. *Set a custom status which includes the button required to navigate
  4. *to the Extra data screen. This status will dynamically be called
  5. *from the program control and is a copy of the standard status of the
  6. *screen 1020
  7. IF SY-TCODE = 'VT02N'OR
  8. SY-TCODE = 'VT03N'.
  9. READ TABLE C_CUA_CONTROL ASSIGNING <CUA>
  10. WITH KEY PROGNAME = 'SAPMV56A'
  11. DYNPRO = '1020'
  12. TRTYP = '*'.
  13. IF SY-SUBRC = 0.
  14. *这一步就是为下一步调用的GUI_STATUS先创建一个函数组 ,下面是函数组主程序名
  15. <CUA>-STATPROG = 'SAPLZ_PLES_SHIPMENT'.
  16. *这一步就是修改标准的调用步骤,将标准的GUI_STATUS--->TRA_MAIN 复制成ZTRA_MAIN
  17. <CUA>-STATUS = 'ZTRA_MAIN'.
  18. ENDIF.
  19. ENDIF.

第二步,在用户出口:EXIT_SAPMV56A_001 创建  INCLUDE ZXV56U18.

添加如下代码

  1. *Description : User EXIT EXIT_SAPMV56A_001 (ENHANCEMENT V56AFCCH)
  2. *The normal purpose OF this EXIT IS TO CHECK IF a
  3. *particular FUNCTION CODE may be executed (see doc)
  4. *IN this CASE it IS used TO initialise/read extra DATA
  5. *pertaining TO the shipment that IS processed IN a cusom SCREEN.
  6. CHECK I_FCODE EQ 'DETAILS'. "这个就是上一步 你复制出来的GUI_STATUS中新增的按钮名
  7. "这里传入运输单号,进入自建的function 里面调用你想要的展示的屏幕
  8. CALL FUNCTION 'ZSD_SHIPMENT_ENHANCEMENT'
  9. EXPORTING
  10. IV_TKNUM = I_XVTTK_WA-TKNUM
  11. .

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/羊村懒王/article/detail/525868
推荐阅读
相关标签
  

闽ICP备14008679号