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

Screen 1000 - Select Options - Message

Former Member
0 Likes
1,055

Hi gurus,

Can u tell how it's possible to perform a warning message when, for example, the user dont fill a condition made in the abap program.

Example:

in a simple report:

SELECTION-SCREEN BEGIN OF BLOCK B01 WITH FRAME TITLE text-t01.

SELECTION-SCREEN SKIP 1.

Select-options:

pa_datai for SWWWIHEAD-WI_CD.

.

.

.

.

I can define a "obligatory" field and if the user doesnt fill this field a message will be displayed in the screen.

My problem is, if a have 2 fields in the selection screen which i define that the user can not choose bothi have the following code :

If "example" is initial and "example2" is initial.

message w001(zexample).

endif.

This works fine, but the warning message is displayed in other screen, even if i put after the code:

- call screen 1000

- leave to screen 0

- return

How can u display the message in the screen 1000, without goint to other screen ?

Thank u in advance,

Mário.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,016

Hi

do the validation in

At Selction Screen Event

If field1 is initial and field2 is initial.

message w001.

endif.

rewards points if useful

Hi

do the validation in

At Selction Screen Event

If field1 is initial and field2 is initial.

message w001.

endif.

rewards points if useful

5 REPLIES 5
Read only

Former Member
0 Likes
1,016

Put the statement EXIT after you trigger the message.

Regards,

Jos

Read only

Former Member
0 Likes
1,016

Hi Mário Ricardo,

Use AT SELECTION-SCREEN event to validate screen field.

AT SELECTION-SCREEN.

If field1 is initial.

if field2 is initial.

message E001.

endif.

endif.

Regards,

Hemant

Read only

Former Member
0 Likes
1,016

Use At selection-screen event .

parameters : p1 type c ,

p2 type c .

at selection-screen .

if p1 is initial and

p2 is initial .

message text-001 type 'W'.

endif.

Read only

Former Member
0 Likes
1,016

Hi Mario,

If you are using standard selection screen. write your code

if...

warning messge

endif.

in event AT SELECTION-SCREEN.

If you are using Call Screen, then mention your condition within module with CHAIN...ENDCHAIN

Regards,

Mohaiyuddin

Read only

Former Member
0 Likes
1,017

Hi

do the validation in

At Selction Screen Event

If field1 is initial and field2 is initial.

message w001.

endif.

rewards points if useful