Application Development and Automation 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: 
Read only

alv reports

Former Member
0 Likes
954

what is use of filtering in alv

what is use of filtering in alv

7 REPLIES 7
Read only

Former Member
0 Likes
924

hi,

Filtering is used to filter the final report based on your requirement. For eg: filter on name, co.code, address, city, state...etc..

Regards,

Subramanian

Read only

Former Member
0 Likes
924

Hi,

With filters you restrict the display of data records in the ALV output. To do this, you specify conditions that a record in a specific column has to fulfill in order to be displayed or filtered out.

Like the sort object, you are able to generate a maximum of one filter object for each column. Every filter object can include on or more filter conditions.

Best Regards,

Stephanie

Read only

former_member125931
Active Participant
0 Likes
924

Use

With filters you restrict the display of data records in the ALV output. To do this, you specify conditions that a record in a specific column has to fulfill in order to be displayed or filtered out.

Like the sort object, you are able to generate a maximum of one filter object for each column. Every filter object can include on or more filter conditions.

Classes

The total of all the filter objects is represented by an object of type CL_SALV_FILTERS. The filter settings for a column are represented by an object of type CL_SALV_FILTER. The individual filter conditions in a filter object are represented by objects of type CL_SALV_SELOPT.

Filter Condition

In a filter condition, you provide information on which data records are to be displayed:

· The column in which the tested content is located

· The comparison value with which the rows are tested. This can be an individual value or an range for the given value.

· The condition, that is, an operator that defines the necessary relation between the cell value and the comparison value (for example, greater than, less than or equal to)

· Exclusion or inclusion, that is, whether the rows that fit the condition are to be displayed or whether they are not to be displayed

All entries that have the value AA in the CARRID column should be displayed.

...

gr_filter->add_filter(

columnname = 'CARRID'

sign = 'I'

option = 'EQ'

low = 'AA' ).

...

§ With the columname parameter, you determine the column name

§ With the low (or high) parameter, you determine the comparison value

§ With the option parameter, you determine the condition

§ With the sign parameter, you determine whether it is an inclusive or exclusive condition

Features

You are able to make the following settings for aggregations:

· Get filter objects and filter conditions

· Generate and Delete a filter object and filter condition

· Forbid filters for a column

For more information:

Link:[http://help.sap.com/saphelp_sm32/helpdata/en/16/e6eb40c4f8712ae10000000a155106/content.htm]

Read only

Former Member
0 Likes
924

Hi Pravalika,

In a filter condition, we provide information on which data records are to be displayed:

· The column in which the tested content is located

· The comparison value with which the rows are tested. This can be an individual value or an range for the given value.

· The condition, that is, an operator that defines the necessary relation between the cell value and the comparison value (for example, greater than, less than or equal to)

· Exclusion or inclusion, that is, whether the rows that fit the condition are to be displayed or whether they are not to be displayed

All entries that have the value AA in the CARRID column should be displayed.

*gr_filter->add_filter(

columnname = 'CARRID'

sign = 'I'

option = 'EQ'

low = 'AA' ).*

...

Check this link, which gives the complete information about filtering in ALV:

http://help.sap.com/saphelp_nw04/helpdata/en/16/e6eb40c4f8712ae10000000a155106/content.htm

Hope this helps you.

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
924

Hi pravalike,

[http://www.cdg-inc.com/news/WhitePaper_ALV_Reporting_Power.htm]

Regards,

Sravanthi

Read only

Former Member
0 Likes
924
Read only

Former Member
0 Likes
924

Hi Pravalika.

I would like to suggest a couple of references for filtering in ALV,

[SDN - Reference for Setting the filter value in ALV|;

[SAP HELP - Standard Reference for Setting and Deleting Filters in ALV|http://help.sap.com/saphelp_nw04/helpdata/en/73/b79d37e188a049e10000009b38f8cf/frameset.htm]

[SDN - Reference - How to develop a customer filter option in ALV?|;

[SDN - Reference for Use of filter and Direct option in use of Filter|;

[SAP HELP - Standard Reference for Filtering rows in ALV|http://help.sap.com/saphelp_nw04/helpdata/en/16/e6eb40c4f8712ae10000000a155106/frameset.htm]

[SDN - Reference for OSS notes for ALV grid filter|;

Hope that's usefull.

Good Luck & Regards.

Harsh Dave