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: 

Filter Logic

Former Member
0 Kudos

Hi All,

I want the code for filter logic which is exists in ALV. I know the FM's . But i want the code for filter how it is working in ALV. I want implement in other than ALvs'.

please help me in this.

will give reward points.

regards,

Ajyareddy

9 REPLIES 9

Former Member
0 Kudos

Please respond any body.

regards,

Ajay

0 Kudos

CAN U BE CLEAR IN QUESTION...

FILTER IN WHAT SCENARIO..

0 Kudos

See....If you want to select fields from different tables means for filtering of some fields ..

Then you can go for REUSE_ALV_FIELDCAT_MERGE....If any other case...tell the question completely

0 Kudos

Hi Anil,

Thanks for your quick respond.

I want the filtering code in ALV with out using the function modules.I want to use same techniquie in differnet scenario.

I am downloading the excel sheet in my inboox before excuting the ALV function module in my report. Once the ALV fm's are executed filter is working but i want this option before displlay the report output. I want to add filtering technique in excel downloaded.

regards,

Ajay reddy

0 Kudos

Filtering is nothing but removing the unwanted rows from display and in your case removing them from your download internal table. So why not simply copy the internal table to another table and delete the unwanted records and download it to excel and use the original one passing it to ALV.

0 Kudos

Thanks srinivas,

But the problem is, The filter condition is in Layout. If we run the report with that

layout, the data is filtered in the 'Reuse_alv_grid_display'. I want to delete some rows from output table, depending on the filter set in 'Layout' . I want to filter this

table before it's display, to download that filtered data into excel file.

Has anybody done this scenario earlier?

Please help, it is very urgent....

Thank you very much,

Ajay

0 Kudos

That is interesting scenario, not something that I came across. Do you know the name of the layout variant? If so, try using REUSE_ALV_VARIANT_SELECT (read documentation) to get the filter criteria and may be based on that you can apply the same to remove the rows you don't need. But it will be very complicated.

0 Kudos

Also look at REUSE_ALV_LIST_LAYOUT_INFO_GET but I think this works only after you display the ALV.

0 Kudos

Hi Srinivas,

Before the display the report i need to filter the excel sheet data depending on the variant.

Alerady I am saving the filter layout in variant.

regards,

Ajay reddy