Enterprise Resource Planning Blogs by Members
Gain new perspectives and knowledge about enterprise resource planning in blog posts from community members. Share your own comments and ERP insights today!
cancel
Showing results for 
Search instead for 
Did you mean: 
mariuszglowa
Explorer

Contents


Batch determination configuration for Sales and distribution with ATP control

Introduction

Set-up

Update standard characteristics (LOBM_*)

Create custom characteristics

Create batch classes

Create Sort sequence.

Configuration of condition tables, access sequences for batch determination

Condition tables

Access sequences

Strategy types

Define search procedure

Batch Search Procedure Allocation and Check Activation

Create batch strategy

Enhancement project implementation in CMOD

Summary

 

 

Introduction


During production processes, product quality can vary based on several distinctive characteristics e.g., semi-finished material quality, machine efficiency, quality control at a particular process step etc. To differentiate mentioned finished product quality in SAP we can use batches. There is a possibility that the feeling of what is acceptable quality can vary from customer to customer. Also, it is very important to sell products based on sorting strategy – the most common used strategies are FIFO (First In First Out) and LIFO (Last In First Out). Their use varies by different industry branches. The other part is to handle ATP (Available To Promise) control during batch determination, to avoid creating deliveries with batches already planned to sell.

In my article I would like to explain the sample configuration process for Sales and Distribution, without going into technical detail. Treat this article as a blueprint (not a tutorial or final solution) to adjust to your own goals. This is one of the ways to devise the process, so, if you have different ideas, I will be glad to read your opinions.

The main goals to achieve were:

  1. Set-up characteristics, which were measured in a laboratory.

  2. Create a batch class, to store material quality information

  3. Determine finished goods quality, based on threshold values, stored in Z-table

  4. Set-up batch search strategies and sorting sequence (FIFO)

  5. Perform ATP control during batch determination


I have excluded the material master batch determination in my scope of work. This article fits only the SD configuration.


In SAP standard implementation, we have found a roadblock that we have to bypass. In standard implementation of the batch determination process for the defined search procedure, there is no possibility to 'Exclusive' determine batch strategy, when conditions are met (like it is e.g. in pricing determination).


Therefore, there is no known (at least by me) standard solution to fulfill the above process.

Set-up


Update standard characteristics (LOBM_*)


Use TCODE BMSM to update standard SAP characteristics:




Create custom characteristics


In TCODE CT04 create characteristic which meet your needs. For our case, we have additionally created two technical characteristics that will store as follows:

  1. Z_ASSIGNED → to store if batch is assigned to the customer

  2. Z_QUALITY → to store defined quality level, based on measure values and thresholds


Later on, I will show an enhancement project that we have used to automatically assign above characteristics.

We need to  establish  the characteristic is visible and ready for input:



Create batch classes


In TCODE CL01 we can create batch class which stores batch characteristics relevant to it. We must use batch class 022 - Batch.


In our case we need four classes:

  1. ZQUALITY - that stores information of material quality + technical characteristics.



I have used one standard SAP characteristic which stores the information of 'Assigned' customer to batch (multiple values possible).

  1. ZSEARCH1 - used for batch classification for assigned customers. Used characteristics:

    1. LOBM_LWEDT - last goods mvt.

    2. LOBM_HSDAT - batch production date

    3. LOBM_CUSTOMER_OK - mentioned above



  2. ZSEARCH2 - used for homogenous batch, not assigned to the customer. Used charact.:

    1. LOBM_LWEDT

    2. LOBM_HSDAT

    3. ZASSIGNED - then used to exclude Assigned batches to other customers



  3. ZSEARCH3 - batches not assigned to customer. Characteristics as above.


Create Sort sequence


In TCODE CU70 we can maintain sorting sequence.

Then, inscreen, we are assigning characteristic in which batches should be sorted out.



For FIFO sort strategy, I have used standard SAP characteristic LOBM_LWEDT in ascending order.

Configuration of condition tables, access sequences for batch determination


You can find batch management configuration there: SPROLogistics - General Batch Management Batch Determination and Batch Check



Condition tables


I have defined two Z-fields which will store information as follows:

  1. ZHOMOGENOUS - field adopted from the Sales Order appended field. It stores information if we want a homogenous batch to be determined.

  2. ZASSIGNED – which is technically filled in FV50DFZZ form USEREXIT_MOVE_FIELD_TO_KOMPH


The idea is to read LOBM_CUSTOMER_OK  in a loop to get batches where LOBM_CUSTOMER_OK  = KOMH-KUNWE, then check availability of those batches using BAPI_MATERIAL_AVAILABILITY, check rule = ‘B’. If there is a batch which ATP > 0, the program will assign ‘X’ to ‘ZASSIGNED’.

This is the information for condition table to pick 1st strategy.

Access sequences


I have defined 3 access sequences -  each represents one strategy.

We are defining there what conditions have to be met to pick correct batch strategy.



Strategy types


Here we are assigning default search classes, sorting sequences and other batch strategy settings. Those data can be further modified in a system in using VCH2 TCODE.

My setting looks the following:


For a homogenous batch, I have assigned “1” to parameter No. of splits, which will pick only one batch, with no split.




Define search procedure


I have created one procedure and assigned 3 steps as below:


It will then search batches the following batches: 1 - batch assigned to customer → 2 - homogenous batch →  3 - batch not assigned to customer.

Batch Search Procedure Allocation and Check Activation


Here we are assigning batch search procedure to Sales organization, distr. channel, division and Document Type. We must activate "Check batch" to have this procedure active.



Create batch strategy


In TCODE VCH1 we are creating search strategies based on access sequences. It will copy the default data from Strategy types in SPRO.

In my case I am using Plant addition to technical conditions.

There is one issue I have found - if you are going to Selection criteria, it will not get class assignment correctly:


I must go back (F3), and then again open the Selection criteria – the assignment is determined correctly:



Enhancement project implementation in CMOD


To achieve my goals, I have to somehow automatically set the batch technical characteristics, based on conditions mentioned previously. To do this, we have created a CMOD project, and used CLFM0002 - Call classification data before saving.

Then we have created ABAP code, to fill characteristic ZASSIGNED with 'X' when, standard characteristic LOBM_CUSTOMER_OK has not initial value. Also we are maintaining the ZQUALITY based on threshold values from Z table.

Summary


With the above configuration, we have resolved a particular case of business task fulfilled business need – batches are picked correctly with ATP check. Unfortunately, we have not found how to solve issues that we have met at the beginning with the SAP standard functionality.

Please note, that classes, characteristics, search and sort procedures are not transported between systems - you have (unfortunately) maintain them manually in every system.

I hope that this article will help someone with similar problems. If you have any doubts or a better solution for such a business case, I would be grateful to read your comments and open a discussion. You can also check SD Sales Question section or SD Sales Blogs section to find more information about Sales and distribution.

 

 
Labels in this area