cancel
Showing results for 
Search instead for 
Did you mean: 

error message is coming on next screen

Former Member
0 Kudos

Hi,

In my report ,one selection screen is threre.after selecting the data,if the itab does not contain any data

i have to display the error message.the code is like.

IF gi_output[] IS INITIAL.

MESSAGE e007(zs) .

leave list-processing.

ENDIF.

But my problem is the error message is coming on next screen

I want the error message on my selection screen.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Priya,

As i suggested you must be populating the output table some where in start-of-selection or end-of-selection

so before that please do this: check v_error is initial.

and where ever you are filling the output table using select statement there inside your if statement insert a else and equate v_error = const.

This will not bother your performance issues too.

Edited by: Swetha on Dec 12, 2008 5:47 PM

Former Member
0 Kudos

Hi,

Put that code in At Selection-screen event.

at selection-screen.

IF gi_output[] IS INITIAL.

MESSAGE e007(zs) .

leave list-processing.

ENDIF.

Former Member
0 Kudos

But i am selecting the data in start-of-selection event.

means gi_output is getting filled in start-of-selection event,

after the select query only i have written the error message.

but the error message is coming in next screen..

i want it in selection screen

Former Member
0 Kudos

create a variable say

data: v_error type string,

const type c value 'X'. " create constant

before your call to i_output after end of selection code this.

check v_error is initial.

now

IF gi_output[] IS INITIAL.

MESSAGE e007(zs) .

leave list-processing.

else.

v_error = const. " this will retain screen and gives error on same screen

ENDIF.

Hope this works, Try.

Swetha