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

Sets comparing

daniel_duras2
Participant
0 Likes
425

Hi experts.

Is there any possibility to compare two sets in abap code. ?

I have 2 ranges with date type and I want to know if one set inclusive data from second ...

Thanks for answering & regards.

Daniel.

2 REPLIES 2
Read only

Former Member
0 Likes
361

Hi,

Are you looking for something like this?


loop at ranges1-low
IF ranges1-low in ranges2.
flag = 'X'.
ENDIF.
ENDLOOP.

IF flag = 'X'.
write: 'SET1 is inclusive with SET2'.
ELSE.
write: 'SET1 is not inclusive with SET2'.
ENDIF.

You can even try doing the same by comparing SET2 with SET1.

Regards,

Vi

Read only

0 Likes
361

Thanks for your reply Vikranth.

Your example is inclusive one parameter first set into second set. This is very simple method of sets comparing.

Sets for example ranges or select-options could have more complicated definitions, like exclusive some elements from set etc.

Thanks.

Edited by: Danielek on Aug 28, 2009 10:47 AM