102.6. Repository Configuration


Overview

The configuration for repositories are maintain in the repositoryDataStore property of the SAP Component. Each entry in this map configures a distinct repository. The key for each entry is the name of the repository and this key also corresponds to the name of server to which this repository is attached.
The value of each entry is a repository data configuration object, org.fusesource.camel.component.sap.model.rfc.impl.RepositoryDataImpl, that defines the contents of a meta-data repository. A repository data object is a map of function template configuration objects, org.fuesource.camel.component.sap.model.rfc.impl.FunctionTemplateImpl. Each entry in this map specifies the interface of a function module and the key for each entry is the name of the function module specified.

Repository data example

<bean id="nplRepositoryData"
    class="org.fusesource.camel.component.sap.model.rfc.impl.RepositoryDataImpl">
    <property name="functionTemplates">
        <map>
            <entry key="BOOK_FLIGHT" value-ref="bookFlightFunctionTemplate" />
        </map>
    </property>
</bean>

Function template properties

The interface of a function module consists of four parameter lists by which data is transferred back and forth to the function module in an RFC call. Each parameter list consists of one or more fields, each of which is a named parameter transferred in an RFC call. The following parameter lists and exception list are supported:
  • The import parameter list contains parameter values that are sent to a function module in an RFC call;
  • The export parameter list contains parameter values that are returned by a function module in an RFC call;
  • The changing parameter list contains parameter values that are sent to and returned by a function module in an RFC call;
  • The table parameter list contains internal table values that are sent to and returned by a function module in an RFC call.
  • The interface of a function module also consists of an exception list of ABAP exceptions that may be raised when the module is invoked in an RFC call.
A function template describes the name and type of parameters in each parameter list of a function interface and the ABAP exceptions thrown by the function. A function template object maintains five property lists of meta-data objects, as described in the following table.
Property Description
importParameterList A list of list field meta-data objects, org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMeataDataImpl. Specifies the parameters that are sent in an RFC call to a function module.
changingParameterList A list of list field meta-data objects, org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMeataDataImpl. Specifies the parameters that sent and returned in an RFC call to and from a function module.
exportParameterList A list of list field meta-data objects, org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMeataDataImpl. Specifies the parameters that are returned in an RFC call from a function module.
tableParameterList A list of list field meta-data objects, org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMeataDataImpl. Specifies the table parameters that are sent and returned in an RFC call to and from a function module.
exceptionList A list of ABAP exception meta-data objects, org.fusesource.camel.component.sap.model.rfc.impl.AbapExceptionImpl. Specifies the ABAP exceptions potentially raised in an RFC call of function module.

Function template example

The following example shows an outline of how to configure a function template:
<bean id="bookFlightFunctionTemplate"
    class="org.fusesource.camel.component.sap.model.rfc.impl.FunctionTemplateImpl">
    <property name="importParameterList">
        <list>
            ...
        </list>
    </property>
    <property name="changingParameterList">
        <list>
            ...
        </list>
    </property>
    <property name="exportParameterList">
        <list>
            ...
        </list>
    </property>
    <property name="tableParameterList">
        <list>
            ...
        </list>
    </property>
    <property name="exceptionList">
        <list>
            ...
        </list>
    </property>
</bean>

List field meta-data properties

A list field meta-data object, org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMeataDataImpl, specifies the name and type of a field in a parameter list. For an elementary parameter field (CHAR, DATE, BCD, TIME, BYTE, NUM, FLOAT, INT, INT1, INT2, DECF16, DECF34, STRING, XSTRING), the following table lists the configuration properties that may be set on a list field meta-data object:
Name Default Value Description
name - The name of the parameter field.
type - The parameter type of the field.
byteLength - The field length in bytes for a non-Unicode layout. This value depends on the parameter type. See Section 102.2, “Message Body”.
unicodeByteLength - The field length in bytes for a Unicode layout. This value depends on the parameter type. See Section 102.2, “Message Body”.
decimals 0 The number of decimals in field value; only required for parameter types BCD and FLOAT. See Section 102.2, “Message Body”.
optional false If true, the field is optional and need not be set in a RFC call
Note that all elementary parameter fields require that the name, type, byteLength and unicodeByteLength properties be specified in the field meta-data object. In addition, the BCD, FLOAT, DECF16 and DECF34 fields require the decimal property to be specified in the field meta-data object.
For a complex parameter field of type TABLE or STRUCTURE, the following table lists the configuration properties that may be set on a list field meta-data object:
Name Default Value Description
name - The name of the parameter field
type - The parameter type of the field
recordMetaData - The meta-data for the structure or table. A record meta-data object, org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl, is passed to specify the fields in the structure or table rows.
optional false If true, the field is optional and need not be set in a RFC call
Note that all complex parameter fields require that the name, type and recordMetaData properties be specified in the field meta-data object. The value of the recordMetaData property is a record field meta-data object, org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl, which specifies the structure of a nested structure or the structure of a table row.

Elementary list field meta-data example

