cancel
Showing results for 
Search instead for 
Did you mean: 

Schedule line missing in table YVBEP

Former Member
0 Kudos

We are putting delivery block at schedule line level in sales order when quantity exceeds a predefined value. We have updated schedule line in userexit at sales order level. After putting delivery block we are updating FLAG indicator to " U " (updkz= U ) but when we update flag indicator in user exit we receive error " schedule line is missing in table YVBEP at the time of updating sales order via . VA02.

When we do not update the FLAG indicator program works fine. So is it necessary to update flag indicator ?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

YVEP would be the before version of changes made to the XVBEP table in the exits.  If it is not in YVBEP, carefully examine what you are doing.  Are you supplying the correct row identifier to the exit code? 

In an extreme case, I might take a look at copying the XVBEP row to YVBEP, then making the change in XVBEP, setting the UPDKZ to 'U', and allow the program to continue....however, caution is essential when modifying the content of these internal tables in exit routines.  A potential result is express document termination after the save starts, arising from errors detected during the db updates.

Former Member
0 Kudos

Attached below is the code that has been written and when we comment LS_vbep-updkz, the error would not come.

So we want to know the reason behind updating Flag UPDKZ. Thanks

Set the delivery block with value '11 - Max Qty exceeded'

 

ls_vbep-lifsp = lc_maxqty_exceeded.

IF ls_vbep-updkz IS INITIAL.

ls_vbep-updkz = lc_upd.

ENDIF.

 

*Pass the value to XVBEP

 

MODIFY xvbep FROM ls_vbep INDEX sy-tabix.

CLEAR ls_vbep.

ENDLOOP.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi,

See note 178328 (problems due to incorrect user exits in SD) to know how to works structures X* and Y* and their relation with field UPDKZ. So, when you do the modification in XVBEP check the value for UPDKZ according the note 178328.

I hope this helps you.

Regards

Eduado

Former Member
0 Kudos

Thanks for the information. I have already checked this note. My doubt is that when the flag is initial then there is no entry in Y table and it is mentioned in the note. But when we updated the Flag indicator to "U" then also we cannot see original entry in Y table. So do we need to update YVBEP table when we update the Flag indicator  ?

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

As i understand it, and as the note says:

" When you create a document, only the update indicator 'I' can exist

in the X tables (or sometimes the update indicator remains

initial). No records exist in the Y tables."

So, I understand you are doing a new entry (so, UPDKZ = 'I'). Check in SE16 if you have an entry in VBEP for this key.

Don't do changes on Y* tables, because it could have consequences on tables CDPOS/CDHCR.

I hope this helps you

Regards

Eduardo

Lakshmipathi
Active Contributor
0 Kudos

Moved from sales forum to ABAP forum since this is not a functional issue.

G. Lakshmipathi