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: 

Generate Invoice number automatically

0 Kudos
387

Hello,

I created a module pool to generate invoice order using table control.

My requirement is

For single invoice number there may be n number if items.

How this can be obtained? Please help me out!

I tried with SNRO,which is creating unique invoice number for each items,which has no logic.

Below I Have attached my table control screen shot.

3 REPLIES 3

Former Member
0 Kudos
217

I would feed the input into a BAPI or BDC.

Neal

former_member188827
Active Contributor
0 Kudos
217

On submit, you can call bapi "BAPI_BILLINGDOC_CREATEFROMDATA". If your screen contains records for multiple invoices at same time, you would require a reference field which would hold same value for all items of one invoice. This way, you will be able to combine line items that pertain to single invoice and pass them to BAPI. If however, your screen contains all line items for a single invoice at one point in time, you can simply call the BAPI and pass data to it.

Regards

arnab_das5
Explorer
0 Kudos
217

Hi ,

   I faced the same situation earlier in my proj , plz go with BAPI that will update perticular table as well as correspondence table.

Regards

Arnab