Hello
In my system it works correctly
If the flag 'g_failgm' is initial, it will only select records from table AFFW where the field MSGNO is empty, otherwise, it selects all the records. If MSGNO is empty, it means that it is not a goods movement with error from COGI.
The following piece of code was executed:
IF g_failgm IS INITIAL.
* nur fehlerfreie Sätze aus AFFW lesen
IF NOT tafwd_tab[] IS INITIAL.
SELECT * FROM affw
INTO TABLE affw_tab
FOR ALL ENTRIES IN tafwd_tab
WHERE weblnr <> space
AND autyp <> auftragstyp-corp
AND inact = space
AND wablnr = space
AND ( msgno = space OR
( msgno = tafwd_tab-msgnr AND
msgid = tafwd_tab-arbgb ) ).
ELSE.
SELECT * FROM affw
INTO TABLE affw_tab
WHERE weblnr <> space
AND autyp <> auftragstyp-corp
AND inact = space
AND wablnr = space
AND msgno = space.
ENDIF.
BR
Caetano