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: 

Question on Module Pool

Former Member
0 Kudos

Hi,

I have two input fields in a screen. They are "deptno-low" and "deptno-high". I am using these fields to input a range to display a list of departments in a second screen.

My Question is:-

1) I want to check that both of these fields are not initial using a "if condition".

2) deptno-low <= deptno-high.

Is it possible to accomplish the above 2 conditions in a single statement. If so, what is the code like?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

if deptno-low is not initial and

deptno-high is not initial and

deptno-low <=deptno-high.

.....

ENDIF.

Reward points if useful.

Regards,

Atish

4 REPLIES 4

former_member214288
Participant
0 Kudos

Hi,

If these fields are Select Options then SAP will not allow High to be less than Low. So you dont need to add any code for checking this explicitly.

Rewards points if Helpfull.

Regards,

Ram

Former Member
0 Kudos

if deptno-low is not initial and

deptno-high is not initial and

deptno-low <=deptno-high.

.....

ENDIF.

Reward points if useful.

Regards,

Atish

Former Member
0 Kudos

Hi

check this

IF ( not ( deptno-low is initial or deptno-high is initial ) and deptno-low <= deptno-high ) )

Reward points for useful Answers

Regards

Anji

Former Member
0 Kudos

hi,

try like this,

usin AND, OR operators in If statement we can have any no.of conditions ina single if statement.

if deptno-low is not initial and deptno-high is not initial and deptno-low <=deptno-high.

if useful reward some points..

with regards,

suresh.