[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SAP DotNet Connector INT4 Data Conversion issue C#

Posted on 2004-11-14
3
Medium Priority
?
1,023 Views
Last Modified: 2013-12-08
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?
0
Comment
Question by:mitchellm44
3 Comments
 
LVL 23

Expert Comment

by:rama_krishna580
ID: 12584275
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
 
LVL 2

Author Comment

by:mitchellm44
ID: 12587404
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
 
LVL 10

Accepted Solution

by:
jonvaughan earned 2000 total points
ID: 12826434
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

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I showed you how to use console view (HERE (http://www.experts-exchange.com/articles/18379/Getting-Started-and-Using-the-Salesforce-com-Console.html)) -– but how do you set it up on the admin side of Salesforce? Note that you have to have Admin leve…
Read about achieving the basic levels of HRIS security in the workplace.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question