Tuesday, 18 July 2017

Combine Two Column into a single using Calculated Column in Calculation View

Scenario:

BUKRS – Company_Code
BUTXT – Company_Name

Note : (BUKRS and BUTXT) field should be in the single Column.

For example:

Company_Code: 01
Company_Name: SAP AG

Output looks like :

          1    - SAP AG




Solution:

  1. Create calculation dimension View for material. Here it named as CV_COMPANY_CODE.
  2. Use the T001 and TVKO and TVKOT tables.
  3. Drag and drop T001 and TVKO and TVKOT tables from HANA_EVA Schema in a separate projection node and rename the column fields in both the table by using below description.
  4. Then Join the tables using join nodes:
  5. Join 1:
  6. Join 2:
  7. Then join the join node 2 to the Projection node and select the required fields.
  8. Finally it looks like:
  9. To create a new column which helps to join the two column.we have to create “Calculated Column”. Here I named it as “COMPANY_CODE_WITH_NAME”.
a.       Here I’m going to join the two fields “BUKRS” (i.e., Company_code) and “BUTXT” (i.e., Company_Name”).
b.      We have to write an expression for join the two columns:
c.       Expression: “BUKRS” + ‘-‘ + “BUTXT”
d.      Validate your Expression by clicking “validate syntax”.
e.       And click Ok.




10. Then validate and activate the view.
11. Results:


NOTE:
The last column shows the combination of two fields.

Thank you for visiting my blog...
Share your Comments...










1 comment:

  1. Thank you so much for the detailed explanation on CC, it was so perfect to understand the scenario very easily, and its really good to learn from this and doing a wonderful support for learners thanking you once again

    ReplyDelete