cancel
Showing results for 
Search instead for 
Did you mean: 

Values are not updating in Sales Document in user exit

Former Member
0 Kudos

Hello Experts,

I have one requirement to set header level block to the sales doc. if the customer is blocked. I am writing include in userexit_move_field_to_vbak. So whenever I'll change the quantity for the blocked customer automatically block should be set at header level. Even the block is showing when we come back from APO confirmation screen. But if I remove that block again from the header its not populating again even if my code is getting called at saving the sales doc. Please help me to understand how to resolve this issue.

Thanks

Bhoomika

Accepted Solutions (1)

Accepted Solutions (1)

pjcools
Active Contributor

I believe you need to make the change in both user exists including the USEREXIT_SAVE_DOCUMENT_PREPARE (program MV45AFZZ) to make sure when you save the order the block is correctly applied. In the past I have blocked sales orders automatically via the user exits and I've added code to that userexit. Try that and see how you go.

Thanks & Regards

Phil Cooley

Former Member
0 Kudos

Hi Phill,

By Both user exits you mean "userexit_move_field_to_vbak" and "USEREXIT_SAVE_DOCUMENT_PREPARE"?

pjcools
Active Contributor
0 Kudos

Yes Bhoomika - you will need to provide logic in both user exits, not only one of them. The USEREXIT_SAVE_DOCUMENT_PREPARE will do one more sweep to make sure the field is populated correctly. Try this and see how you go.

Thanks & Regards

Phil Cooley

Former Member

Okay. I'll check with the user about the test results and afterwards, I'll write check in the USEREXIT_SAVE_DOCUMENT_PREPARE exit.

Thanks for your help.

Bhoomika.

Former Member

Hi Phil,

Thank you very much for your help. But I have set the flag in VBEP exit and chcking the same in the VBAP exit and now its working.

Regards!

Bhoomika

pjcools
Active Contributor
0 Kudos

Awesome bhoomika.sharma that this is now working. Well done!

Answers (4)

Answers (4)

Former Member

Thank you everyone for the kind help.

Its working now I have added one flag in userexit_move_field_to_vbep to check item level values of item blocks in userexit_move_field_to_vbak.

Thanks & Regards.

Bhoomika

larshp
Active Contributor

Troubleshooting this depends a lot on the exact scenario, suggest isolating the issue and sharing your code. Also isolating the problem sometimes solves the issue by itself.

Like the other answers, I like guessing, my guess is that UPDKZ is not updated.

roberto_forti
Contributor

Hi,

User Exits In Sales Document Processing
This IMG step describes additional installation-specific processing in sales document processing. In particular, the required INCLUDES and user exits are described.
MV45ATZZ: System modifications for sales document processing affect different areas. Depending on the modification, you make the changes in the program components provided:
MV45AOZZ: For entering metadata for sales document processing. User-specific metadata must start with "ZZ".
MV45AIZZ: For entering additional installation-specific modules for sales document processing which are called up by the screen and run under PBO (Process Before Output) prior to output of the screen. The modules must start with "ZZ".
MV45AFZZ and MV45EFZ1: For entering additional installation-specific modules for sales document processing. These are called up by the screen and run under PAI (Process After Input) after data input (for example, data validation). The modules must start with "ZZ".
MV45AOZZ or MV45AIZZ: For entering installation-specific FORM routines and for using user exits, which may be required and can be used if necessary. "

Also try to identify it going to VMOD SAP package.

Regards,

Roberto

sez41
Active Contributor

That's the wrong user exit I suppose - Try USEREXIT_CHECK_VBAK in MV45AFZB instead.