Application Development and Automation 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: 
Read only

selection screen assignment

Former Member
0 Likes
615

if i enter wrong data at selection screen level

i need to get information message at message bar .

and srceen will be the same selection screen

thanks,

Ravi

4 REPLIES 4
Read only

Former Member
0 Likes
506

Hi Ravi,

You can do validation on selection screen fields using AT SELECTION-SCREEN ON <SELCECTION-SCREEN FIELD>

after entering the values in the fields.

Regards

Kumar M

Edited by: mukesh kumar on Nov 7, 2008 7:04 AM

Read only

Former Member
0 Likes
506

Just use E

Like this.

select-options: c_pernr type pernr-pernr.

at selection-screen .

Select single * from pa0002 where pernr = c_pernr.

if sy-subrc ne 0 .

message ' no data found' TYPE 'E'.

endif.

Ps: this is a basic thing in abap ravi...Doing a little bit r & d will solve u r problem..From next do little bit searching before posting.All the best

Read only

Former Member
0 Likes
506

SELECTION-SCREEN BEGIN OF BLOCK block1.

PARAMETERS: test1(10) TYPE c,

test2(10) TYPE c.

SELECTION-SCREEN END OF BLOCK block1.

AT SELECTION-SCREEN ON test1.

select *from -


into -


where matnr = test1

if sy-subrc <>0.

MESSAGE i888 WITH 'AT SELECTION-SCREEN'

'ON TEST1'.

endif

Read only

Former Member
0 Likes
506

Hi,

Try this code

DATA WA_CARRID TYPE SCARR-CARRID.

PARAMETERS CARRID TYPE SCARR-CARRID.

AT SELECTION-SCREEN ON CARRID.

  SELECT SINGLE CARRID
  FROM SCARR INTO WA_CARRID
  WHERE CARRID = CARRID.

  IF SY-SUBRC IS NOT INITIAL.

    MESSAGE 'Carrier not present' TYPE 'E'.

  ENDIF.

START-OF-SELECTION.

WRITE  CARRID .

Regards