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: 

ALV - coulmn names differ from Grid display to Excel download

Former Member
0 Kudos

Hi,

When I display report in ALV grid, the layout looks fine. But the column headings and field output length differs from Grid to Excel sheet data.

suppose if some column heading is like ABCDEF and content is of 2 characters. Then it grid i am getting like ABCDEF. But in Excel I am getting it like ABC. ( which is seltext_S).

My question is why the layout is not being copied to Excel as it is like in GRID display??

Thanks in advance.

Praneet

4 REPLIES 4

Former Member
0 Kudos

Hi,

I also faced the same issue in one of my reports. What is the data type that you are using for those fields?

Regards

Ansari

Former Member
0 Kudos

Hi,

I also faced the same issue in one of my reports. What is the data type that you are using for those fields?

If you change the data type to char for all the fields it will start working properly. For example

ekorg(4) type c ,"ekko-ekorg, "Purchasing Organization

Regards

Ansari

Former Member
0 Kudos

HI,

Just Try this,

Eg: suppose this is the field VBELN

Declare in the internal table like

vbeln(10) type c,

instead of vbeln LIKE vbak-vbeln,

Hope it'll work

0 Kudos

Hi,

It's not working. And also one field has leading zero. And I want that by

lzero = 'X'

It's appearing properly in ALV grid display and print preview. But excel does not show up leading zero.

Can any one faced this earlier?

Pra