Salesforce

SAP ERP - XML (Magic xpi 4.14)

« Go Back

Information

 
Created BySalesforce Service User
Approval Process StatusPublished
Objective
Description

SAP ERP - XML (Magic xpi 4.14)

The SAP ERP connector supports the XML interface only. Follow these steps to configure the SAP ERP connector.

Double-click or right-click on the SAP ERP connector and select Configuration from the context menu to open the SAP ERP Configuration dialog box. The general fields for the XML configuration are described in the table below:

Property

Description

Connection

Resource Name

This read-only field displays the name of the SAP ERP resource or dynamic resource that you defined in the Settings dialog box's Resources section and selected for this connector.

Keep Connection Open

Select this check box to indicate whether you want the connection to the SAP ERP database to remain open once the operation has been completed. You should use this function when the connection to SAP ERP is done periodically. The default is unchecked.

Connections to the SAP ERP database are maintained in a connection pool. A SAP ERP step in a flow requests an existing open connection from this pool.

If you select the Keep Connection Open check box, the connection is not returned to the pool once the step is finished. Instead, it is used in the next SAP ERP step on the same thread, or returned to the pool once the thread is finished (which can take some time).

The only scenario where connections should not be returned to the pool is when several calls to the SAP ERP database are in a transaction. In all other scenarios, used connections should be returned immediately to the pool once the step is finished so that other steps can use them.

You should now select the Operation that you want to execute, as described in the table below:

Property

Description

Operation

Interface Type

Select one of the following from the drop-down list:

  • IDoc

  • RFC

  • Read

  1. If you selected IDoc as your Interface Type in the previous step, you should now define it, as described in the table below:

Property

Description

Message Type

This allows you to select the relevant Message Type name from a list received from the server.

You can access the Message Types list by clicking . This opens the IDoc Message Type List dialog box. Click Select to select the required IDoc Message Type, or click Cancel to exit the list. Alternatively, you can click Reload to refresh the Message Type list.

IDoc Type

This allows you to select the relevant IDoc Type name from a list obtained from the server by the IDoc Search Form. This list is filtered by Message Type.

You can access the IDoc Types list by clicking . This opens the IDoc Type List dialog box. Click Select to select the required IDoc Type, or click Cancel to exit the list. Alternatively, you can click Reload to refresh the IDoc Type list.

Extension

This allows you to enter an extension name or select from a list of available extensions by clicking .

Transaction ID

This variable allows you to manage a Transaction ID for delivery failures, such as timeout.

You can select a variable to hold the Transaction ID by clicking . This opens the Variables List. Choose the required Alpha variable by clicking Select.

  • When an IDoc is sent, the variable is populated with the transaction ID of the transaction.

  • If the variable is not empty, Magic xpi will use the value as the transaction ID.

The use of this option is for Transaction ID management. For example, if an IDoc is sent but Magic xpi gets back a timeout, then Magic xpi does not know if the IDoc arrived at its destination. To prevent the redundant processing of the same IDoc, Magic xpi, by supplying the previous Transaction ID value, sends the IDoc with the same transaction ID as before.

On the SAP ERP side, if the IDoc arrived the first time it was sent, the next time Magic xpi sends the IDoc with the same transaction ID, SAP ERP knows to ignore it.

IDOC is not sent to SAP successfully when Transaction ID is stored in Business and Global type of variables. Use Flow or Context variable instead of Business and Global type of variables.

Result

Store result in

Defines where you want to store the resulting XML file.

  • Variable: Select a variable to hold the object data that is returned by SAP ERP.
    Click to open the Variables List. Select a variable where this information is to be stored. The default is C.UserBlob.

  • If you select Message Type, only IDocs belonging to this group will be available.

  • When you select a specific IDoc by clicking OK, Magic xpi connects to the SAP ERP server and receives IDoc information which it uses to generate the appropriate schema.

  • The generated interface schema that is used by the Data Mapper is saved in SAP ERP/XSD/HostDetails/IDoc directory, where HostDetails is a string built from the connection properties. The name of the file is the same as the IDoc type.

  1. If you selected RFC as your Interface Type in the previous step, you should now define it, as described in the table below:

Property

Description

RFC Group

This allows you to enter the RFC Group, or to select the relevant RFC Group from a list received from the server. You can access the RFC Group List by clicking .

