Ansicht
Dokumentation

MCP20002 - SOP: define macro calculation for flexible planning

MCP20002 - SOP: define macro calculation for flexible planning

CPI1466 during Backup   BAL_S_LOG - Application Log: Log header data  
This documentation is copyright by SAP AG.
SAP E-Book

Use this function module to calculate any functions you want in the planning table of Sales & Operations Planning (SOP).

The interface to the function module EXIT_SAPMMCP6_002 looks like this:

IMPORTING
VALUE(I_T445A) LIKE T445A STRUCTURE T445A
VALUE(I_T445P) LIKE T445P STRUCTURE T445P
VALUE(I_VRSIO) LIKE RMCP2-VRSIO
VALUE(I_MNAME) LIKE T445M-MAKRO
VALUE(I_EVENT)
TABLES
T_MCOLS STRUCTURE VESOP
T_COLS STRUCTURE PGCOLS
T_TAB STRUCTURE MXSOP
T_TAB_OLD STRUCTURE MXSOP
T_LINES STRUCTURE MCP6_LI
T_TAB_ATEL STRUCTURE MCP6_ATEL

The field string I_T445A gives the planning parameters of the information structure currently being planned. In particular, the planning method can be determined here (field T445A-FLGPL).

Information on the planning type currently being planned is transferred in the field string I_T445P.

The field I_VRSIO gives the version currently being planned.

The name of the macro to be executed (exit for content) is transferred in the field I_MNAME.

The field I_EVENT shows the point at which this call is made. The following are possible:

Initial macro '1'
Default (before event) '2'
Default (after event) '3'
Final macro '4'
Manual macro start '5'

At the present date, table T_MCOLS is filled in the same way as table T_COLS.

Table T_COLS describes the layout of the columns in the current matrix. Field TCOLS-COLUMN is particurly important here. It gives the column number in which this column is stored in tables T_TAB, T_TAB_OLD, and TAB_ATEL (reference to matrix).

The central table for this function module is T_TAB. All currently used planning values are stored here. The table looks like this:

T_TAB-Z : row number (refers from T_LINES)

T_TAB-C : column number (refers from T_COLS)

T_TAB-V : planning value

Note that the table remains sorted by Z and C.

Table T_TAB_OLD contains the last cell contents to be changed. Its structure is the same as that of table T_TAB. If you change values in table T_TAB, the original values must be recored in table T_TAB_OLD (if they do not already exist there).

Table T_LINES describes the layout of the lines in the current planning table. It contains the information about which key figure and which planning object (T_LINES-KRIT1) are to be found in which line. Particularly important here is the line number T_LINES-LINE which refers to tables T_TAB and T_TAB_OLD.

Output attributes can be stored for every cell (row/column) in table T_TAB_ATEL.






CPI1466 during Backup   TXBHW - Original Tax Base Amount in Local Currency  
This documentation is copyright by SAP AG.

Length: 3612 Date: 20240329 Time: 121226     sap01-206 ( 45 ms )