Application Development 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: 

ALV??

Former Member
0 Kudos
89

HI,

What r the diff types of ALV Fmodules and their use?

Nayak.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
50

HI,

Goto SE80 and select development class and check the programs under SLIS package. There are many ALV demo programs.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/an%20easy%20r...

ALVGRID with refresh

http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html

ALV Group Heading

http://www.sap-img.com/fu037.htm

http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm

http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm

ALV all Imp

http://www.geocities.com/mpioud/Abap_programs.html

http://www.sap-img.com/fu002.htm

http://www.sapdevelopment.co.uk/reporting/alvhome.htm

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_events.htm

ALV Documentation for Field

http://www.mpls.k12.mn.us/sites/f7071225-9844-4da6-96c0-996b9c74b221/uploads/SAP_Navigation_Training...

1. Please give me general info on ALV.

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

2. How do I program double click in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=11601

http://www.sapfans.com/forums/viewtopic.php?t=23010

3. How do I add subtotals (I have problem to add them)...

http://www.sapfans.com/forums/viewtopic.php?t=20386

http://www.sapfans.com/forums/viewtopic.php?t=85191

http://www.sapfans.com/forums/viewtopic.php?t=88401

http://www.sapfans.com/forums/viewtopic.php?t=17335

4. How to add list heading like top-of-page in ABAP lists?

http://www.sapfans.com/forums/viewtopic.php?t=58775

http://www.sapfans.com/forums/viewtopic.php?t=60550

http://www.sapfans.com/forums/viewtopic.php?t=16629

5. How to print page number / total number of pages X/XX in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)

6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.

http://www.sapfans.com/forums/viewtopic.php?t=64320

http://www.sapfans.com/forums/viewtopic.php?t=44477

7. How can I set the cell color in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=52107

8. How do I print a logo/graphics in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=81149

http://www.sapfans.com/forums/viewtopic.php?t=35498

http://www.sapfans.com/forums/viewtopic.php?t=5013

9. How do I create and use input-enabled fields in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=84933

http://www.sapfans.com/forums/viewtopic.php?t=69878

10. How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

11. How can I display an icon in ALV? (Common requirement is traffic light icon).

http://www.sapfans.com/forums/viewtopic.php?t=79424

http://www.sapfans.com/forums/viewtopic.php?t=24512

12. How can I display a checkbox in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=88376

http://www.sapfans.com/forums/viewtopic.php?t=40968

http://www.sapfans.com/forums/viewtopic.php?t=6919

Kishore.

5 REPLIES 5

former_member194669
Active Contributor
0 Kudos
50

Check for fun.group SALV

These fun group REUSE* fun. modules for ALV.

aRs

Former Member
0 Kudos
50

Nayak,

ABAP List Viewer

The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).

This helps us to implement all the features mentioned very effectively.

Using ALV, We can have three types of reports:

Simple Report 2.Block Report 3.Hierarchical Sequential Report

There are some function modules which will enable to produce the above reports without much effort.

All the definitions of internal tables, structures and constants are declared in a type-pool called SLIS.

SIMPLE REPORT.

The important function modules are

Reuse_alv_list_display

Reuse_alv_fieldcatalog_merge

Reuse_alv_events_get

Reuse_alv_commentary_write

Reuse_alv_grid_display

REUSE_ALV_LIST_DISPLAY : This is the function module which prints the data.

The important parameters are :

Export :

I_callback_program : report id

I_callback_pf_status_set : routine where a user can set his own pf status or change the functionality of the existing pf status

I_callback_user_command : routine where the function codes are handled

I_structure name : name of the dictionary table

Is_layout : structure to set the layout of the report

