Skip to Content
0
Former Member
Sep 12, 2013 at 06:56 AM

Invoice split per MAX line items working - can we change Item no

211 Views

Hi,

We have requirement to split the invoices depending upon the line items available in Sales order.

We have validated the Max no of lines items as 5. If it exceeds then it will create new Invoice.

Ex :

If the Sales Order have 16 line items then it will create 4 Invoices.

4 Invoices with 5 line items and 1 Invoice with 1 Line item.

We have implemented the logic in Form Routine.

Issue :

Invoice split is good but issue is with Line items (POSNR).

First Invoice - It will display ITEM's 10, 20, 30, 40 , 50

Second Invoice - It is displaying : 60, 70, 80, 90, 100

Third Invoice : 110, 120, 130, 140, 150

Fourth Invoice : 160

Can we change the Item Numbers as below : ?

First Invoice - It will display ITEM's 10, 20, 30, 40 , 50

Second Invoice - It is displaying : 10, 20, 30, 40 , 50

Third Invoice : 10, 20, 30, 40 , 50

Fourth Invoice : 10

For noe I am using the below structure to split the invoice

DATA: BEGIN OF zuk,

vtweg LIKE vbak-vtweg,

spart LIKE vbak-spart,

vgbel LIKE vbrp-vgbel,

billno LIKE tvko-maxbi,

END OF zuk.

Any suggestions, if we can change the line item numbers ?

Best Regards,

Kittu