cancel
Showing results for 
Search instead for 
Did you mean: 

Condition should be required or ignored depending on other condition

Former Member
0 Kudos

Hello,

I have two condition types in my pricing procedure that I need to control.

If condition XXXX also condition YYYY should become mandatory. If Condition XXXX does not exist, the condition YYYY should be excluded.

I decided to enter an exclusion indicator on XXXX condition (KZNEP = F) and assign the following routine to the condition YYYY in the pricing procedure. (Refer to SAP Note 836243)

Also I marked condition YESE as mandatory in the P.Proced.

With this routine if condition XXXX exists and there is no valid condition record for YYYY, the system is issuing the message that YYYY is mandatory.

My problem is that the document is not becoming incomplete.

Can you advise? Thank you.

FS

FORM KOBED_919.

*{ INSERT S08K941365 1

SY-SUBRC = 4.

IF KOMP-KPOSN NE 0.

CHECK: KOMP-PRSFD = 'X'.

CHECK: KOMP-KZNEP eq 'F'.

CHECK: KOMK-VBTYP NA VBTYP_FKIV.

ENDIF.

SY-SUBRC = 0.

CLEAR KOMP-KZNEP.

*} INSERT

ENDFORM.

*{ INSERT S08K941365 1

*

*} INSERT

FORM KOBEV_919.

*{ INSERT S08K941365 1

SY-SUBRC = 0.

*} INSERT

ENDFORM.

Accepted Solutions (0)

Answers (1)

Answers (1)

eduardo_hinojosa
Active Contributor
0 Kudos

Hi Fatima,

Try to check in your subroutines the value for XKOMV (it is an internal table with the conditions that you have until this condicion this moment in pricing procedure). Set a breakpoint and see it in the debugging session.

I hope this helps you

Regards

Eduardo