cancel
Showing results for 
Search instead for 
Did you mean: 

Freight condition for Batch split items in delivery

Former Member
0 Kudos

Hello Experts:

We have a situation in which the freight is calculated in a third party software and is being

fed in via header at the delivery level.

When we have a batch split, the freight conditon type ZFRT has condition values at header level

in delivery, but at the the sub item level only 900003 subitem has the condition value and hence when

invoice is generated, the ZFRT conditon value comes out to be 0. Pls let me know how I can fix this.

Thanks,

Ray

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ray,

Are you able solve it?

shashi_thakur
Contributor
0 Kudos

Hi Ray,

Can you provide some more details on how the condition value is being fed from the Header. Is it through a BAPI or Idoc or?

Regards,

Shashi Thakur

Former Member
0 Kudos

Hi Shashi,

The company is using ERPis to calculate freight and it is passed onto the ZFRT header condition via a web service.

The issue is the conditon value does not get copied to the main item or the first 2 batch split items. It only gets copied to the third batch split item(As marked in the screenshot).

Hence, it is not further copied into the billing document. So the freight charges at the invoice

are 0.0

Thanks,

Ray.

shashi_thakur
Contributor
0 Kudos

Hi Ray,

Can you confirm if the Header Condition and Group Condition is marked in the configuration of the condition type ZFRT or not?.

Regards,

Shashi Thakur

Former Member
0 Kudos

Yes Shashi.

Header Condition, Item Condition, Group Condition are all marked in ZFRT condition type.

Thanks,

Ray.

Shiva_Ram
Active Contributor
0 Kudos

Check the copy control settings from delivery to billing (t.code VTFL). Go to item level and check the value assigned in the field Billing quantity. Try to maintain value G and check the results.

Regards,

shashi_thakur
Contributor
0 Kudos

Hi Ray,

Thanks for the reply. I believe you are using the Pricing within the Delivery. If the configuration is fine, then I believe the issue is with the code which is getting triggered through the code. Is it possible for you to share the code. I would like to see the basis on which the structure which contains the line items are getting selected.

Regards,

Shashi Thakur

Former Member
0 Kudos

Hi Shiva,

We have already assigned a "G" for Billing Quantity at the relevant item and sub item copy control.

The problem is before that. Its in the delivery itself. The "condition value" is not distributed/copied from header of the delivery to main item and all batch split items, except

the last one. The last batch split item has the values from the header ZFRT condition.

Thanks,

Ray.

Shiva_Ram
Active Contributor
0 Kudos

Thanks for the clarification, you can refer OSS  1921287 - Pricing with scale conditions in delivery with batch split

, which is similar to scenario. Discuss with an ABAP'er on the use of the BADI - BADI LE_SHP_PRICING to change the system behavior. Using this, the system can be made to consider field KCMENG to calculate the pricing.

Regards,

Former Member
0 Kudos

Hi Shashi,

I am a functional consultant. I dont have access to the relevant code and not sure where

to find it. Is there a configuration solution for this?

Thanks,

Ray.

shashi_thakur
Contributor
0 Kudos

Hi Ray,

You will have to get the details of the Proxy or RFC FM which is being used to update the Delivery from the Development team. I believe the pricing is being applied in the code forcibly by finding the last item. If that is indeed the case then the logic should be changed to apply it at the main item level so that it gets distributed based on the configuration of the condition type.

Regards,

Shashi Thakur

Former Member
0 Kudos

Shashi-  The ZFRT condition type is passed on to the header in delivery and it is supposed

to distribute among the items. What it does is that main item and batch split items dont get the condition value for ZFRT. Only the last batch split item gets the complete value copied from the header condition.

I read in another forum that someone had a similar problem with batch split item. So I think this is standard SAP behavior in delivery in batch split items.

Thanks,

Ray.

Former Member
0 Kudos

Hi Shashi,

We have decided on a programming solution to add up all the batch split items in deilvery and place the figure in the main item in delivery. Can you pls guide me as to where to put this code and what userexit to use.

Thanks,

Ray.

shashi_thakur
Contributor
0 Kudos

Hi Ray,

Try this. Add a VOFM routine in the Pricing procedure in the Reqt Column for the Freight Condition. Add the following code in it.

(Here XXX will be the routine number)

form kobed_XXX.

  sy-subrc = 4.

  if komp-kposn LE '900000'.

    sy-subrc = 0.

  endif.

endform.

* Prestep

form kobev_XXX.

  sy-subrc = 0.

endform.

This should ensure that the condition type is not determined in the sub-item.

Once this is done, we will have to test to see if the Main item gets the Freight value or not, if it does not get a value, then we will have to add a Base Value routine to it in the Pricing procedure.

Regards,

Shashi Thakur

Former Member
0 Kudos

Hi Shashi,

In our situation, in Delivery,  we are looking to add up the ZFRT conditon values from batch split items and place it in ZFRT conditon value for the main item. Can you pls tell me what userexit to use and what logic should I provide to the ABAPer.

Thanks,

Ray.

Shiva_Ram
Active Contributor
0 Kudos

Did you try the BADI I proposed earlier?

Regards,

Former Member
0 Kudos

Hi Shiva,

At that time we were contemplating another solution, but I will ask the ABAPer again if this is feasible.

Again, the shipping costs are calculated externally through ShipERP and are placing the value in ZFRT conditon in header in delivery. There is no calculation performed internally. The header condition is not able to pass it on to the main item. Only 1 batch split item has ZFRT condition value and the rest of batch split items do not have ZFRT conditon value.

So we have decided to add ZFRT in all batch split items and place that in main item ZFRT condition value so it can be passed on to invoice. Hence, I am looking for a user exit/ BADI and some explaination as to how to accomplish this. So that I can explain the ABAPer.

Thanks for your help.

Ray.