工艺路线读取——CARO_ROUTING_READ

运行效果:

 

代码:

DATA: lt_oper TYPE capp_opr OCCURS 0.

DATA: ls_layout   TYPE slis_layout_alv,
      lt_fieldcat TYPE slis_t_fieldcat_alv.

CALL FUNCTION 'CARO_ROUTING_READ'
  EXPORTING
    date_from      = sy-datum
    plnty          = 'N'
    plnnr          = '50036595'
    plnal          = '01'
    matnr          = 'T24874G-01-FE'
    buffer_del_flg = 'X'
  TABLES
    opr_tab        = lt_oper
  EXCEPTIONS
    not_found      = 1
    ref_not_exp    = 2
    not_valid      = 3
    no_authority   = 4
    OTHERS         = 5.

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

ls_layout-colwidth_optimize = 'X'.

CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program = sy-repid
    is_layout          = ls_layout
    it_fieldcat        = lt_fieldcat
    i_save             = 'A'
  TABLES
    t_outtab           = lt_oper
  EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.

 

posted @ 2022-04-12 20:18  鲸与海  阅读(597)  评论(0编辑  收藏  举报