The following meta-data configuration specifies an optional, 24-digit packed BCD number parameter with two decimal places named TICKET_PRICE:
<bean    class="org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMetaDataImpl">
    <property name="name" value="TICKET_PRICE" />
    <property name="type" value="BCD" />
    <property name="byteLength" value="12" />
    <property name="unicodeByteLength" value="24" />
    <property name="decimals" value="2" />
    <property name="optional" value="true" />
</bean>

Complex list field meta-data example

The following meta-data configuration specifies a required TABLE parameter named CONNINFO with a row structure specified by the connectionInfo record meta-data object:
<bean    class="org.fusesource.camel.component.sap.model.rfc.impl.ListFieldMetaDataImpl">
    <property name="name" value="CONNINFO" />
    <property name="type" value="TABLE" />
    <property name="recordMetaData" ref="connectionInfo" />
</bean>

Record meta-data properties

A record meta-data object, org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl, specifies the name and contents of a nested STRUCTURE or the row of a TABLE parameter. A record meta-data object maintains a list of record field meta data objects, org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl, which specify the parameters that reside in the nested structure or table row.
The following table lists configuration properties that may be set on a record meta-data object:
Name Default Value Description
name - The name of the record.
recordFieldMetaData - The list of record field meta-data objects, org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl. Specifies the fields contained within the structure.
Note
All properties of the record meta-data object are required.

Record meta-data example

The following example shows how to configure a record meta-data object:
<bean    id="connectionInfo"
        class="org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl">
    <property name="name" value="CONNECTION_INFO" />
    <property name="recordFieldMetaData">
        <list>
            ...
        </list>
    </property>
</bean>

Record field meta-data properties

A record field meta-data object, org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl, specifies the name and type of a parameter field withing a structure.
A record field meta-data object is similar to a parameter field meta-data object, except that the offsets of the individual field locations within the nested structure or table row must be additionally specified. The non-Unicode and Unicode offsets of an individual field must be calculated and specified from the sum of non-Unicode and Unicode byte lengths of the preceding fields in the structure or row. Note that failure to properly specify the offsets of fields in nested structures and table rows will cause the field storage of parameters in the underlying JCo and ABAP runtimes to overlap and prevent the proper transfer of values in RFC calls.
For an elementary parameter field (CHAR, DATE, BCD, TIME, BYTE, NUM, FLOAT, INT, INT1, INT2, DECF16, DECF34, STRING, XSTRING), the following table lists the configuration properties that may be set on a record field meta-data object:
Name Default Value Description
name - The name of the parameter field
type - The parameter type of the field
byteLength - The field length in bytes for a non-Unicode layout. This value depends on the parameter type. See Section 102.2, “Message Body”.
unicodeByteLength - The field length in bytes for a Unicode layout. This value depends on the parameter type. See Section 102.2, “Message Body”.
byteOffset - The field offset in bytes for non-Unicode layout. This offset is the byte location of the field within the enclosing structure.
unicodeByteOffset - The field offset in bytes for Unicode layout. This offset is the byte location of the field within the enclosing structure.
decimals 0 The number of decimals in field value; only required for parameter types BCD and FLOAT. See Section 102.2, “Message Body”.
For a complex parameter field of type TABLE or STRUCTURE, the following table lists the configuration properties that may be set on a record field meta-data object:
Name Default Value Description
name - The name of the parameter field
type - The parameter type of the field
byteOffset - The field offset in bytes for non-Unicode layout. This offset is the byte location of the field within the enclosing structure.
unicodeByteOffset - The field offset in bytes for Unicode layout. This offset is the byte location of the field within the enclosing structure.
recordMetaData - The meta-data for the structure or table. A record meta-data object, org.fusesource.camel.component.sap.model.rfc.impl.RecordMetaDataImpl, is passed to specify the fields in the structure or table rows.

Elementary record field meta-data example

The following meta-data configuration specifies a DATE field parameter named ARRDATE located 85 bytes into the enclosing structure in the case of a non-Unicode layout and located 170 bytes into the enclosing structure in the case of a Unicode layout:
<bean    class="org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl">
    <property name="name" value="ARRDATE" />
    <property name="type" value="DATE" />
    <property name="byteLength" value="8" />
    <property name="unicodeByteLength" value="16" />
    <property name="byteOffset" value="85" />
    <property name="unicodeByteOffset" value="170" />
</bean>

Complex record field meta-data example

The following meta-data configuration specifies a STRUCTURE field parameter named FLTINFO with a structure specified by the flightInfo record meta-data object. The parameter is located at the beginning of the enclosing structure in both the case of a non-Unicode and Unicode layout.
<bean    class="org.fusesource.camel.component.sap.model.rfc.impl.FieldMetaDataImpl">
    <property name="name" value="FLTINFO" />
    <property name="type" value="STRUCTURE" />
    <property name="byteOffset" value="0" />
    <property name="unicodeByteOffset" value="0" />
    <property name="recordMetaData" ref="flightInfo" />
</bean>
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.