cancel
Showing results for 
Search instead for 
Did you mean: 

Sales Order should be hold and approve by Sales manager if the margin is less then 20%

Former Member
0 Kudos

Hi All,

Good Morning,

I have the following requirement as enclosed below:

Sales Order should be hold and approve by Sales manager if the margin is less then 20% 

1. Order will be created for Sales Man.

2. Item wise discount should be given.

3. Order will be on hold if the margin is less than 20%

4. Once the Order is release by the Sales Manager, the Salesman should get the notification that the Order should be released.

As per my observation, if the profit margin falls below 20% then Order will be put on hold and the sales manager has to approved.

Basically the scope from SD configuration I need to do the following.

1. For the Sales Order to get on hold or approval I need to do the configuration of the Status Profile and assign the Status profile to the Sales Order Type in VOV8.

2. With respect to Sales Order should get on hold I will create the Status Profile with the following status:

  • Pending
  • Approved

3. I will assign the assign the status profile to Sales Order.

4. Once the Sales Order is created if the Profit Margin falls below 20% then the status should be moved to pending.

5. With respect to this requirement, is it possible in the standard way?. I don't think so.

6. We need to write a logic in the save sales Order User Exit to check the profit % being calculated for the line item. If them value falls below 20% then      the Order should be moved to status pending. Kindly correct me in case I need to write an login in the status profile routine we have any or in Sales Order Save User Exit is correct.

7. Once the Sales Order is moved to status pending, we can send some notification to the Sales Manager. Then it should be released by the Sales Manager. Please can you elaborate which transaction code will be used by the Sales Manager to move the Order status from Pending to Approved.?.

8 Once the Sales Order is moved to Approved status, Output PDF notification can be send to the Sales Man. Here I can write a logic in the Output Program or customised routine and can assign the same to the Output Type configuration.

Kindly review the details above and share your views if my approach is correct and any better standard way we can adopt.

Thanks,

Farhan.,

Accepted Solutions (0)

Answers (2)

Answers (2)

michael_kozlowski
Active Contributor
0 Kudos

I implemented a margin control functionalty for a customer few years ago. I was faced with very similar requirements.

From my experience I would highly suggest to use a workflow to control the process flow. Workflow is much more transparent and easier to maintain. And it is not really more effort than write your own process flow logic.

 

Former Member
0 Kudos

Hi Michael,

Thanks alot for your reply.

In my case I need to check the each item value of PM% in VBAP Table which I will store in subtotal and accordingly write the custom code as I have explained above.

But still can you share your thought on my approach.

Also I do not have much exposure to workflow setup and configurations.

Please can you share the some link how to set up the workflow for the order which will suffice my requirement easily keeping ABAP development to minimum.

Awaiting for your inputs.

Thanks,

Farhan.

Lakshmipathi
Active Contributor
0 Kudos

From SD point of view, you can control saving sale order with the standard configuration, if the price is less than the cost but for validating the profit margin at item level, I don't think, it is a good practice taking into consideration the system performance.  I am not sure, on an average, how many line items would be there in a sale order.  If this is going to be on the higher side, then, obviously, you also need to take the concurrence from your Security team

G. Lakshmipathi

Former Member
0 Kudos

Hi Laksmipathi,

Good Afternoon,

Please could you provide me the inputs how to capture profit margin percentage from condition screen at line item of sales order in KONV.

I have done the configuration by assigning the Alternative Calculation Type 18 in the last step of the pricing procedure. Profit Margin % is getting calculated in KBETR field to capture the same I have assigned subtotal 5 in the pricing procedure, but it will capture the condition value amount of that step and not the PM%.

Even I have checked the same passing the condition record number in KONV but it only displays the condition types and their respective rate and condition value.

Please share the valuable inputs.

Thanks,

Farhan.

Former Member
0 Kudos

Hi All,

Good Morning,

I have included the dummy condition type to so that data can be updated in KONV table once the sales order is save through document condition record number.

