MD_SALES_ORDER_STATUS_REPORT该函数来自于事务码CO46和MD04,在函数开头有如下说明:
*----------------------------------------------------------------------
* Rel. 4.70: new parameter MEMORY_ID
* with the following new function:
* if MEMORY_ID = 'ABBL' and DATA_IN_MEMORY = 'X' then
* the order report takes the planning situation (MDPSX) from the
* memory buffer. If they are not found in the memory then the
* order report reads from database and puts the result in the buffer.
* Useful for performance improvement in MD04,MD07,...
* if order report is done multiple times during the transacation.
* In MD04,MD05,MD06,MD07,.. this function can be switched on/off with a
* flag in the user parameters.
* The data is taken from the buffer only
* for Make-to-stock. Sales order segment / project segments are
* always read from the database.
* memory_id = ABBL --> use the buffer for stock req. list
* memory_id = PLHS --> use the buffer from simulative planning
* (old functionality used in sim. MD02,...)
* for compatibility the default is PLHS (which only makes sense
* in simulative MD02).
翻译:
在4.7的释放版本中,新参数MEMORY_ID的引入带来了以下新的功能:
如果MEMORY_ID = ‘ABBL’ 并且 DATA_IN_MEMORY = ‘X’ ,订单报表
将从内存缓存中获取计划情况(MDPSX)。如果内存中不存在计划情况,则
订单报表将从数据库获取并将结果放入内存。
该功能对事务码MD04、MD07...的显示性能改进有帮助,如果订单报表被多次读取。
在事务码MD04,MD05,MD06,MD07,..中,该功能能被用户参数标志位设置为打开或关闭,
该功能从缓存获取的数据仅仅适合于MTS的情况。
销售订单segment和项目segment的订单报表数据总是取自于数据库。
memory_id = ABBL -->为库存/需求清单使用缓存
memory_id = PLHS -->使用来自于模拟计划的缓存来实现兼容性(在模拟MD02,...中使用的旧功能)
,默认是PLHS(这仅仅在模拟MD02中是有意义的)。
CALL FUNCTION 'MD_SALES_ORDER_STATUS_REPORT'
EXPORTINGEDELET = i_mdpsx -delet
edelkz = i_mdpsx -delkz
edelnr = i_mdpsx -del12
EDELPS = i_mdpsx -delps
EPLSCN = 000
* AVAILABILITY_CHECK = ' '
* NO_SAVETY_STOCK = ' '
DATA_IN_MEMORY = 'X' "该字段在4.7版本中更新
MEMORY_ID = 'ABBL' "该字段在4.7版本中更新
* EMATNR = ' '
EWERKS = WERKS
* EBERID = ' '
* EMDPS =
NODISP = 'X'
I_IGNORE_MTOLD = 'X'
I_PROFID = 'SAP000000002'
* I_REP_REFRESH = ' '
* IS_PROFILE =
* IT_VBEP_KEYS =
* NO_COMMIT_WORK = ' '
* IMPORTING
* ET_MLDELAY =
* ET_RTREE_SEL =
TABLES
IIOELX = it_ioel "该表为订单报表数据,但其数据比较复杂,需要仔细分析后获取,且数据分为多条
* EXCEPTIONS
* ERROR = 1
* OTHERS = 2