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

Ranges : With Tables

Former Member
0 Likes
533

Hello Friends,

I want to use Ranges with database tables.

I have one field r_fname.

And i want to check it from tab1 .

How to use Ranges here?

Please Give me whole example related to it.

Regards,

N.Master

3 REPLIES 3
Read only

Former Member
0 Likes
503

<i>Hi Nimesh,

Here is the sample code to create your Ranges:</i>

DATA: IT_ITCOD  LIKE RANGE OF QPCD-CODE    "TASK CODE
      WITH HEADER LINE.

        IT_ITCOD-SIGN = V_SIGN.
        IT_ITCOD-OPTION = V_OPTION.
        IT_ITCOD-LOW = S_ITCOD-LOW.
        APPEND IT_ITCOD.

<i>Then Fire the Query by passing the IT_ITCOD table in the query..

This will solve your problem.</i>

Read only

Former Member
0 Likes
503

Hi

You populated the r_field as ranges

and you wants to check the ITAB field in that ranges

loop at itab.

if not itab-field in r_field. " if the itab field value is in that ranges

...............

endif.

endloop.

Regards

Anji

Read only

Former Member
0 Likes
503

Hi,

<b>r_fname-low</b> will contain the value if you have populated individual values.

In select query where clause u can use IN operator along with range like ---

.....where matnr IN r_matnr.

also u can use if conditions like IF matnr IN r_matnr.