Salesforce

How Do I Add Multiple Objects with the SAPB1 Connector? (Magic xpi 4.5)

« Go Back

Information

 
Created ByKnowledge Migration User
Approval Process StatusPublished
Objective
Description

How Do I Add Multiple Objects with the SAPB1 Connector? (Magic xpi 4.5)

The SAPB1 Data Interface (DI) API handles a single object at a time. Magic xpi’s Data Mapper utility, on the other hand, lets you add multiple objects in a single step. When configuring the step, Magic xpi turns to the DI to add the multiple objects as necessary.

When you add multiple SAPB1 objects, first configure Magic xpi’s SAPB1 connector using the XML interface. Then connect the Source compound to the SAPB1 BO compound. This will let you add several records simultaneously. The process is explained in the example below.

Example

This example describes how to add multiple Business Partners when the list of Business Partners is in a text file. For this example, create a sample text file using the information below.

The Business Partner file template is:

BPName,CardCode,CardType,Tel1,Tel2,Contact,email

The data in the text file is:

Test 00001,M00001,cCustomer,111-00001,222-00001,Contact 00001,1@mail.com

Test 00002,M00002,cCustomer,111-00002,222-00002,Contact 00002,2@mail.com

Test 00003,M00003,cCustomer,111-00003,222-00003,Contact 00003,3@mail.com

Test 00004,M00004,cCustomer,111-00004,222-00004,Contact 00004,4@mail.com

Test 00005,M00005,cCustomer,111-00005,222-00005,Contact 00005,5@mail.com

The steps below show how to add multiple Business Partners when the list of Business Partners is in a text file:

  1. Define an SAPB1 resource in the Settings dialog box's Resources section.

  2. Drag the SAPB1 connector to your flow.

  3. In the SAPB1 connector's Properties pane, select XML as your interface.

  4. In the Properties pane's Settings section, select the SAPB1 resource that you previously defined in the Settings dialog box's Resources section. If you have not yet defined an SAPB1 resource, you cannot proceed to configure the SAPB1 connector.

  5. Double-click or right-click on the SAPB1 connector and click Configuration to open the Configuration window.

  6. From the Operation drop-down list, select Add.

  7. Click to open the Data Object List, select Business Partners, and then click OK.

  8. From the Toolbox's Mapper Schemas section, drag a Flat File type into the Source area of the Data Mapper window.

  9. In the Source's Properties pane, use the text file given above as your source path.

  10. Click Save.

  11. In the Data Mapper window, create the relevant connections. To add multiple objects, connect the Record element to the BO element.

Note:

Magic xpi creates a single XML file that holds the multiple objects’ data and updates the UserXML. Magic xpi then uses this file to add the objects to SAPB1’s DI. If you save the UserXML content to your computer, you will be able to see the XML file. This information is useful when you debug your project.

Click here to view a sample of the XML code.

Reference
Attachment 
Attachment