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

Dynamic WHERE in READ TABLE

Former Member
0 Likes
6,362

Hi

it is possible to do dynamic condition READ TABLE WITH KEY (dynamic),

or maybe in LOOP WHERE (dynamic)?

Hi

it is possible to do dynamic condition READ TABLE WITH KEY (dynamic),

or maybe in LOOP WHERE (dynamic)?

10 REPLIES 10
Read only

Former Member
0 Likes
2,800

Did you try this?

Did you read the documentation??

Rob

Read only

0 Likes
2,800

In documentation there aren't what I need

Read only

0 Likes
2,800

So what does that tell you?

Rob

Read only

0 Likes
2,800

Is not possible.

Do you have use

loop at itab into wa_itab where x = y

and z1 > z2.

your code ....

endloop.

Read only

kesavadas_thekkillath
Active Contributor
0 Likes
2,800

READ TABLE ALL_CUSTOMERS
WITH KEY (KEY1) = VALUE1
(KEY2) = VALUE2.

Loop with dynamic where clauses are supported in higher versions of SAP.

Read only

0 Likes
2,800

Unfortunelly I don't know number of keys in CONDITION it must be dynamic.

Read only

0 Likes
2,800

Hi

Unfortunelly I don't know number of keys in CONDITION it must be dynamic.

That means you have to consider another solution:

let's to know what you need to do, perhaps we can give you an alternative one

Max

Read only

Former Member
0 Likes
2,800

Using call function RH_DYNAMIC_WHERE_BUILD u create dynamic where

Edited by: Krupaji on Nov 19, 2010 11:01 AM

Read only

Former Member
0 Likes
2,800

HI friend,

Yes it is possibel we can read the dynamic values using field symbols also or other wise we can use

string operation like CONCATENAT the fieldnames.

FIELD-SYMBOLS:<FIELDNAME1> TYPE ANY,

<FIELDNAME1> = 'LIFNR'.

READ TABLE ITAB INTO WA WITH KEY <FIELDNAME1> = VALUE.

LOOP AT ITAB INTO WA WHERE <FIELDNAME1> = VALUE.

if it is not possible u can use FIELD SYMBOLS then u can get the fields dynamcially.

Read only

0 Likes
2,800

Good resolve but have only one weakness, I can't use in this case dynamic numbers of keys