cancel
Showing results for 
Search instead for 
Did you mean: 

Function in macro

Former Member
0 Kudos

Hi,

In APO snp planning book under stock balance macro i've added one customized step to handle multiplant scenario. Case is i've two manufacturing units A and B and ATD receipts of A should be stock of A plus stock of B.

For this i've created on auxillary row to read physical stock of B using function physical stock and then ATD receipts of location A is ATD receipts plus auxillary row. The issue in this is while reading physical stock of B im using category CC but is any open sto with caategory BI is there then that much quantity has to be reduced from physical stock and for this i need to reduce category BI from physical stock so correct available stock of B will get added to A.

Currenlty macro step for auxillary row is ,

Stock clubbing auxillay = physical stock ( act_product ; 'A' ; '000' ; 'cc') - physical stock ( act_product ; 'A' ; '000' ; 'BI')

But above syntax is nt gving correct result. Can u pls tell which function i can use to read category BI for particular location .

Regards,

Vrushali

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi ,

STO in APO will have receipt and requiremnet parts with receipt part with ATP category of BI.

Is it possible to indetify the KF used for STO and then align macro accordingly.

Regards

Datta

Former Member
0 Kudos

Hi,

Thanks for your responce. As u said i can assign KF with STO but in macro i want to read KF of that particular location only. Here in my example i want to read sto( KF ) of location A. How i can achieve that.

Regards,

Vrushali

0 Kudos

I'm not 100% clear of your requirement but ORDER_DATA_LOCPRODS() should be able to read any category group for any location product (careful its category group not category so you might need to create one)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

You can create a category group as mencioned in /sapapo/saplopoc. There, you can associate BI category.

When you create your macro indicate the category group and others parameters:

ORDER_DATA_LOCPRODS( u2018buffering (y/n)u2019 ; u2018category

groupu2019 ; u2018versionu2019 ; from-date ; to-date ; u2018location 1u2019 ; u2018product

1u2019 ; u2018location 2u2019 ;u2026) provides the cumulated order quantities of

any number of location products in the specified time series

and in the specified category group.

Example:

ORDER_DATA_LOCPRODS(1 ; 'Y99' ; ACT_VERSION ;BUCKET_BDATE( ACT_COLUMN ) ;BUCKET_EDATE( ACT_COLUMN ) ;ACT_LOCATION ; ACT_PRODUCT )

Other solution is create a KF and define then as Live cache and associate the category group there. In this options you must eliminate the time series.

I really dont know how to define a category group in planning area without create a category group. Please, If you discover it share with us!!!

I hope it help you!

Former Member
0 Kudos

Hi Thiago

I am struggling with the operation ORDER_DATA_LOCPRODS ... Following is the macro but it is not activating and giving me an error - Incorrect assignment - Expression missing


Could you please let me know what I am doing wrong

Regards