Sunday, 22 October 2017

Implementing Merge Transformation:


  • Merge Transformation is used to combine the multiple input data sets into a single output data set.

Steps :-

  • Pop-up will appear.
  • Enter the Data Flow name , Description and click on Finish.

  • To import the Tables , Double click on ECC Data store.
  • Click on Tables.

  • Click on Import Objects by Name.
  • Enter table name.
  • Click on Finish.
  • Looks like,
 

  • Click on Save.

  • Click on Data Flow.
  • Drag and Drop the tables into Data flow.
  • Drag and drop Query transformations.
Note :

  • Query is used to join and filter data from multiple sources, map and transform data from source to target column.
  • Multiple source structure match ( Fields type and order must be same ).



  • Drag and drop Query transformation for CE1IDEA table.
  • Drag and drop another Query transformation for CE2IDEA table.
  • Double click on Query Transforms and rename Query as Actual and Plan.

  • Link between CE1IDEA and Actual.
  • Link between CE2IDEA and Plan.
  • Click on Actual query Transform.Then we can see input schema.
  • In input schema, filter columns.
  • In search, enter column name. Select that column and drag and drop into Output Schema.

  • Similarly ARTNR , BUKRS , VKORG , HZDAT ,VV010 drag and drop from Input Schema to Output schema.
  • Click on plan.
  • Now we see input schema.
  • Search for fields KNDNR , ARTNR , BUKRS , VKORG , HZDAT ,VV010, VV070 drag and drop from Input Schema to Output schema as similar as Actual Query Transform.


  •  Drag and drop the Merge transformation.
Note : Merge is used to combine incoming data-sets, producing a single output data-set with the same schema as the input data sets.

  • Double click on Merge Transform , Rename the merge as ACUTAL, PLAN.
  • Drag the link from Actual query transform  to ACTUAL, PLAN Merge transform.
  • Drag the link from Plan query transform  to ACTUAL, PLAN Merge transform.
  • See Input schema and output schema.
  • Drag and drop template table.
  • Pop-up will appear.
  • Click on Data store browser.
  • Select the Destination and click on Ok.
  • Enter the schema name and Destination Table name.
  • Click on Ok.
  • Looks like,
  • Join link from ACTUAL, PLAN  Merge Transform to Template table.


  • Click on auto arrange.
  • Looks like,


To differentiate source data ( CE1IDEA and CE2IDEA ) , add the indicator field to each query transform.

  •  Click on Plan Query transform.
  • Click on new field in Output schema.
  • Enter the field name and give the constant value in Mapping expression.
  • Similarly click Actual Query transform and add Indicator field.
  • Click on Validate.
  • Pop-up will appear.
  • Click on SAVE
  • Click on Execute.

  • Select the Job Server and click on Finish.
  • Looks like,
  • Click on View Trace log.

  • Looks like.

  • Go to HANA studio -> Schema -> Tables.
  • Right Click on Table -> Open Data preview.
  • Analysis.

1 comment:

  1. Nice information.Thanks for sharing.I know your transformation in simple way.But one thing in the merge transformation when different format of data sets then how to convert single output data set?

    SAP HR Training in Chennai
    SAP SD Training in Chennai
    BEST SAP BASIS Training in Chennai

    ReplyDelete