cancel
Showing results for 
Search instead for 
Did you mean: 

About billing split by quantity ,Source code

Former Member
0 Kudos
97

Hello all,

Does anyone know if its possible to split the billing document by quantity on the item.

I was only able to find split by items but nothing related to quantity.

If it is available , i want to see the Source code

In copy control VTFL you need to maintain the field named VBRK-VBRP as "XXX" (invoice split) at item level.

Thank you in advance.

[For example Source]

DATA: BEGIN OF ZUK, 

MODUL(3) VALUE '001', 

VTWEG LIKE VBAK-VTWEG,

SPART LIKE VBAK-SPART,      

ABTNR LIKE LIPS-ABTNR,   

EMPST LIKE LIPS-EMPST,    

END OF ZUK.   

ZUK-SPART = VBAK-SPART.  

ZUK-VTWEG = VBAK-VTWEG. 

ZUK-ABTNR = LIPS-ABTNR.  

ZUK-EMPST = LIPS-EMPST.

VBRK-ZUKRI = ZUK.

ENDFORM.

Accepted Solutions (0)

Answers (1)

Answers (1)

JanarthananE
Contributor
0 Kudos

Hi,

As you wrote the code just do some modification you can get the solution for your requirement.

This is how it should look after modification:

  

   

  • 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,

field LIKE VBAP-field,    <- New line  Here you add the field for Quantity

END OF ZUK.

ZUK-SPART = VBAK-SPART.

ZUK-VTWEG = VBAK-VTWEG.

ZUK-field = VBAP-field.   <- New line Here you add the field for Quantity

VBRK-ZUKRI = ZUK.

ENDFORM.

After this routine is created and activated place it as the default copy control routine instead of the old ones.

Hope its useful to u,

Regards

Jana