码迷,mamicode.com
首页 > 其他好文 > 详细

需求朔源——MD_PEGGING_NODIALOG

时间:2020-06-04 19:51:10      阅读:169      评论:0      收藏:0      [点我收藏+]

标签:图片   idt   The   tab   you   nts   nbsp   port   mat   

MD04供需状况:

技术图片

 

技术图片

 

代码:

*&---------------------------------------------------------------------*
*& Report ZPPRTEST4
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT ZPPRTEST4.

TYPE-POOLS: slis.
DATA: gs_layout TYPE slis_layout_alv,
          gt_fieldcat TYPE slis_t_fieldcat_alv,
          wa_fieldcat TYPE slis_fieldcat_alv.

DATA: lt_mdrq TYPE TABLE OF mdrq,
      lt_mdrq_fc LIKE mdrq OCCURS 0 WITH HEADER LINE.

CALL FUNCTION MD_PEGGING_NODIALOG
  EXPORTING
    edelkz                      = FE "MRP元素
    edelnr                      = 000020019183 "MRP元素號碼
    edelps                     = 000001     "MRP 元素項目
    ematnr                      = CTYB0757-P1 "物料编号
    ewerks                      = 2000  "工厂
    eberid                      = 2000   "MRP范围
  TABLES
    imdrqx                      = lt_mdrq
 EXCEPTIONS
   error                       = 1
   no_requirements_found       = 2
   order_not_found             = 3
   OTHERS                      = 4.

CALL FUNCTION REUSE_ALV_FIELDCATALOG_MERGE
    EXPORTING
      i_program_name         = sy-repid
      i_internal_tabname     = LT_MDRQ_FC
      i_inclname             = sy-repid
    CHANGING
      ct_fieldcat            = gt_fieldcat
    EXCEPTIONS
      inconsistent_interface = 1
      program_error          = 2
      OTHERS                 = 3.

gs_layout-colwidth_optimize = X.

CALL FUNCTION REUSE_ALV_GRID_DISPLAY
  EXPORTING
    i_callback_program       = sy-repid
    is_layout                = gs_layout
    it_fieldcat              = gt_fieldcat[]
    i_save                   = A
  TABLES
    t_outtab            =  lt_mdrq
  EXCEPTIONS
    program_error            = 1
    OTHERS                   = 2.

效果:

技术图片

需求朔源——MD_PEGGING_NODIALOG

标签:图片   idt   The   tab   you   nts   nbsp   port   mat   

原文地址:https://www.cnblogs.com/StephenAmell/p/13045319.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!