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

error message?

Hi,

How to write the message statement for select options.Below is my select options and query for that one.

SELECT-OPTIONS: s_varnt FOR rsvar-variantt,

s_tknum FOR vttk-tknum,

s_erdat FOR vttp-erdat,

s_vsart FOR vttk-vsart,

s_wdt_it FOR likp-wadat_ist,

s_route FOR likp-route,

s_werks FOR lips-werks,

s_pltmst FOR lips-werks,

s_dstct FOR kna1-land1.

SELECT svbeln swerks sposnr svgbel smatnr slfimg s~vrkme

sarktx skzwi4 pexpkz pwadat_ist p~erzet

INTO TABLE t_lips_likp

FROM lips AS s INNER JOIN likp AS p

ON svbeln = pvbeln

FOR ALL ENTRIES IN t_vttk_vttp

WHERE s~vbeln EQ t_vttk_vttp-vbeln

AND p~expkz EQ 'X'

AND p~route IN s_route

AND p~wadat_ist GE w_date1

AND s~werks IN s_werks.

IF sy-subrc = 0.

LOOP AT t_lips_likp WHERE wadat_ist EQ l_date1 AND erzet LE l_time1.

DELETE t_lips_likp.

ENDLOOP.

ENDIF.

When i enter the wrong route value in the selection screen how to i will get the error message "This route does not exits".

Regards,

Srihitha

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

3 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 12:58 PM

    sorry

    Message was edited by:

    Dhwani shah

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 01:00 PM

    Hi

    write the screen field validation in at selection-screen event

    at selection-screen.

    • Checking for the input values of selection screen.

    perform screen_check.

    &----


    *& Form screen_check

    &----


    • Ckecking for Selection Screen fields Validation

    ----


    form screen_check.

    • Validation of Route

    clear tvro.

    if not s_route-low is initial.

    select route from tvro up to 1 rows

    into tvro-route

    where route in s_route.

    endselect.

    if sy-subrc ne 0.

    message e009. " Invalid Route

    endif.

    endif.

    • Validation of Plant

    clear t001w.

    if not s_werks is initial.

    select werks from t001w up to 1 rows

    into t001w-werks

    where werks in s_werks.

    endselect.

    if sy-subrc ne 0.

    message e004. " Invalid Plant Number

    endif.

    endif.

    endform. "screen_check

    Regards

    anji

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 01:08 PM

    if sy-subrc ne 0.

    message e001(zmsg).

    end if.

    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.