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

SY-SUBRC

Former Member
0 Likes
840

Difference between sy-subrc=0 ,sy-subrc=4 & sysubrc>0

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
670

Hi,

Sy-subrc = 0 -


Success

Sy-subrc = 4 -


Failure(known reason)

Sy-subrc = 8 -


Internal error(Unknown reason).

Regards

Aneesh.

3 REPLIES 3
Read only

Former Member
0 Likes
671

Hi,

Sy-subrc = 0 -


Success

Sy-subrc = 4 -


Failure(known reason)

Sy-subrc = 8 -


Internal error(Unknown reason).

Regards

Aneesh.

Read only

Former Member
0 Likes
670

Hi

It depends on which STATAMENT is checked, anyway:

0: it means the comand is done successfully;

If it's not 0 it means the comend is faild, in this case it can be different values assigned to SY-SUBRC in order of the kind of error.

It usually finds which values SY-SUBRC can have in the help of statament.

For example after AUTHORITY-CHECK, SY-SUBRC can have:

4 -> User has no authorization in the SAP System for such an action. If necessary, change the user master record.

8 -> Too many parameters (fields, values). Maximum allowed is

12 -> Specified object not maintained in the user master record.

16 -> No profile entered in the user master record.

24 -> The field names of the check call do not match those of an authorization. Either the authorization or the call is incorrect.

28 ->Incorrect structure for user master record.

32 -> Incorrect structure for user master record.

36 -> Incorrect structure for user master record.

Max

Read only

Former Member
0 Likes
670

Hi

Sy-Subrc=0 SUCCESS

Sy-Subrc=4 FAILURE

Sy-subrc=8 INTERNAL ERROR

Check for more:-

http://help.sap.com/saphelp_47x200/helpdata/en/7b/fb96c8882811d295a90000e8353423/content.htm

Thanks