cancel
Showing results for 
Search instead for 
Did you mean: 

Viewing Quality Inspection/Blocked Stock in SNP DataViews (Key Figures)

Former Member
0 Kudos

HI All,

I am trying to use the two key figures u2018Blocked Stocku2019 (9ASOBLKQTY) and u2018Stock in Qual.Ins.u2019 (9ASOQMQTY) in the SNP Planning Area in order to pull certain stock categories into the SNP Interactive Planning. I have reset these to use the semantic 000. I have created and assigned a Category Group to these key figures in the SNP Planning Area which contains the following categories (CC -Stock; CF - InspctnStk; CI- BlockedStk).

I have also assigned the Category Group to the location > SNP Tab > Stock Category Group.

I have also assigned these two key figures to an SNP dataview. I am able to see these stock categories ad quantities if I right click on any key figure and select display stock. However, I am not able to display any values in the key figures themselves (e.g. 9ASOBLKQTY or 9ASOQMQTY) .

Does anyone have any knowledge of how to set this up so I can see certain stock categories in their respective key figures in APO?

Thank you,

Paul

Accepted Solutions (0)

Answers (2)

Answers (2)

aparna_ranganathan
Active Contributor
0 Kudos

Paul

Write a macro and use the function PHYSICAL_STOCK() or phy_stock_locprods() to retrieve the value of stock belonging to particular category and assign the same to your keyfigures.

Thanks

Saradha

Former Member
0 Kudos

Hi Saradah,

I have tried using the function PHYSICAL_STOCK( ACT_VERSION ; ACT_PRODUCT ; ACT_LOCATION ) but I am not aware of how to pull in a particular category into the macro logic.

Reagrds,

Paul

aparna_ranganathan
Active Contributor
0 Kudos

Paul

Thats very easy. Here is the syntax of physical stock function , taken from help.sap

PHYSICAL_STOCK()

PHYSICAL_STOCK( u2018productu2019 ; u2018locationu2019 ; version ; u2018categoryu2019 ; u2018categoryu2019 ; u2026) returns the stock of a location product of one or more categories.

PHY_STOCK_LOCPRODS()

PHY_STOCK_LOCPRODS( u2018category groupu2019 ; u2018versionu2019 ; u2018location 1u2019 ; u2018product 1u2019 ; u2018location 2u2019 ;u2026) returns the cumulated stock of multiple location products from the specified category group.

In your case the syntax will be PHYSICAL_STOCK(ACT_PRODUCT ; ACT_LOCATION ; ACT_VERSION ; 'CI') . This will return the value of stock under inspection.

Hope this helps

Thanks

Aparna

Former Member
0 Kudos

Hi Aparna,

I tried this without success. In the macro, is it enough to put in the category 'CI' or do I also need to put in the word 'category' as we have done with location, version, etc. How else does it know what 'CI' represents? Perhaps this is just part of the logic of this macro? In any event, I am still not able to get stock to show in the key figure.

Thanks,

Paul

aparna_ranganathan
Active Contributor
0 Kudos

Paul

Are you able to see the stock of category "CI" in your receipts view (/n/sapapo/rrp3). Asking this because we have to first check if the stock got transferred successfully from R/3 to APO.

In case you are able to see the stock in receipts view , then there is some other problem. Did you add that macro as default macro to your data view ? That is very important. Also there is no need to add the word "category" to the macro forumla . Just 'CI' is enough. I have used this function many times and if we give the correct syntax it should defenitely work.

Check it and keep me updated

Thanks

Saradha

Former Member
0 Kudos

Thanks Saradha,

Actually, I was able to get it to work and pull in the category (e.g. CI). However, it seems as though I have to specific the exact product number the macro. If I just use 'ACT_PRODUCT' or 'product' it then does not seem to work. I want this to work for all materials, not just one. Does your solution work for all materials? Did you use 'ACT_PRODUCT', product or the product number itself in the solution.

The same is true for location. It would only work if I put the location number in the macro itself. Perhaps I am missing something in the syntax?

Paul

aparna_ranganathan
Active Contributor
0 Kudos

Paul

This syntax should work for any product location. You just have to give PHYSICAL_STOCK(ACT_PRODUCT ; ACT_LOCATION ;ACT_VERSION ; 'CI') . Note that there are no quotes for ACT_PRODUCT. That is you should not say

'ACT_PRODUCT' just say ACT_PRODUCT ( no quotes) .

This should defenitely work for all location product combinations

Thanks

Saradha

Former Member
0 Kudos

Saradha,

I am still not abble to get this to work:

My code is as follows:

PHYSICAL_STOCK( ACT_PRODUCT ; ACT_LOCATION;ACT_VERSION;'CI')

I did not put quotes around ACT_PRODUCT, ACT_LOCATION, or ACT_VERSION. I am not sure if I should put quotes around ACT_LOCATION and ACT_VERSION, but I don't have room in the cell to do this anyway!!

This is a default macro and there is CI stock in the product view.

Am I missing something obvious?

Thanks,

Paul

Former Member
0 Kudos

Saradha,

I created a second macro and used the following formula:

PHYSICAL_STOCK(ACT_PRODUCT;ACT_LOCATION;'000';'CI')

It seems that if I use '000' instead of ACT_VERISION the stock is pulled into the key figure correctly. So it appears that the issue may be because of the ACT_VERSION? Also, I don't have enough room in the cell to use the word "ACT_VERSION'.

Kind Regards,

Paul

sarvesh_rathore
Explorer
0 Kudos

Hi all,

I have a similar requirement where I want to copy the Initial stock displayed in stock on hand projected key figure to another key figure. This is done using the function initial_stock.

The syntax used is:

KeyFigureXXX (Time series) = INITIAL_STOCK( ACT_VERSION ; ACT_PRODUCT ; ACT_LOCATION )

In interactive mode this is working if I keep it as a default macro.

I have two questions:

1. Why it is working only as a default macro.

2. If I schedule a background job for this, the data is not getting copied to the new key figure.

Is it possible to copy the initial stock to a time series key figure using a background job for all Location Product.

Regards,

Sarvesh

Former Member
0 Kudos

Hi Paul,

In product master data, under demand > available stocks tab,

check whether tick is made against both stock in quality

inspection and in blocked stocks. This will facilitate the

key figures updated with their values

Regards

R. Senthil Mareeswaran.

Former Member
0 Kudos

Hi Senthi,

Yes, I have tried this but the key figure is still not being populated with stock values. Do you have any other suggestions?

Paul

Former Member
0 Kudos

Try Time series consistency check (/SAPAPO/TS_LCM_CONS_CHECK)

and if it still dosent appear try re-initilialising the planning area.

-Viren

Former Member
0 Kudos

I have tried both of these but I am still not able to see the stock. Any other suggestions?

Kind Regards,

Paul