cancel
Showing results for 
Search instead for 
Did you mean: 

Batch Number Assignment as per Client Codification Logic

shailesh_mishra5
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear Gurus,

Below is the requirement of Client for Materials to be handled in Batches, Chemical Manufacturing, SAP PI module is going to be deployed.

Client wants 10 digit Internal Batch number assignment with below Codification Logic for FG/ SFG.

Well, I am aware of Batch Management Configuration from PP side but unable to create the Number range as per Client codification.

Can you please help how to map this logic in SAP ?

There are 4 Order types i have created as per business req. Crude, Distillation, Blending and Packing.

FG/SFG Batch Codification(10 Digit)
LetterMeaning
YYearLast digit of Year 4 for 2014, 5 for 2015
MMonthA for Jan, B for Feb, C Mar….L for Dec
PPlant1 for X plant, 2 for Y plant
SStage of Production1 =crude, 2 =distillation, 3= blending, 4=Packing
GMaterial Group101 for PVCL, 102 FOR 2EHCL
G
G
NSerial Number01 to 99 serial nos for Month
N
LLot Serial0, 1 to 9 serial no lots
Batch No4I1D101011
4YEAR 2014
ISept
1Plant A
4Packing
101PVCL
0101 to 99 serial no for the month
10,1 to 9 serial nos for Lots

Thanks

Shailesh Mishra

Accepted Solutions (1)

Accepted Solutions (1)

former_member226240
Active Participant
0 Kudos

Hi Shailesh,

You need to implement user exits for defining your own number ranges.

Configure Customer Exits for Intern. Batch Number Assignment

You can use SAP enhancement SAPLV01Z for internal batch number assignment. This enhancement contains two function module exits that you can use to define number ranges or templates for batch numbers:

EXIT_SAPLV01Z_001. You use this exit to replace the number range object and/or interval proposed by the system with your own number range object and/or interval.
In addition, you can, for instance, stop the system from assigning an internal number depending on the material or plant. You can also use this exit to stop the dialog box from appearing.

EXIT_SAPLV01Z_002. Using this exit, you can either change the number assigned by the system, or assign your own number.

   

Both exits contain a communication structure with application data from the respective business transaction (plant or material type, for example). If you need further information, such as the time, the user name or the date, you must include them yourself in one of the exits.

The system always checks whether the assigned batch number already exists in the system. If it does, it terminates the function without assigning a batch number.

   

In function module exit EXIT_SAPLV01Z_001, the system uses the material type to determine number range interval XY. This number range is then used to determine number 0000100123 as the next batch number .

In function module exit EXIT_SAPLV01Z_002, the final batch number 'ABCD100123' is determined from batch number 0000100123 and plant ABCD. The system suppresses the leading zeros.

If you do not use a sequential counter for the batch number, you can skip internal number assignment in exit EXIT_SAPLV01Z_001 to specify your own batch number in exit EXIT_SAPLV01Z_002. Further information and examples for EXIT_SAPLV01Z_001 and EXIT_SAPLV01Z_002 Further information and examples for EXIT_SAPLV01Z_002

 

 

1. Implement the required enhancement.

Either create a new project or use an existing one.

2. Activate the project.

Your enhancement works only after the project has been activated.

Let me know if you need any additional information.

BR

Rahul

former_member226240
Active Participant
0 Kudos

Hi Shailesh,

Define variables identifying each & every digit of batch like I_BATCH_NUM as variable for batch number

Get the system date to capture last digit of the year and the month from sy-datum.

If you are creating batch number in PI sheet for a process order, you can get the plant from the production order. Material group need to be taken from material master.

I am not sure as to how would you get the data for date of production & Lot serial number.

But, these all need to be concatenated with number range object defined for batch with incremental values.

Hope i could have be any help !

BR

Rahul

shailesh_mishra5
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Rahul,

Thanks for your reply. I am doing this with the help of Technical Consultant and will get back to you if issues arise.

Thanks

Shailesh Mishra

Answers (0)