Within this document we will show, we configure parameter for Price Point Group how to effect our price rounding.

Brief logic about price rounding

basic parameter:

    rounding rule: twpk-eprgr

    first price: twpg-prsfi        last price: twpg-prsla    increment: twpg-prsdi

    purchase price:                markup rate: 

    1. pre-calculate sales price, then price should be input rounding program and rounding it.

        pi_price: purchase pirce * (1+markup%)

     2. calculate difference between pi_price and first price

         diff_total = pi_price – twpg-prsfi

     3. calculate rest of diff_total / twpg-prsdi

         rest = diff_total mod twpg-prsdi

     4. to check whether pi_price meets priced corner the cornor price range or not.

         (rest eq 0) and (twpk-eprgr ne 100)

     5. if condition (rest eq 0) and (twpk-eprgr ne 100) not mattched, price pi_price meets priced corner the corner price range.

        calculate both low and high price

        number_of_steps = diff_total div twpg-prsdi (number_of_steps is integer value)

        price_low = twpg-prsfi + number_of_steps * twpg-prsdi

        price_high = price_low + twpg-prsdi

     6. to determine which price should be used.

         calculate comparison value

         c_value = ((100 – twpk-eprgr) * twpg-prsdi) / 100

         if rest >= c_vaule

             use price_high


             use price_low

then, we will introduce by illustration.

1. we configure Price Point Group as below picture.

1.Price Point Group Config.png

2. we calculate price by tx: VKP5, as below screen, we can see purchase price(Basis PP):0.53, and the sales price(Gross SP) has been rounding is 0.69.

2.Purchase Price change before.png

3. then we will change the purchase price (basic PP) from 0.53 to 0.8, to simulate and show the config parameter how to involve sale price rounding.

    as we know that 0.8 * (1+30.189%) = 1.041512. let us to see the system behavior, if we has been configured the Price Point Group.

3.change purchse price.png

4. entry the price 0.8 and press “Enter” button. the system will cll function : PRICE_POINT_READ

5. function to determine price point group (eprgr = pi_eprgr = twpk-eprgr: price point group)

4.system deter price point group.png

6.system calculate

   pi_price = purchase price * (1+ markup%)

   pi_prsfi = twpg-prsfi (first price in price point range)

   pi_prsdi = twpg-prsdi (increment for price point range)

5.calculate 1.png

calculate 2.png

system will calculate both low and high price

PROZ = PI_RUNRG = TWPK-RUNRG: Rounding = 40

6.calculate 2.png6.calculate 2.png

system determine which price we will be use

7.system determine price.png

Due to the rounding logic, we got price 0.99 as sales price, the are differ with price 0.8 * (1+30.189%) = 1.041512

8.price has been rounding.png

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

  1. ' MoazzaM '


    If you could add some business scenario or process where this could be applicable then that would be easy for understanding. IT looks tricky and complicated without some business process example.



Leave a Reply