SAP Open Connectors

Common Objects UI and Automapper

Building transformations has become even simpler and faster on the new Common Objects V2 UI. To create a new Common Resource using the new UI, follow the next few steps.

  1. On Common Resource V2 UI, click on the Build New Common Resource button on the top right corner.


  2. Choose whether you want to build a new Common Resource using the interface or using JSON. Click Continue.
    • If you want to build a CO using the interface, click 'Build New' and proceed to step 3.
    • If you want to build a VDR using JSON import, click 'Import JSON' option. Type your VDR name and enter the JSON object in the editor. Click Import to import the JSON.
  3. Using our interface, you can build a CO by either choosing a template or from scratch.
    • If you want to start building a CO from scratch, click Build New CO.
    • If you would like to build a CO using one of our templates, you can search for a template and choose the one most suited to your use.

Both methods are discussed in detail further in this article.

Without a Template

To build a CO without a template, follow the steps below.

  1. Continuing from our previously mentioned steps, Click Build New CO as mentioned above.
  2. Click Continue.
  3. Enter a name for your VDR and click Create VDR.
  4. On the screen that appears next, add as many fields as you want for the transformation.
  5. Select a field for your mapping and enter a name for it.
  6. To select the type of the data you added in the field, click on the icon and choose from the list that appears.
  7. For more actions pertaining to a particular field, check the box.
  8. Click on the settings icon to toggle headers, per your convenience.
  9. Click Save on the top right corner of your page.
  10. Before you can transform fields, you need to map the fields for each element instance to a Virtual Data Resource. Click Add New Transformation.
  11. The console that pops up displays elements along with their respective instances. Select the element instance you want to work with. Click Save & Next.
  12. After selecting the element instance, select the object you would like to map. Click Transform.
  13. Select a field for your mapping and enter a name for it. 
  14. Choose a data type for the field.
  15. Optionally add a Display Name to more clearly identify a field with how it appears in an API provider's UI.
  16. Select the corresponding field on the right to map to the new field.
  17. Continue adding resources until you finish, and then click Try It Out.
  18. You have an option to either directly execute your Virtual Data Resource or save it first.
    Alternatively, you could also click Save on the top right, to save your Virtual Data Resource.

With Automapper

If you would like to build a CO using one of our templates, follow the steps shown below.

  1. On Common Resource V2 UI, click on the Build New Common Resource button on the top right corner.
  2. Choose whether you want to build a new Common Resource using the interface or using JSON. Click Continue.
    • If you want to build a CO using the interface, click 'Build New' and proceed to step 3.
    • If you want to build a VDR using JSON import, click 'Import JSON' option. Type your VDR name and enter the JSON object in the editor. Click Import to import the JSON.
  3. To build a CO using one of our templates, you can search for a template and choose the one most suited to your use.
  4. Click Continue.
  5. On the next screen, you will see all your connector instances. These are grouped into two sections - Suggestions and All Instances.
    The instances grouped under Suggestions are instances that contain objects that are a close match to the template you selected.
    And the All Instances section groups all of your available instances together.
  6. Select the instance most appropriate for your use and click Continue.
  7. After selecting the connector instance, select an object from the list of objects supported by the connector. Similar to the instances, objects too are separated into two sections - the closest match to your selected template grouped under Suggestions while all the objects available for the connector are grouped under All objects.
  8. Click on Continue.
  9. Enter a name for your VDR and click Create VDR.
  10. Usually a screen as shown below appears and you'd require to manually add field names to map them with the object definitions on your template.
    But with the Automapper, you have the option to have these fields populated automatically.
  11. You will now see automatic mappings between the object definitions on your template and the transformation fields. You may edit them as you please.
  12. You can click on the three dots next to the Try It Out button to perform more actions.
    Click on Add Custom JS to enhance your transformation using customized JS. For some connectors we display comments in this section, to make it more convenient for you in scenarios where the same Common Resource definitions can be mapped to different fields based on some conditions.
  13. The fields to be mapped under different conditions are displayed in the comments. You would need to map those fields to Common Resource definitions manually as you would know the conditions being used. Click on the Save button to save the transformation.

The Common Resource Automapper saves time and effort for the user by automatically suggesting templates. You would not require to manually add each and every field from scratch and also have the flexibility to make any enhancements or changes depending on your requirements.