‎2006 Jul 04 1:20 PM
DATA : lv_matnr LIKE mard-matnr,
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = itab-matnr
IMPORTING
output = lv_matnr.
i made this and get ERR
entry is too long format is ____-_____-_____
‎2006 Jul 04 1:21 PM
How is itab-matnr defined? It should be only 18 characters. You can insure this by moving the value from ITAB-MATNR into your local varialbe, then doing the conversion.
DATA : lv_matnr LIKE mard-matnr.
<b>
lv_matnr = itab-matnr.</b>
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = <b>lv-matnr</b>
IMPORTING
output = <b>lv_matnr</b>.Regards,
Rich Heilman
Message was edited by: Rich Heilman
‎2006 Jul 04 1:22 PM
Check the type of the field ITAB-MATNR. It should not be GT 18.
-Kiran
‎2006 Jul 04 1:47 PM
Dear Rani,
u can use only 18 char length MATNR, otherwiseit will gave no result but gave an error msg,
so use only 18 char MATNR.
hope it will help u
with regard
chetan vishnoi
‎2006 Jul 04 1:54 PM
Hi,
pls. check d itab-matnr field also declared as itab-matnr,
if u decladred other than this it will throuws an error.
pls rectify that and check d program.
Ramesh.
‎2006 Jul 04 1:55 PM
Hi,
pls. check d itab-matnr field also declared as LIKE mard-matnr,
if u decladred other than this it will throuws an error.
pls rectify that and check d program.
Ramesh.
‎2006 Jul 04 2:01 PM
Hi,
Use the FM <b>CONVERSION_EXIT_MATN2_INPUT</b>.
Consider this code.
DATA : it_mard TYPE STANDARD TABLE OF mard WITH HEADER LINE.
DATA : lv_matnr TYPE mard-matnr.
LOOP AT it_mard.
lv_matnr = it_mard-matnr.
CALL FUNCTION 'CONVERSION_EXIT_MATN2_INPUT'
EXPORTING
input = lv_matnr
IMPORTING
output = lv_matnr.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ENDLOOP.
Regards,
Arun Sambargi.
‎2006 Jul 04 2:17 PM
Hai Rani
Check the following Code
data : v_matnr like mard-matnr.
data : begin of itab occurs 0,
matnr like mara-matnr,
end of itab.
select matnr from mara up to 10 rows into table itab.
delete adjacent duplicates from itab comparing matnr.
loop at itab.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
input = itab-matnr
IMPORTING
output = v_matnr
EXCEPTIONS
length_error = 1
OTHERS = 1.
IF sy-subrc = 0.
write 😕 v_matnr.
ENDIF.
endloop.
Thanks & regards
Sreenivasulu P