cancel
Showing results for 
Search instead for 
Did you mean: 

Additional splitting criteria

andrea_brusarestelletti
Active Contributor
0 Kudos

Hello,

I need to use two custom fields as splitting criteria during delivery creation from Sales Order and during invoice creation from delivery: as fields ZUKRL and ZUKRI, provided for this aim, are already almost completely full, I need an additional way to achieve this.

Does anybody know of there is a user-exit or a routine, or something else, where I can carry out changes to make the program behave with my custom fields in the same way as it happens with ZUKRL and ZUKRI?

Thanks in advance.

Best regards,

Andrea

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Andrea,

You have the combination criteria flag set (KNVV-KZAZU) which

is driving the combination of the sales documents into one delivery.

You should be able to get the result you are looking for by using your

own data transfer routine (VOFM) If you look at routine FV50C001 you can

see that there is a combination criteria field in the delivery header

(LIKP-ZUKRL) in this routine it is filled with the distribution channel

and division, you could use the sales order number too to get the split

you are looking for in your own routine for example.

kind regards,

Ramana

Answers (2)

Answers (2)

RBM
Active Participant
0 Kudos

Hi,

Check up the transaction VTFL for your Billing type and delivery type / Item category... Check up the field Data VBRK/VBRP... there u can see the split routine used...

Also you could read SAP Note 11162 - Invoice split criteria in billing document for more info.

Hope this helps!

Regards!

Former Member
0 Kudos

Hi,

Giving below an example of splitting based on the Item category.

In trx VTFA (if your billing is sales order based) choose your billing type and SO type, there select your item categories and there select the field VBRK/VBRP data. In that field you will see the currently used routine. With the help of your ABAP guy 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,

PSTYV LIKE VBAP-PSTYV, <- New line

END OF ZUK.

ZUK-SPART = VBAK-SPART.

ZUK-VTWEG = VBAK-VTWEG.

ZUK-PSTYV = VBAP-PSTYV. <- New line

VBRK-ZUKRI = ZUK.

ENDFORM.

Like wise incorporate your fields which you intend to do the splitting.

Regards,

Saju.S