‎2008 Nov 21 9:18 AM
Hi All
I Use this code
TYPES : BEGIN OF type_xldata,
string(800),
END OF type_xldata.
data: type_t_xldata TYPE STANDARD TABLE OF type_xldata.
CALL FUNCTION 'FAA_FILE_UPLOAD_EXCEL'
EXPORTING
i_filename = 'D:\2.xls'
I_DELIMITER = ';'
TABLES
et_filecontent = type_t_xldata
EXCEPTIONS
error_accessing_file = 1
OTHERS = 2.
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
All work, but load string only 255 char . Need load maximum 800 char in row.
help please..
thx.
‎2008 Nov 21 9:42 AM
hi,
instead of string , kindly try using CE_STRING, which don't have limit of characters.
TYPES : BEGIN OF type_xldata,
string(800), " CE_STRING.
END OF type_xldata.
Thanks,
Pavan
‎2008 Nov 21 10:21 AM
‎2008 Nov 21 10:41 AM
hi Andrey,
i wrote the below code and i am not getting any dump. kindly check.
TYPES : BEGIN OF type_xldata,
pav type CE_STRING,
END OF type_xldata.
data: type_t_xldata TYPE STANDARD TABLE OF type_xldata.
CALL FUNCTION 'FAA_FILE_UPLOAD_EXCEL'
EXPORTING
i_filename = 'D:\2.xls'
I_DELIMITER = ';'
TABLES
et_filecontent = type_t_xldata
EXCEPTIONS
error_accessing_file = 1
OTHERS = 2.
if sy-subrc = 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
pls let me know still if you have issue
thanks,
Pavan
‎2008 Nov 21 10:58 AM
‎2008 Nov 21 11:43 AM
hi,
kindly check weather your system had D Drive or not else change the drive to C.
kindly pass some dummy data to internal table, because your internal table is blank.
Thanks,
Pavan
Edited by: pavan kumar pisipati on Nov 21, 2008 12:44 PM
‎2008 Nov 21 11:47 AM
if Im use string(800), All work, but string < 255 chars.
if use CS_STRING, when run have dump and error in function body
‎2008 Nov 21 11:52 AM
hi,
when i went to function module, it is alsmex_tabline, kindly use this
begin of ty_table
pav type alsmex_tabline,
end of ty_table.
use CE_STRING not CS_STRING
and kindly check the delimeter you using is ';' , but the function module default value is ','.
if still issue persists, kindly goto SE37 and execute the function module over their and check
thanks,
pavan
Edited by: pavan kumar pisipati on Nov 21, 2008 12:53 PM
‎2008 Nov 21 11:58 AM
yes, i use CE_STRING
if use pav type alsmex_tabline,
Work. but PAV-VALUE ONLY 50 CHAR
‎2008 Nov 21 12:08 PM
hi,
i think we are comeing closer to the solution,
kindly use tabline only instead of alsmex_tabline
if this also not worked out, i think you need find for other FM for u r requirement.
just now i executed the functiona module with a xls sheet, what my understanding is we can use alsemex-tabline, because it is allocatting 50 character for each column and row. so i think this will solve your problem.
thanks,
Pavan
Edited by: pavan kumar pisipati on Nov 21, 2008 1:23 PM
‎2008 Nov 21 12:57 PM
Make a Z copy of ALSM_EXCEL_TO_INTERNAL_TABLE.
In tables tab, you will find an entery
INTERN LIKE ALSMEX_TABLINE
Now if u look at structure of ALSMEX_TABLINE, u willl find a field VALUE of type CHAR50.
This restricts u from uploading data more than 50 char from a single cell of excel.
Wat u need to do is, make a Z copy of structure ALSMEX_TABLINE. And edit the type of VALUE field to char5000 or some custom data element.
Now in FM ZALSM_EXCEL_TO_INTERNAL_TABLE in tables tab use ZALSMEX_TABLINE instead of ALSMEX_TABLINE. You will need to replace all refrences of data objects in FM coding from ALSMEX_TABLINE to ZALSMEX_TABLINE --> This is a critical step. Now activate the FM ZALSM_EXCEL_TO_INTERNAL_TABLE and now you will be able to upload any length of data from a single excel file cell.
Regards,
Amit
‎2008 Nov 21 1:00 PM
‎2008 Nov 24 6:27 AM
‎2008 Nov 24 6:31 AM