LSMW data manipulation

When loading data with LSMW, you can be stuck by incorrect date formating : Here is how to convert a field read in the file in DDMY (no matter what date separator the loading file provide) to SAP Date format YYYYMMDD : Add the following in the Mapping & Conversion Rules :

MATMAS9-ZKDAT+0(2) = MATMAS09-ZKDAT+6.
MATMAS9-ZKDAT+2(2) = MATMAS09-ZKDA+4.
MATMAS9-ZKDAT+4(4) = MATMAS09-ZKDAT.

Activate Change pointers for Message generation

BD10 to generate Material Idocs (MATMAS)

BD30 to generate BOM idocs (BOMMAT)

BD21 to process changes pointers. Here is how to set them :

https://blogs.sap.com/2014/03/09/change-pointers-in-r3/

Important :

  • By default, change pointers are generated for all changes in the material master (no filter by plant).
    • Filter can be done by Badi BDCP_BEFORE_WRITE for the specific message type to register in change pointer table (BDCP2) only the relevant changes required.
    • It can be done also filtering in the distribution model but then the plant in this case should be in a mandatory segment to avoid those messages to be sent. 

Introduction:

This document explains how to track the Material Master Data changes using change pointers in SAP R/3 environment.

Let us understand by taking following example –

The requirement is to track the Material Master changes in SAP R/3 environment and to send the information to some Legacy system (in form of AL11 Text file), if following fields changes –

  • If any new Material is created.
  • If Material is assigned with Dangerous indicator profile
  • UN Number
  • Dangerous Good Class
  • Dangerous Good Packing Group

Master data changes can be distributed with the SMD (Shared Master Data) tool. Changes to the Master Data are written in change documents interface, which in turn logs entries into change pointers.

The following step shows the change pointers settings and how to track the change logs for modified data.

Step 1 – Create Message Type (WE81)

/wp-content/uploads/2014/03/1_406385.jpg

Step 2: Assign Table Fields to Message type (BD52)

Assign table fields to message type which needs to be considered for Change pointers generation.

/wp-content/uploads/2014/03/2_406386.jpg

Step 3: Activate Change Pointers generally (BD61)

/wp-content/uploads/2014/03/3_406387.jpg

Step 4: Activate change pointers corresponding to fields in message type(BD50)

/wp-content/uploads/2014/03/4_406388.jpg

Also check if the data elements of all the required fields has ‘change Document’ field checked (Below screen shot for Material Number)

/wp-content/uploads/2014/03/5_406389.jpg

Step 5: Create a new Part Number and change following fields to test the generation of change logs in table CDHDR, CDPOS, BDCP and BDCPS.

  • Dangerous indicator profile (Transaction MM02)
  • UN Number (Transaction DGP3)
  • Dangerous Good Class (Transaction DGP3)
  • Dangerous Good Packing Group (Transaction DGP3)
Transaction – MM02Transaction – DGP3
  

Step 6: Create a report which will perform following functions –

  • Read non processed change logs using Function Module CHANGE_POINTERS_READ by passing the Message type name
/wp-content/uploads/2014/03/8_406392.jpg
  • Create a text file with all the required material information
  • Transfer that file on the application server (AL11)

And from application server the file is transferred to legacy system using some UNIX Script (this is out of scope of this BOK)

