Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Pricing requirement with three requirements

Hi,

I'm no developer, but have to create a pricing requirement. I created the one below, but it doesn't work.

I want some conditions only to be used if komk-vkorg = 1111 + komp-zzmtpos = DIEN + any of the defined item categories are used.

FORM KOBED_998.

sy-subrc = 4.

if ( komk-vkorg = '1111' ).

if ( komp-zzmtpos = 'DIEN' ).

if ( komp-pstyv = 'ZSQ1' ) or

( komp-pstyv = 'ZSQA' ) or

( komp-pstyv = 'ZSQC' ) or

( komp-pstyv = 'ZSQE' ) or

( komp-pstyv = 'ZSQF' ) or

( komp-pstyv = 'ZSM' ) or

( komp-pstyv = 'ZS1' ) or

( komp-pstyv = 'ZSA' ) or

( komp-pstyv = 'ZSC' ) or

( komp-pstyv = 'ZSE' ) or

( komp-pstyv = 'ZSF' ) or

( komp-pstyv = 'ZG2N' ) .

sy-subrc = 0.

endif.

sy-subrc = 0.

endif.

sy-subrc = 0.

endif.

ENDFORM.

FORM KOBEV_998.

ENDFORM.

Thank you for help!

Former Member replied

i agree with Wolfgang Valtin

here is piece of code that works for u ..

FORM KOBED_998.
sy-subrc = 4.

if ( ( komk-vkorg = '1111' ) and ( komp-zzmtpos = 'DIEN' ) ) 
and ( ( komp-pstyv = 'ZSQ1' ) or
( komp-pstyv = 'ZSQA' ) or
( komp-pstyv = 'ZSQC' ) or
( komp-pstyv = 'ZSQE' ) or
( komp-pstyv = 'ZSQF' ) or
( komp-pstyv = 'ZSM' ) or
( komp-pstyv = 'ZS1' ) or
( komp-pstyv = 'ZSA' ) or
( komp-pstyv = 'ZSC' ) or
( komp-pstyv = 'ZSE' ) or
( komp-pstyv = 'ZSF' ) or
( komp-pstyv = 'ZG2N' ) ) .
sy-subrc = 0.
endif.
ENDFORM.
FORM KOBEV_998.
ENDFORM.

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question