cancel
Showing results for 
Search instead for 
Did you mean: 

Using SALV_WD_TABLE filter criteria

former_member211591
Contributor
0 Kudos

Hi all,

this is a question regarding the usage of ALVs within WDA, not regarding the technical part of view.

I want to filter my table by "Today" and save as a variant. Are there any preset variables which I can use to filter columns? E.g. "today" for columns of type DATS.

If yes, which possibilities do I have; how do I use them?

Thanks a lot.

Ismail

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

From alv settings you can create a filter on the date and save as a preferred layout ( also as a default).

But I dont think that there you cannot pass any variable value as sy-datum to get the current date automaticallyand display values accordingly. It will always display the previous value and filter accordingly.

If you set the filter with a date value and save the layout as default then every time you need to provide the current date in the layout to get values accordingly.

regards,

Monishakar Chatterjee

former_member211591
Contributor
0 Kudos

Thats the point!

I don't want to edit the filter everyday.

I think I have to implement this criteria specifically. For instance, if '$today' is entered. use sy-datum as filter-criteria.

Do you think this is possible? Maybe enhancing the standard?

Former Member
0 Kudos

HI,

you can check the following thread to create filter through coding.

I think it is possible. just check i have tried but its not picking the the system date automatically. You can check once with the same way, it might be I am missing something.

Display Filter Line Default in ALV Table :-

[http://forums.sdn.sap.com/thread.jspa?threadID=1429705]

Regards,

Monishankar Chatterjee

amy_king
Active Contributor
0 Kudos

Hi Ismail,

Did you find a solution to this requirement? I'm facing the same requirement. Thomas Jung has mentioned in this similar thread

You could set it programatically, but you can't create variable values within the layout variant.

But I haven't found a solution.

Cheers,

Amy

former_member211591
Contributor
0 Kudos

Hi Amy,

how are you doing? Long time no see.

I'm sorry, but I couldn't find a solution for that. This requirement has been dismissed a long time ago. But I would like to know a solution if you find one.

Regard,

ismail

amy_king
Active Contributor
0 Kudos

Hi Ismail,

It's good to run into you again on SCN-- I've been less active lately as work has been busy. I ended up putting together a solution for this requirement and wrote it up for SCN...

One thing I wasn't able to do which I would have liked is to hide the filter row once the user has moved to a view variant that has no filters associated with it, but it seems this isn't possible to do in code without also hiding the Filter link as a side effect.

Hope all is well and thanks for replying to this old thread.

Amy

Answers (0)