In addition to above FM (change_pointers_Read) you can also see the logs in following Table –

  • CDHDR (Change Document Header Table)
  • CDPOS (Change Document Items)
  • BDCP   (Change Pointer table
  • BDCPS (Change Pointer Status table)

IDOC Generation to send modified records –

In addition to above report you can also create a Function module and create an IDOC’s to send the modified data to legacy system-

Step1 – Create a Function module (e.g. ZTESTFM)

In this you can populate the IDOC segments and use the FM – MASTER IDOC_DISTRIBUTE to create and IDOC

Step2 – Assign Function module to Message Type (Transaction BD60)

/wp-content/uploads/2014/03/9_406393.jpg

Step 7: For the master data that are processed set the change pointer status to ‘Processed’ by setting its value to ‘X’ by calling function module CHANGE_POINTER_STATUS_WRITE.

/wp-content/uploads/2014/03/10_406394.jpg

Delete change pointers

Transaction is BD22 or the standard program RBDCPCLR deletes the obsolete/processed change pointers.

/wp-content/uploads/2014/03/11_406395.jpg

Pull List and Stock Determination in Production

Pull List and Stock Determination in Production – MF60

https://blogs.sap.com/2015/02/25/pull-list-and-stock-determination-in-production/

1. Pull List

The pull list controls the in-house flow of material for supplying production with materials. The system assumes that the components required for production have already been produced in-house or procured externally and are now available to be transferred from their current storage location or bin to the production storage location.

The pull list checks the stock situation at the production storage location and calculates the quantities of missing parts. Replenishment elements can be created for these missing parts.

2. Master Data

Here we are going to review the key master data needed to use the Pull List.

2.1. Production Storage Location

Issue location for production order
Number of the issue location from which the material is issued during the production process. Backflush is posted to this issue location if required.

Use
In production, this is the access sequence in which the determination of the production storage location occurs:

  1. First, the issue storage location of the material to be issued (MARC-LGPRO) is transferred to the material master from the MRP data if it is
    filled.
  2. The system overwrites this value with the issue storage location from the bill of material (RC29P-LGORT, STPO-LGORT) if it is filled.
  3. If the operation to which the component is assigned in production order contains a work center with supply area, the storage location is transferred
    from this supply area (PVBE-LGORT). However, this transfer is only carried out if storage location data (MARD) is maintained for this storage location for the material.

Ref.: OSS Note: 137225 – Prod. order: Issuing storage location for component

Depending on if your component is used in more than one production storage location, you could asisgn this in the material master or in the BOM or through a Supply Area. Let’s supose in this example that we assign this at BOM item level.

This is maintained using t-code CS02. The production storage location is assigned at item level. Once you are in the BOM, click twice on each BOM item and go to Status/Lng Text tab:

PLIST 1.jpg

2.2. Stock determination

The pull list controls the in-house flow of material for supplying production with materials. The system assumes that the components required for production have already been produced in-house or procured externally and are now available to be transferred from their current storage location or bin to the production storage location.

This automatic transfer between the current storage location to the production storage location is performed based on the stock determination strategy.

Strategies for Stock Determination
You make all the settings you require for a stock determination strategy.

You determine a strategy at plant level using the stock determination group and the stock determination rule (The terms ‘rule’ and ‘group’ correspond to the checking group and the checking rule logic in the availability check).

The customizing point for the Strategies for Stock Determination is:

SPRO –> Materials Management –> Inventory Management and Physical Inventory –> Stock Determination –> Define Strategies for Stock Determination

PLIST 2.jpg

The stock determination group is assigned to the material in the material master record.

PLIST 3.jpg

3. Pull List Execution

Suppose your business is running the following process:

  • Create and Schedule process orders: the planner creates the process orders and the production scheduler schedules all the process orders.
  • Material staging: warehouse responsible will receive the list of process orders and will move components to the shop floor based on: which is the material that will be produced and which is the production line capacity.
  • Production execution: production responsible executes the production of the corresponding process order.
  • Goods receipt & confirmation: finished good production quantity is received and the confirmation is done. At this moment components are consumed from the production storage location using Backflush.

3.1. Create and Schedule process orders

Let’s create a process order and ensure the Production Storage Location is determined as expected.

PLIST 4.jpg

Take a look of the component list. All the components have an assigned production storage location:

PLIST 5.jpg

3.2. Material staging (MF60: Pull List)

The warehouse responsible will move components to the shop floor (production storage location). This can be done based on process order number or entering the material and quantity to be produced (this is commonly used when the order takes several days and we only want to supply components on a daily basis for the corresponding production of the day)

In this example suppose that the first process order is: 304472 and its duration is 5 days. The corresponding finished good is: 403403 (production version: 0001) and the production line maximum capacity is 5000CS/day.

Material Staging is executed thru transaction: MF60.

PLIST 6.jpg

PLIST 7.jpg

The pull list checks the stock situation at the production storage location and calculates the quantities of missing parts. Replenishment elements can be created for these missing parts (this is the section at the bottom of the screen).

Let’s see what is each column:

  • Issue stor. location = production storage location. This was entered in the bill of material.
  • NetReqQty = component quantity based on maximum production line capacity. In case the Pull list is executed agains an order, here you will see the quantity of the component determined in the order.
  • Available stock = this is the available stock in the issue storage location (production storage location). This can be the available remaining quantity of the before production day or shift or order.
  • Quantity staged = NetReqQty – Avail.Stock = This is the remaining quantity to be moved to the shop floor (production storage location).
  • RepLoc = is the warehouse storage location. It is the location found by the stock determination strategy.

Finally.. you press Save and the components will be moved from the main warehouse to the production storage location

PLIST 7.jpg

4. Pull List Global Settings

If necessary, limit your selection using the Global settings . Here, you have the choice between:

PLIST 1.jpg

  • General settings

For example, you may choose to display components with missing quantities only in the pull list or, using the indicator Take all requirements into account , you may define that the system is to include the requirements of all orders that influence the missing parts situation. If this field is not selected, the system only includes requirements for the specific order that you entered in the missing parts calculation. Here, you can also define whether your components are staged at storage location level via direct stock transfer, or using stock transfer reservation.

PLIST 8.jpg

  • Settings for dialog control
    Here, you define which procedures are to be carried out automatically in the pull list and which are to be carried out in dialog mode.

You also define whether the system is to save a complete log of all the messages and whether this log is to be displayed automatically.

PLIST 9.jpg

  • Printing settings

Here, you make the settings for the print list.

PLIST 91.jpg

References:

Pull List – Repetitive Manufacturing (PP-REM) – SAP Library

Accessing the Pull List – Repetitive Manufacturing (PP-REM) – SAP Library

OSS Note: 137225 – Prod. order: Issuing storage location for component

Ouvrir une période MM (pour les mouvements de stocks) MMPV

Transaction MMPV

Code société 

Période à ouvrir

Contrôler et déplacer

Autoriser qtés négatives dans période précédente

Autoriser valeurs négatives dans période précédente

 

Attention, n’avance que d’une seule période à la fois. Il faut la lancer plusieurs fois pour avancer de plusieurs mois.

Publié dans MM

Dérivation des données de lot

Source : http://www.sapsword.com/home/sap-batch-management/sap-batch-derivation-1

SAP Batch derivation

 

Definition

Transferring batch characteristics values or batch master fields from the sender batch to the receiving batch is called “Batch Derivation”. The component batches can pass on their Field values/characteristics values to the manufactured batch.

 Events at which the copy of characteristics values to the manufactured batch is possible =

 ·         At Goods Receipt of the manufactured quantities

 ·         At Release of order

 ·         At Usage Decision

 ·         At Batch Creation

 


 

Batch Derivation Example

The following is an example of batch derivation at production order or process order release.

Production order / Process order = 1000120 for Material M1

Step 1: Define the transfer characteristics from the issued or sending component batches to the manufactured batch.

 

Issued Component Batch Concerned Characteristics Value Require Transfer Logic
C1 B1 COLOR RED NO  
    WIDTH 2 M YES Move Average Value
    LENGTH 10 M YES Move Average Value
    HEAT NUMBER H1 YES Move the Minimum
           
  B2 COLOR RED NO  
    WIDTH 3 M YES Move Average Value
    LENGTH 10 M YES Move Average Value
    HEAT NUMBER H1 YES Move the Minimum
           

Step 2: At Goods Receipt of the order or at Release of the manufacturing order or at usage decision, the transfer of characteristics can be triggered from the sending batch/es to the receiving batch/es.

 

Manufactured

Material

Batch Concerned Characteristics Value Whether Copied over
M1 BX DIAMETER 5 MM  
    WIDTH 2.5 M Move Average Value
    LENGTH 10 M Move Average Value
    HEAT NUMBER H1 Move the Minimum
         

 

 


 

SAP Batch Derivation Types

 There are 2 types of Batch Derivations, Pull and Push Batch Derivation.

 Pull Derivation

 Pull derivation exists when there are multiple sender batches and one receiver batch.

 Batch Master Characteristic’s values or Batch Master Field values can be transferred to the receiver batch from the sender batch.

 For a given characteristics either its value from the first batch can be copied over or an average value can be copied over to the receiver batch.

Pull Derivation = Many Senders >>TRANSFERRED>> One Receiver

                       = senders – 1 Receiver

 Push Derivation

 When there are many receivers and 1 sender. You have to choose whether the batch derivation is a push derivation in the sender condition record.

 An example of Push derivation can be:

 When you procure a component batch and use it to produce chemical products which are produced in bulk and stored in various bulk containers marked with unique batch numbers, in this case you if you want to transfer a component batch characteristics value or component batch master fields to the receiver batches, then you can do so using “Push Batch Derivation”.

 Push Derivation = One Senders >>TRANSFERRED>> Many Receiver

                           = 1 senders – n Receiver


 

Steps in Settings up SAP Batch Derivation

 One can use the following steps to set up batch derivation in SAP.


Step 1:

 Activate Batch Where used list

 One should activate the Batch where used list, in the configuration with the BaWU Synchron.posting indicator on– Allowing the system to figure out the sending batches and the sending characteristics values. There is no Transaction code for this, you have go to Logistic General >>> Batch >>> Batch Where Used List.

 


 Step 2:

 Batch Derivation Activation

 Batch Derivation should be active in configuration so as to use this functionality. Use transaction code DVSP.

 

 Step 3:

Setting Batch Derivation Search Procedure Techniques

It becomes really impossible for us to inform the system about the sending batch number (for each and every batch) and the characteristics/rules to transfer to the receiving batch number/s. Thus we use the batch search procedures and conditions records to direct the system so that for all the sending material batches at the “plant” level should be considered in the search and its data should be transferred to the receiving material batches. A similar condition record should be set for the receiving side so that all the material batches at the “receiving plant” level should be considered in the search and they should receive the characteristics data. Setting the sending condition on “sending plant” and the receiving condition on the “receiving plant” is just an example. You could define the levels at which condition records should be defined through the standard condition table and access sequence configuration

 SAP makes it easier for the users to make various combinations of levels for the sending party and the receiving party, to do this you should choose the condition fields as supplied by SAP and create a condition table and use these tables or key combinations to assign them in an access sequence with priorities. This suggests that you can make use of more than one key combination assigned in priorities so that if the condition record for one combination is not found, the system can make use of the next condition record to search for the sending batches and the receiving batches involved in the transfer.

 Once the Condition tables, access sequences, strategy types, and search procedures are configured for the sending party and the receiving party, you should then create condition records at the defined levels or defined key combination, for the sending party and the receiving party.

 For example

 If the sending key combination or sending condition record is to be defined at the “sending material-plant” level, then you should define the “actual sending material and the “sending plant” in the condition records and the characteristics involved in the transfer.

 On the other hand you should also define the condition records key combination for the receiving party, for example if you make a definition at the “receiving material-receiving plant level”; you should enter the actual receiving material and the receiving plant involved in the derivation, to help the system to search for the receiving batches.

 While you create the receiving condition records, you should maintain a set of transfer specific rules i.e., if the sender field/characteristics value is empty or the sender is overwriting any existing characteristics values in the receiving batch then should it error out the transfer or issue an warning or do nothing and on the other hand you can direct the system to send minimum/maximum/average value of the sender characteristics if there are more than one sender batches or more than one value is defined for the characteristics in the sending batch.

 The Batch derivation procedures and the condition records, for the sending party and the receiving party, which are set, it helps the search for all the concerned sending batches and the receiving batches, and identifies the rules defined in them, so that the characteristics values can be transferred to the receiving batches.

Steps in setting up Batch Derivation Condition techniques

1. Create Sending Condition Tables

SAP provides a set of standard key combination sets or preconfigured sending condition tables. Conditions tables are created with a combination of conditions field all provided. You cannot add your own field. Each Condition table contains a key combination.

You can alternatively create your own sending key combination/condition tables other than that provided by SAP as shown above, by creating a custom sending condition table. Following set of sending conditions fields can be used to create your own sending key combination or sending condition table (Use configuration Transaction code DSC1): 

Receiver Material

Receiver Material Type

Sender Material

Sender Material Type

Sender Plant       

The key combinations or condition tables (for the sender) as provided by Standard SAP are as below:

Sender Material Number (Table 010)

Sender Material Type (Table 011)

Receiving material + sending material (Table 012)

Receiving material type + sending material type (Table 013)

Sending Plant (Table 502)

à You can create your own condition table – 901 with the following condition fields

     Sending material + Sending Plant (Table 901)

2. Create Receiving Condition Tables 

SAP provides a set of standard key combinations set in preconfigured receiving condition tables. Conditions tables are created with a combination of conditions field all provided. You cannot add your own condition field. Each Condition table contains a key combination.

 

You can alternatively create your own receiving key combination/condition tables other than that provided by SAP as shown above, by creating a custom receiving condition table. Following set of receiving conditions fields can be used to create your own key combination or receiving condition table (Use configuration Transaction code DRC1):

Material Number

Material Type

            Receiving Plant

The key combinations or condition tables (for receiver) as provided by Standard SAP are as below: 

Receiving Material Number (Table 001)

Receiving Material Type (Table 002)

Receiving Plant (Table 501)

à You can create your own condition table – 902 with the following condition fields

            Receiving material + Receiving Plant (Table 902)

3. Create Sender Access sequence,

Create Sender access sequence so as to help in searching the attributes of the sender batches. Some field key combinations or sending condition tables are already grouped together in priority sequence in the standard SAP Batch derivation access sequence “BDS1”.

 

The field combination which are set in a priority sequence in the configuration represent the field key combination that would be used to create the master data for sending party, which in-turn would help in searching the attributes of the sender batches.

If you choose to create your own access sequence, you may do so; when you do that you have to assign the sending condition tables in your own defined priority sequence. Transaction code is DSC5 to create access sequences in configuration.

SAP offers the following receiving condition tables (key combinations) for use in the access sequence BDS1 arranged in a priority:

10 Receiving material + sending material (Table 012)

20 Sender Material Numbers (Table 010)

30 Sending Plant (Table 502)

You can create your own sending access sequence arranged in a required access sequence: You can call this sending access sequence as “ZDS1”

10 Sending Plant (Table 502)

     20 Sending material + Sending Plant (Table 901)

4. Create Receiver Access sequence,

Create receiver access sequence to search for the attributes of the receiver batches. Some field key combinations or receiver condition tables are already set up in the standard SAP Batch derivation access sequence “BDR1”.

The receiver condition tables which are set in a priority sequence in the configuration represent the field key combination that would be used to create the condition record master data for receiving party, containing the characteristics and rules, which in-turn would help in searching the attributes of the receiver batches.

If you choose to create your own receiver access sequence, you may do so; when you do that you have to assign the receiver condition tables in your own defined priority sequence.

Transaction code is DRC5

SAP offers the following receiving condition tables for use in the access sequence BDR1 arranged in a priority sequence:

10 Receiving Material Number (Table 001)

20 Receiving Material Type (Table 002)

30 Receiving Plant (Table 501)

You can create your own receiving access sequence arranged in a required access sequence: You can call this sending access sequence as “ZDR1”

10 Receiving Plant (Table 501)

     20 Receiving material + Receiving Plant (Table 902)

5. Sending Condition Type (Strategy type)

Sending Condition types is created to assign the sending access sequence to it. Standard SAP already has done this for you.

In SAP, the standard sending condition type BDS1 is created and assigned to the standard sending access sequence BDS1.

Transaction code is DSC6.

6. Receiver Condition Type (Strategy type)

Receiver condition types are created to assign the receiving access sequence to it. Standard SAP already has done this for you.

In SAP, the standard receiving condition type BDS1 is created and assigned to the standard receiving access sequence BDS1.

Transaction code is DRC6.

7. Sending Batch Derivation Search Procedure

Sending Batch Derivation Search Procedure contains the sending Condition type.

Various condition types are assigned in a priority sequence for use for searching the sending batches and its data.

Note: You can choose to assign more than one condition type set in a priority while building a search procedure.   

Transaction code is DSC7.

8. Receiver Batch Derivation Search Procedure

Receiver Batch Derivation Search Procedure contains the receiving Condition type.

The various condition types are assigned in a priority sequence for use for searching the receiving batches.

Note: You can choose to assign more than one condition type set in a priority while building a search procedure.  

Transaction code is DRC7.


Step 4:

Define the Batch Derivation Event

Defining derivation event would tell the system of a business event to trigger batch derivation, i.e., a point in time to transfer batch characteristics values from a sender batches to a receiver batches.

The transaction code to configure the derivation events is DVC8.

To configure the batch derivation event, the following information is fed to the system:

A)    When do you want to trigger the batch derivation?

