cancel
Showing results for 
Search instead for 
Did you mean: 

Invoice split based on number of delivery items

former_member242512
Participant
0 Kudos

Hi All

Im not very familier with routines .

We have requirement to split an invoice based on number of items in delivery when it goes beyond say 10 items.

Please let me know how can this can be implemented using any particular routine or any other solution.

Once we got particular rotuine we have to place proper code to split this invoice.

Thanks in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member242512
Participant
0 Kudos

Hi All

On using the routine , i made some chnages in the routine and activated the program. some code has got grey out and im unable to delete. The code is dummy and unncessary so want to remove it completely from the routine. Kindly suggest how can i remove it.

Former Member
0 Kudos

Hi Ujj

You can also look into using User Exit for the Same and restricting users for 10 Line Items in Sales Order .

   For this you can user exit "USEREXIT_SAVE_DOCUMENT_PREPARE " . Logic can be given to abap consultant to count Number of Items in Sales Order  just before saving the document .

   User will not be allowed to enter more than 10 line items if they do so System will throw an Error message and will not allow to Save the Document.

Hope this caters your requirement .

Lakshmipathi
Active Contributor
0 Kudos

In IMG, you can set the maximum line items per billing document and the menu path is SD > Billing -> Billing Docs -> Country specific features

G. Lakshmipathi

former_member242512
Participant
0 Kudos

Thanks for replying. Sorry i forgot to mention it is for particular billing type .

The coutry specific features will fix it for all invoices . Any solutions through routines.

Lakshmipathi
Active Contributor
0 Kudos

In that case, you can add this logic to your existing routine assigned in copy control VTFL for the field Data VBRK/VBRP at item level.  If the routine is standard, then you have to create a new routine in VOFM and assign to this field.  Dont make any coding changes in standard routine.  Alternatively, you can include this logic in USEREXIT_NUMBER_RANGE (Module pool SAPLV60A, program RV60AFZZ)

G. Lakshmipathi

former_member242512
Participant
0 Kudos

Thanks Lakshmipathi for your kind reply.

I'm not knowing more how to implement this logic ,can you please tell me which include i should use ? I have customers exits before , can you please elaborate more or some helpful steps.

Lakshmipathi
Active Contributor
0 Kudos

As I said already, you can add the logic in your existing routine assigned in VTFL with the help of ABAPer, if it is a customized routine.  On the other hand, you can either try with the user exit which has already been suggested by me or USEREXIT_FILL_VBRK_VBRP (Module pool SAPLV60A, program RV60AFZC).

G. Lakshmipathi