Skip to Content
author's profile photo Former Member
Former Member

Question on Module Pool

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?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2007 at 06:14 AM

    if deptno-low is not initial and

    deptno-high is not initial and

    deptno-low <=deptno-high.

    .....

    ENDIF.

    Reward points if useful.

    Regards,

    Atish

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 12, 2007 at 06:11 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2007 at 06:14 AM

    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

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jun 12, 2007 at 06:19 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.