The answer to this question decides when you would wish to trigger the batch derivation

  • @ Release of production/process order
  • @ Goods receipt from production/process order
  • @ Usage Decision
  • @ Manual Batch Derivation
  • @ Batch Master creation

B)    What would be the Sender/Receiver Batch Determination Procedure?

The answer to this question decides the search of the sender batch and the receiver batches to copy/compute the batch characteristics values for the receiver batches.

  • Assign a Sender Batch Derivation Search Procedure
  • Assign a Receiver Batch Derivation Search Procedure

C)    What is the type of Batch Derivation?

The answer to this question decides what would be the type of Batch Derivation that is required for business use.

  • Static batch derivation transfers the characteristics values of the sender batches to the receiver batches. A derivation log is generated in the derivation Monitor.
  • Dynamic batch derivation does not transfer the characteristics values of the sender batches to receiver batches, it only simulates the transfer. The receiving batches are not automatically updated with the transferred values; you would have to manually change it.

D)    Do you want to display the batch derivation results

The answer to this question decides whether the derivation results are displayed.

  • Display in Errors
  • Hide when ok
  • Always Display
  • Always Hide

Following steps can be followed to implement batch derivation in your organization:


Step 5:

Creating Sending Condition Records or Sending Batch search Strategies

When you configure the system till the creation of batch derivation search procedures for both sending and receiving parties, you would eventually create the master data for the sending conditions. To create the sending condition records you should follow the process as below using the transaction code DVS1/DVS2/DVS3:

