cancel
Showing results for 
Search instead for 
Did you mean: 

Routine???

Former Member
0 Kudos

Hi.

Where to Write Routine as

If X<Y then does not allow to save Sales Order.

where X & Y are Condition types.

Regards,

Amol

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Amol,

If you will tell us what types of these condition type is there so we can assist you some other method also. Whether these can be configured by customer expected price condition types or not.

Anyways if you want to right the check then you can have that in SAVE_DOCUMENT_PREPARE in sales order user exit MV45AFZZ,

Thanks,

Raja

Former Member
0 Kudos

Hi Raja,

These are Pricing condition types

where i want to check that X should be always < Y.

Otherwise dont save the SO.

what to write in" MV45AFZZ" userexit?????

is that require Access Key????????

Reg.

Amol

Former Member
0 Kudos

Yes Amol

It requires ABAP developer access key.

As mentioned goto SAVE_DOCUMENT_PREPARE in sales order user exit MV45AFZZ and write code such that read KONV table for X and Y then compare and if condition satisfied then only save else not.

Former Member
0 Kudos

Dear Amol,

I understand from your questions that these are Pricing Condition types, but if you can elaborate your scenario, probably the best solution you can get from a Lot of experts, elaboration makes us understanding problem better.

Again, As Mr Yadav Suggested it will require Access key, and in the exit, you have to write a check, remember the values you have to Pick From the Structure KOMV. and compare the conditions.

Explain this to your Technical consultant he will surely help you out.

Thanks,

Raja

Former Member
0 Kudos

My Scenario is as follows

VPRS Internal price 560.000,00 INR 1 EA 560.000,00

ZR15 Dealer Price 540.000,00- INR 1 EA 540.000,00-

Markup 20.000,00 INR 1 EA 20.000,00

ZD03 % of Internal Price 30,000 % 168.000,00

SubTotal 540.000,00- INR 1 EA 540.000,00-

here

Markup = VPRS- ZR15

ZD03 = 30% of VPRS

so i want markup should not be lass than ZD03

Regards,

Amol

Former Member
0 Kudos

In that case, i will also suggest go with User exit check, or ask you ABAPer to debug and check whether any existing BADIs can help.

Thanks,

Raja

Former Member
0 Kudos

Amol,

Another option could be allow sales order entry but insert rejection reason for that line item based on values of specific pricing conditions. Then it would allow users to take corrective action subsequently. This could be done during order processing itself and you don't have to wait for user exit during order save.

Former Member
0 Kudos

Hi Vijay,

But Reason for Rejection will not check whether condition X < Y right????

it will be manual process....

Regards,

Amol

Former Member
0 Kudos

Hi Amol

The best way to achieve as already suggested by Mr.Yadav and Mr.Raja as use the exit MV45AFZZ ,Form Save document Prepare As This comes at the end of All entries done by user just before saving dcument.

second way is to use a condition value routine for ZD03 as it is always 30 % of VPRS ,

Compare the value of VPRS with Other condition types u r using and write a custom error message through SE91.assign it to Routine. Message can contain "MArk up is not in the Expected range " please review".

and u can exit from program using abap code.

This will be useful in case u dont want any item to go above mark up value.

The other advantage of using routine is u get condtion values and condition related tables access while in pricing processing only ,while in first case it is to be fetched in user exit code.

the issue with routine is user can't save document and he has to data entry again from beginning of the sales document.

Routine to write in VOFM condition value routine.

SE91 custom message .

Regards

Mandar

Answers (1)

Answers (1)

Former Member
0 Kudos

Sales order save exit..........