cancel
Showing results for 
Search instead for 
Did you mean: 

Routine fails but the condition record is picked up

Former Member
0 Kudos

Hi,

I have a situation here. Where in we have a condition type for customer specific discounts that ZDSP. Now there is requirement routine attached to the condition type. The funny thing is when I look at the analysis. I see that the condition had been ignored. Which is correct as the requirement was not fulfilled. But then after thay it shows that it continued to find the condition record and fetched it. This lead to the discount being applied.

My question is when the requirement was not fulfilled the system ofcourse through a message 111 stating ''Condition ignored (requirement 939 not fulfilled)'. But then why does it proicees to find the condition record and apply the discount.

Any help would be really appreciated.

Regards,

Imran.

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hii Mujtaba Imran,

I am sure that either your routine is wrong or you have any relative routine written in Alternative Condition Type.

Thanks and Regards,

Santanu

Former Member
0 Kudos

Hi,

I debugged the code and found out the there is problem in the 'compare_komp' method. This method;s output for the recalculation type is 'A'. Where as what I really want is 'C'. When I change the recalculation type to 'C' in debugging the pricing is done perfectly i.e. the discount are not calculated.

I guess it is some kind of a customization where the fields from the KOMP structure are compared.

Regards,

Imran.

former_member182378
Active Contributor
0 Kudos

Hi Imran,

What field do you mean by "recalculation type"? (is it Calculation type in V/06?)

Please explain the change you made and how it solved the situation.

Former Member
0 Kudos

No, it is the 'Pricing type'. It is not the one in the condition type. I am pasting part of the code which is causing the problem.

*-- compare old <-> new

check <lv_value_old> ne <lv_value_new>.

*-- change on field -> set pricing type to C

cv_knprs = lcv_knprs_c.

In this code for the pricing procedure (KALSM), the system is trying to get the KOMP fields to compare. Below is the list of fields it brings to compare.

QUSTR QUFNA

KOMP /DBM/LABVAL

KOMP KONDM

KOMP PMATN

KOMP USR00

Now it checks if the old KOMP values match with the new KOMP values.

I guess, what I have to do is add one more field ZZJBTYP to this list and things should fall in place.

The problem is I do not know where this customization is to be done. I need some help here friends.

Regards,

Imran.

former_member182378
Active Contributor
0 Kudos

I think you should go for D (Copy pricing element unchanged) & NOT C (copy manual pricing and redetermine others)

So, basically -

You created sales ord, pricing was OK

Then when you created bill, the pricing was NOT Ok, because of "Pricing type" in copy control.

Is that correct?

Even if system used A (copy price components and redetermine scales), the pricing should be correct. Why was it NOT?

Can you explain the functional requirement of your condition type (dis to cust)?

Thanks!

former_member182378
Active Contributor
0 Kudos

In VA02, item level, Tab Conditions> Analysis -

When you say "system still fetches it", What does "Analysis" exactly say? in another line, "condition record found" or......

Have you created 2 condition types, one with requirement & another without requirement?

Former Member
0 Kudos

Hi,

Check if any Alt Calc type is specified or any condition record is maintained for you discount condition.

Ask your ABAPer to check the requirement routine to check if the criteria is not fulfilled has sy-subrc been set to 0.

Regards,

Amit

Former Member
0 Kudos

Check with ABAP why system is picking the condition record,may be in change in order may igonring the routine.