cancel
Showing results for 
Search instead for 
Did you mean: 

diplaying error(abend) message if execute selection screen with no field

Former Member
0 Kudos

Hi experts,

I have created PNP logical database selection screen,

in that if user execute with no field data in the selection area,then ABEND and show the

following error message

" A minimum of 1 selection criteria must be inputed in the Selection area"

please send me helpfull code.

Thanks in advance,

mohan

Accepted Solutions (0)

Answers (3)

Answers (3)

naimesh_patel
Active Contributor
0 Kudos

Hi try following code,

p1, p2... are parameters /select-options

AT selection-screen.

data: input type i.

if not p1 is initial.

input = input + 1.

endif.

if not p2 is initial.

input = input + 1.

endif.

and so on..

if input is initial.

message s001 with 'Please enter atleast one parameter'.

leave to list-processing.

endif.

Regards,

Naimesh.

PS : Reward Points, if you find useful...!

Former Member
0 Kudos

Hi,

Try following logic.

AT SELECTION-SCREEN.

IF all selection screen parameters are INITIAL.

MESSAGE S00 with some text.

STOP.

ENDIF.

Using success message will give user another chance to specify the selection criteria, whereas if you use ABEND or ERROR message, it will come out of the current program.

Regards,

Shashank

hymavathi_oruganti
Active Contributor
0 Kudos

IF S_ABC[] IS INITIAL AND S_DEF[] IS INTIAL AND.........INITIAL.

MESSAGE 'A minimum of 1 selection criteria must be inputed in the Selection area' type 'A'.

ENDIF.

S_ABC , A_DEF ........etc be the select-options in the selction screen