10-21-2008 7:36 AM
Hi All,
my requirement is to upload the data from excel sheet but that excel sheet have mutiple tabs and all individual tab have mutiple records inside. I need to open the excel sheet from selection screen and select dynamically any tab and i need to put all the records into internal table of that paricular tab.
Please suggest how it can be done.
<removed_by_moderator>
Thanks,
Madhu
Edited by: Julius Bussche on Oct 21, 2008 11:41 AM
10-21-2008 8:20 AM
10-21-2008 8:30 AM
Thanks for reply but this FM is actually transfer the tha data frrom excel sheet to the internal table. which we can use later before that i need to open the excel sheet on the selection screen.
10-21-2008 9:57 AM
>
> Thanks for reply but this FM is actually transfer the tha data frrom excel sheet to the internal table. which we can use later before that i need to open the excel sheet on the selection screen.
it depends on which event do you call the FM. If you call in INITIALIZATION (or LOAD-OF-PROGRAM) than the Excel sheet will be uploaded before the selection screen appears at all. The problem with the above FM is that it will upload the actual tabstrip of the sheet, probably not what you want (and definetly no multiple ways). To upload data form Excel from multiple tabs, you need to code it on your own with the help of OLE commands.
10-21-2008 9:44 AM
Hi Madhu,
Follow this to open any file may be excel or text pad.
Copy paste and execute the code.
PARAMETERS: P_FNAME LIKE RLGRAP-FILENAME OBLIGATORY.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_FNAME .
CALL FUNCTION 'F4_FILENAME'
EXPORTING
program_name = syst-cprog
dynpro_number = syst-dynnr
IMPORTING
file_name = P_FNAME
.
Any issues revert me back i will help you.
Cheers!!
balu
10-21-2008 10:46 AM