Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Add a line item automatically in sales order during save

Former Member
0 Kudos

Hello,

I'm trying to add a line item in an order during saving (USER EXIT DOCUMENT SAVE PREPARE) by inputting only the material code into XVBAP structure.

However, the other fields in the said structure are not automatically filled up as when for example you manually enter a material code into the sales order line item.

Is there a way we can alternatively do this or better yet, an easier way to do this?

thanks!

Edited by: Jimmy Bondoc on Jul 28, 2008 9:05 PM

3 REPLIES 3

former_member188685
Active Contributor
0 Kudos

You need to fill the following...

XVBAP-MATNR

XVBAP-KWMENG

XVBAP-POSNR <== increase the one sequence if items are 10,20, then make it to 30,

XVBAP-UPDKZ = 'I'. <== For new line Item

first try the above , if it is not working then

populate some other internal table records for tables like XVBEP etc..

you need populate extra item otherwise it will lead to Run time error.

0 Kudos

Hello Vijay,

Unfortunately, you're recommendation did not work. Any other ideas?

Thanks by the way

Edited by: Jimmy Bondoc on Jul 28, 2008 9:40 PM

0 Kudos

HI Jimmy

Did you get the solution for your question?I have a same requirement of adding so item.

It is possible to send me your methode for make it.

thank very much!

Best Regards.

maserati