‎2007 Jul 06 6:04 AM
hi
can you find any error in this
select single * from makt where matnr = p_matnr and spras = 'sv'.
‎2007 Jul 06 6:50 AM
HI.
SEE BELOW CODE PLZ..
data: BEGIN OF it_makt OCCURS 0,
matnr LIKE maKT-matnr,
maktx LIKE makt-maktx,
END OF it_makt.
data: process_tab_struct_tmp like IT_MAKT.
field-symbols: <fs1>.
after downloading file(excel) to excel_tab....code follows
LOOP AT EXCEL_TAB.
assign component excel_tab-col of structure
process_tab_struct_tmp to <fs1>.
<fs1> = excel_tab-value.
at end of row.
move-corresponding: process_tab_struct_tmp to IT_MAKT.
append IT_MAKT.
endat.
ENDLOOP.
if i check with this below statment...it's giving sy-subrc = 4. (but data there in makt)
select single * from MAKT where MATNR = it_makt-MATNR and SPRAS = 'E'.
my clue: any conversion problem with it_makt-matnr ......plz replay fats.
‎2007 Jul 06 6:07 AM
Hi,
Change you code to
select single * from makt where matnr = p_matnr and spras = 'S'. OR
select single * from makt where matnr = p_matnr and spras = sy-langu.
Regards,
Atish
‎2007 Jul 06 6:30 AM
Hi,
select single * from makt <b>into table <tablename></b> where matnr = p_matnr and spras = 'S'.
Regards,
Ameet
‎2007 Jul 06 6:34 AM
Hi,
If u pass values in where field then it should be always capital letter. Anyways i hope ur issue got fixed.
Regards
Sathish:)
‎2007 Jul 06 6:38 AM
Hi
Pass the value SPRAS in Capital letters
or declare variable for the same
Regards
Shiva
‎2007 Jul 06 6:50 AM
HI.
SEE BELOW CODE PLZ..
data: BEGIN OF it_makt OCCURS 0,
matnr LIKE maKT-matnr,
maktx LIKE makt-maktx,
END OF it_makt.
data: process_tab_struct_tmp like IT_MAKT.
field-symbols: <fs1>.
after downloading file(excel) to excel_tab....code follows
LOOP AT EXCEL_TAB.
assign component excel_tab-col of structure
process_tab_struct_tmp to <fs1>.
<fs1> = excel_tab-value.
at end of row.
move-corresponding: process_tab_struct_tmp to IT_MAKT.
append IT_MAKT.
endat.
ENDLOOP.
if i check with this below statment...it's giving sy-subrc = 4. (but data there in makt)
select single * from MAKT where MATNR = it_makt-MATNR and SPRAS = 'E'.
my clue: any conversion problem with it_makt-matnr ......plz replay fats.
‎2007 Jul 06 6:52 AM
Hi,
yes you are right. You need to convert MATNR.
USe CONVERSION_EXIT_ALPHA_INPUT to convert the material number.
or use CONVERSION_EXIT_MATN1_INPUT
Reward points if useful.
Regards,
Atish
‎2007 Jul 06 7:01 AM
thanks atish
if i use CONVERSION_EXIT_MATN1_INPUT
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT =
IMPORTING
OUTPUT =
input =???
output=??? according to my code plz suggest will get 6 points:)
‎2007 Jul 06 7:18 AM
Hi,
Use like this.
data: BEGIN OF it_makt OCCURS 0,
matnr LIKE maKT-matnr,
maktx LIKE makt-maktx,
END OF it_makt.
data: process_tab_struct_tmp like IT_MAKT.
field-symbols: <fs1>.
after downloading file(excel) to excel_tab....code follows
LOOP AT EXCEL_TAB.
assign component excel_tab-col of structure
process_tab_struct_tmp to <fs1>.
<fs1> = excel_tab-value.
at end of row.
move-corresponding: process_tab_struct_tmp to IT_MAKT.
CALL FUNCTION 'CONVERSION_EXIT_MATN1_INPUT'
EXPORTING
INPUT = <b>it_makt-matnr</b>
IMPORTING
OUTPUT = <b>it_makt-matnr</b>.
append IT_MAKT.
endat.
ENDLOOP.
Do reward points to useful answers.
Regards,
Atish