Application Development 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: 

IF sy-subrc <> 0.

Former Member
0 Kudos

IF sy-subrc &lt;&gt; 0.

pls xplain me the above line......... whats the use of semicolon??????

9 REPLIES 9

Former Member
0 Kudos

sorry ..... i say a syntax that consist ; IF sy-subrc &lt ; &gt ; 0.

0 Kudos

hi

we checked sy-subrc after "Read operation" , "Select statement " to see whether our selection is rite or wrong

1) if sy-subrc = 0

Then our selection is wrong

we can also write

if sy-subrc <> 0

write : " error is coming "

endif

We can write both ways

Thanks

0 Kudos

Hi Subu,

where did you see it? ; is not ABAP.

Looks like a special symbolic language. If the second semicolon would not precede the zero, I might interpret it as an OR, but ???

Regards,

Clemens

0 Kudos

if sy-subrc = 0.

endif.

     -This statement checks the above condition and even if sy-subrc fails, the code will be executed further.

OR

check sy-subrc = 0.

     - This statement checks for the condition and if it is true, the further code will be executed. If not, the execution will stop if sy-subrc fails.




---ADIL HASSAN

Former Member
0 Kudos

sy-subrc is the system variable used to check wheather the previous statement is executed successfully or not . on successful execution it contains 0 . on unsuccessful it contains non zero ( generally 4 )

Former Member
0 Kudos

hi,

<> or NE represents NOT EQUAL TO

LT represents LESS THAN

GT represents GREATER THAN.

sy-subrc is a system variable, which is usually '0', when the statement it just executed was successfull. If it wasnt successful it ll have a value other than 0.

eg: READ TABLE or DELETE entries...etc..

Sri

Former Member
0 Kudos

This looks like a macro to me.

Rob

0 Kudos

... which was my first guess as well (bevause I avoid macros). But it does not fulfill any macro syntax, so what?

Regards,

Clemens

0 Kudos

Hello guys,

I am a basis admin, and we are getting a dump DBIF_RSQL_SQL_ERROR when a background job is executed and on the error analysis i see the dump is of memory and its shows at the line code of

504                     package size s_maxsize.

>>>>               if sy-subrc <> 0.

506                 s_no_more_data = rs_c_true.

Our memory parameters are perfectly set

i had asked abab people to reduce the selection which they did but still no luck
Please help.