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: 

Material Availability Date

former_member253923
Participant
0 Kudos

Hello All,

There is a field called Material Availability date in VBAK (VBAK-FMBDAT ). During Sales Order Creation system internally copies the date from the line item level to this field. I have written in a code in "userexit_save_document" (MV45AFZZ) to override this date, but still the update isn't happening, though i see the new value in debugging till the commit.

Any light thrown on this would be greatly appreciated.

Thanks!!!

4 REPLIES 4

Former Member
0 Kudos

It is generally not a recommended practice to change SALES Order data in USEREXIT_SAVE_DOCUMENT... Try SAVE_DOCUMENT_PREPARE user exit...

0 Kudos

Changing in SAVE_DOC_PREPARE and MOVE_FIELDS_VBAK will not work as standard code redetermines the FMBDAT after these exits.

kesavadas_thekkillath
Active Contributor
0 Kudos

USEREXIT_SAVE_DOCUMENT_PREPARE in MV50AFZ1 will work.

I remember i had done something like this to change the field value in VBAK


FIELD-SYMBOLS: <fs> TYPE vbak.
ASSIGN ('(SAPMV45A)VBAK') TO <fs>. 
if <fs> is assigned.
<F_VBAK>-FMBDAT = sy-datum.   
endif.

0 Kudos

I saw that MV50AFZ1 is called during Sales Order creation only if an automatic delivery creation is set. For SO, only MV45AFZZ DOC_PREPARE is called. We dont want auto deliv creation.

Thanks for your inputs so far!!!