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: 

How to use where clause for dynamic table using dynamic sel scr fields

Former Member
0 Kudos

Hi,

can anybody tell me, How to use where clause for dynamic table.

say I have dynamic selection screen with some select option fields on it, and I have to use that for filter the data in the dynamic table.. (It's table having archiving data-> and for archiving , as there is no data stored in tables, this table will contain the data from archive file and there is data pointer which points the data into internal table-> so it's dynamic. and I want to filter the data from this table using fields on dynamic seletion screen. Is there any way to do this?

Regards,

Mrunal

5 REPLIES 5

martin_voros
Active Contributor
0 Kudos

Hi,

you can dynamically construct your WHERE condition into string and then just call it. Check out ABAP documentation for dynamic where condition. It's well described there.

Cheers

0 Kudos

Hi Martin,

Can u send me the link for material?

Regards,

Mrunal

0 Kudos

Check below code from SAP help for dynamic where clause . Look for help on SELECT statement , you will get n no. of ex.

PARAMETERS: airline(2) TYPE C, 
            date       TYPE D. 
DATA: where_clause TYPE STRING, 
      connid       TYPE sflight-connid. 

CONCATENATE     'carrid = ''' airline '''' 
            ' AND fldate = ''' date '''' INTO where_clause. 

SELECT connid FROM sflight INTO connid 
  WHERE (where_clause). 
  WRITE: / date, airline, connid. 
ENDSELECT.

Former Member
0 Kudos

This message was moderated.

Former Member
0 Kudos

closed