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

problem with material number

Former Member
0 Likes
404

I created a material 20070730a1 using mm01 tcode. But in my program when i am trying to retrieve info for that material the select statement is unsuccessfully. But when i go for that material in mm03 i am able to view info for that material. Even i am using CONVERSION_EXIT_MATN1_INPUT FM to convert my materal number and i am using the return value from this function in my select statement. But still the select statement fails.

code is as follows:

****************************************************************************************************

FORM conversion_exit USING pv_matnr TYPE matnr

CHANGING pr_temp_matnr TYPE char18.

CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'

EXPORTING

input = pv_matnr

IMPORTING

output = pr_temp_matnr

EXCEPTIONS "#EC *

length_error = 1

OTHERS = 2.

ENDFORM. " conversion_exit

pr_temp-matnr is send to an internal table i_cabn from there it used in select statement.

FORM get_mat_type.

IF NOT i_cabn IS INITIAL. "check for initial

SELECT matnr "#EC CI_NOFIELD

matkl

pstat

FROM mara

INTO TABLE i_matn

FOR ALL ENTRIES IN i_cabn

WHERE matnr = i_cabn-old_matnr

AND lvorm <> c_x.

IF sy-subrc = 0.

SORT i_matn BY matnr.

ENDIF. " IF sy-subrc = 0

ENDIF. " IF NOT i_cabn IS INITIAL

ENDFORM. " get_mat_type

********************************************************************************

Any suggestion on this problem.

Thanks

1 REPLY 1
Read only

Former Member
0 Likes
374

got it