Beruflich Dokumente
Kultur Dokumente
1
1. IMPLEMENTING ATTRIBUTE VIEW WITH CUSTOMER
Attribute view:
2
Provide name<provide description<click ok
3
Provide name as SD <provide description <click ok
4
Right click on sub package<new<click on attribute view
5
Search for table KNA1<click on table<click ok
6
Again click on plus icon<enter table T005T<click ok
Connect KNA1 LAND1 to T005T LAND1 to get output as LANDX <select LANDX as output
coloumn
Text join:text join is used to fetch the description based on user's session language. Once we
implement the text join in sap hana, it automatically finds out user's language and gives
description in that language.
7
Again click on plus object<select T005U table<click ok
Join KNA1 LAND1 to T005U LAND1 because regions are specified with country
8
Join KNA1 REGIO to T005U BLAND<select output coloumn as BEZEI
9
Click on semantics<select key attribute as KUNNR
Key attributes:
Key attribute is a kind of primary key for the attribute view. But, it doesn’t prevent the
Passage of duplicate values. It is basically needed to determine the join execution order
At the run time when multiple tables are used in an attribute view.
In attribute views there is one mandatory step. Whatever keys in the table one key?
Label mapping:
Mapping is also called as description mapping. For example if a1 has a label column
B1, then you can rename b1 to a1.description. The related columns appear side by
10
Click save and validate<click save and activate
Use of assign object: in the select change dialog, either create a new id or select an
existing change id that you want to use to assign your change
11
Click on data preview
12
Output in different language:
13
Click save and validate<click save and activate<click on data preview<click on raw data
14
2. IMPLEMENTING ATTRIBUTE VIEW WITH MATERIAL
Attribute view:
15
Provide name AT_MATERIAL<provide label<select subtype as standard <click finish
16
Select table MARA<click ok
17
Again click on plus icon <add table MAKT<click ok
Text join: text join is used to fetch the description based on user's session language. Once we
implement the text join in sap hana, it automatically finds out user's language and gives
description in that language.
19
Click on semantics<provide MATNR as key attribute
Key attribute is a kind of primary key for the attribute view. But, it doesn’t prevent the passage of
duplicate values. It is basically needed to determine the join execution order at the run time when
multiple tables are used in an attribute view.
In attribute views there is one mandatory step. Whatever keys in the table one key we need to
define inside an attribute view
20
Label mapping:
Mapping is also called as description mapping. For example if a1 has a label column
B1, then you can rename b1 to a1.description. The related columns appear side by
21
<assign an object<click finish
Use of assign object: in the select change dialog, either create a new id or select an
existing change id that you want to use to assign your change
22
Click on raw data<to get output
23
Click additional properties<select locale<click apply<click ok
Click save and validate<click save and activate<click on data preview<click on raw data
24
3. IMPLEMENTING ATTRIBUTE VIEW WITH COMPANY CODE
Attribute view:
Attribute views are dimensions, master data.
Attribute views are used to join to a dimension or attribute view.
In most cases used to model master data like entities (like product, employee, business partner)
Highly re-used and shared in analytic- and calculation views
25
Right click on sub package<new<click on attribute view
26
Provide name as AT_COMPANY CODE<provide label<click finish
27
Select T001 table
28
Join T001 BUKRS to TVKO BUKRS<join type as inner join <select required output columns
29
Join TVKO VKORG to join TVKOT VKORG<join type as text join<language as SPRAS<<select
VTEXT
30
Join T001 WAERS to TCURT WAERS<select ltext<join type as text join<language as SPRAS
31
Provide descriptive mapping:
Mapping is also called as description mapping. For example if a1 has a label column
B1, then you can rename b1 to a1.description. The related columns appear side by Side during
data preview
32
Open data preview <click on raw data
33
ck additional properties<select locale<click apply<click ok
Click save and validate<click save and activate<click on data preview<click on raw data
34
4. IMPLEMENTING CUSTOMER ATTRIBUTE VIEW OF TYPE
SHIPTOPARTY (DERIVED VIEW)
Derived attribute view:
In some business cases, it is required to use the same attribute view more than once. (Example:
Two logical join of different join types but defined on the same attribute view.)
Another example, Sales table has 3 dates i.e. Sales_Open_Date, sales_Closed_Date,
Sales_Begin_Date. All these columns should be joined with the date attribute view separately
In such cases, one can derive an attribute view using the base view which acts as reference to the
base attribute view. The derived attribute view will be opened in the read only mode. The only
Editable field will be its description.
The derived attribute view will act as a reference to its base attribute view.
35
Expand package< Right click on sub package<click new<click attribute view
36
Click on browse<expand package<expand sub package<expand attribute views<click base
attribute view customer<click ok
Click finish
37
In customer view the color will be like this
38
It means derived view is in display mode we cannot change the object
Only we can change the description except this we cannot do any changes in derived view
39
If we want see more properties:
Click on data foundation<click on free space<properties<we can see engine as join <base attribute
view
This view will change only when base attribute view will be change
40
Save and validate<save and activate
41
We can see same output in SHIPTOPARTY
Go to AT_SHIPTOPARTY view
42
Output in different language:
43
Click save and validate<click save and activate<click on data preview<click on raw data
44
Attribute views are dimensions, BW characteristics or master data.
Attribute views are used to join to a dimension or attribute view.
In most cases used to model master data like entities (like product, employee, business partner)
Highly re-used and shared in analytic- and calculation views
45
Provide name AT_BILLTOPARTY<provide label<Click copy from<browse
46
Click finish
47
Click save and validate<click save and activate
48
<assign an object<click finish
Use of assign object: in the select change dialog, either create a new id or select an
existing change id that you want to use to assign your change
49
Output in different language:
50
Click save and validate<click save and activate<click on data preview<click on raw data
Time attribute is based on time period. For e.g. you have a date filed in your views and you want
to calculate the aging (no of years) based on the date field’s they this calculated attribute you can
call as time attribute.
In general, the time attribute view would normally be created based on time dimension table
(_SYS_BI.M_TIME_DIMENSION)
51
How to create an attribute view:
53
Click on semantics<select DATE_SQL as key coloumn
Key attribute is a kind of primary key for the attribute view. But, it doesn’t prevent the
Order at the run time when multiple tables are used in an attribute view.
In attribute views there is one mandatory step. Whatever keys in the table one key we need to
define inside an attribute view
54
Click save and validate<click save and activate
Use of assign object: in the select change dialog, either create a new id or select
55
Click on data preview
56
7. IMPLEMENTING TIME ATTRIBUTE VIEW WITH FISCAL CALENDER
Time attribute is based on time period. For e.g. you have a date filed in your views and you want
to calculate the aging (no of years) based on the date field’s they this calculated attribute you can
call as time attribute.
In general, the time attribute view would normally be created based on time dimension table
(_SYS_BI.M_TIME_DIMENSION)
57
How to create an attribute view:
Provide name at time<provide label<select sub type as time<choose calendar type as fiscal<select
variant schema<select variant<click finish
58
Using 'generate time data' option, the sys (_SYS_BI.M_FISCAL_CALENDAR) table are loaded
with data for the period entered.
59
Click on semantics<select DATE_SQL as key coloumn
Key attribute is a kind of primary key for the attribute view. But, it doesn’t prevent the
Order at the run time when multiple tables are used in an attribute view.
In attribute views there is one mandatory step. Whatever keys in the table one
60
<assign an object<click finish
Use of assign object: in the select change dialog, either create a new id or select
61
Click on raw data<to get output
Filters are expressions which limit the data that is retrieved. For instance you can restrict the data
62
Retrieved based on the date or SAP client using filter expressions
63
Provide name<provide description<click ok
64
Provide name as SD <provide description <click ok
65
Provide name AT_CUSTOMER<provide label<select subtype as standard <click finish
66
Click on plus icon to add objects
67
Again click on plus icon<enter table T005T<click ok
Connect KNA1 LAND1 to T005T LAND1 to get output as LANDX <select LANDX as output
column
Text join: text join is used to fetch the description based on user's session language. Once we
implement the text join in sap hana, it automatically finds out user's language and gives description
in that language.
68
Again click on plus object<select T005U table<click ok
69
Join KNA1 LAND1 to T005U LAND1 because regions are specified with country
70
71
Click on semantics<select key attribute as KUNNR
Key attributes:
Key attribute is a kind of primary key for the attribute view. But, it doesn’t prevent the
Passage of duplicate values. It is basically needed to determine the join execution order
At the run time when multiple tables are used in an attribute view.
In attribute views there is one mandatory step. Whatever keys in the table one key?
We need to define inside an attribute view
72
Provide label mapping
Label mapping:
column B1, then you can rename b1 to a1.description. The related columns appear
73
Click on data preview
74
Click raw data<to get output
We want to see customers only belong to US country then we create a design time filter
Go to view < apply filter on LAND1 < Right Click on LAND < Apply Filter
75
Select operator
76
Click ok
77
<click data preview<click raw data
78
9. IMPLEMENTINGCALCULATED COLUMN INSIDE A ATTRIBUTE
VIEW
Calculated Column:
It is an additional column which can be created by us, the results of which are calculated at
runtime based on the existing column and using functions, input parameters and constants.
79
Provide name as AT_COMPANY CODE<provide label<click finish
80
Select T001 table
81
Again Click plus icon<add TVKO table<click ok
Join T001 BUKRS to TVKO BUKRS<join type as inner join <select required output columns
82
Again click on plus icon<add TVKOT table<click ok
Join TVKO VKORG to join TVKOT VKORG<join type as text join<language as spras<<select
vtext
83
Again click on plus icon<select TCURT table<click ok
Join T001 WAERS to TCURT WAERS<select LTEXT<join type as text join<language as spras
84
Click on semantics<select BUKRS as key column
Mapping is also called as description mapping. For example if a1 has a label column
B1, then you can rename b1 to a1.description. The related columns appear side by Side during
data preview
85
Click save and validate<click save and activate
86
Right click on calculated columns<click new
87
Here
we can see various functions available categorized into different sections like
Conversion Functions
String Functions
Mathematical Functions
Date Functions
Misc Functions
88
Click ok
89
By this we can say that calculated columns are very useful in SAP HANA and has good amount of
functions that can be used to build the same. If we need any help on the syntax of the function or
how different functions works, we can use the symbol ‘’ in calculated column editor screen
Calculated columns are the additional information we create based on the existing columns
available at data base level.
If we create calculated column at attribute level, that is going to act as just as attribute
If we create a calculated column at either analytic view or at calculation view, then we can choose
whether it should act as an attribute view or as a measure.
90
Provide the details and click on finish
91
Click on + icon at data foundation<-type in KNA1<-select KNA1 (BEST) <-click on ok
92
Click on + icon<-type in T005T<-select T005T (BEST) <-click on ok
93
Click on + icon at data foundation<-type in T005U<-select T005U (BEST) <-click on ok
94
Now, you have to select the required columns from these tables
95
Select KUNNR, LAND1, NAME1 and REGIO in KNA1 table; select LANDX in T005T table;
select BEZEI in T005U table
96
Link a join between LAND1 (KNA1) and LAND1 (T005T); Link a join between LAND1 (KNA1)
and LAND1 (T005U); Link a join between REGIO (KNA1) and BLAND (T005U)
97
Make sure all the join types are text join and language column is SPRAS<-click on semantics
98
Let us do descriptive mapping between (KUNNR, NAME1); (LAND1, LANDX) and (REGIO,
BEZEI)<-select KUNNR as key attribute
99
Save and validate<-save and activate
100
Click data preview
101
View the output data by clicking on raw data
102
Provide name, label, data type, length<-type in “KUNNR”+‘–’+“NAME1”<-click on validate
syntax
Expression is valid<-click ok
103
Click ok
104
Now, we can see that the calculated column “KUNNR_NAME1” has been created
105
Activation completed successfully
106
Click raw data<- Now, you can see that the column “KUNNR_NAME1” has been created and we
can view the data in that column
107
I0. IMPLEMENTING JOIN ENGINE IN ATTRIBUTE VIEW
Join engine:
This engine is used when we execute any Attribute View in HANA or run native SQL on more
than one table with join condition.
If there are any calculations involved either in Attribute View or in native SQL then Join Engine
will use Calculation Engine for calculations or fetch the result.
108
Right click on sub package<new<click on attribute view
109
Click on plus icon to add objects
110
Select required output columns
Connect kna1 land1 to T005T LAND1 to get output as LANDX <select LANDX as output column
111
Join type as text join<language as SPRAS
Join KNA1 LAND1 to T005U LAND1 because regions are specified with country
112
Join type as text join <language as SPRAS
113
Click on semantics<select key attribute as kunnr
114
Provide label mapping
116
Output in different language:
117
Click additional properties<select locale<click apply<click ok
Click save and validate<click save and activate<click on data preview<click on raw data
118
11. IMPLEMENTING ATTRIBUTE VIEW WITH TEXT JOIN
Attribute view:
TEXT JOIN:
A text join is used to obtain language-specific description. It retrieves the descriptions for a
column from a text table based on the user’s session language. The text tables contain
description for a column value in different languages.
Go to remote desktop connection
Click all programs<-select hana studio
We can use text join in three different models
Attribute views
Analytic views
Calculation views
119
Enter ip address and click connect
120
How to create a package:
121
How to create a sub package:
122
Create another sub package and click ok
123
Right click on sub package<new<attribute view
124
Click on data foundation plus icon to add objects
125
Select required fields for output
126
Connect KNA1 LAND1 to T005T LAND1 to get output <select LANDX as output column
127
Join KNA1 LAND1 to T005U LAND1 because regions are specified with country
128
Click on semantics<select key attribute as KUNNR
Key attributes:
Key attribute is a kind of primary key for the attribute view. But, it doesn’t prevent the
Passage of duplicate values.
It is basically needed to determine the join execution order at the run time when multiple
tables are used in an attribute view.
In attribute views there is one mandatory step. Whatever keys in the table one key we need
to define inside an attribute view.
Label mapping:
We can choose to associate an attribute with another attribute description.
Label mapping is also called as description mapping.
129
Click save and validate<click save and activate
130
<create an object<click ok
131
Click on data preview
132
12. IMPLEMENTING ATTRIBUTE VIEW WITH INNER JOIN
Attribute view:
Inner Join:
The inner join select the records that match in both the tables
Inner join should be used if referential integrity is ensured.
Inner Join is much faster that Outer Join thus is the preferred solution if possible from
semantically perspective.
Inner Joins can be used to join different master data tables to a joint dimension Analytical
Views.
Inner Joins can be used if referential integrity cannot be ensured
133
Provide name as AT_INNER_JOIN and click finish
134
Select T001 table and click ok
135
Select TVKO and click ok
136
Select TVKOT table and click ok
137
Select TCURT table and click ok
138
Define relationship between TVKO BUKRS to T001 BUKRS and provide join type as Inner
Inner Join:
The inner join select the records that match in both the tables
Inner join should be used if referential integrity is ensured.
Inner Join is much faster that Outer Join thus is the preferred solution if possible from
semantically perspective.
Inner Joins can be used to join different master data tables to a joint dimension Analytical
Views.
Inner Joins can be used if referential integrity cannot be ensured
Define relationship between TVKO VKORG TO TVKOT VKORG and provide join type as Text
join
139
Define relationship between T001 WEARS TO TCURT WEARS and provide join type as Text
join
140
Select label columns
141
Assign objects for a change
142
Click on raw data
143