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 check if field values exists in list of numeric values

pashasapcha
Participant
0 Kudos
659

I have field from work area ls_test-po of numeric data type. I have list of 10 PO's. 1000 to 1110.

The requirement now is I have to check the ls_test-po value contains the numbers from 1000 to 1100 or not.

I have seen about keyword CA but it is for character.

(1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010)


if ls_Test-po = any one of values (1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010)

How can I achieve this ?

5 REPLIES 5

raymond_giuseppi
Active Contributor
516

In what form did you obtain the "list of 10 OPs" in a text string, an internal table, a range (sort of internal table)?

(Of course, you could convert the value to be searched into a character field)

matt
Active Contributor
516

What have you tried? On the face of it, this looks like simple use of > or <.

Sandra_Rossi
Active Contributor
0 Kudos
516

Purchase Order number I guess (EBELN).

I wonder the same as Raymond and Matthew.

pavan_prabhu
Active Participant
0 Kudos
516

As Raymond righly asked the question in which format you receive these POs.

Assuming you are getting POs in range table(lr_po), try with something like below.

IF CONV char10( |{ ls_test-po ALPHA = OUT }| ) IN lr_po.

***do something***

ENDIF.

ThorstenHoefer
Active Contributor
0 Kudos
516

Hi,

make it simple:

if ls_Test-po >= '1000' and ls_test-po < '1010'.
...
END IF.