Quantcast
Channel: SCN : Blog List - SAP HANA and In-Memory Computing
Viewing all 902 articles
Browse latest View live

JDE Date Conversion in SAP HANA

$
0
0

I spent some considerable time investigating for any standard option to convert the date from JD Edwards (JDE) standard "CYYDDD" date format to the humanly recognizable Gregorian Date, but there seems to be no known function available out of the box.

 

For those who are new to the concept of JD Edwards date (like me), here is a brief intro.


In JDE, the format for Date is C-YY-DDD. (C for Century, YY for the two digit year and DDD for a number between 1 to 365 (or 366 for leap year)) Since JDE was invented in the 20th century (obviously), I believe they started this format which supports for only dates starting year 1900, (as I understand, JDE does not support dates before the year 1900).


Here are a few examples of JDE dates and their equivalent Gregorian date.

115141 - May 21, 2015

102317 - November 13, 2002

99054 - February 23, 1999

 

So basically if the JDE date is 5 digit, C in the CYYDDD is 0 (zero), which indicates that the date is in the 20th century (i.e. starting year 1900 and before year 2000), and if it starts with 1 (C in CYYDDD – century), then it is in the 21st century starting year 2000.

 

It looks like a difficult conversion at the first look, but in fact, it is simple on a little bit of digging and the date function of Microsoft Excel can convert this easily.


Similarly, using the standard date function, this can be easily achieved in SAP HANA by creating a calculated columns in a SAP HANA calculated view.


Here is the source data that I used as input data for the table used in the calculation view.

P1.png

 

The data type used in the JDE source system was Numeric with precision of 6 and scale of 0 (zero) for the JDE date field as you can see in the image below.

P2.png

 

Since the conversion formula uses some numerical calculations I used the source data with “integer” (INT) data type for the JDE date data while loading it into SAP HANA table.


Below is the table data definition, for which I have used only three column table with the data types as shownP3.png


As mentioned before, for the JDE date fields, I have used INT data type. I created a simple dimensional calculation view on top of this table.

P4.png

With that done, all I have to do was create a calculated column which will convert the JDE date into a Gregorian date column with the correct formula.


The definition of the calculated column is done and below is the formula that I used for the JDE date to Gregorian date conversion

P5.png

 

date(leftstr(string("UpdateDate"+1900000),4))+int(rightstr(string("UpdateDate"),3))-1


Adding the value 1900000 to the JDE date data – and stripping the leftmost 4 characters (after converting it into a string) brings the correct year. And after that it is as simple as adding the digits to arrive at the correct month and date from the JDE date.


As you can see, the breakdown is very simple from the formula and it brings the output in the calculated column as expected.


The interesting power of the column engine date() functions simply generates the output needed. It does give lot of flexibility to calculate the value as needed in any customized environment.


Here is the output in the date preview with the calculated columns in place.

P6.png


Secondly – If the DDD number goes beyond 365 (or 366) as you can see in some test data in the PymtDate - it calculates the correct year based on the DDD number, which is not normal for standard date data - but shown here to see how the formula works, and a standard functionality of the date() function for adding days.The DDD is expected to be under 366.


Also - the standard formula with full addition of YYYYMMDD can also be used which also produces the same result as expected, though I feel the additional concatenation as unnecessary to speed up the calculation


date(leftstr(string("UpdateDate"+1900000),4)+'01'+'01')+int(rightstr(string("UpdateDate"),3))-1


Optional yet recommended post tasks to optimize HANA system performance, stability and ease of performance analysis

$
0
0

Area

DetailsStepWhenReference
General Performance

General SAP HANA Checks: Ensure system is running in

healthy state and critical alerts are picked up.


Recommend to run: post installation, revision update,

recovery, weekly, monthly or quarterly, etc.

run scripts HANA_Configuration_MiniChecks* and examine the result.

Post Installation and

Maintenance

1999993 - How-To: Interpreting SAP HANA Mini Check Results


1969700 - SQL statement collection for SAP HANA


General Performance

SAP HANA Parameter Checks: Ensure relevant

parameters are set correctly


Recommend to run: post installation, after every parameter

changed, weekly, monthly or quarterly, etc.

run scripts HANA_Configuration_Parameters_Rev* and examine the result.

Post Installation and

Maintenance

2186744 - FAQ: SAP HANA Parameters


1969700 - SQL statement collection for SAP HANA


Workload Management

Memory tracing & limit:

 

i) Monitor memory consumption of SQL statements

 

ii) Protect SAP HANA system from excessive memory

usage due to uncontrolled queries/database request



i) global.ini -> [resource_tracking]

-> enable_tracking = on

-> memory_tracking = on

 

ii) global.ini -> [memorymanager]

-> statement_memory_limit = <GB>

 

*Note 2222250: In general it is useful to start with a rather high memory limit. You can e.g. take 30 % of the first 500 GB of the global allocation limit and 15 % of the remaining memory as a starting point:

Global allocation limitstatement_memory_limit
250 GB75 GB
500 GB150 GB
1000 GB225 GB
3000 GB525 GB

 

*check and consult with functional/ business user to adapt to critical business queries on later stage

 

-> statement_memory_limit_threshold = <%>

 

*Optional: statement_memory_limit parameter is taken into account only when total memory usage reaches above threshold. No statements have to be canceled if total memory is below the threshold. This allows expensive statements that consume more than the allowed statement memory limit to finish successfully during periods when a system runs under no load (for example, during the night).


Post Installation and

Maintenance (adjust value depends on system's workload)

1999997 - FAQ: SAP HANA Memory


2222250 - FAQ: SAP HANA Workload Management
Workload Management

CPU measurement:

 

i) Activation of CPU specific data collection and show CPU time

required for processing the statement.

 

Allow CPU time analysis and see what's happening in more

detail in Studio -> Performance -> Thread:

 

*Note 2100040: activation of the CPU time measurement can be

expensive in terms of system CPU consumption and performance, so you should pay attention for these side-effects and deactivate the time measurement if required.


i) global.ini -> [resource_tracking]

-> enable_tracking = on

-> cpu_time_measurement_mode = on [SPS09 and above] | fast [SPS08 and below]


ii) global.ini -> [resource_tracking]

-> service_thread_sampling_monitor_thread_detail_enabled = true


*THREAD DETAIL, THREAD METHOD not populated per default in M_SERVICE_THREAD_SAMPLES view and only written when parameter above is set to true.


Once set to true, THREAD DETAIL and THREAD METHOD will populated

when doing performance analysis with script HANA_Threads_ThreadSamples_*

 

Example of THREAD DETAIL and THREAD METHOD:

Thread Type

Thread Method

Thread Detail

JobWorker

calc

PlanExecutor calc

plan<id>@<host>:<port>/pop<id> (<action>)

MergedogMerger

merging

<x> of <y> table(s):

<table>

SqlExecutor

BatchExecute

(batch size:<size>) <sql_statement>


Post Installation or

activate when needed

2100040 - FAQ: SAP HANA CPU



2114710 - FAQ: SAP HANA Threads and Thread Samples

Workload Management

Workload Management - Activate expensive statements trace.

 

Recommend to activate this trace on a permanent basis due to the

significant value added and small performance overhead

(with reasonable thresold)

 

Extremely useful for SQL optimization and performance analysis.

i) activate expensive statements trace:

 

-> global.ini -> [expensive_statement] -> enable

 

ii) available criteria and indicators that mark a SQL statement as expensive:

 

Runtime: global.ini -> [expensive_statement] -> threshold_duration

 

CPU Consumption: global.ini -> [expensive_statement] -> threshold_cpu

 

prerequisite: enable below

global.ini -> [resource_tracking]

-> enable_tracking

-> cpu_time_measurement_mode

 

Memory Consumption: global.ini -> [expensive_statement] -> threshold_memory

 

prerequisite: enable below

global.ini -> [resource_tracking]

-> enable_tracking

-> memory_tracking

 

*Set to an accpetable thresold value and higher limit to avoid overhead and increase unnessary system resource consumption.

 

Recommended and suggested starting value (based on average to large system workload)

 

threshold_cpu = 300 000 000 us (5 mins)

threshold_duration = 900 000 000 us (15 mins)

threshold_memory = 2 147 483 648 byte (2GB)

 

*adapt the setting above by monitor the number of expensive statement generated in M_EXPENSIVE_STATEMENTS.


Post Installation

