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 NE0 even though entry exits in internal table

Former Member
0 Kudos

Hi All

In reeading internal table sy-subrc NE0 even though entry exits in internal table.

Kindly provide the solution.I am not using binary search and sort.

If i share my code moderator will delete the post.

Thanks

Vamsi

14 REPLIES 14

former_member207873
Participant
0 Kudos

Hi Mohan,

We cant help you unless and until you share your code.

BR.

atul_mohanty
Active Contributor
0 Kudos

Hi Mohan -

SORT the internal table in the order your using the BINARY SEARCH.

Former Member
0 Kudos

I can't be possible.

If entry exist in Itab and you are providing correct condition, sy-subrc = 0.

VijayaKrishnaG
Active Contributor
0 Kudos

Hi Mohan,

Once you sort your table with condition field and read using Binary search.

Thanks & Regards,

Vijay

karun_prabhu
Active Contributor
0 Kudos

Hello Mohan Vamsi.

     Data that you are reading from the internal table should exactly match (including preceding zeroes).

     Kindly check that.

Regards.

arivazhagan_sivasamy
Active Contributor
0 Kudos

Hi Mohan,

If where condition field datatype is C and its length 10.

Suppose your value is 180180. then you have to check as '0000180180'..

Arivazhagan S

ThomasZloch
Active Contributor
0 Kudos

Mohan Vamsi wrote:

If i share my code moderator will delete the post.

I don't think so. Limit it to the relevant parts though, so helpful souls don't have to wade through pages and pages.


Thomas

Former Member
0 Kudos

HI All

IF lv_partner_Po-partner_fct = '00000027'.

            READ TABLE gt_but020 into gs_but020 with key Partner = lv_partner_po-partner_ID.

If sy -subrc = 0.

Here partner_ID = 0000000001

Thanks

Vamsi

0 Kudos

Hi Mohan,

Sort gt_but020 by partner before the read statemnet.

0 Kudos

Make sure the type of lv_partner_po-partner_ID and  gs_but020-Partner is same.


0 Kudos

Hi Vamsi,

How is your table gt_but020 declared? And what type is your field lv_partner_po-partner_ID?

Have you debugged it, are your sure the read statement is reached?

Br,

Manu.

nabheetscn
Active Contributor
0 Kudos

Hi Mohan

Please share only the relvant code with your debugging screen shot of value you are trying to read. Moderators will delete if you are going to dump your all other code

Nabheet

Former Member
0 Kudos

Hi,

Whether it has a  conversion routine of which field pass value.

you need to do the conversion.

Thanks,

Yawa

Former Member
0 Kudos

Hi Mohan,

Just check if you need to use conversion exits before comparing with dictionary entries.

Regards,

Sheetal.