2007 Mar 27 7:12 PM
Hi Group,
Can somebody send me the material or guide to implement alv grid using OOPS.
Thanks in advance.
Regards
Prabhas
Hi Group,
Can somebody send me the material or guide to implement alv grid using OOPS.
Thanks in advance.
Regards
Prabhas
2007 Mar 27 7:14 PM
2007 Mar 27 7:15 PM
2007 Mar 27 7:17 PM
If you are on a Netweaver release and are interesting in using the new ALV Object Model, here is a link to the help.
http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
And some links to some tutorials.
Regards,
RIch Heilman
2007 Mar 27 7:17 PM
Hi,
Check this link..
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
THanks,
Naren
2007 Mar 27 7:18 PM
If you want to know more about the class CL_GUI_ALV_GRID, here is another help link.
http://help.sap.com/saphelp_nw2004s/helpdata/en/bf/3bd1369f2d280ee10000009b38f889/frameset.htm
Regards,
Rich HEilman
2007 Mar 27 7:23 PM
Hi group,
This is really difficult to understand .. can somebody give me a sample code to implement an alv grid using OOPS.
Thanks in advance.
2007 Mar 27 7:32 PM
2007 Mar 27 7:38 PM
Also try this:
1) create a Z prog and then create a screen 0100 for that prog.
2) place a Custom Control on the screen and name the Custom Control as CUSTOM_GRID_CONTAINER
3) Exit screen painte and Paste in this code into the editor
data: i_vbak type table of vbak.
data: grid1 type ref to cl_gui_alv_grid,
field_catalog type lvc_t_fcat,
grid1_container type ref to cl_gui_custom_container.
data: lt_fieldcat type LVC_T_FCAT.
data: wa_fieldcat type LVC_s_FCAT.
start-of-selection.
select * from vbak into table i_vbak
where erdat > '20041201'
and erdat < '20071216'.
Instantiate the grid container.
create object grid1_container
exporting
container_name = 'CUSTOM_GRID_CONTAINER'.
Instantiate the grid itself within the container.
create object grid1
exporting
i_parent = grid1_container
i_appl_events = 'X'.
data: p_tb_exclude type ui_functions.
DATA: layout TYPE lvc_s_layo.
layout-edit = 'X'.
layout-NO_ROWMARK = ' '.
layout-zebra = 'X'.
layout-sel_mode = 'C'.
APPEND CL_GUI_ALV_GRID=>MC_FC_DESELECT_ALL
TO p_tb_exclude.
APPEND CL_GUI_ALV_GRID=>MC_FC_SELECT_ALL
TO p_tb_exclude.
CALL METHOD grid1->set_table_for_first_display
EXPORTING i_structure_name = 'VBAK'
is_layout = layout
IT_TOOLBAR_EXCLUDING = p_tb_exclude
CHANGING "it_fieldcatalog = gt_fieldcat
it_outtab = i_vbak[].
call screen '0100'.
*
*&----
*
*& Module STATUS_0100 OUTPUT
*&----
*
text
*----
*
MODULE STATUS_0100 OUTPUT.
SET PF-STATUS 'E100'.
SET TITLEBAR '100'.
ENDMODULE. " STATUS_0100 OUTPUT
*&----
*
*& Module USER_COMMAND_0100 INPUT
*&----
*
text
*----
*
MODULE USER_COMMAND_0100 INPUT.
case sy-ucomm.
when 'EXIT' or 'BACK' or 'CANCEL'.
leave program.
endcase.
ENDMODULE. " USER_COMMAND_0100 INPUT
2007 Mar 27 7:24 PM
hi,
check the below link u will find lot of examples in alv's
http://www.geocities.com/mpioud/Abap_programs.html
http://www.sapdevelopment.co.uk/reporting/alv/alvscr.htm
~~Guduri
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |