Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Pricing condition type validation

Former Member
0 Likes
3,760

Dear Experts,

Here am facing some problem with Pricing condition validation, My requirement is to avoid duplicates of Pricing condition type for particular Order type in the conditions Tab Sale Order transactions like VA01,VA02...Just i have to through an error message or information message to stop that...am not getting any right Exit's i have surfed the programs like MV45AFZZ,MV45AFZB,etc.

So kindly me provide me any Exit's or Routines to achieve this requirement.

Thanks in advance,

Dinesh Kumar R

1 ACCEPTED SOLUTION
Read only

VenkatRamesh_V
Active Contributor
0 Likes
2,346

Hi,

Try,

Include MV45AFZZ

FORM USEREXIT_PRICING_PREPARE_TKOMP.

Data: lv_cnt1 type i,

         lv_cnt2 type i,

         it_temp type table of komv.

   CHECK  sy-tcode = 'VA01'

         AND    VBAK-AUART  = 'ZPS'

         AND NOT xkomv[] IS INITIAL.

it_temp[] = xkomv[].

sort it_temp by kschl.

delete adjacent duplicates from it_temp comparing kschl.

lv_cnt1 = lines( it_temp ).

lv_cnt2 = lines( xkomv  ).

if lv_cnt1 NE lv_cnt2.

message 'Duplicate entries exit' type 'E'.

endif.

Hope it helpful,

Regards,

Venkat.V

7 REPLIES 7
Read only

Former Member
0 Likes
2,346

Hello Dinesh,

Good Day,

Use this user exit to control the pricing conditions.

Exit : LV69AFZZ

Note:

As the user exit which I have mentioned is common for all the applications, We have to restrict this only for Sales applications.

Check : Only If KAPPL = V  (Sales/Distribution)

Thank you,

Kavitha,

Reward points if helpful.

Read only

Former Member
0 Likes
2,346

Hello Kavitha,

Thanks for the reply..i have tried even that..include LV69AFZZ...it contains the exits for field modifications,getting triggred for each and every screen-field for each condition type and every for greying out KONV-KBETR field i have used that exit.


My requirement is to validate the whole table..whether 2 same  condition types are there or not and throw error message...anyways i will try using that exit and once again thanks for your reply.


Thanks,

Dinesh Kumar

Read only

VenkatRamesh_V
Active Contributor
0 Likes
2,347

Hi,

Try,

Include MV45AFZZ

FORM USEREXIT_PRICING_PREPARE_TKOMP.

Data: lv_cnt1 type i,

         lv_cnt2 type i,

         it_temp type table of komv.

   CHECK  sy-tcode = 'VA01'

         AND    VBAK-AUART  = 'ZPS'

         AND NOT xkomv[] IS INITIAL.

it_temp[] = xkomv[].

sort it_temp by kschl.

delete adjacent duplicates from it_temp comparing kschl.

lv_cnt1 = lines( it_temp ).

lv_cnt2 = lines( xkomv  ).

if lv_cnt1 NE lv_cnt2.

message 'Duplicate entries exit' type 'E'.

endif.

Hope it helpful,

Regards,

Venkat.V

Read only

0 Likes
2,346

Hi Venkat,

Very thanks for the mail and the exit which u suggested is working fine,Thanks a lot.

Thanks,

Dinesh Kumar R

Read only

kiran_k8
Active Contributor
0 Likes
2,346

Dinesh,

Is it really possible to have the same condition type again in the Pricing Procedure ? Doesn't the SAP Standard have a check on this ?

K.Kiran.

Read only

Former Member
0 Likes
2,346

Kiran,

For Manual pricing condition type it is possible to enter more than one time....but one pricing procedure will be active at a time, But user can delete the right one...so my requirement is this..user should not have provisions to modify existing pricing condition type.

Thanks for th email and i achieved this by using

Include MV45AFZZ

FORM USEREXIT_PRICING_PREPARE_TKOMP

Thanks,

Dinesh Kumar R

Read only

Lakshmipathi
SAP Champion
SAP Champion
2,346
My requirement is to avoid duplicates of Pricing condition type for particular Order type

Have you checked with your SD functional consultant before posting here?  For information, as per standard SAP functionality, if a condition type with field KOAID value "B" flows twice, the lowest level would only be active.  Before going for any enhancement, better check with your functional consultant once again.

G. Lakshmipathi