Maintenance (adjust value depends on system's workload)

2180165 - FAQ: SAP HANA Expensive Statements Trace


2000002 - FAQ: SAP HANA SQL Optimization


2114710 - FAQ: SAP HANA Threads and Thread Samples

Workload Management

ESS - Collector status

 

Ensure relevant history collections are activated to ease performance

analysis, troubleshooting and investigation, extremely helpful with

complete resource information, usage provided when

execute perfomance analysis scripts, example HANA_IO_KeyFigures_Details_History & HANA_Threads_ThreadSamples_FilterAndAggregation and etc.

UPDATE "_SYS_STATISTICS"."STATISTICS_SCHEDULE" SET STATUS = 'Idle' WHERE STATUS = 'Inactive' AND ID NOT IN (41, 5008, 5024, 5025, 5033, 5035, 5047)

 

If you find disabled actions due to timeout, you can enable them with the following command:

 

UPDATE "_SYS_STATISTICS"."STATISTICS_SCHEDULE" SET STATUS = 'Idle' WHERE STATUS = 'Disabled' AND STATUSREASON = 'timeout'


Post Installation2147247 - FAQ: SAP HANA Statistics Server
Workload Management

ESS - Collector Retention period

 

With the embedded statistics server the retention time for most of the

histories is already 42 days. Recommend to set the retention to more

than a month for month-end perfomance analysis and comparison.


Howeer, you can adapt the retention of each collector based on your

business needs.


UPDATE _SYS_STATISTICS.STATISTICS_SCHEDULE SET RETENTION_DAYS_CURRENT = 42 WHERE ID NOT IN ( 5008, 5024, 5025, 5026, 5033, 5035, 5047 )Post Installation2147247 - FAQ: SAP HANA Statistics Server
System Availability

Increase xsengine log segment

 

The size of a logsegment of the XSEngine is set to 8MB by default. In

certain circumstances (e.g. full log backup volume) this might be too

small as the number of logsegments might grow too fast and reach

the limit of 10240 logsegments, thus, causing system standstill.


Hence, it might make sense to increase the size to 64MB.


ALTER SYSTEM ALTER CONFIGURATION ('xsengine.ini', 'SYSTEM') SET ('persistence', 'log_segment_size_mb') = '64' WITH RECONFIGURE;Post Installation2062080 - SAP HANA DB: Increasing the size of logsegments of XSEngine
General Performance

Increase SQL Plan Cache

 

Performance problem arise when plan cache is set to too  small due

to frequent recompilations of queries.

 

Current default plan cache size is 2GB. Would recommend to set to

3.2GB after fresh installation and adjust accordingly based on

system's characteristic or workload and by monitor the

SQL plan cache usage.

if plan cache is turn off:

 

ALTER SYSTEM ALTER CONFIGURATION (‘indexserver.ini’,’system’) SET(‘sql’, ‘plan_cache_enabled’) = ‘True’ WITH RECONFIGURE

 

Increase plan cache value:

 

ALTER SYSTEM ALTER CONFIGURATION (‘indexserver.ini’,’system’) SET(‘sql’, ‘plan_cache_size’) = ‘<DESIRED_SIZE_IN_BYTES>’ WITH RECONFIGURE


Post Installation

and

Maintenance (adjust value depends on system's workload)

2040002 - Size recommendation for the HANA SQL Plan Cache

 

 

Normally, we will set and configure above as post HANA DB installation tasks. Those are optional yet important post tasks to ensure HANA system is running in optinum and healthy state, as well as provide insightful data to ease performance analysis, troubleshooting and optimization.

 

--- Important ---

Please ensure parameter set is supported by installed HANA revision. Most of the parameters above are only valid to SPS09 and above.


Any valuable feedback from time to time to make this more informative and complete are welcomed and appreciated.


Thanks,

Nicholas Chang

Want to Calculate WORKDAYS_BETWEEN without TFACS Table?

$
0
0

Hi All,

 

We have "WORKDAYS_BETWEEN" In-built Function in HANA to calculate Business Days Between based on Organization Customization.

Prerequisite To use the Function is,

TFACS must be available in the SAP HANA database. (TFACS Table will be available in SAP ECC (on HANA) and BW (on HANA) Systems in SAP<SID> Schema. Else TFACS table would be replicated from a SAP ECC system)

 

For Example like this scenarios,

1. In Native HANA System, (TFACS table won't be there) How can I Calculate Customized WORKDAYS_BETWEEN?

2. I have Table for Holiday List for My Organization. Using this Table only I have to Calculate WORKDAYS_BETWEEN. How can I?

This blog about this.

I am going to explain My experience on How I calculated WORKDAYS_BETWEEN.

 

My Input Data is,

I have to Calculate No.of Workdays From Jan 1 to Jan 31 based on Company leave Calendar.

temp.PNG

 

Company Leave Calendar for Jan 2016:


temp.PNG

 

Based on this Leave Calendar, No.of Work_Days Between Jan 1 to Jan 31 is 20.

 

To calculate WORKDAYS, based on this calendar, I have written the Procedure. I have given the procedure snippets below.

It give me the required output .

 

 

temp.PNG

 

Procedure Snippets:

 

[I have written the Procedure using CURSOR]


DECLARECURSOR CURSOR_1 FOR

SELECT START_DATE, END_DATE  FROM"SCHEMA1"."DAYS_BETWEEN";

 

LOOP_NUM := 1;

 

FOR CURRENT_ROW as CURSOR_1 DO

 

V_TOTAL_DAYS_COUNT := DAYS_BETWEEN (CURRENT_ROW.START_DATE, CURRENT_ROW.END_DATE);       

       SELECTCOUNT(*) INTO V_HOLIDAYS_COUNT FROM"SCHEMA1"."T004_HOLIDAY_CALENDAR"WHERE HOLIDAY_DATE BETWEEN CURRENT_ROW.START_DATE AND CURRENT_ROW.END_DATE;

          

SELECTCOUNT(*) INTO V_ENDDATE_AS_HOLIDAY FROM"SCHEMA1"."T004_HOLIDAY_CALENDAR"WHERE HOLIDAY_DATE = CURRENT_ROW.END_DATE;


   IF V_ENDDATE_AS_HOLIDAY = 1 THEN

        V_BUSINESS_DAYS_COUNT := (V_TOTAL_DAYS_COUNT - V_HOLIDAYS_COUNT) + 1;

      ELSE

        V_BUSINESS_DAYS_COUNT := V_TOTAL_DAYS_COUNT - V_HOLIDAYS_COUNT;

      ENDIF;

          

ARR_START_DATE[LOOP_NUM] := CURRENT_ROW.START_DATE;

ARR_END_DATE[LOOP_NUM] := CURRENT_ROW.END_DATE;

ARR_BUSINESS_DAYS_COUNT[LOOP_NUM] := V_BUSINESS_DAYS_COUNT;

 

LOOP_NUM := LOOP_NUM + 1;

 

ENDFOR;

 

OUTPUT_TABLE = UNNEST (:ARR_START_DATE, :ARR_END_DATE, :ARR_BUSINESS_DAYS_COUNT)

                AS ("START_DATE", "END_DATE", "WORKDAYS_BETWEEN");

 

END

Delta Backups

$
0
0

Hi all,

My name is Man-Ted Chan and I’m from the SAP HANA Product Support team. Today I’m just writing up an add-on to a previous blog and video:

Backup and recovery blog
Storage Snapshot video

This blog will be about a new feature in HANA SP10, delta backups.

What is a Delta Backup?

Starting with SPS 10 delta backups were introduced, this feature allows users to perform backup and recoveries quicker. Delta backups only capture the data changed since the last backupor delta backup, meaning less log backups are read for a recovery.

There are two options available when creating a delta backup:

Differential Backup - stores all data changed since the last full backup.

Incremental Backup - Stores the data changed since the last full or last delta backup. These backups are smaller than the differential backups.

How to Create a Delta Backup?

First choose a user that has the BACKUP ADMIN authorization, in this case we will be using the SYSTEM user.

Right click on the system you would like to create a backup for

image1.png

In the ‘Backup Type’ select the delta backup options

image2.png

image3.png

image4.png

image5.png

This error occurred because I did not create full data backup prior to making this delta backup, as mentioned before delta backups arejust the difference between the current time to the last full backup. The nameserver trace will show the following:

 

[23117]{300068}[-1/-1] 2016-02-12 20:18:27.643831 i Backup           BackupMgr_DeltaBackupTracker.cpp(00845) :  [DBT] received BackupCatalog_DifferentialBackupStartEntry for 1455308307601

[23117]{300068}[-1/-1] 2016-02-12 20:18:27.644641 i Backup BackupMgr_DeltaBackupTracker.cpp(00113) : No data backups found.

 

After we create a full data backup in the nameserver trace we will see:

 

i Backup BackupMgr_DeltaBackupTracker.cpp(00845) :  [DBT] received BackupCatalog_DifferentialBackupStartEntry for 1455309927467

e Backup BackupMgr_DeltaBackupTracker.cpp(00957) : Requested volume 0 not found in backup tracker.

i Backup BackupMgr_DeltaBackupTracker.cpp(00685) :  [DBT] received BackupCatalog_DataDestinationStartEntry for 1455309927467

  1. backup.log will show:

BACKUP   SAVE DATA will write to the following files:

INFO    BACKUP   to file: /usr/sap/xx/HDB00/backup/data/DIFF_DATA_BACKUP_databackup_differential_0_1455309927467_0_1

INFO    BACKUP   to file: /usr/sap/xx/HDB00/backup/data/DIFF_DATA_BACKUP_databackup_differential_1455309613593_1455309927467_1_1
….
INFO    BACKUP   SAVE DATA finished successfully

As we can see the only way to tell it is a differential backup is by the filename

*PREFIX*_databackup_differential

Incremental backups are done the same

image6.png

And the logs are not much different as it just shows the file name is *PREFIX*_databackup_incremental (IE. INC_DATA_BACKUP_databackup_incremental_0_1455310512146_0_1)

Please note that in SPS 10 you cannot create a delta backup in the HANA Cockpit, but this feature is available in HANA SPS 11

HANA SPS 10 will show the delta backup options as disabled

image7.png

Viewing Backups

You can view the backups in the HANA Studio by opening the backup wizard

image8.png

To see our delta backups are not there, to see them we will need to check ‘Show Delta Backups’

image9.png

Please note in the HANA cockpit the delta backups are not visible and not option to view them (SPS 10>

image10.png

What About Recoveries?

Recoveries are performed the same as before

image11.png

image12.png

Please note that if you choose ‘Recover the database to a specific data backup or storage snapshot’ you won’t have the option to select a delta

Select the log area

image13.png

Select the data backup

image14.png

After this we can select the delta backup option

image15.png

Please note that if you selected ‘Recover the database to a specific data backup or storage snapshot’ this option will be grayed out.

S4HANA Basics for a Technology Consultant

$
0
0

“S4HANA”, the new generation business suite has already arrived and am one of the lucky chaps to have a hands-on. 

 

As you know there is lot of material on help.sap.com and SCN to provider a deeper insight on the product, I think I read all of it and want to put everything in this blog.  Well that was sarcasm, in this blog I will summarize my view point as a Technology consultant interested in technology stack and migration paths and scenarios.

 

Architectural changes:

 

“If we have many ways to achieve the very same thing, then we lack standardization on the product”

If you want to give me all the credit for the phrase then please....

 

Well not my words, I picked it form one of the speaker at a conference.  They really make sense.

 

Many people might disagree with the above statement but the argument I have is, we need to invest in many product which give me same functionality.

S4HANA is re-imaged business suite to re-image your business. SAP say they used  "principle of one"  in building S4HANA.

 

Let’s have a look what’s changed in the underlying architecture? How is it different from traditional Business suite?

Traditional Business Suite:


 

Latest Enhancement pack is EPH8 which is in GA and available for any DB, but from here on SAP’s strategy is that there will not be any EHP’s it will be replaced by S4CORE component.

 

S4HANA


What happens in S4HANA?



*Hidden – These components are no longer developed but you can use them if needed.

SAP_FIN and SAP_APPL is no longer separate SC’s but built into S4CORE, so as an admin one less thing to worry when patching the system.

 

Well, if the architecture changed then how about the code? Do I need to tweak the code or can I use the existing code? Well in some case yes but S4HANA minimises it, let’s see how?

 

SAP uses CDS – Core Data Services compatibility views.

As we know the programs are written referencing the data models, in S4HANA we have compatibility views which have the same references as the old data models but the data is populated on the fly.  The program wouldn’t care less if they are calculated on the fly, all they need is data.

The following figure explains more about the CDS compatibility views

 

 

 

Everything is accessible only through Fiori in S4HANA, well that not the case, we can still use SAP GUI with on-premise edition.

 

Migration Paths to S4HANA

There are three transition scenarios to SAP HANA

 

 

     New Implementation or Re-Implementations

This scenario is for Green-Field implementation where you migrate non-SAP to S4HANA or perform data migration from SAP ERP to S4HANA on-premise or Cloud.

 

 

Tools used: 

  • Non-SAP system to S4HANA – File/Object based template upload.
  • SAP Systems to S4HANA – SAP SLT

 

    System Conversions

 

       This scenario is for Brown-Field implementation where customers are already running on-premise ERP system on AnyDB/SAP HANA DB migrating to 

       S4HANA.

 

      

 

        In this scenario we cannot migrate to cloud because, it’s a lift and shift of existing system  and this might not be compatible with the S4HANA cloud

        principles or solutions as we need to retain the existing  customization.

 

    Tools Used:

  • Software Update Manager with DMO option.

 

   I    know there would be lot of questions around from which versions of SAP ERP we can migrate to S4HANA, I would not comment on it because SAP might 

   add/remove the product versions. So the best place is to look at is PAM or Service market place.

 

  Landscape Transformation

   This scenario is also for Brown-Felid implementation where customers are already running on-premise ERP system on AnyDB and migrate to SAP S4HANA

    or merge different ERP systems to single S4HANA on cloud/on-premise.

 

 

 

Tools used:

  • SAP LT

 

This option would be more suitable for business merger scenario where the reduction of landscape would be more efficient to cut IT costs.

 

Well, It's  with the Customers and Consultant to consider which scenario best suits their business need. Each customer scenario is different and the migration path should be carefully chosen in consultation with SAP.



What difference I have seen in the system?

  1. Memory Utilization – In our labs we have installed S4HANA on 128GB server, we noticed S4HANA (1511) is a bit more intensive than SoH. So I wouldn’t consider a 128GB box for Dev & Test Environment and would prefer 256GB appliance (This is purely my view).
  2. You can no longer find 001 and 006 clients; it comes with only 000 Client.
  3. More importantly if you want to use Apps for SAP Activate you need to install the add-on UIS4HOP1.
  4. You need to update the SLD if you want to apply the SPS otherwise LMDB doesn’t recognize the products.

Things keep changing around here!

$
0
0

Fellow Community members, readers and otherwise interested!

 

 

Today I share a change in the organisation of this community.

Last week I returned the moderator and space editor privileges and the duties that come with those.

Lucas, who has done a awesome job as a moderator since he came aboard last year, will take it from here.

If this was a live audience I would ask for a round of applause for him - here instead I can only wish him the best.

 

As to why I took this decision (in case you're wondering - this will take moment, so grab your coffee or ):

When we started the SAP HANA journey in 2010 internally and then 2011 with the global availability of the product, there was no community around it.

In fact, there was very little at all around it. Barely any documentation, nearly no SAP notes and only a few people that had a clue what this new thing did and how it did it.

Finding the right information, people who knew something and correct answers actually was hard.

I had some experience with SDN and sites like AskTom.com, so I knew that answering questions, explaining concepts and discussing specific questions can go a long way when it comes to "enablement" and knowledge sharing.

So, with the hope to spark active community participation I volunteered to do just that in 2011.

 

Fast forward five years on, there are now around 50 blog posts on SAP HANA, several topic leader batches, other communities (SAP internal JAM, stackoverflow) and a SAP Press book 'under my belt'. I managed to talk a couple of SAP colleagues into spending their time here and provided answers as well as opinions to thousands of discussion threads. And let's not forget the countless emails I wrote to colleagues, partners and people I don't even know who asked me questions about HANA - only to be redirected to this very forum .

 

And the community is thriving! There's a good set of regulars (both SAP employees and externals) who share their expertise on a daily basis - just look at the current 12-month leadership board. Every week several blog posts and documents are created and shared.

Of course there's more:

SAP notes on SAP HANA had been massively improved (thanks to Martin for his fabulous FAQ series), the SAP HANA docu. development team churned out guide after guide (Small surprises, well documented, a tip to the hat to Ralph Schroeder and the whole team) and the SAP HANA Academy brought video learning into the SAP HANA area - awesome!

 

In short, the community has grown and developed into a full fledged developer and admin community.

While I like to think that I had a share in that, I also think that my definition of "done" has been reached.

"That bridge got built - let's move on", if you see what I mean.

 

In the wake of the upcoming conversion to 1DX the technical platform for this community will change and that is something that others will do better than I would. I assume that the SAP HANA product management and development teams might continue to provide more and more official material into via this channel. Also, there's tons of high quality user generated that will be converted and available in the new forums.

All in all really nice times for anyone starting off with SAP HANA nowadays.

 

http://s2.quickmeme.com/img/4f/4f15ca326d661fd71177bcd909ec6023cc4b1688aee152ebb815e15a8fc380f8.jpg

 

And that's all folks!

See you around.

Lars

HANA maintenance strategy - the customer's perspective

$
0
0

Hi experts,

 

this week I participated the "DSAG Technologietage" (German speaking user group - technology days) in Hamburg, Germany. There was one session which was pretty interesting and completly different from all others: „WIR FÜR UNS – DSAG-interne Diskussion:Gerede/Gerüchte zum Thema „HANA“ => translated „ we in private – DSAG – discussion: repute / rumor around the topic HANA“

It was not a classic speaker - audience session. The audience were parted into 3 groups. Every group got a question to discuss it on the flip chart.

 

#1 Pro/Cons: The future without oracle in connection with SAP

#2 What do I know about HANA?

#3 What will I do if my company will implement HANA?

 

The results were discussed all together and I wondered about some questions and the nescience.

 

Now I’m familiar with the technical topic HANA since the last 3 years. I’m administrating oracle databases since 9i – so I know both databases pretty good. But I was shocked that since HANA was released in 2010/2011 (“SanssouciDB”) the people know so less about whole truth. Although the last 2-3 years SAP talked about nothing else more than HANA.

The audience included I think 80-90% DBA’s. Employees of any vendor had to leave the session to guarantee a free discussion. The first moment I wondered about this rule, but at the end of the session it was a good decision to talk freely. Don’t panic there was no bashing against any vendor

 

There were a lot of questions, just some of them:

  • How to handle mixed business oracle/HANA
  • Support: OSS + metalink => future? Only OSS?
  • Oracle tools (RMAN/Dataguard/brtools/Grid) => counterparts with HDB?
  • Maintenance strategy for HDB
  • S/4 on oracle?
  • Releasing the command pool of HDB for adapting it to the “any DBs”

 

This discussion inspired me to start the discussion about the maintenance strategy. If you are interesting in one of the other topics, I will create another

I will point out in this blog the questions maintenance strategy. Not the normal details which we can all find by our self via google, sap.help.com and the notes. I will just highlight and critical scrutinize the current strategy.

 

Maintenance strategy

Some facts to give you a briefly overview:

  • For Productive systems are recommended to use the DSP (DataCenterServicePoint – a long term successful test with SAP own productive systems; duration: 2+ weeks) or a newer revision within the same SPS
  • After release of the new SPS (e.g. SPS11) there are only maintenance revisions released for the old SPS (SPS10 with 102.x) for the next 3 months
  • Every 6 months RTC (release to customer) => new SPS
  • Certifications to administrate and install HANA databases which are only valid for 3xSPS => 3x6month => 1,5years after this period you have to recertify yourself on the latest release

 

maintenance_strategy_hana.png

 

Most of the systems which I have administrated could only be maintained with a new patchset once a year, because the testing effort for the application teams are too long to update/upgrade the system, activate new features and verify the functionality. You have to block this people for a long period besides their normal business tasks + projects.

Now you get only 9-months support for your revision. Ok 9 months are short but maybe ok for the most companies. But wait a minute – you have to wait until the DSP is released to test and verify it for your productive system. So this are 6 months minus testing maybe 4-5months. The technical part is pretty easy but the application team are testing the whole year – nothing else! Ok now we shift some application logic from the ABAP application server with CDS (Core Data Services) down to the database. So I have also the responsibility to do regression tests!

After the 3months maintenance revision period, you have to update the system to a newer SPS because no more fixes will be available for it. So if you have an issue there will be no downport to this revision after this period of time, anxious or?

 

Certifications

The latest release is SPS11 which was released at the end of 2015. A training and a certification are still only available for SPS09 (E_HANAINS151). So there is no one for SPS10. SPS11 is going to be released in the next months. I have send an email to sap education to clarify from which date a HANA certification is valid (still no answer since 4 weeks):

- From the date I passed the exam?

- From the date the SPS which the certification based on => so the release time of the SPS

 

So when the exam is available it is possible that one or two newer SPS were released in the meantime. This results in a certificate which is only valid for 6-12 months! How many certifications have you passed for oracle, db2, mssql, maxdb or Sybase? I think max. two - if any. However, but not every year! To install a productive HANA DB you have to be certified and the associate certification is mandatory to can participate to the install exam! So every year 2 exams!!! I think this construct should be reviewed

 

I know HANA is real fast moving technology with a mass of developers behind and with every release a ton of new features. I love to work with it, test new features and of course discover new bugs. But it has to be fit in the maintenance strategy of the customers. The current strategy is not clearly defined and with more logic on the HDB itself and the coming S/4 it will getting more complex.

 

 

What is your experience and strategy with HANA and the other “any DBs”?

 

 

 

Best Regards,

Jens Gleichmann


 

Details

Maintenance strategy: https://scn.sap.com/docs/DOC-67586

2021789 - SAP HANA Revision and Maintenance Strategy

1948334 - SAP HANA Database Update Paths for Maintenance Revisions

Certifications: SAP HANA Education - Course & Certification Program 2015

 


Computing rates using SAP HANA calculation view

$
0
0

When using SAP HANA for analytical purposes, it is interesting to have rates (interest, participation, benefit, etc) being computed by HANA, instead of BI tools, for performance reasons. It is very easy to use a calculation view to compute those rates.

 

Let's take an example the following calculation view, which is using one analytical view (called SALES) and one attribute view (called PRODUCT). There is a join in between the 2 views on PRODUCTKEY, and some objects have been added to output. I want to compute the benefit between the SALESAMOUNT and the TOTALPRODUCTCOST as a rate, the formula would be SALESAMOUNT/TOTALCOST*100 (to get a percentage) so I added the BENEFIT to the output of the JOIN; well this is a MISTAKE, let's see why!

calcview1.PNG

When adding this calculated measure at the JOIN level, it will be aggregated as a SUM (or COUNT/MIN/MAX) which cannot apply to the aggregation of a rate:

calcview3.PNG

We have to add the calculated column at the AGGREGATION level as BENEFIT2 using the same formula, in order to make it work. As shown in the previous image, it will aggregate as "Formula" instead of "Sum", basically it will be computed after the aggregation of the object used inside the formula:

calcview2.PNG

Let's see how this applies to a data set, I have added Customer Name and Product as dimensions, and SALESAMOUNT, TOTALPRODUCTCOST, BENEFIT and BENEFIT2 as measures. Both calculated columns work as expected as we have ALL the dimensions columns in the data preview, it means that there is no difference between the data at the JOIN level vs AGGREGATION level in our the calculation view:

calcview4.PNG

But the error in Benefit shows up fast, as soon as I aggregate a smaller number of dimensions; let's use only the Customer Name as dimension column:

calcview5.PNG

As you can see, BENEFIT shows up like a sum of rates which is not useful, where the BENEFIT2 shows a calculated rate on pre-aggregated values of the SALESAMOUNT and TOTALPRODUCTCOST for each customer.


Official survey on usage of HANA technologies

$
0
0

Hello everyone,

 

SAP HANA Product Management is currently looking for feedback regarding the most used technologies/functionalities of SAP HANA at customers. We are collecting anonymous data from customers directly and the data will be used for future scoping and technological or feature-related questions.

If you are a customer or working with a customer on a SAP HANA implementation, we would appreciate your participation in the survey in order to make our results as promising as possible. The survey is anonymous and will not take up more than 15 minutes of your time to complete. In case you are interested in contributing and impacting the future direction of SAP HANA, please use the link below to participate.

 

https://surveys.sap.com/SE/?SID=SV_5aSYuwwNp1paU2F

 

Thank you for helping us to continuously improve SAP HANA!

 

p.s.: do you know about the newly established SAP HANA presence on the SAP Idea Place?

How to Guide for Tier Based HANA System-Replication

$
0
0

SAP HANA System Replication is used in most of the SAP HANA implmentation for HA or DR scnearios.

 

In this blog, is more for the technology consultants, a bit inclined to technical people 

 

I have installed three HANA instances with same SID and instance number. So won't be talking any thing on installing SAP HANA systems.

 

 

 

Make sure three hosts have different hostname and different IP's.

 

Change the bewlow parameters:

SSL in  global.ini  with value "systempki".

enable_ssl in global.ini to on

 

Change these parameters in all the required HANA systems.

 

Backup the HANA system which you want as a primary. Without a full databack we cannot enable system replication.

 

 

 

 

 

 

use the command "hdbnsutil -sr_state" to see the status of system replication.

 

As we have't registered the secondary system, it doesn't show SITEB.

 

To enable the replication, we need to stop the seconday systems

 

.

 

Register the secondary system:

 

 

 

 

Always use the hostname to configure system replication. We use virtual hostname for a dedicated communication between these systems.

 

Replication status can also be checked in Studio

 

This completes the TIER1 replication of SAP HANA systems

 

 

Enabling tier 2 replication:

In this scenario, data will be replicated from Seconday system.

 

 

 

 

We have used mode of replication as asynchronus for tier2  replication.

Registering the third site:

 

 

 

 

 

 

 

 

 

 

 

 

 

Site A:

 

Site B:

 

 

Site C:

 

 

 

Perfom takeover:

Automatic failover is not supported by default, it is possible to setup auto takeover using SUSE packages and OS specific configuration.

I will detail the standard manual take over procedure:

 

 

 

 

 

I have then disabled the replication on the primary server.

 

 

 

 

 

 

 

 

 

 

Access to Reliable Information is Key for Security Professionals

$
0
0

It is no secret anymore that IT security is one of the key concerns and major challenges in today’s highly networked, connected and digitized world. Information fuels the digitized economy resulting in increasing amounts of information being collected, stored and processed. In consequence, the value of this information has grown vastly. As a result, many parts of our lives and our businesses are progressively dependent not only on the reliability of the information stored but moreover on the security of the IT systems running our world today.

The value of this information has not gone unnoticed – IT systems are a tempting target for many hackers. Those systems are therefore increasingly coming under attack, with new and sophisticated threats appearing on a regular basis.

SAP systems, including SAP HANA, are at the core of many SAP customers’ digitization strategies, both running their critical business applications and processes, and also containing their most valuable assets.

Keeping these systems secure is therefore of critical importance. As the global leader in business software, the security of our customer systems and data is paramount to SAP.

Unfortunately the security of a system cannot be achieved by pressing a “magic security button”. It would be more accurate to picture a jigsaw of different pieces, each with its specific security role, which need to fit together perfectly to create an all-round secure system. The pieces of this jigsaw are made up of a combination of people, processes, operations, products and infrastructure (e.g. networks, identity management, monitoring).

Equally there is no “one-size-fits-all” when it comes to security. Depending on various factors such as the business scenario, IT environment, deployment choices, existing infrastructure, industry or regulatory requirements, the security jigsaw can look very different. To complicate matters, there is also the challenge of coping with a constantly evolving and changing environment, additional regulatory requirements, the emergence of new threats and the discovery of new vulnerabilities. Patching, regularly reviewing then adapting the security environment of business systems is therefore growing in significance.

SAP HANA is designed to be a flexible platform that is at the heart of a variety of different scenarios, deployment options, environments, supporting different types of applications and business processes. SAP stands for secure and reliable software solutions, and SAP HANA security is designed to be flexible and adaptable to address the various security requirements in those different scenarios. This flexibility of SAP HANA allows it to fit into the customer’s specific security jigsaw.

The comprehensive security approach of SAP HANA covers different aspects of security including authentication, authorization, logging, and encryption, as well as tools for secure system set-up, configuration and administration. Additionally there is support for standards-based interfaces that allow for the integration into existing infrastructures.

Last but not least, SAP HANA has been developed according to SAP’s secure software development life-cycle (secure SDL), which is founded on a comprehensive product security strategy (“Prevent – Detect – React”). This strategy is applied across all of SAP’s software development and is based on training, tools and processes, which enable the delivery of secure products and services as well as an efficient security response process.

It is essential that everyone responsible for the security of a SAP HANA system has a thorough understanding of the security aspects of SAP HANA, i.e. how to best fit SAP HANA into the security infrastructure and how to keep systems up-to-date. Easy, fast and direct access to reliable information on all aspects of SAP HANA security is therefore vital to facilitate this understanding.

Hence the creation of a new space dedicated to SAP HANA security at http://hana.sap.com/security. This site will serve as the starting point and go-to place for anyone who needs information about all the different aspects of SAP HANA security. The topics covered there include information on the features and functions provided by SAP HANA in order to implement different access and security policies, alongside information on how to securely configure, manage and operate SAP HANA systems. Additionally, there is general information on how SAP develops secure products and where to find current information about security patches, updates and services provided by SAP to assist customers with running their systems securely.

Want to get started with SAP HANA security right now? Check out http://hana.sap.com/security.There you can find the our SAP HANA Whitepaper on lots more details.

Things keep changing around here!

$
0
0

Fellow Community members, readers and otherwise interested!

 

 

Today I share a change in the organisation of this community.

Last week I returned the moderator and space editor privileges and the duties that come with those.

Lucas, who has done a awesome job as a moderator since he came aboard last year, will take it from here.

If this was a live audience I would ask for a round of applause for him - here instead I can only wish him the best.

 

As to why I took this decision (in case you're wondering - this will take moment, so grab your coffee or ):

When we started the SAP HANA journey in 2010 internally and then 2011 with the global availability of the product, there was no community around it.

In fact, there was very little at all around it. Barely any documentation, nearly no SAP notes and only a few people that had a clue what this new thing did and how it did it.

Finding the right information, people who knew something and correct answers actually was hard.

I had some experience with SDN and sites like AskTom.com, so I knew that answering questions, explaining concepts and discussing specific questions can go a long way when it comes to "enablement" and knowledge sharing.

So, with the hope to spark active community participation I volunteered to do just that in 2011.

 

Fast forward five years on, there are now around 50 blog posts on SAP HANA, several topic leader batches, other communities (SAP internal JAM, stackoverflow) and a SAP Press book 'under my belt'. I managed to talk a couple of SAP colleagues into spending their time here and provided answers as well as opinions to thousands of discussion threads. And let's not forget the countless emails I wrote to colleagues, partners and people I don't even know who asked me questions about HANA - only to be redirected to this very forum .

 

And the community is thriving! There's a good set of regulars (both SAP employees and externals) who share their expertise on a daily basis - just look at the current 12-month leadership board. Every week several blog posts and documents are created and shared.

Of course there's more:

SAP notes on SAP HANA had been massively improved (thanks to Martin for his fabulous FAQ series), the SAP HANA docu. development team churned out guide after guide (Small surprises, well documented, a tip to the hat to Ralph Schroeder and the whole team) and the SAP HANA Academy brought video learning into the SAP HANA area - awesome!

 

In short, the community has grown and developed into a full fledged developer and admin community.

While I like to think that I had a share in that, I also think that my definition of "done" has been reached.

"That bridge got built - let's move on", if you see what I mean.

 

In the wake of the upcoming conversion to 1DX the technical platform for this community will change and that is something that others will do better than I would. I assume that the SAP HANA product management and development teams might continue to provide more and more official material into via this channel. Also, there's tons of high quality user generated that will be converted and available in the new forums.

All in all really nice times for anyone starting off with SAP HANA nowadays.

 

http://s2.quickmeme.com/img/4f/4f15ca326d661fd71177bcd909ec6023cc4b1688aee152ebb815e15a8fc380f8.jpg

 

And that's all folks!

See you around.

Lars

SAP HANA Operation Expert & Developer Summit 2016 (EMEA)

$
0
0

SAPHANAOPSDEVSUMMIT_BANNER_small.jpg

Join us and Get Ready for the Platform for Digital Transformation


May 11-12, 2016

Walldorf, Gemany


For the third year running, we are again looking for SAP HANA Operation Experts and - this is new - for Developers to join us at the SAP HANA Operation Expert & Developer Summit 2016 in Walldorf, Germany. This exclusive get-together of SAP HANA experts leverages in-depth expertise, interactive feedback sessions and networking opportunities. We want to hear about your use cases, your challenges and your successes in developing and operating the SAP HANA Platform.

 

 

Get ready - Get firsthand information on latest SAP HANA development and administration topics.

 

Provide feedback - Your solid product feedback during the breakout sessions will help to improve future releases.

 

Get connected - Expand your network and join us on the evening of May 11th for a casual meet-up and dinner.

 

 

 

May 11th, Developer Summit + Evening Presentations and Networking Dinner

 

We are looking forward to talk to developers with experiences in building native applications and data models using SAP HANA. Contribute in discussions about the new SAP HANA XS Advanced developing and modelling environment, core data services concept, graphical modelling tools, and SQLScript. See full agenda attached.

 

The evening event with keynotes, customer experiences and a networking dinner will close the Developer Summit and open the Operation Expert Summit. See full agenda attached.

 

 

May 12th, Operation Expert Summit

 

We invite IT Architects and Administrators with experiences in operating SAP HANA in their daily work. We want to hear your feedback about cloud & virtualization, landscape and deployment options, mission-critical data center operations, big data, monitoring, administration, and security. See full agenda attached.

 

Get an impression of the 2015 SAP HANA Operation Expert Summit in Walldorf, Germany.

 

 

Regional SAP HANA Summits

More SAP HANA Operation Expert and/or Developer Summits are planned this year in the US and APJ region. Please watch out for the announcements.

 

 

Registration

The sumit is fee of charge but do note that space is limited. Each attendance request will be given careful consideration and we will contact you with a confirmation email to attend the event. In case the number of attendance requests will exceed the capacity of the summit, it might become necessary to restrict the number of participants per customer. The event language is English.

 

Register here for an invitation

(for customers only)

 

Agenda: see attached

SAP HANA upgrade Host Agent error

$
0
0

I upgraded a few HANA databases from SPS9 to SPS10. At the end of the upgrade I received this error.

17:51:14.813 - INFO: Deploying SAP Host Agent configurations...
17:51:14.813 - INFO:
----------------------------------------------------
-------
17:51:14.813 - INFO: Deploying SAP Host Agent configurations on host
'sapheccd01'...
17:51:15.592 - INFO: Calling SAP Host Control web service operation
'DetectManagedObjects' (host: 'hostname', user: '<sidadm>', url:
https://hostname:1129, arguments: 'manifest' -
'/hana/shared/<SID>/hdblcm/SIGNATURE.SMF')
17:51:15.607 - ERR : 500 Can't connect to hostname:1129
(Connection
refused)
17:51:15.607 - WRN : Deployment of SAP Host Agent configurations
failed
on host 'hostname'
17:51:15.607 - INFO:
----------------------------------------------------
-------
17:51:15.607 - INFO: END: Deploying SAP Host Agent configurations
(start:
17:51:14.813 duration: 00:00:00.794)
17:51:15.607 - INFO:
----------------------------------------------------
-------
17:51:16.010 - INFO: SAP HANA components updated

Note: Deployment of SAP Host Agent configurations finished with errors.

I'm still pretty new to SAP, ERP and HANA databases. I have been a DBA for over 10 years on other databases. I know that errors and warnings need to be investigated. I also know that the host agent is important for communication between the host and database. So I opened up an incident with SAP. After sending logs and a little back and forth, SAP support asked me to check to see if anything is listening on port 1129.

When I try to connect to the httpshdblcm I get page not available.

https://<hostname>:1129/lmsl/HDBLCM/index.html

I took a look to see if anything was listening on port 1129. netstat -tnlp | grep 112, it came back with 1128, sapstartsrv was only listening on 1128 and not 1129. I compared a working system to this one and found that the ownership was incorrect for the files in /usr/sap/hostctrl/exec/sec.

root was the owner.

-rw-r--r-- 1 root sapsys 993 Feb 25 2013 xxxxx.crt
-rw------- 1 root sapsys 1847 Jun 4 2014 xxxxx.pse
-rw------- 1 root sapsys 1855 Apr 22 2014 xxxxx.pse_backup
-r-------- 1 root sapsys 81 Jun 4 2014 xxxxx_v2
-r-------- 1 root sapsys 97 Apr 22 2014 xxxx_v2_backup

So I changed the ownership on all the files to <sidadm>:sapsys and restarted the host agent, /usr/sap/hostctrl/exe/saphostexec -restart. Now I see sapstartsrv listening on 1128 and 1129. I tried httpshdblcm again and was given a new error.

"The XML page cannot be displayed
Cannot view XML input using style sheet. Please correct the error and
then click the Refresh button, or try again later".

I came across SAP note 2078425 and found this in the note.

  1. 5. Configure SAP Host Agent to serve the Web UI

By default, during installation or update of the SAP HANA system, hdblcm configures the SAP Host Agent to serve its Web UI. For some reason this might have not happened, for example because of a failure during the installation/update procedure or if the SAP Host Agent had been manually reinstalled afterwards.

To update the integration of hdblcm on the SAP HANA host, run the following command:

<sapmnt>/<SID>/hdblcm/hdblcm --action=update_host --components_registration=none

  1. 6. Restart SAP Host Agent

/usr/sap/hostctrl/exe/saphostexec -restart

Since the hdblcm configuration uses https, 1129 it failed. Now that I have https working, I ran the command in the note and restarted the host agent.

<sapmnt>/<SID>/hdblcm/hdblcm --action=update_host --components_registration=none

I'm now able to open httpshdblcm. The big takeaway for me is, investigate all errors and warnings in the HANA upgrade log. In my case I had other problems as a result of this error.

High Availability - My Testing Experience

$
0
0

We already know HANA High Availability Concept.


temp.PNG


I wanted to test this HANA High Availability feature in My Landscape practically and I completed the testing successfully.

I would like to share this Testing experience.


 

HANA Landscape:


It is 3 Node Scale-Out HANA Landscape.

 

Node-1:     240f1d253      Master

Node-2:     5d67d765b    Slave

Node-3:     89a40ea9a     Standby       

 

Now all the 3 nodes are running fine.

temp.PNG

 

Assume The Slave Node - 5d67d765b was getting crashed.

(For Testing Scenario, I manually stopped Slave node - 5d67d765b using HDB STOP operation)

 

What happened Next  ???

 

Immediately Stand by node - 89a40ea9a  took over the Slave node role and

Slave node - 5d67d765b changed as standby.

 

temp.PNG

 

After few seconds, Stand by node - 5d67d765b back to running status automatically.

 

temp.PNG

I hope this blog might be helpful for you to understand the High Availability feature practically

 

Best Regards,

Muthu


SAP HANA Rules Framework End-to-End Tutorial

$
0
0

Inspired by the excellent series of SAP HANA Rules Framework by the SAP HANA Academy YouTube videos listed by Denys van Kempen, and because I did not have the banking model available referenced in those videos, I decided to start my own SAP HANA Rules Framework 1.0 SPS 07 proof of concept implementation.

 

This blog describes my steps from installing the SAP HANA Rules Framework 1.0 SPS 07 Patch Level 1 and configuring it until creating a HANA Rule and executing a HANA Rule Service with varying HANA Rule Conditions in the end.

 

The SAP HANA Rules Framework 1.0 SPS 07 can be downloaded from SAP Service Marketplace:

SMP.png

At the time of this blog, SPS 07 Patch Level 1 was the latest available version:

HCORULEFW07P_1.png

After extracting the ZIP archive, I install the package with the HANA Application Lifecycle Management Delivery Units Import functionality:

Import Delivery Unit.png

After confirming the import of the Delivery Unit:

Confirm Import of Delivery Unit.png

The imports starts and runs for a little while. Once completed you get a green light and we are ready to proceed:

HCO_RULE_FW.png

Next, back in HANA Studio, you have to create a user called HRF_TECH_USER and grant this user the following, to enable rule service consumption:

 

  • sap.hrf::AllPrivilegesForTechnicalUser application privilege
  • sap.hrf.role.model::HRF_TECH_ROLE role

 

Also, you would have to grant your user a series of HANA Rules Framework Roles:

Granted Roles.png

With that preparation we can configure the HANA Rules Framework via REST API. Please configure basic authentication with your user, that you granted the roles above. As a result, you are rewarded with a success message:

HRF Technical Configuration success.png

And subsequently with access to the Fiori Launch Pad of the SAP HANA Rules Framework at:

 

http://<full_domain_name>:80<instance_number>/sap/hana/uis/clients/ushell-app/shells/fiori/FioriLaunchpad.html?siteId=sap.hrf.ui|app|app2

Launch Pad.png

With the configuration in the bag, we next deploy the SAP HANA Rules Framework Modelling Tools at:

 

http://<hostname>:80<instance_number>/sap/hrf/updatesite

HANA Rules Framework Tools.png

After confirming the license agreement the software gets installed and you will have to restart SAP HANA Studio.

 

Next we build a small Point of Sales data model as the basis for our HANA Rules. You find the SQL scripts for these tables and their contents in the appendix at the end of this blog:

Tables.png

Please do not forget to grant both users _SYS_REPO and HRF_TECH_USER SELECT Privileges with Grant Option to the schema of your user. These are needed for the creation and execution of the Rules Service respectively:

Priviledges.png

Now we create a new XS Project and within that a new Vocabulary based on the tables above:

hpvocabulary.png

For this we join:

 

  • CUSTOMER.ID to SOHEADER.DEBITOR
  • SOHEADER.NUMBER to SOITEM.PO
  • SOITEM.ARTICLE to ARTICLE.PART

 

In addition we activate (marked with an Orange light):

 

  • CUSTOMER.NAME
  • CUSTEOMER.SEGMENT
  • SOHEADER.TOTAL
  • ARTICLE.CATEGORY

Outline.png

To finish our vocabulary, we create an Output Type:

Edit Output.png

Now we got the basis to create our first HANA Rule. In the Fiori Launch Pad of the SAP HANA Rules Framework chose Rules – Mange all rules and create a new HANA Rule:

Segmentation.png

Then add the following conditions. Type forward help will help you immensely with this, especially for the joined condition Category over three intermediate tables:

Edit Conditions.png

Finally Add Output Customer and provide conditions as follows:

  • Conditions: SEGMENT of the CUSTOMER = ‘Y’
  • CATEGORY of the PART of the PO of the DEBITOR of the CUSTOMER = ‘G’
  • Outputs: Customer NAME of the CUSTOMER

Rule.png

Now Activate the Rule and select Rule Services from the Fiori Launch Pad of the SAP HANA Rules Framework and create a new Rules Service as follows:

Rule Service.png

Once you save this Rule Service and Test run it, you get two hits as expected, i.e. the customers in Segment = 'Y' and at least one purchase of a product in Category = 'G':

Test Results.png

Now you can play with the Rule Conditions and check-out the respective Test Results. If you for example changed the Category Condition to ‘P’ and Activate it:

Activate.png

You would only get the one expected Test Result back:

Faigle.png

And when further changing the Segment Condition to ‘X’ and Activate it:

Rule Builder.png

You get back the one customer with Segment = ‘X’ and a product in Category = ‘P’:

Frehn.png

Appendix

 

These are the SQL scripts to create the Point of Sales data model used in this blog. Schema USER will have to be replaced with your user schema:

 

CREATE COLUMN TABLE "USER"."CUSTOMER" ("ID" INTEGER CS_INT,

  "NAME" VARCHAR(8),

  "SEGMENT" VARCHAR(1),

  PRIMARY KEY ("ID")) UNLOAD PRIORITY 5 AUTO MERGE

 

insert into "USER"."CUSTOMER" values(1,'Faigle','Y')

 

insert into "USER"."CUSTOMER" values(2,'Frehn','X')

 

insert into "USER"."CUSTOMER" values(3,'Schuler','Y')

 

CREATE COLUMN TABLE "USER"."SOHEADER" ("NUMBER" INTEGER CS_INT,

  "DEBITOR" INTEGER CS_INT,

  "TOTAL" DECIMAL(5,

  2) CS_FIXED,

  PRIMARY KEY ("NUMBER")) UNLOAD PRIORITY 5 AUTO MERGE

 

insert into "USER"."SOHEADER" values(1,1,70)

 

insert into "USER"."SOHEADER" values(2,2,50)

 

insert into "USER"."SOHEADER" values(3,3,30)

 

CREATE COLUMN TABLE "USER"."SOITEM" ("PO" INTEGER CS_INT,

  "ARTICLE" INTEGER CS_INT,

  "COUNT" INTEGER CS_INT,

  "AMOUNT" DECIMAL(5,

  2) CS_FIXED) UNLOAD PRIORITY 5 AUTO MERGE

 

insert into "USER"."SOITEM" values(1,1,1,50)

 

insert into "USER"."SOITEM" values(1,2,2,20)

 

insert into "USER"."SOITEM" values(2,1,1,50)

 

insert into "USER"."SOITEM" values(3,2,3,30)

 

CREATE COLUMN TABLE "USER"."ARTICLE" ("PART" INTEGER CS_INT,

  "DESCRIPTION" VARCHAR(10),

  "PRICE" DECIMAL(5,

  2) CS_FIXED,

  "CATEGORY" VARCHAR(1),

  PRIMARY KEY ("PART")) UNLOAD PRIORITY 5 AUTO MERGE

 

insert into "USER"."ARTICLE" values(1,'Keyboard',50,'P')

 

insert into "USER"."ARTICLE" values(2,'USB Stick',10,'G')

Get Date Dimension – Quarter start date, Quarter end date, Week Start Date, Month Start Date, Month End Date, Week End Date, Current Quarter start date, Start date of previous quarter and End date of previous quarter

$
0
0

Hello,

 

There are often business requirements to find quarter start date, quarter end date and many other calculated columns for the date.

 

Below formula can be used in calculated column in SAP HANA View 


Few of the below formula is derived based on M_TIME_DIMENSION. An attribute view on this table with the below calculated column can be created and used in any analytical/calculation view.

 

  1. Week Start Date – Gives the date for the first day of week (Here Monday is considered as the first day of the week)

 

     if("DayOfWeek" = '00',"Date",adddays("Date",-int("DayOfWeek")))


    2.  Week End Date – Gives the date for the last day of week (Here Sunday is considered as the    last day of the week)

 

     if("DayOfWeek" = '06',"Date",adddays("Date",06-int("DayOfWeek")))


    3.  Month Start Date– Gives the date for the first day of the month

 

     date("CalMonth")

 

    4.  Month End Date– Gives the date for the last day of the month

 

     if(rightstr("CalMonth",2)='12',adddays(date("CalMonth"+'01'),31),date(int("CalMonth")+1)) – 1


    5.  Quarter Start Date– Gives the first day of the quarter based on input date

     date(

      string(

      string(component("Date",1))

      +

      case(

      string(

                 component("Date",2)),'1','01','2','01','3','01','4','04','5','04','6','04','7','07','8','07','9','07','10','10','11','10'     ,'12','10'

      )))

  

    6.  Quarter End Date– Gives the end day of the quarter based on input date

 

     adddays(date(

      string(

      if("QuarterInt" = 4,string(component("Date",1) +1), string(component("Date",1)))

      + 

      case(

      string(

                 component("Date",2)),'1','04','2','04','3','04','4','07','5','07','6','07','7','10','8','10','9','10','10','01','11','01'     ,'12','01'

      ) ) ),-1)

 

Below formula can be used in SQL/Universe level 


Business generally request for few additional columns/filters at universe level. So, below are few of the calculated date columns -

 

  1. Start of current quarter – Gives the first day of the current quarter

     select

 

     to_date(

     to_char(

     to_char(Year(Current_date))


      ||

 

         casewhen to_char(month(Current_date)) in ('1','2','3') then'01'

         when  to_char(month(Current_date)) in ('4','5','6') then'02'

         when to_char(month(Current_date)) in ('7','8','9') then'03'

         when to_char(month(Current_date)) in ('10','11','12') then'04'end

 

      ) )

 

     from dummy

 

    2.  End of Current quarter – Gives the last day of the current quarter

 

   select

 

   add_days(to_date(

      casewhensubstring(quarter(current_date),6) = 'Q4'then to_char(Year(Current_date) +1)

      else to_char(Year(Current_date)) end

 

      ||

 

      casewhen to_char(month(Current_date)) in ('1','2','3') then'04'

      when  to_char(month(Current_date)) in ('4','5','6') then'07'

      when to_char(month(Current_date)) in ('7','8','9') then'10'

      when to_char(month(Current_date)) in ('10','11','12') then'01'end

 

      ),-1)

 

     from dummy

 

    3.  Start of Previous quarter – Gives the first day of the last quarter

 

     select

 

      CASEWHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q1')

            THEN ADD_MONTHS(TO_DATE(YEAR(CURRENT_DATE)),-3)

 

            WHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q2')

            THEN TO_DATE(YEAR(CURRENT_DATE), 'YYYY')

 

      WHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q3')

            THEN ADD_MONTHS(TO_DATE(YEAR(CURRENT_DATE)),3)

 

            WHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q4')

            THEN ADD_MONTHS(TO_DATE(YEAR(CURRENT_DATE)),6)

 

     end

    from dummy

 

    4.  End of Previous quarter – Gives the last day of the previous quarter

 

     select

 

     CASEWHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q1')

     THEN ADD_DAYS(TO_DATE(YEAR(CURRENT_DATE)),-1)

 

          WHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q2')

     THEN ADD_DAYS(ADD_MONTHS(TO_DATE(YEAR(CURRENT_DATE)),3),-1)

 

          WHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q3')

     THEN ADD_DAYS(ADD_MONTHS(TO_DATE(YEAR(CURRENT_DATE)),6),-1)

 

     WHEN (SUBSTRING (QUARTER (TO_DATE(CURRENT_DATE, 'YYYY-MM-DD'), 1),6,2) = 'Q4')

     THEN ADD_DAYS(ADD_MONTHS(TO_DATE(YEAR(CURRENT_DATE)),9),-1)

 

     End

    from dummy

[SAP HANA Academy] Better Identify Business Content in SAP HANA with the New Enterprise Semantic Services

$
0
0

In a series of three tutorial videos the SAP HANA Academy's Tahir Hussain Babar (aka Bob) shows you how to use Enterprise Semantic Services, a new feature available in SAP HANA SPS 11. Enterprise Semantic Services facilities data discovery by enabling developers and business users to search SAP HANA catalog objects and remote source objects for relevant business content. Part of SAP HANA's Smart Data Integration, Enterprise Semantic Services answers a user's search request by using metadata, semantic information and table contents to build knowledge graphs.


Overview of Enterprise Semantic Services' Admin UI and Demo Tool Kit


Watch the first video of the series where Bob provides an overview of the Enterprise Semantic Services' Admin User Interface and Demo Tool Kit. The Admin UI is used to both set up and configure the system. The Demo Tool Kit provides a business-focused search UI which enables you to find datasets using keyword queries à la a Google engine search. The extraction of the meaning is down by data profiling techniques, such as discovering the business type of a column in a table.

Screen Shot 2016-02-11 at 7.14.01 PM.png

To access the Admin UI navigate to http://ess:8011/sap/hana/im/ess/ui in a web browser. To access the Demo Tool Kit, a sample search UI application, navigate to http://ess:8011/sap/hana/im/ess/demo. You can use either the SAP HANA Web-based Development Workbench or SAP HANA Studio to view ESS's content. Bob opts to use the SAP HANA Studio and has already created a schema connected to his repository. The pair of videos profiled below show how to install the Admin UI and the Demo Kit. Bob log in with his credentials to access both the Admin and Search UIs.


The Admin UI contains four tiles on the front page.

Screen Shot 2016-02-12 at 9.43.59 AM.png

The Publish and Scheduling Monitor allows you to both create and schedule profiling requests. The Request Monitor is an administration tile that allows you to monitor any requests. The Entity Grid Monitor is an access point to the knowledge graphs. The Data Profiling Blacklist indicates which datasets will never be profiled.

Screen Shot 2016-02-12 at 10.26.04 AM.png

The Catalog contains your objects from SAP HANA and a list of schemas. There is also a list of Remote Sources. It is possible to publish an entire schema within a catalog. To publish first drill down into SAP ECC from the Catalog and select a table. You have the option to publish the table immediately or schedule a data profile or a table publishing. You have the option to associate published artifacts with an application scope which will in turn enable you to search for objects only in a specified application scope.

Screen Shot 2016-02-12 at 10.34.36 AM.png

Once you click on publish a green icon will appear next to the table and the schedules table will display what has been executed. These same concepts apply regardless if its a remote source object, a local object, a view or a table.

Screen Shot 2016-02-12 at 11.29.23 AM.png

The Request Monitor tile shows the publishing history. If you drill into a listed object's detail you can see the publication artifact's status and any errors.

Screen Shot 2016-02-12 at 11.37.17 AM.png

The Entity Grid Monitor is essentially the knowledge graph. If you drill down to the object you published you can verify its success. If you go to the schema you can see how many Metadata elements were extracted and the total number of extracted values.


Imagine a workflow where Bob has published an entire schema. In Bob's example it's the FOODMART Database. You can see FOODMART's profiling information in the SAP HANA Studio. The SAP HANA IM ESS schema comes with the ESS back-end system which includes storage and services. Bob drills into the SAP_HANA_IM_ESS_DEMO and does a data preview on the DISCOVERED_CONTENT_TYPES view.

Screen Shot 2016-02-12 at 2.29.47 PM.png

To focus on a certain section Bob adds a filter on RUNTIME_OBJECTS for his FOODMART CUSTOMER table. It's found that the Customer table in the FOODMART schema contains the below objects. One attribute is know as STATE_PROVINCE (technical) but is labeled Region (business).

Screen Shot 2016-02-12 at 2.37.32 PM.png

The PROFILE_ATTRIBUTES view gives you the values for the attributes that have been extracted and indexed. The PROFILED_VALUE_TYPE column tells you the type of extracted value, TIME_VALUES, GEO_VALUES, or ENUMERATED_SET. The CONTENT_TYPE_CODE column tells you whether or not the extracted values correspond to known business types. Its important that values are extracted even if the business type is unknown. The extracted values will become searchable in queries even if they don't have a known business type. These values are indexed using SAP HANA Full Text Indexes.

Screen Shot 2016-02-12 at 2.58.06 PM.png

The ENUMERATED_VALUES view lists groups by the various values in each of the measures. For example, the types of member cards, such as Normal, Golden, Silver, Bronze.

Screen Shot 2016-02-12 at 3.01.35 PM.png

How to use the Demo Tool Kit's Search UI


The scenario in which Bob demonstrate the ESS Semantic Search he imagines he's a business user, with a program that connects via an API, who's searching for the total payment information for a specific insurance claim. While entering the keywords for his search Bob is prompted with potential results.

Screen Shot 2016-03-02 at 10.39.39 AM.png

The EntitySet listed at the top matches the seven keywords Bob entered. The search uses SAP HANA Text Analysis and search capabilities to derive a ranking of the EntitySets it's returned. The view listed at the top, InsuranceClaimPaymentQuery, has the highest scores because it matches all seven words.

Screen Shot 2016-03-02 at 10.42.00 AM.png

Bob enters another search for "number of insurance contracts by premium exempt" and returns a list of SAP HANA Live views that best match his query. Ordinal 1, 4, 5 and 7 all have five key words matching Bob's query.

Screen Shot 2016-03-02 at 11.25.24 AM.png

How the Score Rankings are Derived


In SAP HANA Studio Bob shows how there are 37 different Calculation views in the fspm510 SAP HANA Live View. The Calculation views are ranked according to the objects contained within. On his ESS Semantic Search the InsuranceContractQuery view is ranked higher than the InsuranceContractPremium view. Bob opens both views in SAP HANA Studio to show that InsuranceContractQuery contains a measure while InsuranceContractPremium has zero measures.

Screen Shot 2016-03-02 at 11.31.33 AM.png

Screen Shot 2016-03-02 at 11.31.50 AM.png


Objects that contain both a measure and a dimension are ranked higher than objects that only contain a dimension. Similar rules also exist.

Screen Shot 2016-03-02 at 3.31.37 PM.png

To further show how ESS Semantic Search works Bob queries for "unit sales by product and store canada versus usa from 2006 to 2007". The results demonstrate the role played by extracted values in discovering dimensions hidden in the search query.

Screen Shot 2016-03-02 at 3.30.19 PM.png

By navigating to the SALES Calculation views contained in the foodmart view back in SAP HANA Studio you can verify that its COUNTRY attribute is listed as a dimension.


You also have the option to use a programming like language to search as demonstrated below.

Screen Shot 2016-03-02 at 3.23.23 PM.png

The other tabs available include SEARCH [MATCH] which breaks the results out by EntitySet, Attribute, and Match Annotations and Values.

Screen Shot 2016-03-02 at 3.28.50 PM.png

This search feature is actually just a sample application. You're actually accessing your data using a series of ESS APIs.


Admin UI Install, Setup and Test


In another video in the series Bob shows how to install the Enterprise Semantic Services' Admin UI.

Screen Shot 2016-03-02 at 8.41.40 PM.png

First navigate to SAP support portal from the SAP Service Marketplace. Go to download software, then installation, then choose H (for HANA) from the A - Z Index and log in with your certificate. Go to SAP HANA SDI and then click on Support Packages and Patches. Choose Comprised Software Component Variations, then drill down to HANA ESS 1.0, then # OS Independent and then SAP HANA Database. Select to download SP02 Patch0 for HANA ESS1.0.

Screen Shot 2016-03-02 at 8.52.38 PM.png

Extract the Delivery Unit contained in a TGZ file and then log into your SAP HANA Lifecycle Manger through either your Web-based Development Workbench or your SAP HANA Studio. Go to your Delivery Unit page and import your downloaded TGZ file. You can verify its successful importation via the Transport Overview.


Navigate to the security section of the Web-based Development Workbench in order to grant your HANA user the roles necessary to use ESS. Click the green plus button under Granted Roles and search for ESS. The three roles you must grant are Administrator, Publisher and User.

Screen Shot 2016-03-03 at 9.05.14 AM.png

The User role has access to the ESS consumption (search, suggest and CTID) APIs. This is read only access.


The Administrator can access the Admin UI of ESS and preform administration actions.


The Publisher role has access to the ESS publication API which allows content to published to the entity grid.


Next change the URL to sap/hana/im/ess/ui and log in with the user you recently granted the ESS roles. You now have access to the four Admin UI tiles Bob profiled in the video above.


In a new tab as your user access your Catalog from the Web-based Development Workbench. To test that the work flow works Bob will create a simple table with a single comment using the script below.

Screen Shot 2016-03-03 at 9.44.36 AM.png

Next Bob opens the Publishing and Scheduling Monitor tile and drills down into his User's schema from the Catalog. Bob selects his recently created HELLO_ESS table and chooses to publish it.

Screen Shot 2016-03-03 at 9.48.31 AM.png

To confirm that it's been published Bob opens the Request Monitor tile and confirms that the artifact HELLO_ESS has been successfully published.


To further test Bob opens the Entity Grid Monitor to confirm that the table appears in the tree list view of published artifacts.

Screen Shot 2016-03-03 at 10.00.16 AM.png

Demo Kit Install, Setup and Test


In the next video Bob walks-through the installation of the Demo Tool Kit, which provides the sample ESS Search UI application showcased in the prior videos. The Demo Tool Kit contains both published and unpublished URLs to specify on-demand or unscheduled publication request, which are used to populate the entity grid.

Screen Shot 2016-03-02 at 3.37.29 PM.png

Note that currently (early 2016) the demo kit is not available on SAP Service Marketplace. So you will have to get it through SAP support and/or your SAP contact.


Once you have the Demo Kit delivery unit navigate to the SAP HANA XS Lifecycle Manager to import it. Logon as the system user, go to the Delivery Unit page and import the Demo Kit Delivery Unit.


After logging out as the system user you will need to run a special utility to set up the Demo Kit. So append sap/hana/im/ess/setup/install.html on the end of HANA URL and log in as the system user. You can run setup at anytime especially to confirm that everything is OK if an instance has crashed. You can manually execute some of the settings such as the JobScheduler.


Click on Run ESS Setup and log in as your ESS technical user. Once the installation is finished your technical user's ESS password will be disabled for security reasons. Once it's completed you will get a confirmation that all of the settings are OK.


Next you must grant the proper rights to a user so they can use the Search UI contained in the Demo Tool Kit. You can do this in either the security section of the SAP HANA Web-based Development workbench or SAP HANA Studio. Bob elects to use SAP HANA Studio.


In SAP HANA Studio as the system user drill down into your catalog and open the SAP_HANA_IM_ESS schema. Opening the tables folder will show all of the tables including a batch of text index tables and a lot of objects. This ESS schema acts as your repository.


Open a new SQL console and run the below syntax to grant your user (Bob's is called SHA) access to the Demo Tool Kit.

Screen Shot 2016-03-03 at 4.17.16 PM.png

Next run the five commands shown below to grant privilege on the IM ESS on various views from the Administrator role. Bob's user, SHA, is an Administrator.

Screen Shot 2016-03-03 at 4.22.12 PM.png

Screen Shot 2016-03-03 at 4.22.26 PM.png

Once these seven statements have been executed go to the Search UI by appending sap/hana/im/ess/demo to your HANA URL. Log in with your user's credentials. It must be a system user or a user that has execute rights on the SYS repo activated role procedure, has access to the SQLcc administrator role, is an ESS role user and has the ESS Demo role.

Screen Shot 2016-03-03 at 4.31.06 PM.png

First you will encounter the configuration screen shown above. Select the Configure ESS for imported delivery unit option to initialize your package. Bob demonstrated how to use the Search UI in the earlier video. Bob tests his Search UI by entering hello world ess and returns the Entityset he created in the previous video.

 

For more tutorial videos about What's New with SAP HANA SPS 11 please check out this playlist.


SAP HANA Academy - Over 1,300 free tutorials videos on SAP HANA, SAP Analytics and the SAP HANA Cloud Platform.


Follow us on Twitter @saphanaacademy and connect with us on LinkedIn to stay abreast of our latest free tutorials.

Demystifying SAP HANA Administration

$
0
0

This is the first in a series of blogs by SAP instructors, designed to “demystify” some of the hottest topics in SAP technology. We’ll also provide links to information that can help you expand your knowledge. If you have a topic you’d like us to discuss, post a reply to this blog. And of course, we encourage you to comment or ask questions.  We’re here to help each other learn!

 

Since its release, SAP HANA represented a radical change in the direction of SAP's product architecture. As an SAP Instructor, I’ve been wondering how easy it would be to manage the new SAP HANA platform. Can I use platform and administration tools that are currently in place? Or, do I need to learn a new set of gadgets?

 

After reading through some of the documentation available in SAP Learning Hub,and reviewing SAP courses such as SAP HANA Introduction (HA100), SAP HANA - Operations & Administration (HA200), and SAP HANA Implementation and Modeling (HA300), I realized that the learning curve is quite easy – if you get some guidance up-front. That’s why I’m here! This blog will demystify SAP HANA administration by listing tools you can use to handle periodic administrative tasks, and by explaining the key capabilities of each and when to use them.

 

If you’re an SAP System Administrator (BASIS Administrator) or Database Administrator, you may be surprised to learn that although there are new tools to manage SAP HANA, some of the old SAP BASIS tools will also help you get the job done. These are the five major SAP HANA administration tools:

 

  • SAP HANA studio
  • SAP HANA cockpit
  • SAP DB Control Center
  • SAP Solution Manager/DBA Cockpit
  • Command Line (HDBSQL)

 

The following figure summarizes the role of each tool.

HANA_AdminTools_Overview_HA200Col10_Figure208.JPG

 

Tool #1 - SAP HANA studio

 

Administrators use SAP HANA studio to start and stop services, monitor the system, configure system settings, perform backup/recovery, and manage users and authorizations.

HANA_HANAStudioConsole2_HA200Col10_Figure211.JPG

HANA_Studio_HA200Col10_Figure65.JPG


Tool #2 - SAP HANA cockpit

 

SAP HANA cockpit is an SAP Fiori Launchpad application that provides single point-of-access to a range of web-based applications for the administration of SAP HANA. It’s installed automatically with SAP HANA and displays the content as tiles arranged in groups that can be customized. Additionally, the cockpit provides a role-based concept that enables you to control which tiles/apps from the tiles catalog can be accessed by which administrator.

 

HANA_SAPHANACockpit_HA200_Col10_Figure222.JPG

Tool #3 - SAP DB Control Center


SAP DB Control Center is SAP’s new generation of enterprise-class systems management solutions that enables DBAs to administer and monitor a variety of SAP database products in one graphical user interface, either locally or remotely.

It was first available with SAP HANA SPS 09, and it’s added as a delivery unit that can be downloaded from the SAP Support Portal – Software Downloads.

HANA_SAPDBControlCenter_HA200Col10_Figure210.JPG


Tool #4 - SAP Solution Manager/DBACOCKPIT

 

DBACOCKPIT is an ABAP based database management tool available in SAP NetWeaver ABAP systems such as SAP Solution Manager. It supports SAP HANA as well as other databases.

 

The transaction code DBACOCKPIT enables you to monitor and administer SAP HANA remotely. Additionally, it provides quick access to a range of analysis information, for example, performance monitoring, space management, and job scheduling.

HANA_DBACockpit_RemoteMonitoring_HA200Col10_Figure226.JPG


Tool #5 - HDBSQL – Command Line Tool

 

SAP HANA HDBSQL is a command line tool for entering and executing SQL statements, executing database procedures, and querying information about SAP HANA databases.

 

HANA_HDBSQL_HA200Col10_Figure240.JPG

 

Follow me at LinkedIn Fabio Souza

                              Linkedin.jpg

Computing rates using SAP HANA calculation view

$
0
0

When using SAP HANA for analytical purposes, it is interesting to have rates (interest, participation, benefit, etc) being computed by HANA, instead of BI tools, for performance reasons. It is very easy to use a calculation view to compute those rates.

 

Let's take an example the following calculation view, which is using one analytical view (called SALES) and one attribute view (called PRODUCT). There is a join in between the 2 views on PRODUCTKEY, and some objects have been added to output. I want to compute the benefit between the SALESAMOUNT and the TOTALPRODUCTCOST as a rate, the formula would be SALESAMOUNT/TOTALCOST*100 (to get a percentage) so I added the BENEFIT to the output of the JOIN; well this is a MISTAKE, let's see why!

calcview1.PNG

When adding this calculated measure at the JOIN level, it will be aggregated as a SUM (or COUNT/MIN/MAX) which cannot apply to the aggregation of a rate:

calcview3.PNG

We have to add the calculated column at the AGGREGATION level as BENEFIT2 using the same formula, in order to make it work. As shown in the previous image, it will aggregate as "Formula" instead of "Sum", basically it will be computed after the aggregation of the object used inside the formula:

calcview2.PNG

Let's see how this applies to a data set, I have added Customer Name and Product as dimensions, and SALESAMOUNT, TOTALPRODUCTCOST, BENEFIT and BENEFIT2 as measures. Both calculated columns work as expected as we have ALL the dimensions columns in the data preview, it means that there is no difference between the data at the JOIN level vs AGGREGATION level in our the calculation view:

calcview4.PNG

But the error in Benefit shows up fast, as soon as I aggregate a smaller number of dimensions; let's use only the Customer Name as dimension column:

calcview5.PNG

As you can see, BENEFIT shows up like a sum of rates which is not useful, where the BENEFIT2 shows a calculated rate on pre-aggregated values of the SALESAMOUNT and TOTALPRODUCTCOST for each customer.

Viewing all 902 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>