cancel
Showing results for 
Search instead for 
Did you mean: 

Where to adjust demand in heuristic

Former Member
0 Kudos

Dear experts,

during the run of the heuristic we need to adjust qunatities of some demands.

I failed in finding the appropiated BADI or userexit.

Is someone having an idea and can share it with me?

Thanks in advance!

Heinz

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello Heinz,

I think that you need to look from another angle to solve the problem. First you need to correct the demand and then run the heuristic.

So, the question could be how to correct the demand?

For this, you can extract the demand, then apply the changes and at the end to load the new demand in the planning book. I don't know what kind of demand you want to change, so it's a little difficult to provide you more details.

Thanks.

Regards, Marius

Former Member
0 Kudos

Hi Marius,

thanks for Your reply. I agree it might be a solution to change the demand in the planning book.

For a better understanding I desribe my problem with more details using an example:

We have two material Mat1 and Mat2.

Mat1 has a purchase order for 10 ea, and only demand for 8 ea.

Mat2 has no purchase order but demand for 6 ea.

The assignment of substitue material is changing and done via Z-table.

The planner wants now the 2 left overs of Mat1 to be taken into account during planning for Mat2. After the plannig he only wants a purch. req. of 4 ea to be created for Mat2.

My idea is now to do the calculation before the planning starts and reduce the demand of Mat2 to get the purch. req. created with the correct quantity.

Do You think it is possible during the load of the material in the planning book? Where?

Thanks in advance!

Former Member
0 Kudos

Hi Heinz,

You can extract P.Req with BAPI_POSRVAPS_GETLIST3 and change and save with BAPI_POSRVAPS_SAVEMULTI3.

Thanks.

Regards, Marius

Former Member
0 Kudos

Hi Marius,

well, that is not what I wanted initially.

What I needed is a way to adjust the demands before entering the planning run.

In ECC MRP and CTM it is possible using BADIs.

I would like to know if there is an userexit or BADI somewhere in SNP that allows the adjustment of demands before going into the heuristic.

But I agree If this is not possible maybe the adjustment of purchase req. would be a solution.

In this case I would reduce the quantity of the purchase req. of Mat2 in my example above by 2 ea.

But however, for this I need an appropriate BADI to modify the planned objects before the

transfer to ECC.

Any ideas?

Thanks!

Heinz

former_member187488
Active Contributor
0 Kudos

Hi,

Why you take all the trouble to do this in a BADI? Doesn't the interchangeability functionality meet your requirement? From your description I could see there should be some complex logic to make this work properly unless you really have a very simple business model. If you meet any issue in the further after go-live, you'll have to solve them all by yourself ...

I don't know any BADI/user-exit to adjust demand before goes to SNP heuristic. In SNP heuristic, demands/receipts and other figures are read directly from key figures, which are adjusted by macros .. In heuristic, is just reads stock on hand and target stock level, to create procurement orders to meet the difference between these two figures ... I could not see a proper way or at least easy way to meet your requirement ... sorry.

Best Regards,
Ada

Former Member
0 Kudos

Hello Heinz,

In SNP I don't think that this possibility (BADI) exist. For this reason I proposed you to play with the planning book.

I was thinking to this scenario for you: solution receipt modified

1. Mat1 - you perform a delta between receipt and requirement. In your example delta = 2 ea.

2. Mat1 - adjust the receipt. Change quantity from 10 to 8.

3. Mat2 - based on delta calculation and your Z table, create receipt for Mat2 = 2 ea.

4. Mat2 - the demand is 6 ea. The heuristic run will create the difference of 4 ea.

Another way could be: solution demand modified

1. Mat1 - you perform a delta between receipt and requirement. In your example delta = 2 ea.

2. Mat1 - receipt = 10 ea.

3. Mat2 - based on delta calculation and your Z table, create forecast adjustment for Mat2 = -2 ea

4. Mat2 - the demand is 6 - 2 = 4 ea. The heuristic run will create a receipt = 4 ea. 

You have to take in consideration that if you change the demand you lose the contact with the real requirements!

Thanks, Marius

Answers (0)