It_fieldcat : internal table with the list of all fields and their attributes which are to be printed (this table can be populated automatically by the function module REUSE_ALV_FIELDCATALOG_MERGE

It_events : internal table with a list of all possible events of ALV and their corresponding form names.

Tables :

i. t_outtab : internal table with the data to be output

REUSE_ALV_FIELDCATALOG_MERGE : This function module is used to populate a fieldcatalog which is essential to display the data in ALV. If the output data is from a single dictionary table and all the columns are selected, then we need not exclusively create the field catalog. Its enough to mention the table name as a parameter(I_structure name) in the REUSE_ALV_LIST_DISPLAY. But in other cases we need to create it.

The Important Parameters are :

Export :

i. I_program_name : report id

I_internal_tabname : the internal output table

I_inclname : include or the report name where all the dynamic forms are handled.

II Changing

ct_fieldcat : an internal table with the type SLIS_T_FIELDCAT_ALV which is

declared in the type pool SLIS.

REUSE_ALV_EVENTS_GET : Returns table of possible events for a list type

Parameters :

Import :

Et_Events : The event table is returned with all possible CALLBACK events

for the specified list type (column 'NAME'). For events to be processed by Callback, their 'FORM' field must be filled. If the field is initialized, the event is ignored. The entry can be read from the event table, the field 'FORM' filled and the entry modified using constants from the type pool SALV.

Export :

I_List_type :

0 = simple list REUSE_ALV_LIST_DISPLAY

1 = hierarchcal-sequential list REUSE_ALV_HIERSEQ_LIST_DISPLAY

2 = simple block list REUSE_ALV_BLOCK_LIST_APPEND

3 = hierarchical-sequential block list

REUSE_ALV_BLOCK_LIST_HS_APPEND

REUSE_ALV_COMMENTARY_WRITE : This is used in the Top-of-page event to print the headings and other comments for the list.

Parameters :

I. it_list_commentary : internal table with the headings of the type slis_t_listheader.

This internal table has three fields :

Typ : ‘H’ - header, ‘S’ - selection , ‘A’ - action

Key : only when typ is ‘S’.

Info : the text to be printed

REUSE_ALV_GRID_DISPLAY : A new function in 4.6 version, to display the results in grid rather than as a preview.

Parameters : same as reuse_alv_list_display

This is an example for simple list.

BLOCK REPORT

This is used to have multiple lists continuously.

The important functions used in this report are:

REUSE_ALV_BLOCK_LIST_INIT

REUSE_ALV_BLOCK_LIST_APPEND

REUSE_ALV_BLOCK_LIST_HS_APPEND

REUSE_ALV_BLOCK_LIST_DISPLAY

REUSE_ALV_BLOCK_LIST_INIT

Parameters:

I_CALLBACK_PROGRAM

I_CALLBACK_PF_STATUS_SET

I_CALLBACK_USER_COMMAND

This function module is used to set the default gui status etc.

REUSE_ALV_BLOCK_LIST_APPEND

Parameters :

Export :

is_layout : layout settings for block

it_fieldcat : field catalog

i_tabname : internal table name with output data

it_events : internal table with all possible events

Tables :

i. t_outtab : internal table with output data.

This function module adds the data to the block.

Repeat this function for all the different blocks to be displayed one after the other.

REUSE_ALV_BLOCK_LIST_HS_APPEND

This function module is used for hierarchical sequential blocks.

REUSE_ALV_BLOCK_LIST_DISPLAY

Parameters : All the parameters are optional.

This function module display the list with data appended by the above function.

Here the functions REUSE_ALV_FIELDCATALOG_MERGE, REUSE_ALV_EVENTS_GET, REUSE_ALV_COMMENTARY_WRITE can be used.

Hierarchical reports :

Hierarchical sequential list output.

The function module is

REUSE_ALV_HIERSEQ_LIST_DISPLAY

Parameters:

I. Export:

I_CALLBACK_PROGRAM

I_CALLBACK_PF_STATUS_SET

I_CALLBACK_USER_COMMAND

IS_LAYOUT

IT_FIELDCAT

IT_EVENTS

i_tabname_header : Name of the internal table in the program containing the

output data of the highest hierarchy level.

i_tabname_item : Name of the internal table in the program containing the

output data of the lowest hierarchy level.

is_keyinfo : This structure contains the header and item table field

names which link the two tables (shared key).

II. Tables

t_outtab_header : Header table with data to be output

t_outtab_item : Name of the internal table in the program containing the

output data of the lowest hierarchy level.

slis_t_fieldcat_alv : This internal table contains the field attributes. This internal table can be populated automatically by using ‘REUSE_ALV_FIELDCATALOG_MERGE’.

Important Attributes :

col_pos : position of the column

fieldname : internal fieldname

tabname : internal table name

ref_fieldname : fieldname (dictionary)

ref_tabname : table (dictionary)

key(1) : column with key-color

icon(1) : icon

symbol(1) : symbol

checkbox(1) : checkbox

just(1) : (R)ight (L)eft (C)ent.

do_sum(1) : sum up

no_out(1) : (O)blig.(X)no out

outputlen : output length

seltext_l : long key word

seltext_m : middle key word

seltext_s : short key word

reptext_ddic : heading (ddic)

ddictxt(1) : (S)hort (M)iddle (L)ong

datatype : datatype

hotspot(1) : hotspot

Pls. reward if useful

amit_khare
Active Contributor

Former Member
0 Kudos
51

HI,

Goto SE80 and select development class and check the programs under SLIS package. There are many ALV demo programs.

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/abap/an%20easy%20r...

ALVGRID with refresh

http://www.geocities.com/mpioud/Z_DEMO_ALV_REFRESH_BUTTON.html

ALV Group Heading

http://www.sap-img.com/fu037.htm

http://www.sap-img.com/abap/test-alv-display-with-header-footer.htm

http://www.sap-img.com/abap/sample-alv-heading-in-alv.htm

ALV all Imp

http://www.geocities.com/mpioud/Abap_programs.html

http://www.sap-img.com/fu002.htm

http://www.sapdevelopment.co.uk/reporting/alvhome.htm

http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_events.htm

ALV Documentation for Field

http://www.mpls.k12.mn.us/sites/f7071225-9844-4da6-96c0-996b9c74b221/uploads/SAP_Navigation_Training...

1. Please give me general info on ALV.

http://www.sapfans.com/forums/viewtopic.php?t=58286

http://www.sapfans.com/forums/viewtopic.php?t=76490

http://www.sapfans.com/forums/viewtopic.php?t=20591

http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.

2. How do I program double click in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=11601

http://www.sapfans.com/forums/viewtopic.php?t=23010

3. How do I add subtotals (I have problem to add them)...

http://www.sapfans.com/forums/viewtopic.php?t=20386

http://www.sapfans.com/forums/viewtopic.php?t=85191

http://www.sapfans.com/forums/viewtopic.php?t=88401

http://www.sapfans.com/forums/viewtopic.php?t=17335

4. How to add list heading like top-of-page in ABAP lists?

http://www.sapfans.com/forums/viewtopic.php?t=58775

http://www.sapfans.com/forums/viewtopic.php?t=60550

http://www.sapfans.com/forums/viewtopic.php?t=16629

5. How to print page number / total number of pages X/XX in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)

