Skip to content

ERPConnect.RFCParameter

Namespace: ERPConnect
Assembly: ERPConnectStandard20.dll

RFCParameters object represent the parameters to be exchanged with the SAP function module

public sealed class RFCParameter

Inheritance

objectRFCParameter

Inherited Members

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Constructors

RFCParameter(string, RFCTYPE, int, int, object)

Initializes a new RFCParameter object

public RFCParameter(string name, RFCTYPE type, int length, int decimals, object paramValue)

Parameters

name string

Name as provided in the function module

type RFCTYPE

RFC type of the parameter

length int

Length of the parameter in bytes

decimals int

Number of decimal digits

paramValue object

Object which represnts the value that is exchanged with the SAP system

RFCParameter(string, RFCTYPE, int, int)

Initializes a new RFCParameter object

public RFCParameter(string name, RFCTYPE type, int length, int decimals)

Parameters

name string

Name as provided in the function module

type RFCTYPE

RFC type of the parameter

length int

Length of the parameter in bytes

decimals int

Number of decimal digits

RFCParameter(string, RFCTYPE, int)

Initializes a new RFCParameter object

public RFCParameter(string name, RFCTYPE type, int length)

Parameters

name string

Name as provided in the function module

type RFCTYPE

RFC type of the parameter

length int

Length of the parameter in bytes

RFCParameter(string, RFCTYPE)

Initializes a new RFCParameter object

public RFCParameter(string name, RFCTYPE type)

Parameters

name string

Name as provided in the function module

type RFCTYPE

RFC type of the parameter

RFCParameter(string, RFCTableColumnCollection)

Initializes a new RFCParameter object that is a structure

public RFCParameter(string name, RFCTableColumnCollection columns)

Parameters

name string

Name as provided in the function module

columns RFCTableColumnCollection

ColumnCollection object for structured parameters

Properties

DDICFieldType

Represents the DDIC field type

public string DDICFieldType { get; set; }

Property Value

string

Decimals

Gets / sets the number decimals digits

public int Decimals { get; set; }

Property Value

int

IsSupplied

Gets or sets a value indicating whether this parameter is included in the remote function call.

Exports/Changings:
If this property is set to false, no value will be sent to SAP and the default value as defined in the function module will be used. That's the default behaviour for RFCFunction.Exports, unless a value has been assigned through ParamValue.

Imports/Changings:
If this property is set to false, no value will be received from SAP.
When using NWRFC, some function modules might not even calculate the result. The FM can use IS SUPPLIED to check whether the parameter was requested.

public bool IsSupplied { get; set; }

Property Value

bool

Length

Gets / sets the parameter length in bytes

public int Length { get; set; }

Property Value

int

Name

Gets or sets the name of the parameter (as defined in the function module)

public string Name { get; set; }

Property Value

string

ParamValue

Get or sets the value of the parameter. Please pay close attention to the data type and the RFC type:

  • ABAP type C -> System.String
  • ABAP type I -> System.Int32
  • ABAP type F -> System.Double
  • ABAP type D -> System.String (YYYYMMDD)
  • ABAP type T -> System.String (HHMMSS)
  • ABAP type P -> System.Decimal
  • ABAP type N -> System.String
  • ABAP type X -> System.Byte[]
  • ABAP type utclong -> System.DateTime? (nullable)
  • ABAP Type structure -> RFCStructure object
public object ParamValue { get; set; }

Property Value

object

Tag

A tag that can be used for everything

public object Tag { get; set; }

Property Value

object

Type

Gets or sets this parameters RFC type

public RFCTYPE Type { get; set; }

Property Value

RFCTYPE

Methods

GetLength()

[Obsolete("Please use Length instead")]
public int GetLength()

Returns

int

IsStructure()

Returns whether the parameter is a structured data type

public bool IsStructure()

Returns

bool

true / false

IsTable()

Returns whether the parameter is an internal table

public bool IsTable()

Returns

bool

true / false

RetrieveColumnsByStructure(IR3Connection, string)

Retrieves a structure from the SAP Data Dictionary

public void RetrieveColumnsByStructure(IR3Connection connection, string structureName)

Parameters

connection IR3Connection

R3Connection object

structureName string

Name of the DDIC structure

SetValueInternal(object)

Sets the parameter value directly without any checks or conversions

public void SetValueInternal(object value)

Parameters

value object

ToBytes()

Converts the parameter value to System.Byte[]

public byte[] ToBytes()

Returns

byte[]

System.Byte[] object

ToDouble()

Converts the parameter value to System.Double

public double ToDouble()

Returns

double

System.Double object

ToInt32()

Converts the parameter value to System.Int32

public int ToInt32()

Returns

int

System.Int32 object

ToString()

Converts the paramter value to System.String

public override string ToString()

Returns

string

System.String object

ToStructure()

Converts the parameter value to RFCStructure

public RFCStructure ToStructure()

Returns

RFCStructure

RFCStructure object

ToTable()

Converts the parameter value to RFCTable

public RFCTable ToTable()

Returns

RFCTable

RFCTable object