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 Sample code

Former Member
0 Likes
672

Hi all,

I would like to generate an internal number for material master in the following format:

abc-123-4567

Would you please send me any <b>sample code</b> available for the above format.

Thanks and Regards,

Madhu

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
635

Madhu,

can you tell me what is the format of abc-123-4567.

abc meant for what?

123 meant for what?

4567 meant for what?

Satish

3 REPLIES 3
Read only

Former Member
0 Likes
636

Madhu,

can you tell me what is the format of abc-123-4567.

abc meant for what?

123 meant for what?

4567 meant for what?

Satish

Read only

0 Likes
635

abc, 123, and 4567 are classfications of a material.

Here I could get 1234567 from internal number range. But, getting 'abc' prefix is a difficult. I heard that we can do it through user exits.

Can use enhancement MGA00002, with an exit, EXIT_SAPLMG02_002.

I need the sample code to get the required 'abc'

Regards,

Madhu

Read only

0 Likes
635

Hi,

yes u can use this exit for ur rquirement..

just use concatenat statement and try

v_matnr = 1234567.

concatenate 'abc' v_matnr into v_matnr1.

now ur v_matnr1 = abc1234567

pass this value to MATNR field in the changing parameter..

MATNR = v_matnr1.

try and check.

Rewrad if helpful.

Regards,

Nagaraj