Skip to Content
avatar image
Former Member

Execution of Macro in Background job

We have created a macro in APO DP that uses 4 characteristics and a key figure. As part of the macro we are executing a Z-function that we have created. The problem occurs when executing the macro in a background job. When the background job is executed the macro processes correctly (performs the correct calculations) for the first CVC that is processes, but it is not able to process the rest of the CVCs.

<b>ERROR: "There are no plannable characteristic combinations",</b>

The function copies data from the CVC that is being processed (source CVC) to another CVC (target CVC). The values for the target CVC to which the data has to be copied for a particular key figure are determined from the paramaters that are given to the function in the macro.

The steps followed in the function are the following:

1- Determine the relation between source and target CVC, ie, from the source CVC that is being processes in the macro, the function determines the target CVC to which the data has to be copied.

2- Call BAPI "BAPI_PBSRVAPS_GETDETAIL2" to retrieve the valuesthat are in the Planning Book for the source CVC.

3- Perform the addition of data (value retrieved from the source CVC is added to the target CVC).

4- Write value to the target CVC using BAPI "BAPI_PBSRVAPS_CHANGEKEYFIGVAL2".

When using the BAPIs the aggregation level used is the same aggregation as the one specified in the Background job used for the execution of the macro.

This macro is executed in a background job, and the copy/calculation is performed correctly for the first CVC (first CVC contained in the data selection used in the background job) processed, but then it does not do anything else for the rest of CVC's. The error message given by the log of the background job is <b>"There are no plannable characteristic combinations",</b> when in fact, the characteristic combinations do exist in the Planning Object Structure.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    May 25, 2007 at 10:56 AM

    Are there any other macros that are executed when you run the macro in a foreground planning book? For example, in the default or start level sections. If there are, do they provide any calculations or information that your macro uses?

    If so, then you will need to ensure that these others macros are also executed as steps prior to your macro execution in the background job.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member


      The reason we don´t use RTSCOPY is because CVC source and final are not equals and the RTSCOPY does the copy inside the same CVC but in differents planning areas, and that isn't our scenario.