2008 Jan 17 10:52 AM
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.
2008 Jan 17 11:13 AM
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 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.
2008 Jan 17 10:55 AM
Put the statement EXIT after you trigger the message.
Regards,
Jos
2008 Jan 17 10:56 AM
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
2008 Jan 17 11:03 AM
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.
2008 Jan 17 11:12 AM
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
2008 Jan 17 11:13 AM
Hi
do the validation in
At Selction Screen Event
If field1 is initial and field2 is initial.
message w001.
endif.
rewards points if useful
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |