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

Error message-Stop processing

Former Member
0 Likes
5,568

Hi all,

I did some code like when invalid combinations....then need to raise a request,at that time it showing the error message, but after that error message...when press enter....that work order starts genrating(means start processing).So i need to stop the processing after error message displays even click on enter or save...need to show the same error message.Could u plz help me on this.

Plz check the code below:

IF VIQMEL-QMART = ZCL_CONSTANTS=>C_QMART_M1.

IF VIQMEL-PRIOK = ZCL_CONSTANTS=>C_PRIOK_1 OR

VIQMEL-PRIOK = ZCL_CONSTANTS=>C_PRIOK_2.

IF RIWO00-AUART <> ZCL_CONSTANTS=>C_AUART_PM03.

MESSAGE e208(ZPM).

ENDIF.

ELSEIF RIWO00-AUART = ZCL_CONSTANTS=>C_AUART_PM03.

MESSAGE e208(ZPM).

ENDIF.

ENDIF.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
2,751

hi..

i think you are using module screen then you will have to use stop after the error message and clear the sy-ucomm or ok_code before stop statement.

MESSAGE e208(ZPM).

clear ok_code.

stop.

but if it were a report then also it depends on ur code.

in report if your code contains an end-of-selection and u are throwing an error message in start-of-selection , then below error message statement if you write stop then end-of-selection still will get executed ..

but if you write an EXIt then end-of-selection wont get executed. it will show directly output screen if there is an write statement to display on screen in start-of-selction.

and if you are throwing an error message at selection screen then no need to use any of the above.

but if you are using an information message then u need to use stop after the i message..

hope this will help u

5 REPLIES 5
Read only

Former Member
0 Likes
2,751

put STOP after the error message ..

MESSAGE e208(ZPM).

STOP.

Read only

Former Member
0 Likes
2,751

Hi

to the best of my knowledge once you issue ERROR message system becomes standstill, how can you proceed further????

anyhow------>>>>>>

Use EXIT key word after the error message

Regards

Ramchander Rao.K

Edited by: ramchander krishnamraju on Dec 2, 2008 11:44 AM

Read only

Former Member
0 Likes
2,751

Hi,

Is there any Typing error in your code or is it right?

because the code which you have mentoned here i find the IF.....ENDIF's order to be incorrect,because if you have given Message of type E it should not allow you to process further.

like

IF RIWO00-AUART ZCL_CONSTANTS=>C_AUART_PM03.

MESSAGE e208(ZPM).

ENDIF.

ELSEIF RIWO00-AUART = ZCL_CONSTANTS=>C_AUART_PM03.

MESSAGE e208(ZPM).

ENDIF.

the same condition is tested twice and same message is raised,even the IF's and ENDIF's are not clear.

Regards,

Neha

Edited by: Neha Shukla on Dec 2, 2008 4:21 PM

Read only

Former Member
0 Likes
2,751

after the error msg immediately use this statement.

LEAVE TO SCREEN SY-DYNNR.

Read only

Former Member
0 Likes
2,752

hi..

i think you are using module screen then you will have to use stop after the error message and clear the sy-ucomm or ok_code before stop statement.

MESSAGE e208(ZPM).

clear ok_code.

stop.

but if it were a report then also it depends on ur code.

in report if your code contains an end-of-selection and u are throwing an error message in start-of-selection , then below error message statement if you write stop then end-of-selection still will get executed ..

but if you write an EXIt then end-of-selection wont get executed. it will show directly output screen if there is an write statement to display on screen in start-of-selction.

and if you are throwing an error message at selection screen then no need to use any of the above.

but if you are using an information message then u need to use stop after the i message..

hope this will help u