‎2008 Dec 24 1:57 PM
Hi Experts,
Wishing you Mery X-mas and happy new year.
I have a question. I have to upload XLS file from AS to SAP Sytem. Its not working fine.
I use TXT and it works perfect.
I am trying to use read dataset to read data in both cases.
Does it mean that AS doesnt support uploading file in XLS format or is there any other way to do it?
I hv tried alot and then asking you all for your support.
Thank You,
Temesh
‎2008 Dec 24 2:04 PM
Hi,
please use function module TEXT_CONVERT_XLS_TO_SAP, ordinary GUI_UPLOAD does not work fine.
Regards,
Prosenjit.
‎2008 Dec 24 2:25 PM
U mean from Application Server ?
i tried TEXT_CONVERT_XLS_TO_SAP, no data is been copied to internal table.
‎2008 Dec 24 2:29 PM
‎2008 Dec 24 2:36 PM
Well. this is my requirement.
I need to upload data from AS to SAP System by calling BAPI.
that excel has multiple records which i need to map to individual bapi structure.
so i guess T-code is ruled out for that.
any other suggestions ??
‎2008 Dec 24 2:40 PM
AS to SAP SystemThan it depends on which kind of Data you want to upload.There are so many BAPI we have which works for Different-2 Purpose.
But Before calling BAPI you must take data into internal table,With open data set for input/output commands.
‎2008 Dec 24 2:51 PM
I will b using BAPI_MATERIAL_SAVEDATA to upload into SAP System.
Fields are frm MARA, MARC, MARD, MVKE, MBEW.
Excel file has almost 40 records which needs to be uploaded.
I tried reading dataset and mapping to custom defined types structure for every record in excel.
but it doesnt have those records after execution.
same data in text works fine for me with tab delimited spaces.
so i m not sure what could be done. Some explained that excel might not work frm AS. so they advised me to make use of TXT, but i hv to give a shot wth XLS.
‎2008 Dec 24 5:25 PM
Hi,
data extract from excel and text file is different ..
why is the option of text file ruled out in your case when you say that its working fine ?Why is excel option preferred .
//I tried reading dataset and mapping to custom defined types structure for every record in excel.
but it doesnt have those records after execution.
How is data from excel in AS being fetched ,,i dont think its possible ..
Vijay
‎2008 Dec 24 6:10 PM
use this method. just mention the source and destination file paths.
DATA : p_source TYPE string,
p_dest TYPE string.
CALL METHOD cl_gui_frontend_services=>file_copy
EXPORTING
SOURCE = p_source
destination = p_dest
overwrite = SPACE
.