Skip to Content

selection-screen messaging

hi friends i have a problem in selection-screens

SELECT-OPTIONS so_cuno FOR kna1-kunnr.

PARAMETERS p_cuna LIKE kna1-name1.

SELECTION-SCREEN PUSHBUTTON /10(20) text-003 USER-COMMAND disp.

SELECTION-SCREEN PUSHBUTTON 40(20) text-004 USER-COMMAND rese.

SELECTION-SCREEN PUSHBUTTON 70(20) text-005 USER-COMMAND exit.

here we want an error message when so_cuno is empty only when i press f8 and it needs to be show the selection-screen to be redisplayed instead of going to the list.

here after pressing enter or after pressing exit button, or after reset we don't want the error message

thanku friends bye

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Jan 17, 2005 at 04:05 PM

    Hi Shiva,

    Add the 'AT SELECTION-SCREEN' event add code:

    CASE syst-ucomm.

    WHEN 'ONLI'.

    IF so_suna-low is initial.

    <error-message>.

    ENDIF.

    ENDCASE.

    Regards,

    John.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 18, 2005 at 06:05 AM

    Hi Shiva,

    My suggestion would be to have the following code.

    tables sscrfields.
    
    at selection-screen.
      if ( so_cuno is initial ) and 
         ( sscrfields-ucomm eq 'ONLI' ).
        message ....
      endif.
    

    I reiterate again the recommendation of using SSCRFIELDS-UCOMM instead of SY-UCOMM. Please refer to the other posts on this topic in this forum for more explanation.

    Regards,

    Anand Mandalika.

    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.