SAP Sales and Distribution
Visitor : 39
In standard system , single invoice document will be generated if the following field are matching
4.Actual GI date
6.Billing date and billing due date
7.Billing doc type
8.Foreign data trade
9. Sold to party
If the buisnes requirement is to have other criteria for splitting then those fields are to incorported in copy control.
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.
You can also build a single variable with different values and pass it to VBRK-ZUKRI , instead of using the approach above.
The change neeeds to be in Copy routine of Data : VBRK/VBRP at the item category Level.
2. For consolidation of invoices , whatever is the difference in the header needs to be cleared in the routine as per SAP note: 11162
FORM DATEN_KOPIEREN_901. " Clear assignment number , Distribution channel and Division clear VBRK-SPART. CLEAR: vbrk-ZUONR , vbrk-VTWEG. ENDFORM.