‎2008 Aug 20 9:44 AM
Hi,
I have an issue working with USEREXIT_CHECK_VBAK, which affects transactions VA02 .
Iplease let me know the logic to validate the combination of Sold-To and Ship-To, against the Partner Table KNVP, under USEREXIT_CHECK_VBAK. And, if a user enters wrong combination of Sold-To and Ship-To, say in transaction VA02, USEREXIT_CHECK_VBAK will be triggered and the validation error message will be displayed.
Thanks and regards,
Nandy
‎2008 Aug 20 9:49 AM
Please have a look at below help provided by sap which gives details about User Exits In Sales Document Processing.
[User Exits In Sales Document Processing|http://help.sap.com/saphelp_46c/helpdata/en/1c/f62c7dd435d1118b3f0060b03ca329/content.htm]
I hope it helps.
‎2008 Aug 20 2:47 PM
Hi vibha,
Thanks a lot for ur reply.but i know the pupose of all those exits i just wanna know if anyone have any idea about the logic to be used
‎2008 Aug 20 2:58 PM
Try like this in the User Exit USEREXIT_CHECK_VBAK:
* Get Ship to Partner
READ TABLE XVBPA INTL L_VBPA WITH KEY PARVW = 'WE'.
IF SY-SUBRC = 0.
L_SHIPTO = L_VBPA-KUNNR.
ENDIF.
* Check connection
SELECT SINGLE kunnr
INTO l_kunnr
FROM knvp
WHERE kunnr = VBAK-KUNNR " Sold TO
AND kunn2 = L_SHIPTO " Ship To
AND parvw = 'WE' . " Partner func, Ship to party
IF SY-SUBRC <> 0.
MESSAGE E398(00) WITH 'Unconnected Ship To'.
ENDIF.
Regards,
Naimesh Patel
‎2014 Mar 14 5:07 PM
Hello,
I have a really similar logic in the USEREXIT_CHECK_VBAK. The problem is however I use an Error Message, the focus of the screen passes to the next field, PO Number. At the same time the Sold-To-Party and Ship-To-Party fields turn gray. So the user can't change them.
Is there a way to force the program to stay in the Ship-To-Party field letting the user to change ??
Thanks in advance.
‎2022 Jan 27 4:00 AM