We are hiring and constantly growing! Have a look through our vacancies to find the right role for you!
This SAP enhancement enables you to change the process of material quantity calculation in the master recipe and the process order as follows:
The following parameters are transferred from either the master recipe or the process order to the enhancement function:
|APPLICATION||Material quantity calculation source, for example,|
|MR master recipe and 40 for process order.|
|KEY||The material quantity calculation ID. It consists of|
|material number, plant, production version and|
|model number (at present, always 01)|
|Background: a material can be assigned several|
|You can create one material quantity calculation|
|for each production version.|
|VERSION||The material quantity calculation version. One|
|version is created with each change number.|
|IN_CAUFVD||The process order header structure. This structure|
|is transferred if the enhancement is called up from|
|the process order.|
|IN_RCM01||The structure in the master data help field (recipe|
|and BOMs), for example, field DATUV for the|
|periodic master data explosion. This structure is|
|transferred if the process order is called up for|
|DISPLAY_IMP||Indicator for display mode for|
|material quantity calculation (display or change)|
|RECALL_IMP||Indicator for material quantity calculation with|
|temporarily created order (for product costing,|
|DISPLAY_LST_IMP||Indicator: print list of formulas|
The following parameters are transferred from the enhancement function to either the master recipe or the process order:
|CHANGED_VALUE||Value has been changed and is to be saved|
|CHANGED||Formula has been changed and is to be saved|
|SUBRC||SY-SUBRC (return value)|
The following material quantity calculation tables are transferred:
|IN_COL||Column structure of material quantity calculation|
|IN_JOIN||Values and formulas per line|
|IN_KALT||Material quantity calculation header|
|IN_PLPOE||Database tables with operations from the|
|IN_STPO||Database tables with BOM components of|
|material quantity calculation|
|IN_RESBDGET||Database tables with the reservations of material|
|IN_AFVGDGET||Database tables with the operations from the order|
|IN_ROW_DEF||Index to the database tables|
RETURN_CODE controls behavior after the enhancement has been exited. If a value <> 0 is transferred, material quantity calculation is not called up.
For more information on parameters, refer to the interface description of function module EXIT_SAPLCOML_001.
The enhancement contains all the data necessary to represent formulas and results from a master recipe or a process order with the aid of the user's own tools.
In the enhancement, you can read and mix formula tables. If necessary, you can also read characteristics. Then you can add in your own evaluation. See also how the function module CALCULATION_SHEET works.
Finally, decide whether changed values and formulas are to be saved in the standard system.
If the SAP material quantity calculation is no longer to be carried out, enter a corresponding return code.
Table IN_ROW_DEF represents the sequence of operations and components in the material quantity calculation. It contains an index to a data record in the table for every object. Example:
loop at in_row_def
tabnm = 'STPO' or
tabnm = 'RESB'.
* Index for access to material quantity calculation line table
tabix_tmp = sy-tabix + 1.
* reading a BOM component
read table in_stpo index in_row_def-index.
* reading a material quantity calculation line
read table in_row index tabix_tmp.
read table in_join with key row = in_row-id.
* changing a value, value to be saved later
in_join-value = 'xxxxx'.
in_join-form_ind = Space.
modify in_injoin index tabix_tmp.
changed_value = 'X'.
See Include LOCOMLF01 FORM GET_AUSP.
Make the following settings in the enhancement (see the syntax example in the section How do you read a table):
The time at which the data is saved depends on whether you call up material quantity calculation directly after the enhancement:
The data is saved in the following database tables: