cancel
Showing results for 
Search instead for 
Did you mean: 

How to set a conditiontyp as NOT OBLIGATORY via User Exit

Former Member
0 Kudos

Hi,

in SD we use an pricing procedure with an conditiontype (ZZ00) which is defined in the
procedure as obligatory.

Now we want to set this ZZ00 as NOT obligatory depending on the Item catagory (ZAN) via
an USER-EXIT.

Does anyone know an User Exit to solve this Problem?

Regards, Dieter

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Deiter,

You can achieve this with below steps.. I am giving below steps considering you want

to keep the condition type set as Obligatory always in your Pric Procedure

-> Write a custome routine for "Requirement Routine" with the logic : When item category

    is ZAN, remove "Obligatory" check from KOMT1-KOBLI.

-> Assign this routine to condition type ZZ00

you are ready to go now.

Why i am suggesting this...

-> Industry best practise, to write minumum codes in user exits (in this case it will be sales user exit),

    as it increases system response time

-> If we change someting in user exit, imagine, everytime you are creating a Sales Order, which does

    not call for this pricing procedure (with cond typ: ZZ00 ), still this part of user exit code written

    to check if item cat is ZAN or not will be called, so why to make system work more when

    actually not required

Hope this helps !

Regards

Subhajit

Jelena
Active Contributor
0 Kudos

MoazzaM had the right suggestion. If the condition is not mandatory 100% then it should not be set as mandatory and any requirements could be enforced in a user exit. Otherwise imagine someone maintains the system years down the road - what will they think if they see that condition is marked as mandatory but clearly doesn't work that way? Then SAP Support will have to spend time on researching this instead of working on the actual problems. Think about the big picture.

former_member1345686
Active Participant
0 Kudos

Hi,

as an alternative you can create pricing requirement routine to clear the mandatory flag (KOMT1-KOBLI) based on checking logic, and assign it to the condition type in the pricing procedure.

Benefit of using routine is you know there is custom logic assigned to the pricing procedure for future checking

Regards,

TuwuhSW

moazzam_ali
Active Contributor
0 Kudos

Hi

Just uncheck the mandatory tick for that condition in V/08 and ask your ABAPER to write code with if condition in program MV45AFZZ and Pricing prepare userexit. If you open this program in SE38 you will see pricing prepare userexit in it.

Thank$