07-02-2007 6:56 AM
Hi pls,
in abap program what r all the statements give return code.
07-02-2007 7:02 AM
Hi,
The return code value is set as follows:
SY-SUBRC = 0 At least one line was read.
SY_SUBRC = 4 No lines were read.
SY-SUBRC = 8 The search key was not fully qualified.
*********please reward points if the information is helpful to you*************
07-02-2007 7:16 AM
Hi pandu,
It depends on the result of that ABAP statement.
And the return code is checked using sy-subrc and its value is 0 when the command is succesful and all other times the command is unsuccessful but each value has there own meaning.
Regards,
Atish
07-02-2007 7:17 AM
Hi,
All the DB related stetementsl ike INSET, SELECT, MODIFY and DELETE
All the Internal table realted statements like READ, APPEND, INSERT, MODIFY
Function modules, Class methods(Not PERFORM's) if they are called using EXCEPTIONS addition and if you assign numbers to the exceptions in the calling program.
Above are some of the most used.
Its hardto list all the ABAP statements that effect sy-subrc what you can do is just press F1 on any KEY WORD for which you want to know and it gives wether this effects sy-subrc or not
Regards,
Sesh
.
07-02-2007 7:17 AM
Hi,
The statements which give return code are :
select, insert,modify,read, append, update,delete,.
All the above return sy-subrc.
Sy-subrc = 0 -
Success
Sy-subrc = 4 -
Failure(known reason)
Sy-subrc = 8 -
Internal error(Unknown reason).
Regards,
Priyanka.
07-02-2007 7:21 AM
HI.
if return is 0 it run successfully
if return is 4 it not run successfully.
Reward all helpfull answers.
Regards.
Jay
07-02-2007 7:25 AM
hi,
in abap all most all open sql statements which r used on internal tables returns return value for ex: SELECT, INSERT, UPDATE, DELETE MODIFY, APPEND returns return value as 0, 4,8,........... based on situation and condition where they are used.
ex: SELECT * FROM MARA INTO TABLE ITAB WHERE MATNR = S_MATNR.
IF SY-SUBRC EQ 0.
WRITE:/10 'SUCCESS'.
ELSE.
WRITE:/10 'FAILURE OF SELECT STATEMENT'.
ENDIF.
if helpful reward some points.
with regards,
Suresh.A