cancel
Showing results for 
Search instead for 
Did you mean: 

Product Numbers and their Length

Former Member
0 Kudos

I am doing that for product numbers ,

LOOP AT IT_MATKEY INTO wa_matkey.

len = strlen( wa_matkey-ext_matnr ).

len = 40 - len.

do len times.

concatenate '0' wa_matkey-ext_matnr into wa_matkey-ext_matnr.

enddo.

SELECT SINGLE matid FROM /sapapo/matkey INTO matguid WHERE matnr = wa_matkey-ext_matnr.

I am using this code in a user exit, it_matkey is the import paramter of the function module, when the products are CIFed they are stored in it_matkey.

Unless I am writing the above code for product IDs with numbers, select statement is not working. Is there any better way of doing that?

Edited by: Wilian Segatto on Jan 28, 2010 11:33 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

deepthi raj,

You can use standard APO product conversion exit function modules to prefix product by zero.

rgds,

Sarah.

Former Member
0 Kudos

what are those function modules ? can you please be more clear?

hkmaradana
Active Participant
0 Kudos

Hello,

Try these FMS:

CONVERSION_EXIT_PRODU_OUTPUT

CONVERSION_EXIT_PRODU_INPUT

Regards,

Chris

Answers (0)