cancel
Showing results for 
Search instead for 
Did you mean: 

Very urgent user exit. Need help

Former Member
0 Kudos

Hi Gurus,

My client demand is whenever he rise the sales order

first it has to caliculate the profit margin, if the profit margin

is less then the order should block and correspondent ZSM

has to release. For this i have to write the functional spec.

For this i have to use EXIT_SAVE_DOUCUMENT_PREPARE

Under inclulde program MV45AFZZ

Can any body suggest me what are the fields i have to use for

this demang....

I am in client place, pl give the suggition on this.

Thanks in Advance

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Protan,

You are back how r u ?

Regards,

Amrish Purohit

Former Member
0 Kudos

Hi Amrish,

I am find, Than Q. Amrish still i am fighting with

that functional spec. can u suggest me which fields

i have to use????

Former Member
0 Kudos

Hi,

Ok tell me what way you have decided to go as per our earlier communication ?

you will maintain the reference condition type with minimum sales values or the other one ?

Regards,

Amrish Purohit

Former Member
0 Kudos

Amrish,

Not the minimum value. we have a product called Jemmer for that

for one strip the 2 rs is the profit margin. Max discount allowed

is 14% , if the distributer willing to give some huge order but

he want 30% discount. If the company argees togive 30% discount

obvly the profit margin falls to less than one rs. So the order should

block and correspondent ZSM should release if he obays 30% discount

other wise he as to send a mail to him that it is not possible.

Former Member
0 Kudos

Hi,

If you going with reference condition type then I assume that you have done the modification in your pricing procedure as required by this functionality.

Second thing you will be maintaining condition record for the reference condition type(Statistical one).

Assuming that your selling price is PR00 and Reference condition is ZRFC

So if NETWR(net price before tax) from XVBAP(internal table) is less than XKWERT(condition value) of KSCHL(condition type) ZRFC then set field VBAK-LIFSK as P(Delivery block field,this you can define a new delivery block as P,profit margin block)

Oh I was formatting the answer when you replied,so this thing won't work

Reward points if useful

Regards,

Amrish Purohit

in code you can write the code

Former Member
0 Kudos

Hi,

Tell me one,how you are calculating profit margin in your project.This feedback is very crutial to understand and write the code .This is fixed % for a set of materials or how is company's policy ? because depending on this you will have to write down the code.

Regards,

Amrish Purohit

Former Member
0 Kudos

Hi,

Please clarify is the company giving discounts in terms of % only or it is value based also ?

If it is only % base then I have a another alternative.

Regards,

Amrish Purohit

Former Member
0 Kudos

Amrish,

Thanks for ur responce.

profit margin=net value(including fright)-cost

Former Member
0 Kudos

Hi,

Inputs for my last thread ?

Regards,

Amrish Purohit

Former Member
0 Kudos

Amrish,

Profit Margin shold caliculate on the basis of Net Value (Including fright charges)-cost of the material.

These r the inputs Amrish.

Former Member
0 Kudos

Amrish,

R u there???

Former Member
0 Kudos

Hi,

Protan I am unable to understand one thing,as you said that company notices that the profit margin is less(Eg.1 Rs.) than what is required one (Eg.2 Rs.)

So when the user creates the order,gives huge discount and then notices that Oh the profit margin is going down ! Because he laready know that the desired value is 2 Rs.That is his bussiness practice.

But in the system,how system will understand that the desired value is 2Rs.

You can get the current value from the pricing calculation but what about the other one.

Without any reference profit margin value or Minimum % of profit to be earned from order,it is immpossible to fulfill this requirement.

In simple words to compare antything,we always require Two things and not One.

So the reference value has to be provided by your client.

I think if you discuss this point with customer,it will be better.

Secondly if it is always % wise discount to be given then you can set the Maximum value of % to be given in condition record itself.

Regards,

Amrish Purohit.

Former Member
0 Kudos

Amrish,

Your are right. My client provided all the details in Lotus nots

database. We have to acceess from it....

Former Member
0 Kudos

Hi,

This getting more and more complicated and intresting too

So is that minimum % of profit margin or fixed values for profit margin items ?

Should i join u tre just kidding

Regards,

Amrish Purohit

Former Member
0 Kudos

Amrish,

It is Minimum profit margin.

Former Member
0 Kudos

Amrish,

If your helpout for this issue today i will be very thanful to you. i think

u understand my situation.

Former Member
0 Kudos

Hi Protan,

Yes I do understand my dear

Final input from you needed:-

Is it % of profit margin or fixed value of profit margin for each item which you have in lotus data bsae which you will be refering to.

Please give exact input so that i can give exact solution,because both are completly different.

Regards,

Amrish Purohit

Former Member
0 Kudos

oh thanq dear : ) it is % of profit margin.

Former Member
0 Kudos

Hi,

Thanks for input,i will let u know soln in 20 mins

Regards,

Amrish Purohit

Former Member
0 Kudos

Oh ThanQ very much Amrish.

Former Member
0 Kudos

Hi Protan,

I have worked out a solution but kindly validate it from your side or somebody else.

I will explain with help of example.

Say you material XYZ has net price Rs.100

Fright as Rs.10

Cost as Rs.80

So as per formula given by you the profit margin will be = (100+10)-80

=Rs.30

And the % of profit will be = 30*100/110

=27.27 %

This formula needs to be hardcoded in the exit so as to calculate profit margin actually earned in sales order.This value will be stored in a variable in the exit.

Second step is create a condition type as a reference Profit margin ZPRF (Statistical one) For this maintain condition record as % maintained in lotus server.

Access sequence for this can be according to project scenario (Eg.Sales org/Dist channel/Material ) or (Sales Org/Dist channel/ Sale doc type)

In exit compare field XKWERT (condition value) for KSCHL (ZPRF) with the variable value( actual % calculated for profit margin previously ) .

If variable value is less than XKWERT then set the delivery block.

For this create a new delivery block as P(Profit margin block)

Specs for this block setting will be:-

If variable value is less than XKWERT then set VBAK-LIFSK (Delivery block) feild as P.

Consult your ABAPer for technical feasiblity of this solution and try once.

I have not tested this but I think it should work hopefully

Keep updating ....

Reward points if useful

Regards,

Amrish Purohit

Former Member
0 Kudos

ThanQ very much Amrish, i will check it and get back to u.

Once again thanks.

Former Member
0 Kudos

Amrish,

I am leaving office today and catch u tomorrow.Once again thanks for ur help.

Bye Yaaar : )

Former Member
0 Kudos

Hi,

Any progress in this issue ?

Regards.

Amrish Purohit

Former Member
0 Kudos

Hi Proton,

The solution by Amrish looks to be a very helpful one & It should resolve your Problem.

Regards,

Rajesh Banka

Former Member
0 Kudos

Hi Rajesh,

Thanks for validating

Regards,

Amrish Purohit