cancel
Showing results for 
Search instead for 
Did you mean: 

Help! Error marshaling .NET type 20100101 to RFCTYPE_DATE

Former Member
0 Kudos

Hi,

I built a proxy for Qirf* methods (QM-IDI) and I am having a hard time to figure out what's going on. The connection per say works; it opens, and I can ping, so all this is fine.

But when I try to call, for example, Qirf_Send_Requirements_Get_Dat2(), I get this error:

Error: System exception thrown while marshaling .NET type 20100101 to RFCTYPE_DATE

Inner: Conversion buffer overflow

I narrowed it down, I know that the 'issue' is raised by the QAILS field DATUM_VON (Creation date upper limit). If I put nothing in there, I get the same error, with empty string instead of "20100101".

I am pretty sure the problem is about the format I'm passing, but I tried sending these values and always get the same error:

"100101"

"01012010"

"010101"

"2010-01-01"

"01-01-2010"

"2010/01/01"

"01/01/2010"

"01.01.2010"

I disassembled the code to try to see what I was supposed to send, but in the function "NetScalarParamToRfcScalarParam" (SAP.Connector.Rfc.dll, which is the method I assume is marshaling the value) really it should just be a "00000000" kind of format.

Any help on how to address this issue would be greatly appreciated!

Thanks,

Michel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Unicode vs non-unicode was the issue. Going unicode fixed my issue.

Former Member
0 Kudos

Hi again,

On further investigation, I found out that the SAP.Connector is not supporting (or at least, it looks like) correctly when the Partner's codepage is unicode. It creates an empty byte[] (buffer) for marshaling, and crashes.

I spoofed the connector to believe SAP is NOT unicode (just to see) and it "worked" - buffer was fine, RFC worked... But of course, data did not mean anything because of the codepage discrepancy.

Am I the first one to have issues when the SAP Partner's codepage is Unicode Big-Endian? Is there anything that can be done about it?

Thanks!

Michel