cancel
Showing results for 
Search instead for 
Did you mean: 

How to Exatract Stock From APO BW to planning Book Using Macro Function

Former Member
0 Kudos

Hi,

I am new to APO DP, How to Exatract Stock From APO BW to planning Book Using Macro Function, What are the Macro function to Extract stock, Explain with example and Code.

Accepted Solutions (1)

Accepted Solutions (1)

former_member187488
Active Contributor
0 Kudos

Hello,

It is not comman that you need to use stock information in DP. Demand Planning focuses on the sales history and makes forecast on the basis of these data ... The above mentioned two macros are used to retreive stocks from liveCache, which is often used in SNP. I never see these macros are used in DP planning book and not sure whether it is OK to use like that. There're some parameters like location/product which need to pass to the macro function. It is very easy in SNP planning book, but in DP, I'm not sure.

So could you please make sure your business requirement on this? Are you sure you need stock information in DP, but not SNP?

And, there's no macro function that could read data directly from BW, which should be for sure.

Regards,

Ada

Former Member
0 Kudos

Hi,

Thanks for your useful information, I will extract Stock in SNP, PHYSICAL_STOCK(), INITIAL_STOCK(), i need example for this function and Complete MACRO code.

Thanks,

Nandish Gowda

former_member187488
Active Contributor
0 Kudos

Hello Nandish,

I think that you can find the example of Initial_Stock in standard marco book 9ANP94/SNP94(1).

Macro name is "Stock Balance" and step is "Stock on Hand (Initial)" (4th step).

For the macro Physical_Stock, you can use it the same way, referring to the following:

-


PHYSICAL_STOCK( u2018productu2019 ; u2018locationu2019 ; version ; u2018categoryu2019 ; u2018categoryu2019 ; u2026)

returns the stock of a location product of one or more categories.

-


Best Regards,

Ada

Former Member
0 Kudos

Hi,

I saw standard INITIAL_STOCK( ACT_VERSION ; ACT_PRODUCT ; ACT_LOCATION ) like this, these values enter by manually or automatically execute this function. please give practical Example.

Thanks,

Nandish Gowda

Former Member
0 Kudos

Nandish,

To add to Ada's answer, you can find an example of function PHYSICAL_STOCK() in Macro book 'SAP Examples and templates (Part2)'. The name of the Macro is 'Physical_Stock of categories DD, CC'.

Best Regards,

DB49

Former Member
0 Kudos

Hi,

These Stock is it fetched from live cache directly or through ECC.

Thanks,

Nandish Gowda.

Former Member
0 Kudos

Hi,

Please excuse me for repeating again what most of the experts have said in above answers.

All the above rightly mentioned macro functions are useful for extracting stocks which are already available in livecache and you need to carry out further processing.

If you want to extract stocks from BW infocube to load into APO SNP, these macro fucntions will not be helpful.

Regards

Datta

Former Member
0 Kudos

Hi,

Normally stocks are transferred from ECC to APO through CIF application.

This way these stocks become available in APO and remain online though CIF .

Regards

Datta

former_member187488
Active Contributor
0 Kudos

Hello,

This IS the practical example. If you load one location/product in SNP Planning book, this function with this format will work fine. You can test this in standard planning book.

Best Regards,

Ada

Answers (2)

Answers (2)

former_member583013
Active Contributor
0 Kudos

Hi,

There is no macro function which reads data directly from BW.But using macro functions PHYSICAL_STOCK and

INITIAL_STOCK you can read stock of //RRP3 or from APO product master.Refer to the online help on these macrofunctions.

Hope this will helps you.

Regards,

Sunitha

Former Member
0 Kudos

Hi,

PHYSICAL_STOCK(),INITIAL_STOCK() is user for extract stock, please give me example for this function and complete execution of MACRO Code.

Thanks,

Nandish Gowda

aparna_ranganathan
Active Contributor
0 Kudos

Hi

Your question is not very clear. Are you sure you want to pull stock to APO DP module ? Asking this because they mainly use forecast and sales ordes in DP. Also the other question i have is arent you pulling the master and transaction data from R/3 using CIF. You can CIF the stock from R/3 to APO . Once the stock is in APO, you can use Physical_stock( ) function to pull the stock to SNP planning book. Not sure about DP though

Thanks

Aparna

Former Member
0 Kudos

Hi,

Thanks for your immediate reply, Stock from ECC to SCM BW info cube, these stocks are used to planning purpose, means forecast, I know how to copy from info cube to planning area using /sapapo/tscube, I want details about is there any function extract these data directly to planning book using MACRO function. Please explain with example and MACRO code.

Thanks,

Nandish Gowda

Former Member
0 Kudos

Hi,

You already know the standard method of loading Planning area from infocube through the transaction /SAPAPO/TSCUBE in APO DP for further processing.

There is no macro function to read directly from an infocube to a planning area in APO DP.

Since the SAP recommended practice for APO-DP (to load data from infocube through transaction /SAPAPO/TSCUBE into planning area of DP) is followed and proven to be robust, it is improbable to get any sample macro code for the same.

Regards

Datta