if GR4XY_HEADER-SOURCEOFGR = 'PRODORD'.
...
endif.
SELECT SINGLE
FROM i_mfgorderwithstatus
FIELDS OrderIsConfirmed
WHERE ManufacturingOrder = @im_gr4xy_item->inbounddelivery
INTO @ls_orderisconfirmed.
SELECT SINGLE
FROM i_mfgorderwithstatus
FIELDS OrderIsPartiallyConfirmed
WHERE ManufacturingOrder = @im_gr4xy_item->inbounddelivery
INTO @ls_orderispartiallyconfirmed.
...
if ls_orderisconfirmed <> 'X' AND ls_orderispartiallyconfirmed <> 'X'.
append value #( messagetype = 'E' messagetext = '当前工单没有工序确认,禁止101入库。' ) to messages.
endif.
SELECT count(*) from I_MfgOrderDocdGoodsMovement with privileged access
WHERE ManufacturingOrder = @im_gr4xy_item->inbounddelivery AND GoodsMovementType = '261'
INTO @ls_orderisgoodsmoventposted.
...
if ls_orderisgoodsmoventposted = '0'.
append value #( messagetype = 'E' messagetext = '当前工单没有发料,禁止101入库。' ) to messages.
endif.
DATA: ls_orderisconfirmed TYPE string.
DATA: ls_orderispartiallyconfirmed TYPE string.
DATA: ls_orderisgoodsmoventposted TYPE I.
if GR4XY_HEADER-SOURCEOFGR = 'PRODORD'.
loop at gr4xy_item REFERENCE INTO DATA(im_gr4xy_item).
if im_gr4xy_item->inbounddelivery IS NOT INITIAL AND im_gr4xy_item->plant = '1310'.
SELECT count(*) from I_MfgOrderDocdGoodsMovement with privileged access
WHERE ManufacturingOrder = @im_gr4xy_item->inbounddelivery AND GoodsMovementType = '261'
INTO @ls_orderisgoodsmoventposted.
SELECT SINGLE
FROM i_mfgorderwithstatus
FIELDS OrderIsConfirmed
WHERE ManufacturingOrder = @im_gr4xy_item->inbounddelivery
INTO @ls_orderisconfirmed.
SELECT SINGLE
FROM i_mfgorderwithstatus
FIELDS OrderIsPartiallyConfirmed
WHERE ManufacturingOrder = @im_gr4xy_item->inbounddelivery
INTO @ls_orderispartiallyconfirmed.
if ls_orderisconfirmed <> 'X' AND ls_orderispartiallyconfirmed <> 'X'.
append value #( messagetype = 'E' messagetext = '当前工单没有工序确认,禁止101入库。' ) to messages.
endif.
if ls_orderisgoodsmoventposted = '0'.
append value #( messagetype = 'E' messagetext = '当前工单没有发料,禁止101入库。' ) to messages.
endif.
endif.
endloop.
endif.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 | |
3 |