6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.

http://www.sapfans.com/forums/viewtopic.php?t=64320

http://www.sapfans.com/forums/viewtopic.php?t=44477

7. How can I set the cell color in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=52107

8. How do I print a logo/graphics in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=81149

http://www.sapfans.com/forums/viewtopic.php?t=35498

http://www.sapfans.com/forums/viewtopic.php?t=5013

9. How do I create and use input-enabled fields in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=84933

http://www.sapfans.com/forums/viewtopic.php?t=69878

10. How can I use ALV for reports that are going to be run in background?

http://www.sapfans.com/forums/viewtopic.php?t=83243

http://www.sapfans.com/forums/viewtopic.php?t=19224

11. How can I display an icon in ALV? (Common requirement is traffic light icon).

http://www.sapfans.com/forums/viewtopic.php?t=79424

http://www.sapfans.com/forums/viewtopic.php?t=24512

12. How can I display a checkbox in ALV?

http://www.sapfans.com/forums/viewtopic.php?t=88376

http://www.sapfans.com/forums/viewtopic.php?t=40968

http://www.sapfans.com/forums/viewtopic.php?t=6919

Kishore.

Former Member
0 Kudos
50

1. Goto SE80

2. Give Function group as SALV

3. you can get all ALV related function modules.

4. check the where-used-list of them to know their use