goenning / SharpSapRfc

Making SAP RFC calls even easier with .NET
MIT License
84 stars 27 forks source link

SharpSapRfc.UnknownRfcParameter #40

Closed boe1iz closed 7 years ago

boe1iz commented 7 years ago

Hello,

I am using your library. First of all thank you for your effort. This is very usefull.

I have a problem when I try to run my program another computer. My development machine is working very well. But the program has to be run on a server. I installed every required things (.Net Framework 4.5.2, NCo3 etc). But it raised an error like that. Do u have any idea. (by the way program compiled X64 and x86 platform both but none of them is running).

Problem signature: Problem Event Name: CLR20r3 Problem Signature 01: ITP01.exe Problem Signature 02: 1.0.0.0 Problem Signature 03: 583c3142 Problem Signature 04: SharpSapRfc.Plain Problem Signature 05: 2.0.10.0 Problem Signature 06: 570c51ab Problem Signature 07: 6 Problem Signature 08: 5d Problem Signature 09: SharpSapRfc.UnknownRfcParameter OS Version: 6.1.7601.2.1.0.272.7 Locale ID: 1055 Additional Information 1: bf88 Additional Information 2: bf88e307fd25219939e0be5a1549843c Additional Information 3: 6e2e Additional Information 4: 6e2e1c57ac89ee7c1ce5cbb802317fda

boe1iz commented 7 years ago

Hello,

I have solved the problem by myself. My server machine locale (Turkish) somehow is different than my development machine (English). This creates a problem in SapRfcConnection.cs at following code;

var result = this.ExecuteFunction("RFC_READ_TABLE", new { QUERY_TABLE = tableName, // Original was -> Query_table = tableName FIELDS = dbFields, // Original was -> Fields = dbFields OPTIONS = dbWhere, // Original was -> Options = dbWhere ROWSKIPS = skip, // Original was -> Rowskips = skip ROWCOUNT = count // Original was -> Rowcount = count });

I have changed all the RFC_READ_TABLE parameters from lower-case to upper-case like fields --> FIELDS, options --> OPTIONS, rowskips --> ROWSKIPS. Because it creates a problem in SAP side and system converting them to upper-case like (FİELDS not FIELDS). Because in Turkish, there is (İ i) and (I ı) characters are different vowels this is not like English. And this creates a problem for function Metadata. I forked your code to my application and changed, it is solved.

For your information.

goenning commented 7 years ago

Hi @boe1iz , good to know the issue was solved! Thanks for taking the time to share the solution!

By the way, have you seen https://github.com/goenning/SharpSapRfc#rfc-read-table before calling RFC_READ_TABLE on your own?