Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Gui_Download export to excel delivering only one row in excel output

Former Member
0 Kudos

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos

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

15 REPLIES 15

former_member536879
Active Contributor
0 Kudos

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

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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

0 Kudos

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?

0 Kudos

And here is my output

GROUP	         VALUEA	           100B	           200

0 Kudos

Hi,

So you need your output in this format or format which i posted you earlier.

With Regards,

Sumodh.P

0 Kudos

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 ?

0 Kudos

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.

0 Kudos

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

0 Kudos

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.

0 Kudos

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

Former Member
0 Kudos

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

0 Kudos

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.