Register Login

Stock value calculation in Inventory Controlling

It must be taken into account that stock values must be calculated in the LIS (in particular stock value calculation in Inventory Controlling) with 3 different info structure types.

  1. Information structure of the type 'Standard'
  2. Information structure of the type 'Without period'
  3. Information structure of the type 'Without actual data'

Example: Stock Controlling

  1. S031 -> Type 'Standard'
  2. S032 -> Type 'Without period'
  3. S039 -> Type 'Without actual data'

Example: Retail Information System

  1. S083 -> Type 'Standard'
  2. S084 -> Type 'Without period'
  3. S085 -> Type 'Without actual data'

In the LIS, the periodic calculation of stock values is carried out using a certain technique.

This means that all key figures (for example, business volume, goods receipt) that can be accumulated without problems are updated in information structure of the category 'Standard'. It is vital that the key figures Total goods received quantity/Total goods issued quantity of the stock value that has to be calculated are periodically updated in this information structure.

The stock value in the information structure of the category 'Without period' is updated so that the actual stock value is always stored here.

In the information structure of the category 'without actual data', no actual data is updated.
The standard analysis which is based on this information structure reads actual data at runtime from the logically assigned information structures of the category 'Standard', and of the category 'Without period'. It carries out a back-dated stock claculation for the stock value based on the actual stock values and the periodic goods receipts and goods issues.

Without this procedure, a background processing (period closing program for the stock values), or a special update logic would be required for the correction of the periodic stock values when posting in previous periods.

The technique which is used by the LIS to calculate the deadline values should be followed by the customer, and correspondingly be implemented in a customer project.

Procedure:

Step 1

Design the three required information structures according to the requirements.
The information structure of the category 'Without actual data' displays the business approach. The information structures of the category 'Standard', and of the category 'Without actual data' are derived from it.

Step 2

Create/generate the three information structures in the LIS Customizing.

Caution:

  • The characteristic overviews must be identical.
     
  • The stock values must be identically in the information structures of the category 'Without period', and 'Without actual data'.
     
  • The goods receipt and goods issue key figures belonging to the stock value must be identical in the information structures of the category 'Standard', and 'Without actual data'.

Hint:
Since the required information structures possibly only deviate minimally from the information structures delivered in the standard system, you should create the information structure by copying and carrying out the required adjustments.

Step 3

Create/generate the update in the LIS Customizing

A: Category 'Standard'

No special features

B: Category 'Without period'

Updating should be implemented as delta updating, that is, the stock value should be calculated on the basis of the goods issues and gooods receipts key figures.

Example: Key figure stock -> Update of receipts/issues fields from Communication structure MCMSEG

Caution: This is only valid for Application 4.0 Retail!
The stock data update for application 03 BCO must be carried out on the basis of MCBEST otherwise stock data compilation is not possible.

To ensure that only the actual stock value and no period record are updated there are in principle two possibilities.

Option 1:

After you created the update on the basis of any date field of the relevant communication structure (for example, MCMSEG-BUDAT), the call of the PERIODE_ERMITTELN routine is to be removed from the generated update program.

Option 2:

Include a dummy date field, which does not need to be supplied, in the corresponding USER Include (for example, MCMSEGUSR) of the communication structure relevant for updating.

The update of the stock values is created on basis of this date field.

As a result, the update program does not need to be adjusted manually since the PERIODE_ERMITTELN routine does not return any value, and therefore no period updating is carried out.

Advantage: The regeneration of the update program is possible without problems.

Step 4

Create the standard analysis

For all three information structures, you can create a standard analysis where the standard analysis for the information structure of the category 'Without actual data' is the basic problem in using the entire LIS technique.

Note:
In the standard system, standard analyses are only delivered for the info structure of the category 'Without actual data'. If you want to regenerate standard analyses for information structures of the category 'Standard', or of the category 'Without actual data', use the MCS_ANALYSE_GENER function module.

A: Category 'Standard'

Generate the update via the LIS main menu -> Standard analysis -> self-defined analysis, or via FBS MCS_ANALYSE_GENER

B: Category 'Without period'

