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

Check statement.

Former Member
0 Likes
599

Hi,

I am using the following stat for checking whether the the TCODE is in the given range in tab lt_tab3.

If i give values in in LOW & HIGH and In HIGH the following stat working fine. But If i give the value in Only Low field Bothe stat r not working.

CHECK lt_tab3-tcode between lt_tab1-low and lt_tab1-high.

OR (I'm using only one stat from these)

IF LT_TAB3-TCODE GE LT_TAB1-LOW LT_TAB3-TCODE LE

LT_TAB1-HIGH.

Give me suggestions

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
570

Hi,

I'm assuming the lt_tab1 is a range or select-option. If that is the case. Just use the statment for checking if the valud in within the list of specified value range, as follows :

check lt_tab3-tcode in lt_tab1 .

or

if lt_tab3-tcode in lt_tab1 .

endif.

regards,

Advait

4 REPLIES 4
Read only

Former Member
0 Likes
571

Hi,

I'm assuming the lt_tab1 is a range or select-option. If that is the case. Just use the statment for checking if the valud in within the list of specified value range, as follows :

check lt_tab3-tcode in lt_tab1 .

or

if lt_tab3-tcode in lt_tab1 .

endif.

regards,

Advait

Read only

0 Likes
570

Hi Advait

Thnx, ur answer helped me.

Read only

MarcinPciak
Active Contributor
0 Likes
570

You must use this instead


check lt_tab3-tcode in lt_tab1.

It will solve both cases.

Read only

Former Member
0 Likes
570

Hi,

I think you can do some changes to the internal table first.

if the lt_tab1-high is initial.

lt_tab1-high = lt_tab3-tcode.

endif.

Then you can use one of the following statement:

CHECK lt_tab3-tcode between lt_tab1-low and lt_tab1-high.

OR (I'm using only one stat from these)

IF LT_TAB3-TCODE GE LT_TAB1-LOW LT_TAB3-TCODE LE

LT_TAB1-HIGH.

Hope this will help you.