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

How to do a checking in an internal range?

walkerist
Participant
0 Kudos
579

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
Read only

FredericGirod
Active Contributor
0 Kudos
493

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

Read only

RaymondGiuseppi
Active Contributor
493

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...

Read only

Sandra_Rossi
Active Contributor
493

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.
Read only

walkerist
Participant
0 Kudos
493

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