Choose the batch derivation strategy from the drop down >>> Then choose a key combination as set in access sequence >>> and then create the sending batch derivation strategy master data by entering values for the condition fields of the key combination >>> Enter the characteristics that you would want to transfer the values from the sending batches >>> Save.

There is not much of data entry when you create the sending condition record apart from assigning the characteristics for which values are to be transferred to the receiving batches.

You can set master data for more than one key combination (a key combination decides the master data level at which the master data is created), but the system at the time of execution would first access the first condition key combination and check whether the master data exists for the sending batches, if the sending batches are not found using the first sending condition record master data, the system would check whether the master data for the sending batches exists for the second key combination condition and if the batches are not found using the master data under the second sending condition records then it will go to the next key combination in the access sequence and search whether master data for the sending batches is created for the third key combination, so on and forth.

 


Step 6:

Creating Receiving Condition Records or Receiving Batch search Strategies

When you configure the system till the creation of batch derivation search procedures for both sending and receiving parties, you would eventually create the master data for the receiving conditions. To create the receiving condition records you should follow the process as below using the transaction code DVR1/DVR2/DVR3:

Choose the batch derivation strategy from the drop down >>> Then choose a key combination as set in access sequence >>> and then create the receiving batch derivation strategy master data by entering values for the condition fields of the key combination >>> Assign the characteristics for which you want to receive the characteristics values >>> Assign rules for the characteristics.

 The Rules for the receiving characteristics are concerned with the following sending characteristics attributes:

 

  • While you create the receiving condition records, you should maintain a set of transfer specific rules i.e., if the sender field/characteristics value is empty or the sender is overwriting any existing characteristics values in the receiving batch then should it error-out the transfer or issue an warning or do nothing and on the other hand you can direct the system to send minimum/maximum/average value of the sender characteristics if there are more than one sender batches or more than one value is defined for the characteristics in the sending batch.

 You can set master data for more than one key combination (a key combination decides the master data level at which the master data is created), but the system at the time of execution would first access the first condition key combination and check whether the master data exists for the receiving batches, if a receiver batch derivation master data does not exists for the first key combination and the system fails to search the receiving batches using this condition record, it would further check whether the master data for the receiving batches is covered in the second key combination condition and if the master data does not exists under this given condition then it will go to the next key combination condition in the access sequence and search whether master data for the sending batches is created for the third key combination conditions, so on and forth.

 


 Step 6:The Actual Derivation

 Once the batch derivation configuration is done and the master data is set, the derivation is triggered at the point where it is defined for.

 SAP issues messages of success or error or information when the derivation finishes. You can define in transaction code DVC8 – Batch derivation Event configuration, if you want such messages to be popped-up after the derivation.

Publié dans MM, PP