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

set cursor on a parameter

Hi,

I want my ABAP program to diplay an error message whenever a particular paramater is left blank. This will happen if a checkbox will be checked. If the error message will be displayed I also want the cursor to be put on that blank parameter. However if a checkbox will not be check there is no need to display an error message message.

PARAMETERS: p_error(200) TYPE c,

cb_check AS CHECKBOX.

AT SELECTION-SCREEN.

IF cb_check = 'X'.

IF p_error = space.

???????????????????????.

MESSAGE e055(00). "Error message

ENDIF.

ENDIF.

Question: what statement should be placed in ????????????????????????? part...

Thanks in Advance....!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • Best Answer
    Posted on Jun 10, 2005 at 08:33 AM

    Hi,

    If you want specifically,try this.

    SET CURSOR FIELD 'P_ERROR'.

    Note:It should be in capital letter[p_error-won't work.]

    Message was edited by: Jayanthi Jayaraman

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member Durairaj Athavan Raja

      PARAMETERS: p_file(200) TYPE c,

      p_error(200) TYPE c,

      cb_check AS CHECKBOX.

      AT SELECTION-SCREEN on p_error.

      IF cb_check = 'X'.

      if p_error is initial.

      MESSAGE e055(00).

      endif.

      endif.

      Above is my initial code..

      After I type value on the parameter p_file, and check cb_check right away (without putting my cursor on p_error), an error message was not displayed.

      Raja, Thanks so much for your effort....

  • author's profile photo Former Member
    Former Member
    Posted on Jun 10, 2005 at 08:35 AM

    Hi Jim

    I think it is possible with Set Cursor Field P_error

    u can try this.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jun 10, 2005 at 08:27 AM

    AT SELECTION-SCREEN on p_error .

    if cb_cehck eq 'X' and

    p_error is initial .

    MESSAGE e055(00). "Error message

    endif .

    check this out, this will meet your requirment.

    If your question is answered, mark the thread as answered and close it.

    Regards

    Raja

    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.