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

error msg

Former Member
0 Likes
858

Hi,

i have 7 fields in selection screen...

after entering the values in 6 fields whan we press Update button have to get error message...how to do it?

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
840

Hi Balu

AT SELECTION-SCREEN.

IF P_FIELD7 is initial.

case sy-ucomm

when 'UPDATE'.

MESSAGE 'enter value of 7th field' type 'E'.

endcase.

ENDIF.

reward points to all helpful answers

kiran.M

6 REPLIES 6
Read only

Former Member
0 Likes
840

Please code the logic in event AT SELECTION-SCREEN and perform the validations based on your need...

Read only

Former Member
0 Likes
840

AT SELECTION-SCREEN.

IF P_FIELD7 is initial and sy-ucomm = 'UPDATE'.

MESSAGE 'Please enter field 7 !' type 'E'.

ENDIF.

Read only

Former Member
0 Likes
841

Hi Balu

AT SELECTION-SCREEN.

IF P_FIELD7 is initial.

case sy-ucomm

when 'UPDATE'.

MESSAGE 'enter value of 7th field' type 'E'.

endcase.

ENDIF.

reward points to all helpful answers

kiran.M

Read only

0 Likes
840

HI KIRAN,

Tanq ...

not only 7 th field if we are not entered the value for any field or fields ...when we click on Update button should get error message.....

Read only

Former Member
0 Likes
840

try like this.

AT SELECTION-SCREEN ON [FIELD] UPDATE.

if p_field is initial.

message 'U HAVE TO FILL ALL FIELDS' TYPE 'E'.

else.

message '1 RECORD UPDATED' TYPE 'S'.

endif.

...........

or u can same validation in AT SELECTION-SCREEN event also

if useful reward some points.

with regards,

Suresh Aluri.

Read only

Former Member
0 Likes
840

HI

WHAT EVER ACTION U DO ON THE SELECTION SCREEN

THAT MUST BE DONE UNDER EVENT AT SELECTION-SCREEN

THE SCREEN VALIDATION TO BE DONE ON AT SELECTION-SCREEN

WRITE WHAT EVER CONDITION U WANT UNDER AT SELECTION-SCREEN

IF THAT SY-SUBRC EQ 0 THEN WRITE MESSAGE E WITH ' ERROR'.

THATS ALL

REWARD IF USEFULL