Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Split Billing document based on the Delivery Document Quantity.

Former Member
0 Likes
505

Dear Friends,

I want to split Billing document based on the Delivery Document Quantity. For ex. If I am having a delivery document with 2 line items with 2 quantity each, then I should create 2+2 = 4 Billing documents.

I have checked routine no 006, but it is working based on the line items of Delivery.

Looking forward for your valuable suggestions.

Thanks and Best Regards,

Hari.

2 REPLIES 2
Read only

former_member609120
Contributor
0 Likes
414

In transaction VTFA (if your billing is sales order based) choose your billing type and SO type

Select the item categories , select the field VBRK/VBRP data. In that field you will see the currently used routine. You can create a copy of that routine under a different number and add your lines of code. Let's say you use routine 001.

FORM DATEN_KOPIEREN_001.

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

END OF ZUK.

ZUK-SPART = VBAK-SPART.

ZUK-VTWEG = VBAK-VTWEG.

VBRK-ZUKRI = ZUK.

ENDFORM.

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.

Thanks and Regards

Vanessa

Read only

Former Member
0 Likes
414

Hi Vanessa ,

I have tried this method, but its not satisfying my requirement. I want to split the Invoice based on Delivery quantity.

By using this method also, I am not able to split.

Thanks for your reply. Looking forward for for some suggestions.

Regards,

Hari.