cancel
Showing results for 
Search instead for 
Did you mean: 

Split delivery based on quantity in Scheduling Agreement

jitendra_it
Active Contributor
0 Kudos

Hello ,

i have got a requirement in which delivery should be split based on the quantity in scheduling agreement.

In VL10 transaction , we got scheduling agreement .

Now  we have to Background option to split delivery based on qty.

I searched a lot and got threads saying VOFM routines. Could you please guide me.

Many Thanks,

Jitendra

Accepted Solutions (0)

Answers (1)

Answers (1)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Please, see these notes for this FAQ

SAP Note 166397 - Delivery split according to customer field ZUKRL

SAP Note 355404 - Why was there a delivery split during creation?

SAP Note 546668 - FAQ: Delivery split when creating deliveries

SAP Note 386340 - Grouping purchase orders into one delivery using Vl10*

For your requirement, you'll need to create your own VOFM, so, see Note 327220 - VOFM function and its objects

and related notes

I hope this helps you

Regards

Eduardo

jitendra_it
Active Contributor
0 Kudos

Hello Eduardo,

Thanks for reply.

Could you tell me where i have to maintain my routine number created.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

Go to tcode VOFM, data transfer / deliveries, and use other VOFM as a template (use note 327220 and related as a checklist). For instance, use 201 as the template, in the end of subroutine you have this coding

* Split criteria
* likp-zukrl = ...

You can do as this for routine 900 for instance,

PERFORM daten_kopieren_201.

LIKP-ZUKRL = your_data.

After, go to copy rules, and set it for the relevant items in VTLA

and in item data, set your customer VOFM.

I hope this helps you

Regards

Eduardo

jitendra_it
Active Contributor
0 Kudos

Hello Eduardo ,

Tried with that  but its not splitting delivery.

I have done below code :

DATA : lv_qty TYPE LFIMG.

CLEAR:  lv_qty.

lv_qty = '50'.

LOOP at cvbap.

if cvbap-kwmeng > lv_qty .

CONCATENATE likp-zukrl 'X' INTO likp-zukrl.

endif.

ENDLOOP.

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

No, please, check SAP Note 192558 - Template for invoice split with a maximum amount per invoice and the VOFM 906 as a template. Change amount by quantity, and vbrk-zukri by likp-zukrl.

One problem is that amount is an homogeneous magnitude but quantity could be a mix of different materials and with different unit of measures.

So, write a proposal of coding using the coding from this note as a template (if you don't know ABAP, look for an ABAPer and fit it with debugging sessions) and changing the values of VBRK by LIKP and so on.

I hope this helps you

Regards

Eduardo

jitendra_it
Active Contributor
0 Kudos

Hello Eduardo,

Thanks for your support.

I tried with routine 906 and did the same which is done for China Invoice Split but for me the problem is parameters in  ZUK906 structure. For invoice there are parameters VGBRL & BILLNO which can be set based on the logic but for delivery i didnt see any.

In fact i tried with split_qty type char1 but it didnt work for me.

See my code :

DATA: BEGIN OF ZUK906,

       MODUL(3) VALUE '906',

       VTWEG  LIKE VBAK-VTWEG,

       SPART  LIKE VBAK-SPART,

       split_qty like char1,

       END OF ZUK906.

DATA: lv_Split_qty like likp-LFIMG.

     CLEAR : lv_Split_qty.

    

     lv_Split_qty = 5.

     if lips-LFIMG > 5.

     lips-LFIMG = 5.

     ZUK906-VTWEG = VBAK-VTWEG.

     ZUK906-SPART = VBAK-SPART.

     ZUK906-split_qty = 'X'.

     LIPS-ZUKRL = ZUK906.

     ENDIF.

Can you suggest me where I am doing wrong.

Many Thanks,

Jitendra

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

For VGBEL you can refer to LIPS-VGBEL (sales order or purchase order in the case of STO or subcontracting process).

BILLNO or perhaps better DELNO (and LAST_DEL_NO instead LAST_BILL_NO) works as a kind of counter. So, when it achieves some amount (or quantity) it increases, so, the concatenation in ZUK becomes different and it triggers the splitting. Be careful than ZUK* won't be higher than 40 characters (see the definition of ZUKRL in the dictionary).

Regards

Eduardo

jitendra_it
Active Contributor
0 Kudos

Hello Eduardo,

Do you have any document which descries overall splitting process.

I want to check the whole process. I mean after assigning value to ZUKRL how control flow to delivery split and is all this processing is happening inside a loop and so on.

I am eagerly looking for such document.

Many Thanks,

Jitendra

eduardo_hinojosa
Active Contributor
0 Kudos

Hi

No, usually I set a break point in the VOFM and with a debugging session I check it after it is triggered. After, I try to check how to populate table LIKP until SAP get the number ID (usually with function module NUMBER_GET_NEXT). The trouble is populate this fiels (ZUKRL, ZUKRI) and check it works.

Other idea is look for notes for program error or special development for string 'ZUKRL', with its help you can research useful reports for your purpose. You can find also other templates for VOFM or the notes where some standard VOFM were created.

I hope this helps you

Regards

Eduardo