*&---------------------------------------------------------------------*
*& Report ZPPR022
*&---------------------------------------------------------------------*
*&
*&---------------------------------------------------------------------*
REPORT zppr104.
TABLES: plaf, ioitem.
TYPES: BEGIN OF tp_output.
INCLUDE STRUCTURE sfc_poco.
TYPES: cy_seqnr TYPE afko-cy_seqnr,
aufnr_t TYPE string,
cy_seqnr_t TYPE string,
txt TYPE t024f-txt,
ablad TYPE afpo-ablad,
msg TYPE bapi_msg, " 消息
fstyle TYPE lvc_t_styl,
ZKHBZ TYPE MARA-ZKHBZ, "客户备注
WRKST TYPE MARA-WRKST,
ZCPGG TYPE MARA-ZCPGG.
TYPES: END OF tp_output.
TYPES: BEGIN OF tp_material,
matnr TYPE marc-matnr,
maktx TYPE makt-maktx,
END OF tp_material.
TYPES: BEGIN OF tp_auart,
auart TYPE auart,
numkr TYPE t003o-numkr,
externind TYPE nriv-externind,
stsma TYPE t003o-stsma,
END OF tp_auart.
TYPES: BEGIN OF tp_mbew,
matnr TYPE mbew-matnr,
bwkey TYPE mbew-bwkey,
werks TYPE afpo-dwerk,
bwtar TYPE mbew-bwtar,
lplpr TYPE mbew-lplpr,
END OF tp_mbew.
TYPES: BEGIN OF tp_ordaut,
auart TYPE t003o-auart,
txt TYPE t003p-txt,
END OF tp_ordaut.
DATA: gt_output TYPE STANDARD TABLE OF tp_output,
gs_auart TYPE tp_auart.
DATA: gt_fcat TYPE lvc_t_fcat,
gs_layo TYPE lvc_s_layo.
SELECTION-SCREEN BEGIN OF BLOCK blk1 WITH FRAME TITLE TEXT-001.
"PARAMETERS: p_werks TYPE plaf-plwrk OBLIGATORY DEFAULT '1000'.
PARAMETERS: p_werks TYPE plaf-plwrk .
SELECT-OPTIONS: s_plnum FOR plaf-plnum,
s_matnr FOR plaf-matnr,
s_plgrp FOR plaf-plgrp ,
s_dispo FOR plaf-dispo,
s_psttr FOR plaf-psttr,
s_pedtr FOR plaf-pedtr,
s_kdauf FOR ioitem-kdauf MATCHCODE OBJECT vmva,
s_kdpos FOR ioitem-kdpos.
PARAMETERS: p_auart TYPE aufk-auart OBLIGATORY.
SELECTION-SCREEN END OF BLOCK blk1.
INITIALIZATION.
CLEAR: gs_auart.
PERFORM frm_init_fcat.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_auart.
PERFORM frm_auart_f4 CHANGING p_auart.
AT SELECTION-SCREEN.
PERFORM FRM_CXKZPP. " 权限检查
START-OF-SELECTION.
PERFORM frm_get_data.
END-OF-SELECTION.
PERFORM frm_show_data.
FORM frm_init_fcat.
DATA: ls_fcat TYPE lvc_s_fcat.
gs_layo-zebra = 'X'.
* gs_layo-cwidth_opt = 'X'.
gs_layo-box_fname = 'SEL'.
gs_layo-stylefname = 'FSTYLE'.
DEFINE mro_fcat.
CLEAR