You can leave the RFC Group blank. If you do this, when you select an RFC Name its related group is filled in automatically.

RFC Name

This allows you to enter the RFC Name, or to select the relevant RFC Name from a list obtained from the server by the RFC Search Form. This list is filtered by RFC Group. You can access the RFC Group List by clicking .

Result

Store result in

Defines where you want to store the resulting XML file.

  • Variable: Select a variable to hold the object data that is returned by SAP ERP.
    Click to open the Variables List. Select a variable where this information is to be stored. The default is C.UserBlob.

  • If you select RFC Group, only RFCs belonging to this group will be available.

  • When you select a specific RFC by clicking OK, Magic xpi connects to the SAP ERP server and receives RFC information which it uses to generate the appropriate schema.

  • The generated interface schema that is used by the Data Mapper is saved in SAP ERP/XSD/HostDetails/IDoc directory, where HostDetails is a string built from the connection properties. The name of the file is the same as the RFC name.

  • You can see documentation for the SAP ERP RFC simple and compound nodes in the Properties pane's Additional XML Properties section.

  1. If you selected Read as your Interface Type in the previous step, you should now define it, as described in the table below: (Since version: 4.13.2)

Property

Description

Operation

Select the Operation from the drop-down list.

  • Query (Default)

The Query operation will use the REMOTE_EXECUTE_QUERY function to fetch the data from the SAP server.

  • Table

The table operation will use the RFC_READ_TABLE standard SAP function module to fetch the data from the SAP server.

The filter criteria for Table may not fetch the result as per the defined filter if the Magic xpi project with SAP ERP component is upgraded. For upgraded or migrated projects, open the SAP ERP step and save it again by clicking the OK button. Once the project is saved, run the Clean Solution option and then rebuild the project.

If the Read Table operation is fetching large dataset from SAP ERP server, especially when configured with Local Agent, the Magic xpi runtime will require higher Java heap size to handle the large data. Otherwise it may result in an Error 9999: Java Exception.

To handle large data, increase the Java heap size to an apropriate value. For more information on increasing the heap size, refer to How to Tune JVM Memory Parameters.

Object Name

Based on the operation selected above, click (ellipsis button) to open the Query List or the Table List.

The Query List will display all the available queries on the server along with the user group they belong to. The Table List will display the list of tables available on the server.

Select an entry from the list. To get the updated list of Queries or Tables, click the Reload button on the window.

Operation Parameters

Based on the operation selected above, click (ellipsis button) to open the window to define the Filter Criteria for the selected query or the Filter Criteria for the selected table.

Action Summary

The Action Summary gives brief overview of the data on the selected query or selected fields for table (above).

The summary will be shown in multiple rows showing the list of parameters and its respective metadata.

(Since version: 4.13.5)

Result

Store result in

Defines where you want to store the resulting XML file. Select one of the following from the drop-down list:

  • File: Select a file to hold the object data that is returned by SAP ERP.
    Click to open the Expression Editor or click and enter the file path where this information is to be stored.

  • Variable: Select a variable to hold the object data that is returned by SAP ERP.
    Click to open the Variables List. Select a variable where this information is to be stored. The default is C.UserBlob.

When the Local Agent parameter of the SAP ERP resource is set to True, the resulting XML will be stored in a variable. In this case, the File dialogue will be disabled. If the File option is selected and you change value of the Local Agent parameter from False to True in the resource configuration, it will result in Step configuration error on reopening the step. To avoid this, set the value to Variable before doing change to the Local Agent parameter.

Click OK to complete the process. It will generate the Text/XSD file based on the selected Table/Query object. If a schema does not exist, the required information is retrieved from the server and a schema is created. Once the configuration information is saved, and the Data Mapper window opens with the selected schema as the Destination. You should define the data required to complete the desired operation for SAP ERP in the Data Mapper. The schema file is generated in the SAP ERP folder inside the project folder.

For example, <Project Folder>\SAP ERP\XSD\10.1.3.75_02_200\SAP ERP_8\Read\DD01L\DD01L.txt

Alternatively, you can click Cancel to exit the SAP ERP Configuration dialog box without saving your settings or modifications.

If there is a failure in server connectivity, an error message is displayed, and you remain in the SAP ERP Configuration dialog box.

Reference
Attachment 
Attachment