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

CL_SALV_TABLE class

Former Member
0 Likes
1,078

Hi iam using sap 4.6 version .

For generating ALV simplest report i have to call CL_SALV_TABLE class.

But in my system it is showing error 'It is not exist'.

I think it is beceause of version problem Pls tell me suitable reason.

regards,

kaladhar.

Hi iam using sap 4.6 version .

For generating ALV simplest report i have to call CL_SALV_TABLE class.

But in my system it is showing error 'It is not exist'.

I think it is beceause of version problem Pls tell me suitable reason.

regards,

kaladhar.

5 REPLIES 5
Read only

Former Member
0 Likes
855

Hi Kaladhar,

Most of the classes does not exist in 4.6c , use Function modules instead, what is the exact requirement??

Read only

0 Likes
855

for displaying data of the internal table in an ALV in full screen.

For this i have to call CL_SALV_TABLE class. But it is not working in sap 4.6 ..

pls show me any other way...

Read only

uwe_schieferstein
Active Contributor
0 Likes
855

Hello Kaladhar

If you need a fast way of displaying ALV lists without defining screens simply use function module REUSE_ALV_GRID_DISPLAY_LVC which is already quite close to OO-based ALV lists.

The new ALV object model classes are available >= 6.40.

Regards,

Uwe

Read only

Former Member
0 Likes
855

hi Kaladhar,

chk this sample ALV report

report zsas_alv.

tables :t247.

type-pools slis. "Type definitions for alv report

data: it_fieldcat type lvc_t_fcat,

wa_fieldcat type lvc_s_fcat.

data: wa_layout type lvc_s_layo.

data : begin of it_final occurs 0,

check(1),

celltab type lvc_t_styl, " Switch between display/change

mnr like t247-mnr,

ltx like t247-ltx,

end of it_final.

data : wa_final like it_final.

data : w_repid like sy-repid.

w_repid = sy-repid.

refresh it_final.

select mnr ltx

from t247

into corresponding fields of table it_final

where spras eq 'E'.

wa_fieldcat-fieldname = 'CHECK'.

wa_fieldcat-tabname = 'IT_FINAL'.

wa_fieldcat-checkbox = 'X'.

wa_fieldcat-edit = 'X'..

wa_fieldcat-outputlen = '3'.

wa_fieldcat-col_pos = '1'.

append wa_fieldcat to it_fieldcat.

clear wa_fieldcat.

wa_fieldcat-fieldname = 'MNR'.

wa_fieldcat-tabname = 'IT_FINAL'.

wa_fieldcat-outputlen = '8'.

wa_fieldcat-col_pos = '2'.

wa_fieldcat-reptext = 'Month'.

append wa_fieldcat to it_fieldcat.

clear wa_fieldcat.

wa_fieldcat-fieldname = 'LTX'.

wa_fieldcat-tabname = 'IT_FINAL'.

wa_fieldcat-outputlen = '20'.

wa_fieldcat-col_pos = '3'.

wa_fieldcat-reptext = 'Month Desc'.

append wa_fieldcat to it_fieldcat.

clear wa_fieldcat.

data: wa_celltab type lvc_s_styl,

it_celltab type lvc_t_styl,

l_index type i.

clear : wa_celltab,wa_final,it_celltab.

refresh it_celltab.

*Initialize the celltab table

loop at it_final into wa_final.

l_index = sy-tabix.

wa_celltab-fieldname = 'CHECK'.

wa_celltab-style = cl_gui_alv_grid=>mc_style_enabled.

insert wa_celltab into table it_celltab.

insert lines of it_celltab into table wa_final-celltab.

modify it_final from wa_final index l_index.

endloop.

*Make the first five 5 rows as disabled

clear l_index.

loop at it_final into wa_final.

l_index = sy-tabix.

if sy-tabix le 5.

loop at wa_final-celltab into wa_celltab.

if wa_celltab-fieldname eq 'CHECK' .

wa_celltab-style = cl_gui_alv_grid=>mc_style_disabled.

modify wa_final-celltab from wa_celltab.

modify it_final index l_index from wa_final transporting celltab.

endif.

endloop.

endif.

endloop.

wa_layout-box_fname = 'CHECK'.

wa_layout-no_rowmark = 'X'.

wa_layout-stylefname = 'CELLTAB'.

call function 'REUSE_ALV_GRID_DISPLAY_LVC'

exporting

i_callback_program = w_repid

i_grid_title = 'GRID DISPLAY'

is_layout_lvc = wa_layout

it_fieldcat_lvc = it_fieldcat

tables

t_outtab = it_final

exceptions

program_error = 1

others = 2.

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
855

As has already been mentioned, the ALV Object Model classes, such as CL_SALV_TABLE, do not exist in 46c, they were intoduced in NetWeaver 2004, so you would have to have an ERP 2005 system in order to use this functionality. Since you are on 46c, you are stuck with the function module REUSE_ALV_GRID_DISPLAY or the class CL_GUI_ALV_GRID.

Regards,

Rich Heilman