03-11-2016 6:45 AM
hello all,
i am using exit EXIT_SAPLCOIH_09
to check some conditions before saving the order in IW32 or IW31..
with my code lines
assign ('(SAPLCOBC)resb_bt[]') to <fs1>.
ASSIGN ('(SAPLCOBP)AFVG_BT[]') to <fs2>.
it_resb[] = <fs1>.
it_afvg[] = <fs2>.
based on the field VBKZ(update indicator) i am deleting the records from it_resb and it_afvg and then writing required logic..
my question here is
when an item is deleted in components tab or operations tab the field VBKZ is updated correspondingly,
however some times it is updated with 'D' (VBKZ = D),
and some times it is updated with 'X'(VBKZ = X),
why is it so,
does this change once again,
for safe side i have written the code as
delete it_afvg WHERE vbkz eq 'D' or vbkz eq 'X'..
delete it_resb WHERE vbkz eq 'D' or vbkz eq 'X'.
why some times the deletion flag is updated with D and sometimes with X...
thanks in advance...
03-11-2016 8:14 AM
Hi Vinay,
No doubt SAP uses the differences between the value 'D' and 'X' to give it more information about the deletion. There could be many reasons for this that only a thorough investigation of the Function group COBC could determine.
What is more important is to confirm whether your approach (to check for the values D and X) is correct. A search of the Function group COBC confirms what you are doing as a record is always checked for these 2 values when determining if it is deleted. A simple example is the loop at the top of function CO_BC_RESB_UPD_OPR_WITH_FKT:
LOOP AT RESB_BT
WHERE AUFNR = AUFNR_IMP
AND VBKZ <> VBKZ-DELETE
AND VBKZ <> YX
AND VORNR = VORNR_IMP.
In the above YX has the value 'X'.
Hope that helps,
Jeff
03-11-2016 8:27 AM
I always check the domain of the data element that defines the field there are usually values there that give you some sort of a clue.
Rich
03-11-2016 8:14 AM
Obvious, field vbkz might be filled in different moments: in one it "X" as usual and other "D" - developer means "Delete". You can use shorter construction delete it_afvg WHERE vbkz ne ''. but your variant is better.
02-21-2022 4:20 PM