Application Development and Automation 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: 
Read only

Problem with CL_ALV_GRID

Former Member
0 Likes
901

hi there,

I have a program where I have used CL_ALV_GRID , the problem is that the data displayed on the screen within the container grid is correct, but when I export it on my disk i.e export local file > Spread Sheet the data for Lifnr is incorrect(the last number for all line item is trucated). Can you please let me the reason why so?

Out of the 9 digits shown on screen only 8 digits are there in xls that is generated for lifnr column.

Output as xls --

A part of the xls.

Group Vendor Pre.A/c No. P.Org

YKRD 15080771 3007710 BYPH

YKRD 15080771 3007710 BYPH

YKRD 15080934 3009345 BYPH

YKRD 15080783 3007838 BYPH

YKRD 15080783 3007838 BYPH

YKRD 42 BYPH

YKRD 42 BYPH

1 ACCEPTED SOLUTION
Read only

huseyindereli
Active Contributor
0 Likes
865

Hi,

Check if your fieldcat is filled properly. Especially elements related with length or data type.

hi there,

I have a program where I have used CL_ALV_GRID , the problem is that the data displayed on the screen within the container grid is correct, but when I export it on my disk i.e export local file > Spread Sheet the data for Lifnr is incorrect(the last number for all line item is trucated). Can you please let me the reason why so?

Out of the 9 digits shown on screen only 8 digits are there in xls that is generated for lifnr column.

Output as xls --

A part of the xls.

Group Vendor Pre.A/c No. P.Org

YKRD 15080771 3007710 BYPH

YKRD 15080771 3007710 BYPH

YKRD 15080934 3009345 BYPH

YKRD 15080783 3007838 BYPH

YKRD 15080783 3007838 BYPH

YKRD 42 BYPH

YKRD 42 BYPH

5 REPLIES 5
Read only

huseyindereli
Active Contributor
0 Likes
866

Hi,

Check if your fieldcat is filled properly. Especially elements related with length or data type.

Read only

Former Member
0 Likes
865

The Field Catalog is correct as the Field is DDIC structure, more over the output on the screen is correctly display but not when exported. I did note that the Vendor Column is Numeric in excel as everything is right aligned by default.

Read only

0 Likes
865

Hi,

Can you try changing the output length of the field ( DD_OUTLEN ) in structure LVC_S_FCAT while populating the field catelogue

Thanks

Pavan

Read only

Former Member
0 Likes
865

The Solution I found my self is that The Column header should alway have the no. of character greater than what is specifoed in DDIC Data element .

Example FOr Lifnr the length in Data element of Lfa1 /lfb1 is mentioned as 10 , so you column header name should be greater than that Like ' Vendor No. ' (11 including the space/s)

Read only

Former Member
0 Likes
865

The Solution I found my self is that The Column header should alway have the no. of character greater than what is specifoed in DDIC Data element .

Example FOr Lifnr the length in Data element of Lfa1 /lfb1 is mentioned as 10 , so you column header name should be greater than that Like ' Vendor No. ' (11 including the space/s)