2007 May 18 11:14 AM
Hello everyone!
When the error message in the code below is raised, it shows the message then completely terminates the program.
IF len_bankl NE 8 AND len_bankl NE 11.
MESSAGE E001 WITH 'Error message'.
ENDIF.
How can I show the message but will still return to the previous selection screen?
Thank you!
2007 May 18 11:17 AM
Assuming this is a basic report, once you leave the screen I don't think you can return.
Either code your validation in the AT SELECTION SCREEN event or change the error message
2007 May 18 11:16 AM
Change the error message to information message and
use the statement
LEAVE LIST-PROCESSING.
IF len_bankl NE 8 AND len_bankl NE 11.
MESSAGE <b>i</b>001 WITH 'Error message'.
<b>LEAVE LIST-PROCESSING.</b>
ENDIF.
2007 May 18 11:32 AM
> Change the error message to information message and
> use the statement
> EAVE LIST-PROCESSING.
>
> F len_bankl NE 8 AND len_bankl NE 11.
> MESSAGE <b>i</b>001 WITH 'Error message'.
> <b>LEAVE LIST-PROCESSING.</b>
> ENDIF.
I think this the most useful answer.
This does go back to the selection screen.. But I think I need the flashing 'X' produced by the message type E...
Because if I use S, it will give a flashing check mark, if type I, it will open a dialog box..
2007 May 18 11:40 AM
Hi Ricardo,
Instead of the MESSAGE statement, u can use the function modules to popup a message, check these fm's
popupdisplay
popupconfirm
popupmessage
2007 May 19 9:01 AM
> Hi Ricardo,
> Instead of the MESSAGE statement, u can use the
> function modules to popup a message, check these
> fm's
>
> popupdisplay
> popupconfirm
> popupmessage
Hello again.
I tried some the functions and I think they are only dialog boxes.. Is there any functions for status bar messages only? Thanks!
Also, does the LEAVE LIST-PROCESSING command clear the selected data inside the internal tables (setting the internal tables to no data)?
Thanks a lot!
2007 May 18 11:17 AM
Assuming this is a basic report, once you leave the screen I don't think you can return.
Either code your validation in the AT SELECTION SCREEN event or change the error message
2007 May 29 4:44 AM
> Assuming this is a basic report, once you leave the
> screen I don't think you can return.
>
> Either code your validation in the AT SELECTION
> SCREEN event or change the error message
I just put the error message inside AT SELECTION SCREEN and it is ok.
Thanks!
2007 May 18 11:17 AM
Hi Ricardo,
Write the code like,
message 'Error Message' type ' w '.
Thanks.
Reward If Helpful.
2007 May 18 11:18 AM
hi ,
here is the addition :
IF len_bankl NE 8 AND len_bankl NE 11.
MESSAGE E001 WITH 'Error message'.
leave to list processing .
ENDIF.
2007 May 18 11:20 AM
Hi,
IF len_bankl NE 8 AND len_bankl NE 11.
MESSAGE E001 WITH 'Error message'.
<b>stop.</b>
ENDIF.
Then it will be on the Selection screen to correct the values.
Reward, if useful.
Regards,
U. Uma
2007 May 18 11:20 AM
U cannot come back to the selection screen after the error message(message type is type E) because it stops the further processing . For that u have to give the message either as the information message(type I) or the status message(type S).
Reward if useful
Cheers
Sharadendu
2007 May 18 11:20 AM
Use following code......
IF len_bankl NE 8 AND len_bankl NE 11.
MESSAGE E001 WITH 'Error message'.
leave to screnn 0.
ENDIF.
2007 May 18 11:21 AM
2007 May 18 11:23 AM
hi
raise the error in At Selection-screen event...it will stay in the selection screen and will enable the input again to accept correct values
if helpful, reward
Sathish. R
2007 May 19 9:10 AM
Hi RC ,
how can u check 2 conditions at a time ?
IF len_bankl NE 8 <b>OR</b> len_bankl NE 11.
MESSAGE E001 WITH 'Error message'.
ENDIF.
.
When u raise error message , y it is terminating u? paste ur complete code over here ?
Regards
Peram
2007 May 19 10:05 AM
> Hi RC ,
>
> how can u check 2 conditions at a time ?
>
>
IF len_bankl NE 8 <b>OR</b> len_bankl NE 11.
> MESSAGE E001 WITH 'Error message'.
> NDIF.
.
>
> When u raise error message , y it is terminating u?
> paste ur complete code over here ?
>
> Regards
> Peram
Hello.
Don't worry about the logical expression. It just looks confusing but it is correct. _
len_bankl should only be equal to 8 or 11, so the error will be raised if other values is in len_bankl.