文档介绍:sap 库存查询(SAP库存查询)
*与--------------------------------------------------------------------- *
*项目名称:zrp_mm_032 *
标题:重点物料库存日报表* *
*模块名称:PP *
*和子模块:*
*与作者:明戈斯
*与创建日期:2012-05-03 *
*逻辑DB:无*
*程序类型:报告*
* SAP :*
*与--------------------------------------------------------------------- *
*修订日志*
*日志#日期作者描述*
*与---- ---------- ----------- *
* 001 2012-05-05 Mingos Create
************************************************************************
报告zrp_mm_032。
type-pools:计算机。
表:玛拉,031。
*使用ALV数据变量
数据:i_gt_fieldcat型slis_t_fieldcat_alv。
数据:i_gt_excluding型slis_t_extab。
数据:v_gt_repid像sy-repid。
数据:i_gt_events型slis_t_event。
数据:v_gt_variant像disvariant。
数据:i_gs_layout型slis_layout_alv。
数据:gt_data型alsmex_tabline出现0头线。
“结果
类型:开始ty_result,
I型XH,
像mara-matnr MATNR,
maktx像makt-maktx,
像mara-meins迈恩斯,“单位
labst像mard-labst,“期初
不喜欢mard-labst,“调入
像mard-labst DCS,“消耗
DSC像mard-labst,“报废
Dex像mard-labst,“退仓
像mard-labst大昌,“转仓
潜像mard-labst,“其它业务
dstore像mard-labst,“库存
月喜欢mard-labst,“本月期初
最小mard-labst,“本月调入
像mard-labst MCS,“本月消耗
像mard-labst硕士,“本月报废
墨西哥人喜欢mard-labst,“本月退仓
妇幼保健院像mard-labst,“本月转仓
月喜欢mard-labst,“其它业务
mstore像mard-labst,“本月库存
最后ty_result。
数据:wa_result型ty_result,
gt _ result type standard table of ty _ result.
date: g _ btitle (20) type c
g _ etitle (20) type c
g _ mtitle (20) type c.
date: g _ lmonth like s031 - spmon, "上月
g _ lday like sy datum, "昨天
g _ bday like sy datum. " 月第一天
selection screen begin of block b1 with frame title text - 001.
in: p _ day like sy datum obligatory default sy datum.
select options: s _ matnr for mara - matnr.
selection screen end of block b1.
selection ment / 2 (50) title modified id g2.
selection ment / 5 (50) known modified id g2.
selection ment / 5 (50) note1 modified id g2.
initialization.
title = 提示:.
notes = 1.【铝锭】与【水口料】可用【y01002y * 】通配符方式查询.
note1 = 2.【漆包线】可用【y010080 * 】通配符方式查询.
* start of selection
start of selection.
"处理相关日期
_ perform get _ last month.
"取月期初库存
perform get _ store