Skip to Content
author's profile photo Former Member
Former Member

Is it possible to use dynamic 'with key' conditions of 'READ itab' ??

Hi~

I want to try to set 'with key' conditions dynamically..

READ TABLE itab WITH KEY <...>.

In this <...> phrase, the condition keys could be 2 or 3( don't know at yet this point)

so i want to make it dynamic with importing data.

Is it possible?

Please help me!

thank you in advance~

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 04:11 AM

    I don't think this feature is available with ReadTable. But in Loop at where, u can define dynamic conditions.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Feb 27, 2007 at 04:15 AM

    Hi,

    This syntax is not possible with REABTABLE ITAB, but the best thing will be to filter the value at the database level itself, I mean you can use SELECT with dynamic WHERE clause to ristrict the values if you are getting this internal table as an output of some FM then may be you can use LOOP with WHERE clause.

    Regards,

    Sesh

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2007 at 04:16 AM

    Hey,

    You could write 2 READ statements instead of trying to write a dynamic READ statement.

    IF CONDITION FOR 2 KEYS IS MET.

    READ TABLE WITH KEY1 = (value1) KEY2 = (value2).

    ELSE.

    READ TABLE WITH KEY1 = (value1) KEY2 = (value2) KEY3 = (value3).

    ENDIF.

    ~Kiran

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.