‎2010 Aug 21 8:09 AM
Hi
I have created the Sales order for VA01. but when put the entry for sold to party and PO etc. but item details in not entered in VA01 & check the log (ctr + f8) . then error is not showing for material , qty, plant is not entered . document is Complete.
If the material field is filled and the others field like Qty & plant are blank mean system saying document as incomplete.
Kindly guide me how to solve the Problem.
‎2010 Aug 21 10:10 AM
As long as there is no value for material in item level, SAP won't check for the incompletion in the item level. And it is possible to create SO without any item.
You can do that check in the user exit USEREXIT_SAVE_DOCUMENT_PREPARE. But it wont appear in the incompletion log.
‎2010 Aug 21 10:20 AM
Hi
this user exits is a Blank. How to create the user exits for this Tranaction.
what write code for this user exits.
‎2010 Aug 21 10:45 AM
Go to the program MV45AFZZ and look for the routine USEREXIT_SAVE_DOCUMENT_PREPARE and add the following code.
Before that, you should get access key from basis if it is not modified yet.
Try to add more conditions before raising message, since it will have impact on the other sales process.
FORM userexit_save_document_prepare.
IF xvbap[] IS INITIAL. " AND vbak-auart EQ 'OR' AND etc...
MESSAGE 'NO ITEMS ENTERED' TYPE 'E'.
ENDIF.
ENDFORM. "USEREXIT_SAVE_DOCUMENT_PREPARE
‎2010 Aug 23 7:30 AM
you gave this code pasted but error is not solve out. i have pasted in below code for enhancement. but va01 said that document is complte not not message generated material not entered.
FORM USEREXIT_SAVE_DOCUMENT_PREPARE.
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$"$\SE:(2 ) Form USEREXIT_SAVE_DOCUMENT_PREPARE, Start D
$$-Start: (2 )----
$$
ENHANCEMENT 351 ZSD_SAVE. "active version
IF xvbap[] IS INITIAL AND VBAP-MATNR = ' ' AND VBAK-AUART = ' ' .
MESSAGE 'NO ITEMS ENTERED' TYPE 'E'.
ENDIF.
ENDENHANCEMENT.
$$-End: (2 )----
$$
ENDFORM.
pls check