Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

deletion flag some times updated with 'D' and some times with 'X'

former_member185116
Active Participant
0 Kudos

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...

4 REPLIES 4

jeffrey_towell2
Explorer
0 Kudos

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

0 Kudos

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

Former Member
0 Kudos

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. 

0 Kudos

I can't find field VBKZ in resb_bt !!