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: 

How to do a checking in an internal range?

walkerist
Participant
0 Kudos

Hi, I want check the range LR_VAL specifically the LOW field.

My code is like this but it doesnt work.

IF waers IN LR_VALUES[]

>>Do something

ENDIF.

4 REPLIES 4

FredericGirod
Active Contributor
0 Kudos

it won't work. For me you have to use a standard table to extract a list of value.

Just imagine you have SIGN = 'E' somewhere

raymond_giuseppi
Active Contributor

Does your internal range only contains exact values (I/EQ records)

  • yes - you can use IN RANGE option
  • no - you must resolve the range (build a list of values from database or some code logic)

Also define your range from the actual field definition to remove any error related to some wrong length for example...

Sandra_Rossi
Active Contributor

No issue:

TYPES ty_range_waers TYPE RANGE OF waers.
DATA(lr_val) = VALUE ty_range_waers( sign = 'I' option = 'EQ' ( low = 'CHF' ) ( low = 'EUR' ) ).
ASSERT 'CHF' IN lr_val.
ASSERT 'EUR' IN lr_val.
ASSERT 'USD' NOT IN lr_val.

walkerist
Participant
0 Kudos

sandra.rossi Thanks. However, I have resolved it in a different way as I have populated the LR_VAL range in a wrong way.