*INCLUDE ZRPB_TPLT_0001TOP .
************************************************************************
*DATA DECLARATION *
************************************************************************
*----------------------------------------------------------------------*
* CONSTANTS *
*----------------------------------------------------------------------*
constants: gc_min_priority(10) TYPE c value '9999999999',
gc_max_priority(10) type c value '-1'.
*----------------------------------------------------------------------*
*tables *
*----------------------------------------------------------------------*
tables: marc, resb, zppt_mlb_mat_alt, eban.
*----------------------------------------------------------------------*
* types or type-pools *
*----------------------------------------------------------------------*
types: begin of ty_alt_mat,
plant like marc-werks,
alt_mat like mara-matnr,
priority like zppt_mlb_mat_alt-priority,
mng02 like mdez-mng02,
gr_proc_time(3) type c,
lead_time like eine-aplfz,
safety_time(3) type c,
min_pack_qty like eine-minbm,
min_ord_qty like eine-minbm,
unit like ZPPT_MLB_MAT_ALT-unit,
round_prof like eine-rdprf,
ord_unit like eina-meins,
pr_type like zppt_mlb_mat_alt-pr_type,
purch_org like zppt_mlb_mat_alt-purch_org,
pur_group like eine-ekgrp,
vendor like eina-lifnr,
dat00 like mdez-dat00, "Monday
delivery_date like sy-datum, "Delivery date
quantity like mdez-mng02, "PR quantity
denominator like eina-umren,
numerator like eina-UMREZ, "Numerator
stor_loc type LGPRO,
end of ty_alt_mat,
begin of ty_mrp_list,
dat00 like mdez-dat00,
mat_group like zppt_mlb_mat_alt-mat_group,
extra like mdez-extra,
priority like zppt_mlb_mat_alt-priority,
priority1(10) type c,
matnr like mara-matnr,
next_mat like mara-matnr,
last_mat like mara-matnr,
mng01 like mdez-mng01,
mng02 like mdez-mng02,
end of ty_mrp_list,
begin of ty_message,
keyword(20) type c,
function(20) type c,
status type c,
message(150) type c,
end of ty_message.
*----------------------------------------------------------------------*
* internal tables and work areas *
*----------------------------------------------------------------------*
data: begin of gt_mat_alt_info occurs 0.
include structure zppt_mlb_mat_alt.
data: alt_group(10) type c,
next_mat like mara-matnr,
last_mat like mara-matnr,
mng02 like mdez-mng02.
data: end of gt_mat_alt_info.
data: gt_mrp_list type standard table of ty_mrp_list with header line,
gt_alt_mats type standard table of ty_alt_mat with header line.
data: gt_message_list type standard table of ty_message with header line
.
*----------------------------------------------------------------------*
* global variables *
*----------------------------------------------------------------------*
selection-screen: begin of block b1 with frame title text-001.
parameters: p_werks like marc-werks OBLIGATORY.
parameters: p_MATKL type MATKL.
selection-screen: end of block b1.
閱讀更多 Seth華娛圈 的文章