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: 

Sy-subrc fail scenerio's while modify statement

former_member622443
Discoverer
0 Kudos
1,199

Will there be a condition for modify statements when the sy-subrc will not be equal to zero?

4 REPLIES 4

mayur_priyan
Active Participant
0 Kudos
380

Are you asking the reason/cause when sy-subrc is not equal to 0 after modify ?

When sy-subrc <> 0, it means that at least one line could not be processed as there is already a line with the same unique name secondary index in the database table.

0 Kudos
380

Hi mayur,

              i am having a doubt whether there will be any situtaion where sy-subrc will fail for modify statement.

regards,

Midhun l madhu

vikas_mulay2
Participant
0 Kudos
380

Hi Midhun,

Yes...you will have a condition when sy-subrc will not be '0'.

  • MODIFY sets SY-SUBRC to 0 if the operation is successful, otherwise to 4.

Regards,

Vikas

former_member195402
Active Contributor
0 Kudos
380

Hi,

ABAP keyword help in SE38/SE80 for

MODIFY itab.

MODIFY dbtab.

will give you the answer, when SY-SUBRC is set to 4.

Regards,

Klaus