SAP DotNet Connector INT4 Data Conversion issue C#

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?
LVL 2
mitchellm44Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rama_krishna580Commented:
Hi,

Refer these links...
http://ifr.sap.com/home/Documents/ABAP_Serialization.htm
www.sap-press.de/download/dateien/ 657/sappress_interface_programming.pdf

i hope it may gives some idea....
R.K

0
mitchellm44Author Commented:
I tried many differnt things, and finally, I wrote a little app to take the field and write it out for presentation... and the numbers were displayed correctly.
I had been relying on the display of SE37 to show me the numbers.
The INT4 fields, were looking like garbage on the SE37 display when drilling into the tables returned.
The SE37 apparently does not handle this INT4 field in a way that makes sense.
The fields are there, and can be accessed programatically and shown with valid values.

So in the end, Test your functions with something other than SE37 if the fields are not displaying.
If you can write the values out with either a report or a BSP test page, then you should be able to determine if the data is usable or not.

0
jonvaughanCommented:
Just a note about Se37.

SAP uses something called a display format.
When some fields are written to the screen ie date fields, currency fields - they are converted to a display format which is not necessarily the same as the internal representation of the data.
This is very usefull when you are writing reports but can cause problems when you are developing as you can't actually see the exact data - use a program as a wrapper so that you can see the values in the debugger where you will see the real numbers and can even see the HEX ....

Cheers
Jon
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Enterprise Software

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.