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

ALV using CL_SALV_TABLE

yogesh_joshi8
Newcomer
0 Likes
1,006

I am working on a report where I have to use CL_SALV_TABLE to generate an ALV Report. One of the requirements of this report is to Display certain text at END_OF_LIST.

I would appreciate if someone can help me locating a detailed "Help" document on usage of CL_SALV_TABLE to create ALV report so that I can accomplish this request.

Thanks,

Yogesh

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
852

HI,

Here is the example code

REPORT ztest.

DATA: ispfli TYPE TABLE OF spfli.

DATA: gr_table TYPE REF TO cl_salv_table.

data: gr_funct type ref to cl_salv_functions.

data: gr_columns type ref to cl_salv_columns_table.

data: gr_column type ref to CL_SALV_COLUMN_table.

START-OF-SELECTION.

SELECT * INTO TABLE ispfli FROM spfli.

TRY.

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = gr_table

CHANGING

t_table = ispfli.

CATCH cx_salv_msg .

ENDTRY.

gr_funct = gr_table->get_functions( ).

gr_funct->set_all( Abap_True ).

gr_columns = gr_table->get_columns( ).

gr_column ?= gr_columns->Get_Column( 'DISTANCE' ).

gr_column->SET_VISIBLE( abap_false ).

gr_table->display( ).

http://abap-explorer.blogspot.com/2008/07/important.html

http://translate.google.co.in/translate?hl=en&sl=zh-CN&u=http://blog.csdn.net/CompassButton/archive/...

Thanks

Sudheer

I am working on a report where I have to use CL_SALV_TABLE to generate an ALV Report. One of the requirements of this report is to Display certain text at END_OF_LIST.

I would appreciate if someone can help me locating a detailed "Help" document on usage of CL_SALV_TABLE to create ALV report so that I can accomplish this request.

Thanks,

Yogesh

3 REPLIES 3
Read only

Former Member
0 Likes
853

HI,

Here is the example code

REPORT ztest.

DATA: ispfli TYPE TABLE OF spfli.

DATA: gr_table TYPE REF TO cl_salv_table.

data: gr_funct type ref to cl_salv_functions.

data: gr_columns type ref to cl_salv_columns_table.

data: gr_column type ref to CL_SALV_COLUMN_table.

START-OF-SELECTION.

SELECT * INTO TABLE ispfli FROM spfli.

TRY.

CALL METHOD cl_salv_table=>factory

IMPORTING

r_salv_table = gr_table

CHANGING

t_table = ispfli.

CATCH cx_salv_msg .

ENDTRY.

gr_funct = gr_table->get_functions( ).

gr_funct->set_all( Abap_True ).

gr_columns = gr_table->get_columns( ).

gr_column ?= gr_columns->Get_Column( 'DISTANCE' ).

gr_column->SET_VISIBLE( abap_false ).

gr_table->display( ).

http://abap-explorer.blogspot.com/2008/07/important.html

http://translate.google.co.in/translate?hl=en&sl=zh-CN&u=http://blog.csdn.net/CompassButton/archive/...

Thanks

Sudheer

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
852
Read only

naimesh_patel
Active Contributor
0 Likes
852

Check this from SAP help: [Display List Header and Footer |http://help.sap.com/saphelp_nw04/helpdata/en/37/d0ee406b657e7fe10000000a1550b0/frameset.htm]

You can also visit: [SALV Table Display - Add Header & Footer|http://help-abap.blogspot.com/2008/09/salv-model-5-add-header-top-of-page.html]

Regards,

Naimesh Patel