Skip to Content
avatar image
Former Member

Function in macro


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 .



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Jul 23, 2010 at 08:39 AM

    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.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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)

  • avatar image
    Former Member
    Aug 16, 2011 at 08:49 PM


    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.



    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!

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      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