Before STA generation, ensure that:

  • TMC4-SPERI is not empty (M, T or W)
    This can occur if Transaction S032/S035 is used as a reference!
  • TMC4-SPZIS is empty

Generate the update via then LIS main menu -> Standard analysis
-> self-defined analysis, or via FBS MCS_ANALYSE_GENER

To ensure that the standard anlysis works according to your requirements, carry out an update of the SPZIS field (information structure category) in the TMC4 table.

Update: TMC4-SPZIS = 'C' (without period)

Caution:
When the update has been carried out, it is no longer possible to generate an update program for this information structure.

Note:
A successive generation of the standard analysis for the information structures S032 and S035 is not possible.

C: Category 'Without actual data'

You cannot generate an update in this case but you must create the standard analysis manually.

You can only create it by copying the existing standard analysis, and adjusting it correspondingly.

Description of the procedure:

1. Localize in the standard system information structure, by means of the characteristics and the key figures, that is similar to the affected information structure of the category 'Without actual data'. Make sure that it corresponds best to this structure.

The better the reference is, the less work results from adjusting the copied version.

Standard system:

  • BCO: S039 -> Report RMCB0100
  • RIS: S085 -> Report RMCW0900

In the following it is assumed that a retail customer wants to slightly modify and copy the three information structures S083, S084, S085 of the standard system with the corresponding counterparts S583, S584, S585 -> S085 is the relevant reference information structure -> RMCW0900 is the reference report.

Note:

Take the standard analyses belonging to the information structures from the TMC7 table. After you created the standard analysis successfully, you need to maintain the TMC7/TMC7T table.

2. Copy the corresponding reports (example RMCW0900)

  • RMCW0900 -> ZMCW0900 (standard analysis)
  • RMCW09TP -> ZMCW09TP (local data for analysis)
  • RMCW09F0 -> TMCW09F0 (local FORM routines analysis)

Afterwards, you have to copy and adjust the RMCW0905 report.

This is not critical if the ZMCW0900 program runs error-free.

3. Adjust the Includes ZMCW09TP and ZMCW09F0.

You can basically do this via the activities Replace-/Delete-/Insert.

Hints:

  • Replace S083 -> S583, S084 -> S584, S085 -> S585
     
  • Adjust the characteristics:

Check the characteristics in the reference, and the active structure:

-> Find and delete all lines where the characteristic 9 occurs, if the active structure has only 8 characteristics (every DD_009 and SL_009).
-> Replace N. item reference (for example, EKORG) by N. item active information structure (example VKORG).
-> When you replace the data element WERKS, you must proceed very carefully since this data element is also used in another context in the Includes.

Hint:
Create self-defined information structure so that WERKS occurs exactly at the same item and, as a result, a REPLACE is not required.
-> Localize the key figure blocks and check which blocks can be transfered this way, and where adjustments are required (FIND ZUGMNG).
-> Check/adjust the routines VARIABLEN_INITIALISIEREN andZUSATZKENNZAHLEN_BRECHNEN in the ZMCW09F0 Include.

4. Adjust the main report ZMCW0900.

-> Replace the Includes RMCW09TP and RMC09F0 by the customer Includes.
-> Adjust the Select-Options

Hint:
For testing purposes, a standard analysis can be generated to see what the select options have to look like.

The ZMCW0905 selection report is to be adjusted correspondingly.

5. End notes

The syntax check of the main report refers to the corresponding missing facts.

After this, generate the user interfaces of the customer report (SE43), and adjust them (copy user interface reference).

Proceed very carefully when adjusting the Includes (4-eye priciple). It is better to start again than to modify an Include that has been adjusted incorrectly.

Important:
Use the standard system as an example when creating tailor-made solutions, in particular when creating updates.


Step 6

In Release 4.0, the calculation of stock values will be possible without problems (Create information structure categories, links between information structures, update and standard analysis generation).

After this, an initial data creation of the information structures is required since various control tables are maintained when you create the information structures, which are the basis for a tailor-made generation of the update and standard analysis.

A possibility to avoid the regeneration is maintaining control entries later. As a result, you can, for example, regenerate the standard analysis without problems.

Know more about SAP MM