2008 Jan 04 6:07 PM
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.
2008 Jan 04 6:19 PM
Hi Kaladhar,
Most of the classes does not exist in 4.6c , use Function modules instead, what is the exact requirement??
2008 Jan 04 6:53 PM
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...
2008 Jan 04 6:58 PM
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
2008 Jan 04 7:08 PM
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.
2008 Jan 04 7:35 PM
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
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |