‎2006 Feb 06 10:04 PM
Hi Experts,
I have to build a program which has to read all the fields in a ".xls" file and output into a ".txt" file.
The thing is there is some unwanted data(fields) in the ".xls" file, so i have to clean some of that data and output only those data(fields) which are useful - into the ".txt" file, so that this file can later be uploaded into SAP using an Interface.
Could you tell me what is the appropriate procedure to get this thing done?
Thank you very much,
‎2006 Feb 06 10:13 PM
Upload your excel file data into an Internal table using some func module like ALSM_EXCEL_TO_INTERNAL_TABLE.
Move your cleansed data to a different Itab.
Download this itab into a .txt file using GUI_DOWNLOAD
‎2006 Feb 06 10:08 PM
Hi Dev,
Use WS_UPLOAD & get the data in to your internal table.Do your process of cleaning the data & use WS_DOWNLOAD to download the data into a file.
I guess it s'd be quite simple,unless you have some complex requirement here.
‎2006 Feb 06 10:13 PM
Hi..
First of all read the excel data into an internal table using a function module GUI_UPLOAD or use the method GUI_UPLOAD of the class CL_GUI_FRONTEND_SERVICES.
Loop at the internal and process each record and either transfer the required data into another internal table or delete the unwanted from the same table.
Use the function module GUI_DOWNLOAD or the method GUI_DOWNLOAD of the class CL_GUI_FRONTEND_SERVICES to download data into a text file.
The program should contain Input and Output file paths as Selection Screen parameters.
Regards,
Vara
‎2006 Feb 06 10:13 PM
Upload your excel file data into an Internal table using some func module like ALSM_EXCEL_TO_INTERNAL_TABLE.
Move your cleansed data to a different Itab.
Download this itab into a .txt file using GUI_DOWNLOAD
‎2006 Feb 06 10:34 PM