‎2007 Feb 01 7:50 AM
Hi friends,
I need a class name and method name to display the output in ALV LIST output with page break. If any sample code (oops ALV LIST OUTPUT) is available please send me or give me the information about it. I need it urgently. Please please please...
---Giri
‎2007 Feb 01 11:00 AM
Hi,
For ALV using OOPS,(it is called ALV grids):
CONTAINER CLASS:Cl_gui_custom_control
Class name:cl_gui_alv_grid
Method:SET_TABLE_FOR_FIRST_DISPLAY
Sample programs:http://www.geocities.com/victorav15/sapr3/abap_ood.html#d_grid
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
http://www.sapdevelopment.co.uk/reporting/alvhome.htm
-->download the PDF from following link.
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
You can get all demo programs for ALV:
Go to se38 and type BCALV* and press F4 for all demo porgrams.
a basic sample program:
In your screen,you should create a control area for the custom controller and name it as 'CONTAINER'.
REPORT SAMPLE.
DATA: alv type ref to cl_gui_alv_GRID,
cont type ref to cl_gui_custom_container,
itab_spfli type table of spfli,
ok_code type sy-ucomm.
START-OF-SELECTION.
select * from spfli into table itab_spfli.
call screen 100.
END-OF-SELECTION.
&----
*& Module STATUS_0100 OUTPUT
&----
text
----
MODULE STATUS_0100 OUTPUT.
seT PF-STATUS 'GUI'.
SET TITLEBAR 'xxx'.
if cont is initial.
CREATE OBJECT cont
EXPORTING
CONTAINER_NAME = 'CONTAINER'.
CREATE OBJECT ALV
EXPORTING
I_PARENT = CONT.
CALL METHOD ALV->SET_TABLE_FOR_FIRST_DISPLAY
EXPORTING
I_BUFFER_ACTIVE =
I_BYPASSING_BUFFER =
I_CONSISTENCY_CHECK =
I_STRUCTURE_NAME = 'SPFLI'
IS_VARIANT =
I_SAVE =
I_DEFAULT =
IS_LAYOUT =
IS_PRINT =
IT_SPECIAL_GROUPS =
IT_TOOLBAR_EXCLUDING =
IT_HYPERLINK =
IT_ALV_GRAPHICS =
IT_EXCEPT_QINFO =
IR_SALV_ADAPTER =
CHANGING
IT_OUTTAB = itab_spfli
IT_FIELDCATALOG =
IT_SORT =
IT_FILTER =
EXCEPTIONS
INVALID_PARAMETER_COMBINATION = 1
PROGRAM_ERROR = 2
TOO_MANY_LINES = 3
others = 4
.
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDIF.
ENDMODULE. " STATUS_0100 OUTPUT
&----
*& Module USER_COMMAND_0100 INPUT
&----
text
----
MODULE USER_COMMAND_0100 INPUT.
case ok_code.
when 'BACK'.
leave to screen 0.
when 'EXIT'.
leave to screen 0.
when 'SAVE'.
MODIFY spfli from table itab_spfli.
ENDCASE.
Regards,
Beejal
**Reward if this helps
‎2007 Feb 02 7:27 AM
Hi Beejal,
Actually i need ALV LIST OUTPUT directly by using oops, not for ALV GRID OUTPUT, so please send me class and methods names or a sample code. Please please... I need it urgently.
‎2007 Feb 05 6:44 AM
Hi,
In my knowledge, you have to use REUSE_ALV_LIST_DISPLAY function or other LIST_DISPLY functions <b>WITHOUT OOPS</b> (CL_GUI_ALV_GRID Class).
If you want to output as "LIST" not as "GRID", you have to use function modules only.
Thanks,
Chetan Shah
‎2007 Oct 18 3:18 PM
Hi,
I think that you can use class <b>CL_SALV_TABLE</b>. Go to transaction SE24 and check class documentation.
Also check the demo programs SALV_DEMO_TABLE_REAL_SIMPLE and especially <b>SALV_DEMO_TABLE_SIMPLE</b>.