At Order level in status profile has kept two status Pending and Approved.

Order initially will be in Pending status, At creation time I will check the the PM% for all the line items.

If PM% > 20 then the status will be move from Pending to Approved via status profile user exit.

If PM% < 20, Order will be by default in Pending status.

Once Sales Manager review the respective line item and update the new Price so that PM% > 20 then he will change the status to Approve status and notification will be send to Sales person via program itself " The Order No XXXXX has been approved by Sales Manager".

Thanks,

Farhan.

Former Member
0 Kudos

Hi All,

Please can you review the solution approach  I will be adopting and share your views.

Inputs and further suggestions will be highly appreciated.

Thanks,

Farhan.

VeselinaPeykova
Active Contributor
0 Kudos

Hello Farhan,

do you have a colleague in your company, who is dealing with workflows?

I am not an expert on that topic, but it seems to me that the process could be improved if you utilize a custom workflow for setting statuses, rerouting to users based on some organizational structure, monitoring deadlines, etc. I suggest that you discuss with him what could be achieved.

If you have a lot of orders per day with low profit margin, then it may not be very practical to send hundreds of work items to a single person, but in such case it would not make much sense to have such approval flow either (probably the business can get some numbers from their current legacy system).

I guess that you will calculate the profit margin as percentage and will store it in some subtotal to check against it for decision making purposes, but it is strange to use the item-based value instead of total, because if you give one free item (100 % discount), this would qualify for approval (negative values), while as a total there could be very high profit margin % - so this would be too much workload for the manager. Maybe the business did not consider this case - it would be good to ask them again if they really wish to have the checks per item.

I wonder why you need to send this PDF output to the sales representative.

What will be shown in this form and what steps the employee should perform after receiving it?

Also - what about the case when the discount is not approved - should the order be rejected and some information to be sent to the sales representative and/or to the customer or the order should be returned back to the sales man for rework (of course the customer should be informed if the price would be higher).

My understanding is that until the order is approved, you would not reserve any stock - is this correct?

So after the order is approved for final price, it would go via credit check. In this case it could be better to notify the sales representative after the order gets approved credit status (I am not sure about that, because this PDF part is not clear to me yet).

Former Member
0 Kudos

Hi Veselina,

Thanks alot for your detail email and all the open questions which I had in my mind as I was working on this requirement. I have listed few of them below.

1. Number of Line Items in Sales Order.

2. Whether Material will contain free goods/third party item/bom material etc etc.

3. The Status Profile can be assigned both at header and item level.

4. If status profile is assigned at item level, then it would be laborious job for the sales manager to go and approve each line item wise.

With respect to your workflow approach I agree that will completely new customised workflow which I think will not be into scope presently. So let us keep this out of picture for time being.

Now coming on to this requirement I have discussed above and my approach I would prefer to have the Status profile to be at the header level where in I will cumulate the total gross profit margin.

I will check how this behaves when there are 3 line items with different profit margin percentages.

Again here the pain point is if one line item has profit margin percentage less than 20% I need to write the logic in in completion log to reflect the line item in error log and the price has to be adjusted against the same so profit margin % has to be adjusted by the sales manager and then the order should be moved to approved status.

I will take care of the above.

I have created status profile with the below three status

1. INIT (Initial)

2. PEND (Pending).

3. APPR (Approved)

The reason I would like to share the inputs from you all is that I will be writing the logic in the User Exit MV45AFZZ so that when my sales order is created in VA01, the initial status will be INIT.

When the sales order is getting saved, at that time my code should check the overall value of the Profit Margin %.

1. If the PM% < 20 then the Order Status should be changed from INIT to PEND while saving.

2. If the PM% > 20 then the Order Status should be changes from INIT to APPR which saving as it satisfies the criteria.

With respect to the notification, I can include the logic in the Output which will only trigger when the Order Status is approved and notification email should be send to the Sales Person.

Please review the above approach and share your valuable inputs.

Thanks,

Farhan.