cancel
Showing results for 
Search instead for 
Did you mean: 

How to set one condition type active and inactive another automatically?

Former Member
0 Kudos

Hi all expert,

Problem:

I want to config a condition type, which will be inactive when another condition type active.

I've tried the exclusion condition, but I just want to have my own priorty, which not choose by the system.

For e.g

Condition type:

ZPXX

ZPX2

ZPXX wil inactive if the ZPX2 exist, which retrieve from price table.

and ZPX2 is calculated by routine 909.

I've tried using the Requiement routine to check the subtotal field XWORKD, to determine whether ZPXX have value, then inactive (sy-subrc = 4.) the ZPX2.

But it fail, the XWORKD does not have value when the pricing procedure start.

Anyone can help?

Terry

Accepted Solutions (1)

Accepted Solutions (1)

reazuddin_md
Active Contributor
0 Kudos

Check, whether Condition Exclusion Group may satisfy your requirement?

Condition exclusion Group- works based on calculation such as "Most/Least favourable condition between the conditions/condition records"

Its std feature of SAP in pricing procedure, but very few clients use this.

Regards,

Reazuddin MD

Former Member
0 Kudos

Hi Reazuddin MD ,

I've already checked the exclusion condition, but it cannot satisfy my requirement,

I don't want the system calculate which is most appropriate. I want to force it to deactivate once the upper one active.

I've tried coding using requirement routine, but just want to know where can check it.

I've tried the following after the ZPXX, ZPX2 sequence.

LOOP AT XKOMV.

IF KSCHL = 'ZPXX' AND XKWERT is not initial.

ZFOUND = '1'.

EXIT.

ENDIF.

ENDLOOP.

IF ZFOUND = '1'.

LOOP AT XKOMV.

IF KSCHL = 'ZPX2'.

XKOMV-KINAK = 'X'.

MODIFY XKOMV TRANSPORTING KINAK.

EXIT.

ENDIF.

ENDLOOP.

ENDIF.

The above code is work but it will mess up the price procedure coz it Loop the XKOMV.

Terry

Edited by: Kin Hang, Terry NGAI on Nov 18, 2010 2:34 PM

Former Member
0 Kudos

Hi

Another idea, slightly similar to what you tried ealier.

Would it be OK if you would have second condition active but it would have value zero if the first condition exists ?

If that is acceptable, then try storing first condition in a subtotal (XWORKD or similar). Use condition base formula or condition formula of the second condition to verify if first condition is initial or not. I propose to use condition formulas rather than requirement.

Best regards

Witek Prawecki

Former Member
0 Kudos

Hi Witek Prawecki,

Thanks for you advise, I nearly forget this method.

Terry

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

this is to inform that

this can be done with the help of an ABAPER.

mae sure that you maintain this condition types in this series

STEP COUNTER

100 1

100 2

then tae 909 routine which you are using already copy the routine give new name for it and write your your code there and assign it to the condition type.

or

you need to chec for any OSS notes

regards

balajia

Former Member
0 Kudos

Also my condition type are statistical price.