09-10-2009 8:18 AM
can we display more than 1023 columns in alv. please provide inputs on any approach that can be followed to achieve this.
Thanks.
09-10-2009 8:39 AM
Hi Kalyan,
as far as I remember I tried to do so using the SALV approach using class cl_salv_table and I could not find any limit. But I don't rember if I really tried thousands of columns.
But, by the way, I am curious: What is it good for? Who can read more than 1024 columns, you can't put them into excel, you can't print them, so why?
Kind regards
Clemens
09-10-2009 9:51 AM
Hi,
I believe there are no limitations. But the question is what you intend to do with the display ->
If you intend to :-
1. Print - check OSS Note 454462
2. Excel - check OSS Note 855314
Anoop
09-11-2009 3:13 PM
Hi,
just for the record. Here's the code to create a table with 10000 columns, in this example all of type vendor. It could be modified a little to create any dynamic table. Without any visible limits and can be displayed in SALV.
DATA:
lv_lifnr TYPE lifnr,
lv_numc7 TYPE numc7,
lt_components TYPE cl_abap_structdescr=>component_table,
lo_struc_descr TYPE REF TO cl_abap_structdescr,
lo_tdescr TYPE REF TO cl_abap_tabledescr,
lr_tab TYPE REF TO data.
FIELD-SYMBOLS:
<component> TYPE LINE OF abap_component_tab,
<range_tab> TYPE STANDARD TABLE,
<tab> TYPE table.
* build dynamic table
DO 10000 TIMES.
APPEND INITIAL LINE TO lt_components ASSIGNING <component>.
<component>-type ?= cl_abap_datadescr=>describe_by_data( lv_lifnr ).
lv_numc7 = sy-index.
CONCATENATE 'FIELD' lv_numc7 INTO <component>-name.
ENDDO.
lo_struc_descr ?= cl_abap_structdescr=>create( lt_components ).
lo_tdescr = cl_abap_tabledescr=>create( lo_struc_descr ).
CREATE DATA lr_tab TYPE HANDLE lo_tdescr.
ASSIGN lr_tab->* TO <tab>.
APPEND INITIAL LINE TO <tab>.
I discovered that it takes some time (15 seconds or more) to create, even F1 and F4 in the SALV table use considerable time to pop up, I think (SAP never imagined
But it works - and the code is so simple!
Kind regards,
Clemens
09-19-2011 1:11 PM
01-24-2011 2:48 AM
08-30-2011 7:59 AM
I have 106 columns in my ALV report but when I download in excel file format that time data is not coming in proper format. some columns are coming into next line. Any solution for that?
08-30-2011 9:45 AM
Thank You Clemens...For this beautiful & simple code extract
Regards,
Tanmoy