MIGO采购订单收货时,当点击分类按钮,给为空的特性赋默认值,数据保存在全局内表WS中,具体代码如下:
增强点:
包含文件 LCTMSF3Z ,FORM结尾处实施隐式增强,增强代码如下
*采购订单收货时,第一次点击分类按钮时,批次性性Z_BATCH_ZZSMC制造商名称和Z_BATCH_ZZSPH给默认值
*具体逻辑:从物料主数据MARA-MFRNR进行自动取值,
*根据EKPO-MATNR=MARA-MATNR 取MARA-MFRNR然后根据MARA-MFRNR=LFA1-LIFNR取LFA1-NAME1
DATA:ls_ws LIKE LINE OF ws.
IF sy-ucomm = ‘MIGO_OK_BATCH_CLASS’ .
ASSIGN (‘(SAPLMIGO)GODYNPRO-ACTION’) TO FIELD-SYMBOL(<lfs_action>).
IF <lfs_action> IS ASSIGNED.
ASSIGN (‘(SAPLMIGO)GODYNPRO-REFDOC’) TO FIELD-SYMBOL(<lfs_refdoc>).
IF <lfs_refdoc> IS ASSIGNED.
"采购收货
IF <lfs_action> = ‘A01’ AND <lfs_refdoc> = ‘R01’.
ASSIGN (‘(SAPLMIGO)GOITEM-MATNR’) TO FIELD-SYMBOL(<lfs_matnr>).
IF <lfs_matnr> IS ASSIGNED…
SELECT SINGLE a~mfrnr,name1
FROM mara AS a
LEFT OUTER JOIN lfa1 AS b ON a