Skip to content

Commit

Permalink
Fixed mapping of the optional parameters when getting the parameters …
Browse files Browse the repository at this point in the history
…description from SAP SDK (#315)
  • Loading branch information
ipezkine-ext authored Nov 19, 2024
1 parent e34d11c commit 1cc526f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/YaNco.Core/Internal/Api.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ public static RfcRc AddFunctionParameter(FunctionDescriptionHandle descriptionHa
Name = parameterDescription.Name,
Type = parameterDescription.Type,
Direction = parameterDescription.Direction,
Optional = parameterDescription.Optional ? 'X' : '\0',
Optional = parameterDescription.Optional ? '1' : '0',
Decimals = parameterDescription.Decimals,
NucLength = parameterDescription.NucLength,
UcLength = parameterDescription.UcLength,
Expand Down Expand Up @@ -190,7 +190,7 @@ public static RfcRc GetFunctionParameterDescription(FunctionDescriptionHandle de
{
var rc = Interopt.RfcGetParameterDescByName(descriptionHandle.Ptr, name.ToUpperInvariant(), out var parameterDescr, out errorInfo);
parameterInfo = new RfcParameterInfo(
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 'X');
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 1);
return rc;

}
Expand All @@ -200,7 +200,7 @@ public static RfcRc GetFunctionParameterDescription(FunctionDescriptionHandle de
{
var rc = Interopt.RfcGetParameterDescByIndex(descriptionHandle.Ptr, (uint)index, out var parameterDescr, out errorInfo);
parameterInfo = new RfcParameterInfo(
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 'X');
parameterDescr.Name, parameterDescr.Type, parameterDescr.Direction, parameterDescr.NucLength, parameterDescr.UcLength, parameterDescr.Decimals, parameterDescr.DefaultValue, parameterDescr.ParameterText, parameterDescr.Optional == 1);
return rc;

}
Expand Down

0 comments on commit 1cc526f

Please sign in to comment.