cancel
Showing results for 
Search instead for 
Did you mean: 

Retention of the original BATCH NUMBER during material transfer from Plant

Former Member
0 Kudos

Dear All

We are implementing SAP AFS 6.0.In AFS batch numbers are defined at Plant level.We have two manufacturing plants"MFG1 and MFG2".. Material produced in these plants should have a prefix of plant in the Batch numbers e.x. MFG1001,MFG2001 etc.This we have done theu user exit.

Material manufactured is sold thru depots(Plants).Depot names are DEP1,DEP2---etc.When we transfer the material from manufacturing plant to Depot plant the batch number of the material is changing for ex batch MFG1001 changes to batch no. DEP1001.

**We want the original batch number of the manufacturing to be carried forward during material transfer from mfg. plant to Depot plant.

How should we go about.

Thanks in advance

Suryanarayana t

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Surya,

The way LIPS records are in a batch split scenario is that let us say you have a delivery with one line item 00010. Now if this splits into two batch split items, then you will find in LIPS 3 records, one with line item 00010, one with 90001 and another with 90002. Both 90001 and 90002 will have a UECHA of 00010, whereas for 00010, this field will be blank. So the logic is to create two internal tables one where UECHA is blank and another where it is not blank and use it.

code

SELECT * FROM LIPS

INTO TABLE I_LIPS

WHERE VBELN = P_VBLEN.

I_LIPS_TEMP] = I_LIPS[.

DELETE I_LIPS_TEMP WHERE UECHA IS INITIAL.

This table will not have only the batch split items not the main items.

LOOP AT I_LIPS WHERE UECHA IS INITIAL.

loop at the main items.

IF I_LIPS-CHARG IS INITIAL.

batch is not there on the main item, see if it is there on any batch split items.

READ TABLE I_LIPS_TEMP WITH KEY UECHA = I_LIPS-POSNR.

.........

........

do whatever

ENDIF.

..... do whatever

ENDLOOP.[/code]

if you give me brief i can help you out more.

if helpful REWARD points

Thank you .

Regards

Ramana