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
206

HI

can any one quiclky tell me the <b>advantages of ALV</b> compared to normal <b>'write'</b> statements in points

thank u

Ginni

1 ACCEPTED SOLUTION

Former Member
0 Kudos
146

<b>ALV</b> is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.

<b>write statement </b>

The second write (write ... to itab-name) just fills in the name part of the

table header(it works like an assignment in VB). You may think an itab just

like a "linked list" structure (not an array). You need to insert an element

in the linked list so the structure can hold it. In other case, the element

doesn't exist for the linked list and you may miss it in further

assignations.

insert itab-name into itab may work in the only case that itab has one field

named name. if itab has any other field insert itab should not work at all.

append itab just adds itab header at the end of the linked list. If itab is

a sorted table (I mean, you declared it like sorted table ... with key...)

the header contents are inserted in correct sort order.

reward points if it is usefull ....

Girish

8 REPLIES 8

Former Member
0 Kudos
146

Hi,

The advantages is many - Shruti mentions some of them.

The keyword is flexibility. In the past I have sometimes programmed more programs that was basically the same report with minor variations - in one case i programmed 10 very similar reports for pp evaluation.

With ALV the users can define their own display variants without changing the program.

The display variant covers sorting, summarizing, filtering, hiding fields. The users can also make variants that show only total lines or subtotal lines or both - and by one click in the report they can expand one total line to display the underlying item lines.

The users can also choose to let the report show directly in excel. This is a very powerful option. You can upload excel templates with predefined formulas and macros. This can make you very popular - especially with Finance people that already have a lot of excel files, they populate with SAP data to make al kind of voodoo calculations that will help them see into the future.

With ALV you can give them an ABAP report that automatic popup with their own favorite excel book - without having to do a lot of troublesome and time consuming work to download the data and fit it into the excel sheet.

If you are new to ALV you can very quick make a simple ALV report. Basically it has 3 steps.

1) build an internal table with the data you want do display

2) build a field catalog table (each record in this table describes one column in the list)

3) call the ALV function

Later you can make use of more complicated functions like call back routines.

You have both functions modules and ABAP OO classes to help you with step 2 and 3. I have used the function modules for many years so its hard for me to change, but if I should start all over today I would forget about the function modules and go for the OO approach.

Thanks,

Reward If Helpful.

Former Member
0 Kudos
146

Collapse multiple reports into one, drastically cutting down your report development time

Save many hours using built-in ALV sorting, subtotaling and filtering capabilities

Add conditional structures into your ALV report: No programming required!

Combine ALV with display variants to meet a wide range of reporting requirements more easily

Dynamically reorder column layouts and add/subtract fields

Enable users and analysts to save their own personalized variants

Former Member
0 Kudos
146

Hi

ABAP List Viewer

<b>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.</b>

Using ALV, We can have three types of reports:

1. 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.

1. SIMPLE REPORT.

The important function modules are

a. Reuse_alv_list_display

b. Reuse_alv_fieldcatalog_merge

c. Reuse_alv_events_get

d. Reuse_alv_commentary_write

e. Reuse_alv_grid_display

<b>Reward points for useful Answers</b>

Regards

Anji

Former Member
0 Kudos
146

<b>Report Lists Without ABAP List Viewer </b>

When a report is written, the report list (output) depends almost entirely on how the developer programmed the report.

Shown below is a sample report list where the programmer did not to use the ABAP List Viewer. For illustration purposes, consider a report that was simply written (using the WRITE command to the screen.

<b>Report Lists With ABAP List Viewer </b>

When you insert the ALV code in your ABAP report program, the report list comes “alive.”

Compare the ALV-enabled list shown on page A-6 with the list shown on the previous page. Although the data is the same, the program has been changed to incorporate the ALV function modules.

With the ALV, the user is presented with a standard interface which, from the outset, includes:

&#61500; Headers for the columns that appear on the list.

&#61500; Colors that correspond to indented key information

&#61500; Buttons that appear on the function bar (some of whose functions will be introduced in the pages that follow)

<b>Advantages:</b>

&#61500; Sort

&#61500; Resize rows

&#61500; Double-click on one information element to jump to another information element

&#61500; Perform basic calculations

&#61500; Download “stylized” spreadsheets

&#61500; Display several colors

&#61500; Visually separate various pieces of information on the screen

Regards,

Pavan.

Former Member
0 Kudos
147

<b>ALV</b> is Application List viewer. Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. The report output can contain up to 90 columns in the display with the wide array of display options.

<b>write statement </b>

The second write (write ... to itab-name) just fills in the name part of the

table header(it works like an assignment in VB). You may think an itab just

like a "linked list" structure (not an array). You need to insert an element

in the linked list so the structure can hold it. In other case, the element

doesn't exist for the linked list and you may miss it in further

assignations.

insert itab-name into itab may work in the only case that itab has one field

named name. if itab has any other field insert itab should not work at all.

append itab just adds itab header at the end of the linked list. If itab is

a sorted table (I mean, you declared it like sorted table ... with key...)

the header contents are inserted in correct sort order.

reward points if it is usefull ....

Girish

Former Member
0 Kudos
146

hi

sorting, filtering, summation, u can report it in excel format,word processing, mailing,and graphical mailing..

reward if useful.

Former Member
0 Kudos
146

HI ginni,

1. These are some of the advantages.

a. No need to take care of the formatting of length and position.

b. Standard facility like sorting, filtering, selecting fields, sum etc are available in alv screen.

regards,

amit m.

uwe_schieferstein
Active Contributor
0 Kudos
146

Hello Ginni

Perhaps the following posting

<a href="https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/07/09/messageHandling-FindingtheNeedleintheHaystack&">Message Handling - Finding the Needle in the Haystack</a>

may be useful to understand why we (developers) should bore our customers and users no longer with WRITE lists but use more powerful approaches for reporting.

Regards

Uwe