Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

user exit internal batch number

Former Member
0 Likes
493

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

1 REPLY 1
Read only

Former Member
0 Likes
334

best way is Debug the program then u will come to know how SAP reached this Number.

Regards

Prabhu