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

Message I000(0) issue.

Former Member
0 Likes
3,557

Hi all,

I have an issue with message.

in my program i am giving a message statment as

Message I000(0) with ' message'.

this error message pops us when ever there is no data in the database.

this i am checking in my selection screen.

once this message pops up , i want to stay on the same selection-screen with out executing the code.

Can anyone let me know the solution.

Regards,

Roby

1 ACCEPTED SOLUTION
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,452

Yes, it will work there too.



report zrich_0001.

parameters: p_check type c.

start-of-selection.


  if p_check is initial.
    message i001(00) with ' Message'.
<b>    stop.</b>
  endif.

  write:/ 'Start-of-Selection was fired'.

Regards,

Rich Heilman

Hi all,

I have an issue with message.

in my program i am giving a message statment as

Message I000(0) with ' message'.

this error message pops us when ever there is no data in the database.

this i am checking in my selection screen.

once this message pops up , i want to stay on the same selection-screen with out executing the code.

Can anyone let me know the solution.

Regards,

Roby

17 REPLIES 17
Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,452

You can use the STOP statement for this.




report zrich_0001.

parameters: p_check type c.

at selection-screen.

if p_check is initial.
  message i001(00) with ' Message'.
<b>  stop.</b>
endif.


start-of-selection.

    write:/ 'Start-of-Selection was fired'.

Regards,

Rich Heilman

Read only

0 Likes
2,452

Hi rich.

i dont have my code in at selection-screen.

i have it inside Start-of-selection.

will STOP work for that as well. Let me know

Regards,

Roby.

Read only

Former Member
0 Likes
2,452

Hi,

Use leave-list processing.

START-OF-SELECTION.

  • Do the validations.

MESSAGE I001.

LEAVE LIST-PROCESSING.

Thanks,

Naren

Read only

RichHeilman
Developer Advocate
Developer Advocate
0 Likes
2,453

Yes, it will work there too.



report zrich_0001.

parameters: p_check type c.

start-of-selection.


  if p_check is initial.
    message i001(00) with ' Message'.
<b>    stop.</b>
  endif.

  write:/ 'Start-of-Selection was fired'.

Regards,

Rich Heilman

Read only

0 Likes
2,452

Hi Rich,

I did use stop statment.

but the problem when i am executing it as a report i am not getting an error.

but when i am executing this report attached to a Transaction code . i am getting error.

the error is :

The STOP statement was used outside a report flow.

can you let me know any solution for this .

Regards,

Roby

Read only

0 Likes
2,452

Are you saying that this report is submitted using the SUBMIT statement? And it is not stopping when using STOP? If that is the case, you may try LEAVE PROGRAM

REgards,

Rich Heilman

Read only

0 Likes
2,452

It is submitted through Submit , it creates a session .

it is an se38 program attached to a tcode .

if i use leave program will it stay at the selection-screen.

Let me know .

Regards,

Roby

Read only

0 Likes
2,452

Leave program will exit the program, you want this to stay at selection screen? Please post the code where you are submitting the program, as well as the submitted program(the section where you are issuing the message).

REgards,

RIch Heilman

Read only

0 Likes
2,452

Hi Rich,

I submitting a ZREPORT through tcode ZREPORT1.

when i execute the TCODE.

i will be getting a Selection-Screen i am entering values in it .

based on the values .

i am executing this code .

SELECT SINGLE * FROM table.

IF SY-SUBRC <> 0.

MESSAGE I000(0) WITH ' No Entries Exists in Database '.

LEAVE TO SCREEN xyz.

ENDIF.

ENDIF.

( if sy-subrc fails ) . i am poping up a message. if i use leave program it comes out of the program.

my requirement is after it issues a message it shouls stay on the selection screen itself .

if the execute the report through se38 and put stop after the message it stays in the selection screen.

if i execute the report through tcode , it gives a dump.

Please do let me know what the issue is .

Regards,

Roby.

Read only

0 Likes
2,452

I believe you may have create the tcode wrong. Delete the tcode and recreate. This time choose the radiobutton for "Program with selection screen(report transaction)".

Use the STOP statement or the LEAVE LIST-PROCESSING statement in your program. It should work fine then.


IF SY-SUBRC <> 0.

MESSAGE I000(0) WITH ' No Entries Exists in Database '.
<b>STOP.</b>
ENDIF.

Regards,

Rich Heilman

Read only

0 Likes
2,452

Hi Rich & Narendran ,

It solved my problem , but i am trying to award points it is giving me an error message, let me know how to rectify this error so that i can award the points.

Regards,

Roby

Read only

0 Likes
2,452

Points system is down right now, try again later.

Glad that your problem is solved.

Regards,

Rich Heilman

Read only

Former Member
0 Likes
2,452

Hi,

Use leave-list processing.

START-OF-SELECTION.

  • Do the validations.

MESSAGE I001.

LEAVE LIST-PROCESSING.

Thanks,

Naren

Read only

0 Likes
2,452

Hi Narendran,

I have attached this program to a TCODE . i have tried your option it is not working .

Can you let me know any other option.

Regards,

Roby

Read only

0 Likes
2,452

Roby, I don't understand what the problem is. How are you calling this program which issues this message? And it is not coming out of the program, it is doing the logic after the message?

Regards,

RIch Heilman

Read only

Former Member
0 Likes
2,452

Hi,

You are trying to submit a program let's say 'ZREPORT' from a report ZREPORT_CALLING..

When you are submitting the report it should stay in the selection-screen of ZREPORT if there is any error in the report ZREPORT..

Is this your requirement??

Thanks,

Naren

Read only

0 Likes
2,452

Hi Narendran,

I submitting a ZREPORT through tcode ZREPORT1.

when i execute the TCODE.

i will be getting a Selection-Screen i am entering values in it .

based on the values .

i am executing this code .

SELECT SINGLE * FROM table.

IF SY-SUBRC <> 0.

MESSAGE I000(0) WITH ' No Entries Exists in Database '.

LEAVE TO SCREEN xyz.

ENDIF.

ENDIF.

( if sy-subrc fails ) . i am poping up a message. if i use leave program it comes out of the program.

my requirement is after it issues a message it shouls stay on the selection screen itself .

if the execute the report through se38 and put stop after the message it stays in the selection screen.

if i execute the report through tcode , it gives a dump.

Please do let me know what the issue is .

Regards,

Roby.