Skip to Content
0
Former Member
Jan 29, 2007 at 06:34 AM

user exit internal batch number

68 Views

SAPLV01Z CFCs for internal batch number assignment

in this exit EXIT_SAPLV01Z_002

i had written a code so that i can get batch number in the required format.

now the problem is i am having two plants

for one plant suppose 2500 the batch number is qr00001/07

for plant 2501 the batch number should start with qr00001/07 instead it is giving me qr00002/07.

the code i had written is

data : var(5) type n .

if x_bncom-werks = '2500'.

if x_bncom-bwart = '101'.

if x_bncom-matkl+00(01) = 'I'.

concatenate 'QR' new_charg5(5) '/' sy-datum2(2) into new_charg.

elseIF X_BNCOM-matkl+00(01) = 'J'.

concatenate 'QP' new_charg5(5) '/' sy-datum2(2) into new_charg.

endif.

endif.

elseif x_bncom-werks = '2501'.

if x_bncom-bwart = '101'.

if x_bncom-matkl+00(01) = 'I'.

concatenate 'QR' new_charg5(5) '/' sy-datum2(2) into new_charg.

elseIF X_BNCOM-matkl+00(01) = 'J'.

concatenate 'QP' new_charg5(5) '/' sy-datum2(2) into new_charg.

endif.

endif.

endif.

please help me as this is urgent

i had tried but not succesful please guide me