05-24-2010 6:06 AM
Hello,
I am using Vista Os with the SAP front end logon 710 and Office 2007. Also my company is using Ecc6.0 in the server.
I am able to export the Itab data to excel but all the rows are on the first row in Excel.
If i have 3 rows in ITAB then all the 3 rows are on the First row of Excel
I have supplied these parameters
filename = 'C:\ITAB2XLS.xls'
FILETYPE = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
SHOW_TRANSFER_STATUS = 'X'
tables
data_tab = itab[]
FIELDNAMES = headingTab[]
Is anyone having the same issue like me ?
Thanks.
05-24-2010 6:15 AM
This MS_EXCEL_OLE_STANDARD_DAT function module used here is compatible with office 2007
Just try with this !!!! and use a where used list to check the code!!!
Regards
Bhanu
05-24-2010 6:13 AM
Hi,
Just give the filetype has 'DAT'. You problem will be solved.
And after that read the difference between the 'ASC' and 'DAT' Filetypes.
With Regards,
Sumodh.P
05-24-2010 6:22 AM
Thanks for your quick reply.
I tried DAT as well as ASC.
Both are giving the same output.
I have tried MS_EXCEL_OLE_STANDARD_DAT also, but i am getting the data in the same first row.
05-24-2010 6:52 AM
Hi,
After executing your program am getting the output as below. In the given below output i cant see that all the things are coming in the first row.
GROUP VALUE
A 100
B 200
With Regards,
Sumodh.P
05-24-2010 6:15 AM
This MS_EXCEL_OLE_STANDARD_DAT function module used here is compatible with office 2007
Just try with this !!!! and use a where used list to check the code!!!
Regards
Bhanu
05-24-2010 6:39 AM
HI,
Dont use the WRITE_FIELD_SEPARATOR.
Just check again after commenting the above parameter.
if not working please paste your internal table and the gui_download part here.
With Regards,
Sumodh.P
05-24-2010 6:46 AM
Hi,
I tried commenting the Field seperator but it didnt change anything. I am still having the same problem.
I am pasting my code sample.
data:begin of itab occurs 0,
grp type c,
val type i,
end of itab.
data:begin of headingTab occurs 0,
TEXT(10) type c,
end of headingTab.
itab-grp = 'A'.
itab-val = 100.
append itab.
itab-grp = 'B'.
itab-val = 200.
append itab.
headingTab-text = 'GROUP'.
append headingTab.
headingTab-text = 'VALUE'.
append headingTab.
call function 'GUI_DOWNLOAD'
exporting
filename = 'C:\ITAB2XLS.xls'
FILETYPE = 'DAT'
WRITE_FIELD_SEPARATOR = 'X'
SHOW_TRANSFER_STATUS = 'X'
tables
data_tab = itab[]
FIELDNAMES = headingTab[]
I think there is some problem with the Vista / Office 2007 with SAP.
Any suggestions?
05-24-2010 6:53 AM
05-24-2010 6:56 AM
Hi,
So you need your output in this format or format which i posted you earlier.
With Regards,
Sumodh.P
05-24-2010 6:57 AM
Your format is correct and i want your format.
But for some reason i am getting this wrong output.
I really have no idea where is the problem. May be cos i am using Vista & Office 2007 ?
Is there any OSS notes for this problem ?
05-24-2010 7:02 AM
hi Ashok,
DATA: BEGIN OF s_head OCCURS 0,
head(40) TYPE c ,
END OF s_head.
s_head-head = text-021."'Generic Number'.
APPEND s_head.
s_head-head = text-017."'Listing Procedure'.
APPEND s_head.
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename = v_file
filetype = 'ASC'
write_field_separator = '#'
TABLES
data_tab = it_output1[]
fieldnames = s_head[].
This is also doing same as your requiremqnt to download in xcel try it out.
05-24-2010 7:08 AM
Hi,
Can you try to execute this program in some other system just for checking purpose that its the problem with your OS ( Other than Vista).
With Regards,
Sumodh.P
05-25-2010 5:42 PM
Thanks Sumodh,
I could not check it on another OS cos my client is having only Vista installed in all pc's. Thanks a billion again for trying to help me.
07-07-2010 7:27 AM
Hello,
I am facing the same problem. I have the same OS and MS Office as you do. How did you overcome this issue. Please let me know.
Thanks,
Chan
05-24-2010 7:28 AM
Hi Ashok,
I was looking into fr OSS note could not one!!!
This is for sure its the problem with the OS now!!!
Just try this one
To make your programs portable to different operating systems, we should use the function module FILE_GET_NAME.
which returns the system-dependent name for an abstract file name.
If this is not working try running ur program on a an other OS !!!
Regards
Bhanu
05-25-2010 12:23 PM
Thanks Bhanu Malik for your great effort.
I am just not sure how to use this FM: FILE_GET_NAME.
I am currently working on another requirement and i will check this soon. But in case if you have a sample code for this FM then please update me.
Thanks once again everyone.