Skip to Content
May 20, 2014 at 12:21 PM

Sales to Billing Invoice Creation with Split that Shouldn't Occur


Good Morning,

First of all, let me tell you i've started doing some ABAP development last week, so i have a lot of things to yet understand.

I received a request to implement a change in the creation of a billing document.


I have a order - Order 132098723 - with the following header data:

VBAK-VBELN = 0132098723






VBAK-KNUMV = 0000223615


VBAK-KUNNR = 0010135306

VBAK-TAXK1 = <empty>

VBAK-TAXK2 = <empty>

VBAK-TAXK3 = <empty>

VBAK-TAXK4 = <empty>

VBAK-TAXK5 = <empty>

VBAK-STCEG_L = <empty>

VBAK-LANDTX = <empty>

The items for this Order - Order 132098723 are:

Item Material Order Quantity Un Description ItCa ... 10 0,000 ZATX 20 1400008183 1 UN <Description> ZTAS

I have a delivery - Delivery 811128713 - with the following header data:

LIKP-VBELN = 0811128713


LIKP-KUNNR = 0000223615


The items for this Delivery - Delivery 811128713 are:

Item Material
Delivery. Qty Un
Description ItCa
10 1400008183 1 UN <Description> ZTAS

A copy control was created in transaction VTFA - Sales to Billing Document:


Tgt Billing Type Source SalesDoc Type

ZF3 Invoice ZCV Standard Order

Copy Requirements 001 Header/order-related

Determ.export data <empty>

Assignment Number E

Reference number A

Copy item number checked


Target Billing Type ZF3 Invoice

From SalesDoc Type ZCV Standard Order

ItmCt Description

TAD Invoice

ZATX Text Item

ZSCV <Description>

ZTAD <Description>

Step by Step of the process:

I call transaction VF01 and i input two docs to be processed:

132098723 - Order

811128713 - Delivery

Before i Execute i will do a Billing Document Overview (F5) and in the Billing Document Overview two invoices are generated:

Invoice - <Name> - <Net_Value>

Invoice - <Name> -<Net_Value>


INSTEAD OF TWO INVOICES, ONLY ONE INVOICE SHOULD BE GENERATED. When i do a split analysis the system informs me that the reason for the split is happening because of different header data:

Fld Name
$000000001 $000000002 Tax classification 1 for customer (TAXK1) 1 Tax classification 2 for customer (TAXK2) 1 Tax classification 3 for customer (TAXK3) 1 Tax Classification 4 Customer (TAXK4) 1 Tax classification 5 for customer (TAXK5) 0 Tax departure country PT

I've spoken with my colleague who requested the correction of this and he told me that what he wants is that, in this case, only one invoice should be created.

He also told me that in this case only happens when a item with category ZATX exists in the Order (in this case item category ZATX exists in the first item of Order 132098723).

Debugging, i've found out that the reason for the split is that in program SAPLV60A, in include LV60AA95, form VBRK_VBRP_DATENTRANSPORT, the VBRK-TAXK* values are populated with values from KURGV-TAXK* and VBRK-STCEG_L is populated with values from KURGV-LAND1 or KURGV-STCEG_L (conditional). The problem is that the program goes through the section of code where KURGV is changed twice (as far as i've understood it's related with the fact that there are two items in the Order 1320987239 and on the first pass the KURGV-TAXK* and KURGV-LAND1 are empty, and in the second they have values and i think that's why the split occurs.

I'm also attaching a document with screenshots of the debug which i think they can help.

Please let me know if you need specific information.

Can you please help me in finding how can i prevent this split to occur?

All help is welcome 😊

Best Regards,

Pedro Gaspar


11 - Debug 02.png (246.9 kB)
10 - Debug 01.png (230.7 kB)