Application Development 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: 

Need logic for accessing select options ( range table) internal table values

tuyentran205
Explorer
0 Kudos
959

Hi Guru,


I am new here.

I have some things that I can not understand about the relationship between range table and select option. I have been looked many references on the internet but I can not solve my problem. Could anyone explain it for me!

Thank you very much!

Let explain my problem in detail below

I have a range table with structure like this

SIGN OPTION LOW HIGH

I BT 5 10

I CP 1*
I CO ?


which value I can enter for low field when OPTION field is CO?

Also, which value for case of CN CA NA CS NS

1 ACCEPTED SOLUTION

raymond_giuseppi
Active Contributor
787

You are confusing

(Use provided links to access Abap online help)

7 REPLIES 7

Former Member
0 Kudos
787

Hi,

To my knowledge, valid operators in the OPTION field are EQ / NE / GE / GT / LE / LT / CP / NP and if the column high is not initial you can use BT / NB.

So what do you mean by CO CN CA NA CS NS ?

raymond_giuseppi
Active Contributor
788

You are confusing

(Use provided links to access Abap online help)

0 Kudos
787

thank you so much! My problem solved!

0 Kudos
787

Note: CP as a comparison operator is not case sensitive. In a range/select option it is.

Sandra_Rossi
Active Contributor
0 Kudos
787

A "Ranges Table" is an internal table whose lines have a special structure (SIGN, OPTION, LOW, HIGH) and special values for SIGN and OPTION (see Raymond answer), and can be used after ABAP word "IN" in statements containing conditions (IF, CHECK, SELECT ... WHERE ... and so on).

A "Selection Criterion" is declared with ABAP keyword SELECT-OPTIONS, it is at the same time:

  • a special screen element in Selection Screens
  • a global Ranges Table (same as above)
  • a Header Line of the internal table - As the same name may be used to to address both the header line and the Ranges Table, sometimes it's required to prefix the name with square brackets to address the Ranges Table e.g. selopt[] ).

tuyentran205
Explorer
0 Kudos
787

lou.meron

I understand how to valid operators in the OPTION field are EQ / NE / GE / GT / LE / LT / CP / NP

But in range table could we use options is CO/CN/ CA /NA/ CS /NS

Because I have been read some example of those things wrote in program and I also referenced this material.

I am sorry for my inclear queétion!

https://help.sap.com/saphelp_autoid2007/helpdata/EN/fc/eb3516358411d1829f0000e829fbfe/content.htm?no...

jens_michaelsen
Participant
787

Please take a look to the right answer of Raymond Giuseppi.

The valid operators for OPTION field in SELECT-OPTIONS or RANGE are EQ / NE / GE / GT / LE / LT / CP / NP.

CO/CN/ CA /NA/ CS /NS are operators for comparison of strings in a logical expressions.