Line item pricing based on total value of the order

Logistics : SD and its sub-modules (Inquires, Quotes, Order Entry, SIS, Sales Contacts, Dist. & Billing)

Moderators: Snowy, thx4allthefish, mike_ac, Lost Identity

Post Reply
sapnov05
Posts: 295
Joined: Sun Feb 06, 2005 8:35 am

Line item pricing based on total value of the order

Post by sapnov05 » Mon May 16, 2011 1:40 pm

Hi,

We need to charge as a separate line item (material) 'Insurance' as a % based on the total value of the order less one line item. Our orders are created on the web and posted via a BAPI.

(a) depending on where the customer is located, we charge a certain added shipping cost.
(b) the customer has the choice to ask for insurance or not.

The actual order may be 10 lines totaling $1,000 and due to location, the BAPI slaps on an added line item of $100. If the customer chose the insurance option, the BAPI needs to slap on another line item whose value would be, say 2% of the total order, i.e. 2% of 1000 (instead of on 1000+100). Of course, if the customer doesn't choose this option he is not charges this extra line and further if the customer is not in the particular region, the 100 charge may also not be there.

The 2% can vary time to time so needs to be driven by a condition record based on %.

How can we achieve this in the pricing procedure? The logic of how the BAPI will function is clear to us, we are stuck on the pricing procedure configuration.

Glad to answer any further questions you may need for clarifications.

Many thanks!

ghanem1245
Posts: 17
Joined: Fri May 20, 2011 8:54 am

Re: Line item pricing based on total value of the order

Post by ghanem1245 » Fri May 20, 2011 9:12 am

Hi,

What if BAPI can check item types of the line items and use only amounts from the lines with specific item types for insurance calculation? Then you would be able to calculate insurance based on $1000 rather than $1100. Does it make any sense for you?

Ghanem

sapnov05
Posts: 295
Joined: Sun Feb 06, 2005 8:35 am

Re: Line item pricing based on total value of the order

Post by sapnov05 » Fri May 20, 2011 9:53 am

Thanks, ghanem, yes it kind of does...then we 'insert' another line on the order only for the insurance - if so, then that brings me to the next question, do we do the calculation of this 2% (or whatever it is time to time) in the BAPI and post that value as the item condition value for the 'insurance' material?

mike_ac
Posts: 4464
Joined: Wed Dec 22, 2004 10:14 am
Location: Deep Texas

Re: Line item pricing based on total value of the order

Post by mike_ac » Fri May 20, 2011 11:16 am

The easiest way would be to charge the 2% on each relevant item, but not print invoices, etc, that way. You can itemize the insurance on the outputs.
"If a cluttered desk is a sign of a cluttered mind, of what, then, is an empty desk?" –Albert Einstein, when confronted by a neat freak about the disarray in his work space

ghanem1245
Posts: 17
Joined: Fri May 20, 2011 8:54 am

Re: Line item pricing based on total value of the order

Post by ghanem1245 » Fri May 20, 2011 4:05 pm

sapnov05 wrote:Thanks, ghanem, yes it kind of does...then we 'insert' another line on the order only for the insurance - if so, then that brings me to the next question, do we do the calculation of this 2% (or whatever it is time to time) in the BAPI and post that value as the item condition value for the 'insurance' material?
I don't think that you need a special 'insurance' material, just modify your pricing procedure by adding a pricing condition for insurance. Then assign a formula to this insurance pricing condition, in the formula you can write ABAP code to calculate 2% of the price of the items with specific item types. You can also use BAPI instead of formula.
mike_ac wrote:The easiest way would be to charge the 2% on each relevant item, but not print invoices, etc, that way. You can itemize the insurance on the outputs.
With this approach you might face rounding problem: if you have several items in SO and you first calculate 2% individually for each item and then sum these calculated amounts, you could get amount, which is slightly different from the amount that you get when you first sum all the relevant items and then calculate 2% of the total. It happens due to the fact that SAP rounds numbers to 2 digits after a dot. For some companies these several cents of difference matter.

mike_ac
Posts: 4464
Joined: Wed Dec 22, 2004 10:14 am
Location: Deep Texas

Re: Line item pricing based on total value of the order

Post by mike_ac » Sun May 22, 2011 11:54 am

ghanem1245 wrote:
mike_ac wrote:The easiest way would be to charge the 2% on each relevant item, but not print invoices, etc, that way. You can itemize the insurance on the outputs.
With this approach you might face rounding problem: if you have several items in SO and you first calculate 2% individually for each item and then sum these calculated amounts, you could get amount, which is slightly different from the amount that you get when you first sum all the relevant items and then calculate 2% of the total. It happens due to the fact that SAP rounds numbers to 2 digits after a dot. For some companies these several cents of difference matter.
Not really. Group the conditions, and you're set to the fraction of a penny. You can always work out rounding issues. Or, let standard SAP handle it -- you'll see the difference at the header level, and you can adjust back down as needed.
"If a cluttered desk is a sign of a cluttered mind, of what, then, is an empty desk?" –Albert Einstein, when confronted by a neat freak about the disarray in his work space

Post Reply