SAP Table Connector > Mappings and mapping tasks with SAP Table > Mapping with an SAP Table source example
  

Mapping with an SAP Table source example

You can create a mapping to read data from a single SAP object and write the data to a target object.
You can read data from an SAP purchasing document header, the EKKO table, and write the purchasing details to any target.
In this example to read data from the EKKO table and write the data to a flat file target object, perform the following steps:
  1. 1Define the mapping.
  2. 2To configure an SAP Table source, select an SAP Table connection and select the EKKO table.
  3. 3To configure a flat file target, select a flat file connection, specify a flat file object, and map the source and target fields.
  4. 4Save the mapping and create a mapping task.

Step 1: Define the mapping

    1To create a mapping, click Data Integration > New > Mappings. Select Mapping and click Create.
    2Enter a name and description for the mapping.
    The following image shows the New Mapping dialog box:
    The name of the mapping that you want to map with an SAP Table source.
    3Click OK.

Step 2: Configure the SAP Table source

    1To configure an SAP source, on the Transformation palette, click Source.
    2In the Properties panel, on the General tab, enter a name and description.
    3Click the Source tab to configure source details.
    4Specify an SAP Table connection as the source object connection.
    5Specify the source type as Single Object and click Select.
    6In the Select Source Objectdialog box, select the EKKO table,
    7Click Query Options in the Source tab to specify any filter and sort options for the SAP Table object.
    8Click Advanced to specify the advanced source properties.
    The following image shows the source details page:
    The configured source properties to map with an SAP Table source.

Configure an ABAP CDS view as an SAP source

To read from an ABAP CDS view, configure the ABAP CDS view as the source in a mapping.
    1On the Transformation palette, click Source.
    2In the Properties panel, on the General tab, enter a name and description.
    3Click the Source tab to configure source details.
    4Specify an SAP Table connection as the source object connection.
    5Specify the source type as Single Object and click Select.
    6In the Select Source Objectdialog box, select the CDS view object:
    The following image displays a CDS view object:
    7When you select a CDS view, on the Fields tab, you can view the mandatory and optional parameters:
    8Click Query Options in the Source tab to specify any filter and sort options for the CDS view:
    The following image shows the basic filter options configured for the CDS view:
    9Click Advanced to specify the advanced source properties.

Configure an ABAP CDS view as a lookup

You can configure an uncached lookup in a mapping to look up data in an ABAP CDS view.
    1From the Transformation palette, add a lookup.
    2In the Properties panel, on the General tab, enter a name and description.
    3On the Lookup Object tab, configure the lookup object details.
    1. aSpecify an SAP Table connection for the lookup object.
    2. bSpecify the source type as Single Object.
    3. cIn the Lookup Object field, click Select, and then select the CDS view object as the lookup object.
    4On the Lookup Condition tab, specify the lookup condition:
    5On the Advanced tab, do not select the Lookup Caching Enabled checkbox, and then specify the lookup properties:

Step 3: Configure the flat file target

    1To add a flat file Target transformation, on the Transformation palette, click Target.
    2On the General tab, enter a name and description.
    3Draw a link to connect the Source transformation to the Target transformation.
    4Click the Target tab to configure the flat file target details.
    5Specify a flat file connection as the target connection.
    6Select the target type as Single Object and click Select.
    7Specify a flat file object.
    The following image shows the target details:
    The configured flat file target details.
    8To preview fields, click Incoming Fields.
    The following image shows the incoming field details:
    The configured incoming fields to map with an SAP Table source.
    9Click Field Mapping and map the fields that you want to write to the target.
    The following image shows the field mapping details:
    The configured field mapping details in the Field Mapping tab.

Step 4: Save the mapping and create a mapping task

    1Click Save > Save and New Configuration Task.
    The New Mapping Task page appears.
    2Enter a name and description for the task.
    3Select the runtime environment that contains the Secure Agent you want to use to access SAP tables.
    The following image shows the mapping task details:
    The configured mapping task details to map with an SAP Table source.
    4Click Nextto configure the schedule and advanced options.
    5Save and run the mapping task.