cancel
Showing results for 
Search instead for 
Did you mean: 

Condition type has to executed only when other condition type is availabl

0 Kudos

Scenario: We have two freight condition types YHD1 & YHD6. This YHD6 condition type is a Percentage type calculation and dependent of YHD1 value, for example

YHD1: 30 EUR then the condition value is 30 EUR

YHD6: 10 % then the condition value is 3 EUR

Issue: YHD6 is fetched from Condition records at the time of delivery document, where as YHD1 condition type is inserted into the delivery document through a BDC program in a custom program. BDC program is written in such a way that YHD1 condition record is applied on the first line. This custom program is supposed to execute only after PGI is done for delivery and shipment is created.

Since, YHD6 is fetched from Condition records; this condition is applied when the delivery document is created. And when this custom program is executed, system is looking to insert YHD1 condition on first line, but YHD6 is already exists this step is unsuccessful.

Requirement: is it possible to determine YHD6 condition only when YHD1 is available in the document. I mean, YHD1 condition type has to be executed first and then YHD6.

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member209761
Active Contributor
0 Kudos

Dear Sridhar,

As per my understanding of the issue, you can solve the same by creating a routine (Requirement) in VOFM and assigning the same against YHD6 in the pricing procedure.

Logic for the same will be calculate YHD6 only if the other condition type (YHD1) is having a value.

Please discuss with your ABAP-er and it can be solved with this requirement routine.

Check and revert back.

Thanks & Regards,

Hegal K Charles

0 Kudos

Hi All,

Thanks for repling to my query.

I will explore the opition of developing a Routine to restrict YHD6 condition type. But i have one doubt, suppose i have assigned a routine to YHD6 condition type and when delivery document is created, system fetches the YHD6 condition from the condition record, but due to this routine it will restrict to update the value.

But when i update the delivery document with YHD1 condtion through custom program, NOW, does the system calls YHD6 again so that now the requirement is fullfilled or do i need to update the Pricing again after YHD1..

I kindly reqeust you to clarify my doubt, however, i will take up this with my ABAPer and develop a routine.

Thanks in advance.

Warm Regards,

Sridahr

Former Member
0 Kudos

Hi Sridhar,

It won't re-price automatically and that's what makes your scenario even more difficult and thus my original suggestion..

Regards,

Raghu.

Former Member
0 Kudos

Dear,

First you pass YHD6 condition while creating delivery. It will calculate its value = 0 cos yet this time YHD1 is not determined.

Now when you pass the YHD1 from your BDC program, after passing the YHD1 just carry out new pricing for the delivery document. You can do this manually (if possible) or through user exit also.

Hope this will help you...

Thanks,

Tarpan

former_member209761
Active Contributor
0 Kudos

Dear sridhar b ,

YHD1 is passed by CUSTOM PROGRAM and YHD6 should come only if YHD1 is present in the conditions tab.

If this is your requirement, please follow the routine concept.

Make a requirement routine and assign it to YHD6 (logic should be : consider the YHD6 condition record for calculation if there is YHD1, if no YHD1 then maintain YHD6 as 0 % so that it doesnt affect the other values)

Hence if YHD1 is there , YHD6 % will be considered for calculation,

If YHD1 ia not there, YHD6 % will be zero and hence it wont be affected.

Thanks & Regards,

Hegal K Charles

Former Member
0 Kudos

Try this: In your pricing procedure add a subtotal like 'E' on the condition type YHD1 in transaction V/08. Then in a requirement routine for YHD6 add some logic to check XWERKE > 0. Therefore YHD6 will only get activated if requirement YHD1 exists.

Hope this helps.

Matt

0 Kudos

Dear All,

Thanks for your suggestions and replies.

I cannot update the YHD6 conditon through BDC program because this value comes from the condition records and some sales organization may or may not require this condition. If i update this condition (YHD6) through BDC it will work Globally.

I am thinking of the option Condition supplement, but i am not aware how to configure this functionality, can any body help me in this regard.

Thanks & Warm Regards,

Sridhar

Former Member
0 Kudos

Is it possibel for you to maintain condition record for both condition types?

PhaniKalvagunta
Contributor
0 Kudos

Dear Sridhar,

As you said, you may meet this using condition supplement.Please check the link below which provides all the details regarding condition supplements.

[Condition Supplement.|;

Regards

Phani Prasad

Former Member
0 Kudos

Hi,

It is better to update both the conditions through BDC only. You can mark both the conditions as manual conditions and update them with condition values.

Hope this helps.

Regards,

Sharan

Former Member
0 Kudos

Hi,

if YDH6 is dependent on YDH1, then why not update it also via BDC ?

Regards,

Raghu.

Former Member
0 Kudos

Dear Sridhar,

After gone through your issue i am feeling that this will not map in the SAP standard procedure,you have to go for the development to meet the requirement.

Regards

Ram