cancel
Showing results for 
Search instead for 
Did you mean: 

Delete stock with particular storage location

0 Kudos

Hello All,

Do you know any program using which I can delete stocks for particular 'STorage location' in APO ??

Please help urgently.

Thanks.

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi,

As explained by the gurus, there is no direct way but a development like the one could be done (If development a feasible option)

1- Use BAPI_STSRVAPS_GETLIST2 to fetch the storage location specific stocks(product /location/Sloc combination).

2- Use BAPI_STSRVAPS_SAVEMULTI2 to overwrite the stocks for these storage locations with zero values (for all the versions i.e. batches)

Assumptions:

You need to delete some stocks in the system for a specific duration (say during your planning run)

CIF is blocked during this specific duration

The runtime required for above development is not a concern

However the CIF exit is a cleaner solution (EXIT_/SAPAPO/SAPLCIF_STOCK_001 on APO inbound).

If you donot want the stocks in these Slocs at all then CIF exit is probably the only solution.

You can even make this exit logic flexible by not hard coding the storage locations but referring them from a table which can be maintained by the user...

Thanks & regards,

Ashok

0 Kudos

Hello,

We include all stocks in integration models, and delete unrequired storage location stocks in USER EXIT.

Deleting all stocks in APO production and then CIFing only required storage location stocks will not be feasible.

Please suggest how we can correct this?

Thanks.

Former Member
0 Kudos

Hi Pratiksha,

Even we had the same problem in my prev organization. We basically didnt want APO to consider a few stocks from specific Str.Location (like the Scrap Stck or Cust reserved stcks). Hence what we did was, we added a user exit in APO, wherein we mentioned only those Storage Locations for which the stock is to be moved and Cifed into APO.

Creating a user exit for stocks is a easy process.

Please note before having the user exit active, you would need to delete all the existing stock from APO, and then run a full fledge stock's Integration Model.

By this, the unwanted stocks @ str location would'nt even have an impact during your Reconciliation too.

I hope this information is useful to you.

Please let me know in case you need any further information.

Regards,

PP.

0 Kudos

Hello,

Thanks for replying.

Actually , issue is stocks for some storage locations, should not be CIFed to APO.

But, duing reconciliation, those also were CIFed to APO.

Now, we want to delete these stocks by their storage location.

Is there any program or any other way by which we can achieve this?

We can not delete these stocks in R3, since they are required in R3. But they are not required in APO.

Thanks.

m_manimaran
Active Contributor
0 Kudos

Hi Pratiksha,

How did you control to transfer or not to transfer stocks of specific storage locations from ECC to APO?

There are two options I thought of,

1. If you are controlling the CIF transfer in ECC, then delete all the stocks of the material and retransfer it or do the reconciliation once again. The deletion can be done in the transaction /SAPAPO/RLCDEL.

2. If you are using MRP area concept in APO, then you can delete the stocks very specific to the MRP area locations in the same transaction.

If you didn't control the CIF transfer of specific storage location, since the CIF transfer of stock is online, even after deleting the stock, that will be updated again.

Please check and revert.

Regards,

Manimaran M.

Former Member
0 Kudos

99,

The userexits in your CIF must be consistent with userexits in your CCR. Normally, if you exclude specific StLocns in your CIF, you also modify CCR with one of the CCR userexits to ignore these also. Before you go much farther, you should fix the CCR issue, or this will happen again.

In the meantime, wait for a slow period. Deactivate the Stock Integration Model. Run CCR. Delete all stocks that have 'No active integration model' (this will be all stock, since you have deactivated IM). Now, reactivate the IM. Re-send all stock using program RIMODINI for your IM in ECC. If your IM userexit is working, only the pertinent stocks will be re-ciffed.

Best Regards,

DB49

Former Member
0 Kudos

99,

To add to Aparna's answer, the normal way to delete stocks is to remove them in the Online Transaction Processing System (usually ECC). If the stocks have already been removed in OLTP, then /SAPAPO/CCR should delete them in SCM.

It generally makes no sense to delete stock in SCM if it still exists in OLTP.

Best regards,

DB49

aparna_ranganathan
Active Contributor
0 Kudos

Stock is not stored at storage location level in APO. It is at plant level. So i dont think you can delete stock at a particular storage loation in APO

Thanks

Aparna