I've been experimenting with the following case.
- We have global use of a document type OR
- One sales organization wants to have the check on PO number.
- In customizing, you can define field TVAK-PRBST = 'A' for documenty type to check on PO number
- But in my case only 1 sales organization wants to make use of this functionality. So I want to check in userexit if this is sales org. xxxx, then set field 'A', else keep blank.
I got it partially to work, I used but only this does not work when I enter the customer AND po number in one go. When I enter the customer number, enter, then the PO number it works.
MV45AFZZ - form userexit_field_modification.
MV45AFZB - form userexit_check_vbak using us_dialog.
Now I see RV45PFZA - USEREXIT_SET_STATUS_VBUK as an user exit. Is this the correct place or is there an other exit or start where I can put my check:
if vbak-vkorg = 'xxxx'.
tvak-prbst = 'A'.
endif.
Any info would be appreciated!