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: 

Error in sy-subrc = 4.

Former Member
0 Kudos
956

hi experts ,

My program is running well , but when i am debugging my programs I am getting error ie sy-subrc = 4 .

please help me to resolve this error.

Thanks & Regards

Navin Mahindra

Moderator message: too vague, please search for information before posting, provide all relevant details when posting.

.

Message was edited by: Thomas Zloch

6 REPLIES 6

Former Member
0 Kudos
204

Hi ,

Please clarify where this sy-subrc is getting changed.

or

put your code here.

Regards,

Amit

edgar_nagasaki
Contributor
0 Kudos
204

Hi Navin,

sy-subrc 4 from where?

Edgar

Former Member
0 Kudos
204

Amit ,

When I am Debugging my code in that I am able to see that Sy-Subrc = 4.

and in my code I think , the error would be while " reading the data ".

Error is not showing in my code its synthically correct , but while debugging why  ? it so .

   READ TABLE IT_PWR INTO WA_PWR INDEX 1 .

   V_TDATE  = WA_PWR-PW_TDATE.

   V_ERZET  = WA_PWR-PW_ERZET.

Edgar

from where i didnt get u ?

0 Kudos
204

Please go through basics of ABAP and read the SAP help documentation before posting on this forum.

0 Kudos
204

Hi navin,

If you are saying that you are reading some table and the data is not coming from there i.e. sy-subrc = 4.

This is not an error which will show in your program but its a read statemnt failure.

My understanding of your problem.

READ TABLE IT_PWR INTO WA_PWR INDEX 1 .

if sy-subrc = 0.

   V_TDATE  = WA_PWR-PW_TDATE.

   V_ERZET  = WA_PWR-PW_ERZET.

endif.

If the above sy-subrc = 4 , this means that table IT_PWR is empty.

Check this in debugging mode.

Hope this will help.

Regards,

Amit

0 Kudos
204

Hi Navin,

          IT_PWR[]  is may be empty is correct.Please check it and give the feedback.

Thanks

Dinesh