|
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。如果您注册时有任何问题请联系客服QQ: 83569622 。
您需要 登录 才可以下载或查看,没有帐号?注册
x
report ZE_MM_SCPSDD
no standard page heading line-size 150.
*---------------------------生成转储拣配单的ABAP程序-------------------------------------------*
* data definition
*----------------------------------------------------------------------*
type-pools: slis.
* Batchinputdata of single transaction
DATA: BDCDATA LIKE BDCDATA OCCURS 0 WITH HEADER LINE.
* messages of call transaction
DATA: MESSTAB LIKE BDCMSGCOLL OCCURS 0 WITH HEADER LINE.
* error session opened (' ' or 'X')
DATA: E_GROUP_OPENED.
* message texts
TABLES: RESB , AFPO ,AFKO, MARA ,EKET ,ZSCPSDD ,EKKO ,MARC,ZDSCDD,zlog.
data: mdezx like mdez occurs 0.
data: wa_mdezx like line of mdezx.
data: mdpsx like mdps occurs 0.
data: wa_mdpsx like line of mdpsx.
data: mdsux like mdsu occurs 0.
DATA: begin of itab_mrp OCCURS 0,
RSNUM like RESB-RSNUM , "预留号#
RSPOS like RESB-RSPOS , "预留项目
MATNR like RESB-MATNR , "物料号码#
MAKTX like MAKT-MAKTX , "物料描述#
BDMNG like RESB-BDMNG , "需求量#
BDTER like RESB-BDTER , "需求日期#
LABST like MARD-LABST , "库存量
MENGE like RESB-BDMNG , "采购订单数量,配送量
WERKS like RESB-WERKS , "@@新增工厂
LGORT like RESB-LGORT , "@@新增仓库
AUFNR like RESB-AUFNR , "相关生产订单
GSTRP like AFKO-GSTRP , "生产订单基本开始时间
ARBPL like CRHD-ARBPL , "工作中心
AUFPL like RESB-AUFPL , "计划工艺路线号
APLZL like RESB-APLZL , "计数器
DELB0 like mdez-DELB0 , "MRP(物料需求计划)元素
PLNBEZ like afko-PLNBEZ , "MRP(物料需求计划)数据
end of itab_mrp.
**调用BAPI所需要的内表
**参照ZTEST_BAPI_CREATE_PO
**************************
DATA:itab_poheader LIKE bapimepoheader OCCURS 0 WITH HEADER LINE,
itab_poheaderx LIKE bapimepoheaderx OCCURS 0 WITH HEADER LINE,
itab_poitems LIKE bapimepoitem OCCURS 0 WITH HEADER LINE,
itab_poitemx LIKE bapimepoitemx OCCURS 0 WITH HEADER LINE,
exppurchaseorder LIKE bapimepoheader-po_number,
itab_itemsche LIKE bapimeposchedule OCCURS 0 WITH HEADER LINE,
itab_itemschex LIKE BAPIMEPOSCHEDULX OCCURS 0 WITH HEADER LINE,
return LIKE bapiret2 OCCURS 0 WITH HEADER LINE.
DATA:BEGIN OF recordhead OCCURS 0,
LIFNR_001 like EKKO-LIFNR, "供应商帐户号 1800
BSART_002 like RM06E-BSART , "订单类型(采购):ZEB
BEDAT_003 like RM06E-BEDAT ,"采购订单日期:sy-datum
EKORG_004 like EKKO-EKORG , "采购组织:2000
EKGRP_005 like EKKO-EKGRP , "采购组:F01
EEIND_006 like RM06E-EEIND , "交货日期:P_EINDT
LPEIN_007 like RM06E-LPEIN , "交货日的类别:T
WERKS_008 like RM06E-WERKS , "工厂:P_WERKS
LGORT_009 like RM06E-LGORT, "库存地点:P_LGORT
END OF recordhead. |
|