2008 Jun 09 5:09 AM
Hi,
Can we read a internal table by specifying more htan one condition. For eg, READ ITAB WITH KEY IT_MARA-MATNR AND IT_MARC-WERKS AND IT_MARD-LGORT.
If we write like this..is this correct logic...
thanks,
Ram.
2008 Jun 09 5:11 AM
Hi,
Correct syntax would be :
READ ITAB WITH KEY IT_MARA-MATNR
IT_MARA-WERKS
IT_MARA-LGORT.
AND should not be specfied.
Pls reward points if useful.
Shruthi
Edited by: Shruthi R on Jun 9, 2008 6:11 AM
2008 Jun 09 5:11 AM
Hi,
Correct syntax would be :
READ ITAB WITH KEY IT_MARA-MATNR
IT_MARA-WERKS
IT_MARA-LGORT.
AND should not be specfied.
Pls reward points if useful.
Shruthi
Edited by: Shruthi R on Jun 9, 2008 6:11 AM
2008 Jun 09 5:13 AM
loop at it_mara.
read table it_marc with key matnr = it_mara-matnr.
read table it_mard with key matnr = it_mara-matnr.
..
..
..
endloop.
2008 Jun 09 5:16 AM
Hi,
You can read internal table by specifying more than one condition.
But you need not use AND key word for that, follow up with next condition too...
example
read table itab into watab with key matnr = p_matnr
gjahr = p_gjahr
werks = p_werks.
Reward points if this helps,
Kiran