Skip to Content
0
Dec 27, 2011 at 11:44 AM

Abnormal Invoice split due to unknown reason

29 Views

Dear Gurus

We are facing problem in billing document creation. We are using routine 007 for invoice splitting in copying control from delivery document to billing document at line item level. This is standard routine and we have added MATKL in it. For your reference I am copying whole coding of this routine which we are using. The problem is that we changed this routine at start of 2011 by adding MATKL in it. Everything worked fine and still working fine but in some cases system is splitting invoices due to unknown reason in PRD server. I have tested with same parameters in DEV and system responded in normal way but in PRD in some cases system is creating 100/100 invoices for one delivery order. When I checked the DO and sale orders i found nothing was different on DEV and PRD. The points i want to share are

If we create sale order of 100 quantity of same division, distribution channel and material group (Warranty batch and department fields are always empty in our case.) system created 50 invoices with two quantity each.

We are using batch split and in every invoice there is one line item with zero quantity and it is working fine from last 3 years.

I am checking this from last many days but couldn't found any solution. Any suggestions and helping remarks will be highly appreciated.

----


  • Data transfer for delivery related billing *

----


----


  • FORM DATEN_KOPIEREN_007 *

----


  • ---> VBAK Order Header KUAGV View Sold-to *

  • VBAP Order item KURGV View Payer *

  • VBKD Business data order KUREV View Bill-to *

  • LIKP Delivery Header KUWEV View Ship-to *

  • LIPS Delivery item *

----


FORM DATEN_KOPIEREN_007 .

  • Header data

  • VBRK-xxxxx = ............

  • Item data

  • VBRP-xxxxx = ............

  • Additional split criteria

DATA: BEGIN OF ZUK,

MODUL(3) VALUE '001',

VTWEG LIKE VBAK-VTWEG,

SPART LIKE VBAK-SPART,

ABTNR LIKE LIPS-ABTNR,

EMPST LIKE LIPS-EMPST,

*{ INSERT DEVK910431 2

MATKL LIKE VBAP-MATKL,

*} INSERT

END OF ZUK.

ZUK-SPART = VBAK-SPART.

ZUK-VTWEG = VBAK-VTWEG.

ZUK-ABTNR = LIPS-ABTNR.

ZUK-EMPST = LIPS-EMPST.

*{ INSERT DEVK910431 1

ZUK-MATKL = VBAP-MATKL.

CONDENSE zuk NO-GAPS.

*} INSERT

VBRK-ZUKRI = ZUK.

ENDFORM.