‎2009 May 20 10:34 AM
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.
‎2009 May 20 11:26 AM
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
‎2009 May 26 4:59 AM
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.