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: 

error message?

Former Member
0 Kudos

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

3 REPLIES 3

Former Member
0 Kudos

sorry

Message was edited by:

Dhwani shah

Former Member
0 Kudos

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

Former Member
0 Kudos

if sy-subrc ne 0.

message e001(zmsg).

end if.