SAP DotNet Connector INT4 Data Conversion issue C#
Posted on 2004-11-14
I have written an few RFC Servers that extract data from external data and bring them back into the SAP are to store.
Earlier examples were using DataReaders with the DotNet C# and GetInt32 from the data reader for one SAP Field defined as an INT4 Length 10 in SAP.
That example worked. The same field type I filled from the data reader is now in a new process that does not work.
Now I am working with a Stored Procedure that is using OBJECTNATIONS stored procedure wrapper for DotNet,
During development I can write the data from the Stored Procedure wrapper with the ToString conversion. There are two fields that are both INT4 on the SAP side and both values are returning from the RFC Server with Garbage.
The Stored Procedure wrapper DataType is SqlInt32 which I convert to String, and the put that result into an INT32.Parse to assign the value into the SAP Structure which says it is an INT. I can write the string representation of the source value and after it is assigned, and in the console window the data values are good, but when I look at the values in the record layout from the SE37 test of calling the RFC Server,
the two fields in the layout defined as INT4 Length 10 - I am seeing ###(# as a number? which should be 10000
There are three tables passed to the RFC Server, and the test right now is passing back single rows of data - the rest of the data looks right.
I have checked the structure lengths, hoping for some kind of weird offset of earleir fields but have not seen one.
Anyone got an idea here?