|
Designing Constructor for Defining Connection
The constructor is used to define the parameters for the SAP Business Connectors and also between the Business Connector and SAP R/3 target systems. The input parameters for a constructor are:
- UrlOfBC - URL of the SAP Business Connector.
- bcUser - User name for the SAP Business Connector.
- bcPassword - Password for the SAP Business Connector.
- sapServerName - Symbolic name of the SAP R/3 system as defined in the SAP Business Connector
- sapUser - User name for the SAP R/3 system.
- sapPassword - Password for the SAP R/3 system.
Creating SAP XML documents for RFCs/BAPI
Create Template requests a SAP XML document for the specified RFC/ BAPI and return this as a value of type string. In the case of an error, a blank string is returned. The create function for RFC/ BAPI is CreateTemplate. The input parameters for this are:
- RfcName - Name of the RFC or BAPI.
- call - Call or return document (true/false).
Defining Proxy methods to the Integration Process
Proxy methods with appropriate parameters are required to invoke RFC/ BAPI from a WT script. The function used to define a proxy is getProxyRFC. The input parameter for defining a proxy is:
- rfcName - Name of the RFC or BAPI.
Converting SAP XML Object to WTScript Object
This method converts a section of SAP XML document, which describes a data structure to a corresponding WT Script object. The input parameters for this conversion are:
- InObj - Node as a DOM representation of a SAP XML data structure.
- OutObj - Container for the WTScript object output.
The following table applies for the conversion process:
|
SAP XML
|
WT Script
|
|
STRUCTTYPE
|
object of the Object class
|
|
TABLETYPE
|
object of the Array class
|
|
CHARSVAL
|
String
|
|
STRINGVAL
|
String
|
|
Time
|
String |
|
Date
|
String
|
|
NUMVAL
|
Number
|
|
DECIMALVAL
|
Number
|
|
FLOATVAL
|
Number
|
|
INTVAL
|
Number |
|
I1VAL
|
Number |
|
I2VAL
|
Number |
|
BINVAL
|
Number |
|
URIVAL
|
Number |
The function dateToTree is used to convert a corresponding WT Script object to a section of a SAP XML object. The input parameters for this process are:
- outObj - Container for the WTScript object output.
- inObj - Node as a DOM representation of a SAP XML data structure.
The same table shown above also applies to the conversions with the only difference being that the WTScript objects are given and have to be converted to the SAP XML object.
|