cancel
Showing results for 
Search instead for 
Did you mean: 

Calculating condition value based on periodic cumulative volumes when GR

dietrich_miller
Explorer
0 Kudos

Our company has a business requirement to calculate the condition value of condition type discounts/surcharges before goods receipt and then post the condition value at time of goods receipt

The requirement is to calculate the periodic cumulative volumes that have already been goods receipted during the current fiscal period (month), and then calculate the condition value of the current goods receipt based on a scale basis.  An example of this is as follows:

Condition types:

PB00     Gross Price @ ZAR400

ZXXX     Surcharge

Scales on ZXXX:

From 10TO     30

From 20TO     50

GR1 = 9TO (Cumulative 9TO)

PB00 = 3600

ZXXX =      0

Total = 3600

GR2 = 10TO (Cumulative 19TO)

PB00 = 4000

ZXXX =  270 (9TO@R30)

Total = 4270

GR3 = 12TO (Cumulative  31TO)

PB00 = 4800

ZXXX =  580(1TO @ R30 + 11TO @ R50)

Total = 5380

GR4 = 8TO (Cumulative 39TO)

PB00 = 3200

ZXXX =  400 (8TO @ R50)

Total = 4000

Any ideas on how to achieve this using the normal condition type as described above and using routines on the pricing schema to calculate the cumulative volumes goods receipted within the period and then update the condition value when posting the GR?

Our company is using scheduling agreements and not normal purchase orders for this purpose.

Dietrich Miller

Accepted Solutions (0)

Answers (4)

Answers (4)

kmrcks
Contributor
0 Kudos

Please confirm the following .

Example

PO condition type (pb00 or pbxx) value = 10000

ZXXX condition Value      = 0

During GRN 1

PO condition type (pb00 or pbxx) value = 10000

ZXXX condition Value      = 0



during GRN 2 and before the accounting document is generated for GRN2,


ZXXX value need to be updated.


did you do that ?


or


with the help  of abapers , debug the GRN in stages , that is creation of material document and before the creation of accounting documents


I think you may face a problem here only.





kmrcks
Contributor
0 Kudos

Yes. Thanks

It means , the requirement is to update PO - line item's condition value before doing the GRN.  Then only Inventory value will be updated.

But how to update the condition value?

which event will trigger the update process?

I have not done like this till now.

May be create a routine with the logic you have mentioned and assign this to the condition type in the pricing procedure.

Former Member
0 Kudos

Did you try the pricing category date as GR date?

dietrich_miller
Explorer
0 Kudos

Hi Manosij,

We did change the pricing category on the vendor master and made sure that it was set to '5' on the scheduling agreement.  The routine still isn't accessed at all when doing the GR.  Acoording to our developer, the routine is only accessed when in the scehduling agreement.

Do you have any idea why the routine cannot be accessed despite the settings as suggested?

dietrich_miller
Explorer
0 Kudos

Hi Kannan,

this is exactly what we did.  As per my reply to Kannan, the routine isn't accessed on GR hence the calculation isn't performed.  Any ideas?

kmrcks
Contributor
0 Kudos

For Example :

one vendor has a purchase order .

First we are doing a GRN for XX QTY .

these GRN QTY will be stored in the history table. / ondition record table

then next GRN

But before we save the document , system has to calculate the GRN QTY in the given period and add this to entered qty.(YY)

This an be done thro customisation only.. Lot of testing is necessary in case of cancellation

Please confirm whether this is your requirement.

Also confirm whether this is related to one purchase order only ?

do you have contract / scheduling  agreement ?

dietrich_miller
Explorer
0 Kudos

Kannan, this is more or less the right interpretation.

We have to calculate the condition value of the current GR based on the qty that has already been GR'ed within the given period, plus current GR, e.g.

Qty GR'ed already = 100TO

Current GR = 30TO

Scale value > 100TO = 50

Condition amount for GR = 30TO x 50 = 1500

We are only using scheduling agreements for this purpose, one per vendor.

Please confirm if this answers your questions.

former_member183424
Active Contributor
0 Kudos

As of my knowledge, The scale is always used in purchasing document. You can't use the scale for price at the time of GR.

And Scale is always depend on your PO total quantity. I don't think your requirement can achieve through any standard configuration. You can go for development.

dietrich_miller
Explorer
0 Kudos

Thanks for the feedback Dëv.  We are looking at a development to achieve exactly that.  We originally created a routine and the expectation was that the routine on the pricing schema that must do the calculation is invoked or accessed on GR.  Our programmer cannot get the system to invoke the routine on GR.

We are doing some workaround at present by programmatically updating the condition on the SA and then doing the GR.  I am not convinced though that this is the best solution.

Any ideas?

Former Member
0 Kudos

If you have already come up with the logic in the routine, you can trigger a new pricing on the GR date using the pricing date category as '5- GR date'. This is found in the vendor master, info record or contract. It can also be added during the PO creation.

Please look at this:

SAP Online Help