cancel
Showing results for 
Search instead for 
Did you mean: 

SAP NCO 2.0 RFC_READ_TABLE returns empty RfcAbapException

dmko
Explorer
0 Kudos

Hi all,

I have a very weird situation here, on the customer side one of the tables just stopped return data when we do read it by RFC_READ_TABLE. The table is V_IBIN_SYVAL, what we are doing is just retrieve ATINN values from the table by IN_RECNO ids. So where statement is super simple like IN_RECNO IN ( 051MWa057jQxnYf9m1oEBm, 051MWa057jQxnYhfQYAEBm, 051MWa057jQxnYilPcUEBm, 051MWa057jQxnYymFixEG0, 051MWa057jQxnY{HReCEG0 )
We also do split by separate options to meet 512 max symbols requirement.

The most interesting is I tried to execute a query without specific options and no_data=X to get fields collection only and eliminate other possible issues and it also failed with an empty RfcAbapException.
It's just start happen suddenly, the code has not been changed from 2011.


Also we are still using the old .Net SapConnector 2.0.0.26 for this legacy project.


Other tables like MARA, for example, returning data properly using same code. Can you please advice what can be the issue?

RFC_DB_FLDTable fields = new RFC_DB_FLDTable();
RFC_DB_OPTTable options = new RFC_DB_OPTTable();
TAB512Table datatable = new TAB512Table();
proxy.Rfc_Read_Table("|", "X", "V_IBIN_SYVAL", 0, 0, ref datatable, ref fields, ref options);
Sandra_Rossi
Active Contributor
0 Kudos
Possibly one line is returned which contains invalid data in one column (of database)?
Sandra_Rossi
Active Contributor
Look directly into the database e.g. one DATS contains space, one NUMC contains non-numeric, etc.

Accepted Solutions (0)

Answers (2)

Answers (2)

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert

If there is no standard FM/BAPI yet, which returns the desired table data, then the recommendation is to write your own Z-FM, which selects precisely the table you need. The "generic" RFC_READ_TABLE simply has too many shortcomings and security vulnerabilities.

Nevertheless, in order to trouble-shoot what has changed recently, you could try the following:

  • RfcAbapException means, the ABAP code of RFC_READ_TABLE throws an exception.
  • Therefore, log on with SAPGui with the same user used by your .NET application, go to SE37 and set an "external breakpoint" at the beginning of RFC_READ_TABLE
  • Now execute the problematic call from .NET. It will stop in SE37 in your SAPGui session.
  • Then you can step through the ABAP code in the ABAP-Debugger, until you get to the point, where it raises the exception. This will perhaps give you further ideas about what is wrong at that point.

BTW: NCo 2.0 is out-of-maintenance since ~2003... Since then there was NCo 2.1 (end of maintenance ~2013), NCo 3.0 (end of maintenance 2023) and NCo 3.1. Also the Microsoft .NET Framework you are using, has probably been out-of-support by Microsoft for a couple of decades... So none of the components you are using here, got any security patches for like 20 years. I would say, it's about time to upgrade this solution to up-to-date components. 🙂

dmko
Explorer
0 Kudos
Thanks, I will try to debug it this way and update this ticket about results, maybe it will be helpful to someone else. About legacy stuff, within newest version we already using 3.1 and can't wait Core/.Net 8 version :), but some of our customers still on the old version unfortunately.
dmko
Explorer
0 Kudos

Hi Sandra,

Thanks for the reply! 

How I can figure out that data is invalid, is there any check mechanizm etc. how I can get this invalid value?

Sorry, I'm quite new in SAP, just wondering what is invalid data here? 🙂 

Ulrich_Schmidt
Product and Topic Expert
Product and Topic Expert
0 Kudos
Hello dmko, you probably wanted to add a comment to the discussion above, and not an answer to your own question?
dmko
Explorer
0 Kudos
yes, sorry 😄