cancel
Showing results for 
Search instead for 
Did you mean: 

CIF Stock transfer: Updating stock category using user exit APOCF011

Former Member
0 Kudos

In SCM APO for heuristics run I want to consider only stock from a specific storage location and ignore stock in other storage locations. So I used CIF user exit APOCF011 to change the stock category 'CC' to 'CI' hoping that during CIF transfer the category would change. Currently all the storage location stocks is of category 'CC'. After activating the user exit, when I tried initial data transfer for stock from ECC, the storage locations for which the user exit changed the category to 'CI', were not updated in APO i.e. those storage locations and the related stock I did not see in RRP3 data view. In SLG1 logs I saw a message "Stock item ignored (Pegging area xxx......)" for all the storage locations for which no data was updated.

Any inputs to figure out why the system is no updating stock when I change the category during CIF transfer would be a great help.

Thanking in advance.

Amit Khare.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Amit - was the stock existing in APO prior to your change and initial transfer with the change? That could be the problem. Also if you are changing the category during inbound APO then you need to change the stocktype field to 0C also. Although you can change the category of the stock you are creating another problem which will be in the CCR. You will need to adapt the same logic in the CCR BADI. Another option is to use a enhancement to filter the stock being used during selection in the heuristic (could be table driven or pop-up if interactive). If you will not be using this stock at all in APO perhaps blocking it altogether may work - again synching up the CCR BADI.

Andy

Former Member
0 Kudos

Hi Andy,

Thanks for your quick reply. You are right. We had the stock in APO before making the code change and initial transfer. I thought the initial transfer would overwrite the existing quantities. But that is not happening. Is there any other way to do that?

We are already updating stock type to '0C' along with the category change. Also we have put similar logic in CCR BADI.

Thanks,

Amit Khare.

Former Member
0 Kudos

Hi Amit - since the stock already exists in APO and you are changing the intial transfer to be a different ATP category the original CC in APO is not touched. What you can do in the user exit is create 2 entries for the product/batch - one for the CC with zero qty and one for CI with the real qty. This will zero out the original CC stock.

Andy

Former Member
0 Kudos

Hi Andy,

We tried that but it did not work. In the user exit, for every storage location the stock table carries all the categories even if only one has a non-zero quantity. We changed the 'CC' value to zero and CI value to actual stock that was in "CC" before. For some storage locations the values got updated successfully. But for some storage locations nothing got updated in APO. The original entries for those storage locations in APO got deleted.

We tried CCR but that did not work. We also tried /sapapo/rlcdel to delete existing entries from SCM and did initial transfer but again not all storage locations got CIFed to APO. Those that were CIFed had correct values. But we want all the storage locations in APO.

Thanks,

Amit Khare.

Former Member
0 Kudos

Hi Amit - I don't think I can add anything else. I have several times mass updated stock values in APO using the same method and they all worked fine for each sloc, batch, etc. Even when changing values to zero. We have live enhancements modifying the ATP categories of stock and there are no problems. There is something we are both missing but I cannot help further without seeing more details of what is happening.

Andy