2007 Jan 17 6:34 PM
2007 Jan 17 6:36 PM
check this
http://help.sap.com/saphelp_nw04/helpdata/en/99/49b844d61911d2b469006094192fe3/frameset.htm
development class SLIS for demo programs.
- Guru
can anybody giv the Alv steps?
2007 Jan 17 6:36 PM
check this
http://help.sap.com/saphelp_nw04/helpdata/en/99/49b844d61911d2b469006094192fe3/frameset.htm
development class SLIS for demo programs.
- Guru
2007 Jan 17 6:36 PM
Refer below link to create sample ALVs: Also, there are many links related to ALVs in this forum.
http://www.sap-img.com/abap/sample-programs-on-alv-grid.htm
Thanks,
Santosh
2007 Jan 17 6:37 PM
Hi,
1) Build the field catalog.
2) Set up the layout (Not mandatory).
3) Have the data for display.
Check this simple ALV program.
TYPE-POOLS: slis.
Data declaration.
DATA: BEGIN OF itab OCCURS 0,
vbeln TYPE vbeln,
erdat TYPE erdat,
auart TYPE auart,
netwr TYPE vbak-netwr,
END OF itab.
DATA: wa_kna1 TYPE kna1.
DATA: t_fieldcatalog TYPE slis_t_fieldcat_alv.
DATA: s_fieldcatalog TYPE slis_fieldcat_alv.
Selection-screen.
PARAMETERS: p_kunnr TYPE kunnr OBLIGATORY.
AT SELECTION-SCREEN.
SELECT SINGLE * FROM kna1 INTO wa_kna1
WHERE kunnr = p_kunnr.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'Invalid customer'.
LEAVE LIST-PROCESSING.
ENDIF.
START-OF-SELECTION.
Building the field catalog.
s_fieldcatalog-col_pos = '1'.
s_fieldcatalog-fieldname = 'VBELN'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'VBELN'.
s_fieldcatalog-outputlen = '12'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '2'.
s_fieldcatalog-fieldname = 'ERDAT'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'ERDAT'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '3'.
s_fieldcatalog-fieldname = 'AUART'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'AUART'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
s_fieldcatalog-col_pos = '4'.
s_fieldcatalog-fieldname = 'NETWR'.
s_fieldcatalog-tabname = 'ITAB'.
s_fieldcatalog-rollname = 'NETWR_AK'.
s_fieldcatalog-do_sum = 'X'.
APPEND s_fieldcatalog TO t_fieldcatalog.
CLEAR: s_fieldcatalog.
Get the sales orders.
SELECT vbeln erdat auart netwr
FROM
vbak
INTO TABLE itab
WHERE kunnr = p_kunnr.
IF sy-subrc <> 0.
MESSAGE s208(00) WITH 'No records found'.
LEAVE LIST-PROCESSING.
ENDIF.
DATA: v_repid TYPE syrepid.
v_repid = sy-repid.
Events
DATA: t_events TYPE slis_t_event,
s_events LIKE LINE OF t_events.
s_events-name = 'TOP_OF_PAGE'.
s_events-form = 'TOP_OF_PAGE'.
APPEND s_events TO t_events.
Display the alv
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
EXPORTING
i_callback_program = v_repid
it_fieldcat = t_fieldcatalog
it_events = t_events[]
TABLES
t_outtab = itab.
----
FORM TOP_OF_PAGE *
----
........ *
----
FORM top_of_page.
WRITE: / 'Customer - ', p_kunnr.
WRITE: / 'Name - ', wa_kna1-name1.
ENDFORM.
Thanks,
Naren
2007 Jan 17 7:09 PM
Hi Sunil,
Programming Steps:
Declare data areas for list viewer
Declare internal table to store selected data
Select data into internal table
Build field catalog
Build sort catalog
Build event catalog
Start list viewer
STEP 1:
Specifying a field Catalogue
Specify a heading for a report.
Type lvc_title
Create a field catalogue for the report
Table of type slis_t_fieldcat_alv
line_fieldcat-fieldname : Field name
line_fieldcat-tabname : Itab name
line_fieldcat-key : Specifies key
line_fieldcat-seltext_m : Coloumn header
line_fieldcat-hotspot : Indicate hotspot
line_fieldcat-checkbox : Display checkbox
line_fieldcat-edit : Allow editing
STEP 2:
Choosing and saving Layouts
Save options
' ' = No display variants can be saved
'X' = Standard display variants can be saved
'U = User-specific display variants can be saved
'A' = Standard & user-specific can be saved
Layout options
Structure type slis_layout_alv
i_layout-colwidth_optimize = 'X' : Opt col width
i_layout-zebra = X : Alt color pattern
i_layout-no_vline = X : No vertical line
STEP 3:
A Simple ALV Program
Using REUSE_ALV_GRID_DISPLAY
Passing minimum parameter
Data to be displayed
Format of Column ( Field Catalogue )
Let ALV set standard PF_status
STEP 4:
Initialize Events
Initialize events
Type slis_t_event
Use event 'TOP_OF_PAGE' to write a header
Type slis_t_listheader
REUSE_ALV_COMMENTARY_WRITE
ALV supports 16 events
Hope this will help.
Regards,
Ferry Lianto
2007 Jan 17 7:18 PM
hi sunil,
check the demo programs by typing BALV in se38
and also check these links...
https://forums.sdn.sap.com/click.jspa?searchID=785016&messageID=2946639
http://www.sapdevelopment.co.uk/reporting/alv/alvgrid.htm
http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
do reward if it helps,
priya.
2007 Jan 17 7:36 PM
Hi Sunil,
The best way to learn about ALV and specially ALV using Objects is by studying the standard SAP programs. Type BCALV_GRID_* in reports transaction, you will get a list of 10 programs...with step by step explainations given.
Hope this helps.
Thanks,
Ketan
2007 Jan 17 8:31 PM
Hi,
checko ut the links:
http://www.sapdevelopment.co.uk/reporting/alv/alv_multlist.htm
http://www.sap-img.com/abap/what-is-alv-programming.htm
http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm
http://goldenink.com/abap/alv_grid.html
http://www.erpgenie.com/abap/controls/alvgrid.htm
Regards,
keerthi
2007 Jan 17 10:09 PM
2007 Jan 17 10:22 PM
Hi,
Check these programs
<b><u><i>ALV Using Function Modules</i></u></b>
BALVHD01 Hierarchical-sequential list flight model
BALVHD01_GROUP Hierarchical-sequential list flight model
BALVSD01 Demo program ALV: Simple list flight model
BALVSD02 ALV demo program: Output flights (simplest version)
BALVSD02_GRID Simple ALV grid control call in fullscreen mode
BALVSD02_SAVE Simple ALV call with storage option
BALVSD03 Simple list
BALVSD04 Simple list (merged)
BALVSD06 Demoprogram ALV: Output flights (simple version + save)
BALVSD11 Demo program ALV: Simple list with interactions and layouts
<b><i><u>ALV Using Object Oriented techniques.</u></i></b>
BCALV_GRID_01 Events for print processing
BCALV_GRID_02 Basic list and details list using one ALV control
BCALV_GRID_03 Detail list in screen of type dialog
BCALV_GRID_04 Display exceptions using LEDs or lights
BCALV_GRID_05 Add a self-defined button to the toolbar
BCALV_GRID_06 Define self-defined context menu
BCALV_GRID_07 Defining a toolbar menu
BCALV_GRID_08 Defining a toolbar menu with default button
BCALV_GRID_09 Control the saving options of layouts
BCALV_GRID_10 Load a layout before list display
BCALV_GRID_11 Test for new layout function modules
BCALV_GRID_AND_POPUP ALV Grid in dialog box
BCALV_GRID_DEMO Simple ALV Control Call Demo Program
Regards,
Vara
2007 Jan 18 7:26 AM
Following are the steps for creating ALV reports.
1. Fill the data which you want to display in the ALV report in asingle internal table.
2. Prepare the fieldcatalog for the fields.
3. Prepare the event catalog list.
4. Call function "REUSE_ALV_GRID_DISPLAY" for displaying the grid display
and pass the appropiate parameters.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |