Skip to Content
Nov 21, 2006 at 11:57 AM

Add a new line item in VA01/VA02 using user exits.


Hi Experts,

I have a problem regarding adding of line items in VA01/VA02. I was able to add a line item but my problem is, there is no validation for the added line. I want SAP to validate it before posting it to database. I'm using USEREXIT_SAVE_DOCUMENT_PREPARE for this one.

I also found out from other threads, that adding line items in XVBAP is not advisable since no checking will be done after USEREXIT_SAVE_DOCUMENT_PREPARE.

I'm thinking if I can use FM DYNP_VALUES_UPDATE on one of the user exits to add a line item in VA01/VA02 and let SAP do the checking and validation. This way, I'm sure that the added line is correct and data integrity will be maintained.

Do you have any comments/suggestions about this?

Thanks a lot,