Skip to Content
avatar image
Former Member

Delete stock with particular storage location

Hello All,

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

Please help urgently.

Thanks.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    Oct 21, 2011 at 04:17 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • avatar image
    Former Member
    Oct 20, 2011 at 02:38 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 20, 2011 at 03:48 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 21, 2011 at 05:58 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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.

  • avatar image
    Former Member
    Oct 24, 2011 at 01:14 PM

    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

    Add comment
    10|10000 characters needed characters exceeded