2010 Nov 18 3:21 PM
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)?
2010 Nov 18 3:24 PM
2010 Nov 18 3:33 PM
2010 Nov 18 3:46 PM
2010 Nov 18 4:48 PM
Is not possible.
Do you have use
loop at itab into wa_itab where x = y
and z1 > z2.
your code ....
endloop.
2010 Nov 18 5:14 PM
READ TABLE ALL_CUSTOMERS
WITH KEY (KEY1) = VALUE1
(KEY2) = VALUE2.
Loop with dynamic where clauses are supported in higher versions of SAP.
2010 Nov 19 8:29 AM
Unfortunelly I don't know number of keys in CONDITION it must be dynamic.
2010 Nov 19 8:46 AM
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
2010 Nov 19 10:01 AM
Using call function RH_DYNAMIC_WHERE_BUILD u create dynamic where
Edited by: Krupaji on Nov 19, 2010 11:01 AM
2010 Nov 19 11:31 AM
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.
2010 Nov 22 9:39 AM
Good resolve but have only one weakness, I can't use in this case dynamic numbers of keys
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |