Consume HANA Views

Hello,
We are migrating a report from ABAP to HANA due to performance reasons. We have created various views for data selection and aggregation.
My query is how to consume these views created, via External view Or Native Sql(ADBC) which is better option in terms of performance optimization.

Hi Jitendra,
I think this question is touched/commented on in http://scn.sap.com/message/15268054#15268054, right?
Cheers,
  Jasmin

Similar Messages

  • Consuming HANA views using ABAP

    Hi Experts,
    We have ABAP reports in ECC which is taking very long time to process it. So we decided to push down the complex logic to HANA where ever it is taking long time to fetch data.
    We have standalone HANA System. So can we use HANA as secondary database??? If yes, how can i consume HANA views in ABAP reports??
    Can some one guide me.
    Thanks in advance.
    Best Regards,
    Krishna.

    Hi Sundar,
    Thanks a lot for your valuable inputs.
    You need to access the native HANA artefacts (like HANA information views) from your ABAP system using native SQL and ADBC in case HANA is not the primary DB.
       - If i want to pass values to the views can we use HANA input parameters in this case as a PLACE HOLDER       in Native SQL??? else do i need to create a procedure for it???
    Basically ABAP team is optimized the code but still we are hitting with performance. So we want to utilize existing HANA databse as secondary db to push down the complex logic to HANA.
    Best Regards,
    Krishna

  • Consuming HANA views in ABAP

    Hi,
    I have created one attribute view and activated successfully but while I am creating database proxy and importing it in ABAP , its giving me below error.
    BR
    Sumeet

    Hi,
    These are the names I got ( below screenshot).My user ID is BEST by which I have logged it into ABAP which is not coming in this list. I have one more question here.  I have just debugged my report and I can see my select query is getting failed. How can i find out the reasob for the same. i am not worried about the window information but it must show output. below is the query which is getting failed.
    select  * from ztest_attr up to 10 rows
        into corresponding fields of table lt_test.
    BR
    Sumeet

  • Creating Logic and modeling for SAP BW datasource in SAP HANA views and SLT

    Hi to all,
    I have small question.
    We have BW system and SAP ECC as source system and to get data from SAP ECC source system we are using SAP ECC Standard data source.
    Now we required to, create modeling in SAP HANA by use of HANA View and get data from SAP ECC source table via SLT.
    So we can replicate same modeling,as we done in SAP BW system.
    But  my question is that, as SAP ECC standard data source hit multiple table and do run-time calculation, before sending to SAP BI.
    How we can derives such calculation and logic, in our HANA studio, because as we know in SLT data transformation can be done in limited way also
    in view we can not drive such logic via SQL script ?.
    Is there any way we can do such modeling and logic in SAP HANA ?
    or
    is there any standard document for this type of case, which we can use ?
    Note: We don't want to use SAP DS or DXC for data loading to HANA, as  we want it in more real time.
    Regards
    Pavneet Rana

    Thanks for reply,
    As SLT is based on ABAP, so we can write complex logic in it.
    But if we talk about SAP ECC standard data source, they have complex logic, based on multiple table.
    So we need to write code from scratch in SLT to derive same result. but it will be huge time consuming , and required good ABAP skills, also it will lead to bug in code.
    Also it will reduce the real time performance of SLT, due to complex logic.
    Second option is procedure via SQL script, which is again huge effort in term if logic and can lead to error/bug in logic.
    Does we have any other way or architecture to do this is very simple way, with high performance and less error issue.
    Regards
    Pavneet Rana

  • HANA views connection to Tibco Spotfire

    Hello,
    I am working with Tibco Spotfire version 6.5. I can consume tables in HANA system but I am unable to consume the HANA views. Can I connect to HANA views from the tool? If so, how do I? Thanks in advance!

    Hello Praseedha -
    Thanks for the quick response. It is interesting to know that you cannot embed the data from HANA views into Spotfire memory. It is my understanding that you can leverage both the options -> In database connection & In memory for databases like HANA.
    Were you able to obtain the description of fields from HANA views instead of just the technical names when you inserted a HANA view into a table in Spotfire?
    Looking forward to your response.
    Regards,
    Sudheer B.

  • Authorization Issue while Data Preview from HANA View

    Hi Experts,
    We are using BW on HANA. We have created DSOs (info provider) in BW and generated HANA views from there. We have also created analysis authorizations in BW for authorization relevant characteristics. In HANA, we are able to go to the generated analytic view and preview the data from it successfully.
    Now I have created a test user and assigned a custom role with below authorizations to this user in HANA:
    - bw2hana/../REPORTING role (this role is automatically created by activation of DSO in BW).
    - Roles MODELING, MONITORING, CONTENT_ADMIN, USER.
    - Multiple system privileges although not needed, like REPO.EXPORT, REPO.IMPORT, etc.
    - Analytic Privilege  _SYS_BI_CP_ALL
    - Package Privilege: REPO.READ for all required packages (tried with ROOT package also).
    In BW system also, the test user has analysis authorizations providing access to the relevant info objects.
    But when I am trying to preview data for HANA view, I am getting attached error (also listed below):
    "Cannot get the data provider outline
    SAP DBTech JDBC: [2048]: Column store error: Search table error: [2950] user is not authorized"
    I tried to trace the situation is HANA and got below details in 2 trace files:
    indexserver_alert_saphana.trc:
    [6433]{416977}[66/-1] 2014-10-14 00:59:27.541187 e CalcEngine       ceAuthorizationCheck.cpp(02365) : AuthorizationCheckHandler::addAPsToSearchObject: Error during converting SqlAPs to Query entries
    indexserver_saphana.31003.075.trc
    [6433]{416977}[66/-1] 2014-10-14 00:59:27.541197 i TraceContext     TraceContext.cpp(00702) : UserName=TEST_SSO, ApplicationUserName=<<computer name >>, ApplicationName=HDBStudio, ApplicationSource=csns.modeler.datapreview.providers.ResultSetDelegationDataProvider.<init>(ResultSetDelegationDataProvider.java:118);csns.modeler.actions.DataPreviewDelegationAction.getDataProvider(DataPreviewDelegationAction.java:278);csns.modeler.actions.DataPreviewDelegationAction.run(DataPreviewDelegationAction.java:242);csns.modeler.actions.DataPreviewDelegationAction.run(DataPreviewDelegationAction.java:127);csns.modeler.command.handlers.DataPreviewHandler.execute(DataPreviewHandler.java:53);org.eclipse.core.commands
    [6433]{416977}[66/-1] 2014-10-14 00:59:27.541187 e CalcEngine       ceAuthorizationCheck.cpp(02365) : AuthorizationCheckHandler::addAPsToSearchObject: Error during converting SqlAPs to Query entries
    Do you know what this "Error during converting SqlAPs to Query entries" actually means"? How can we resolve this issue? The authorization is working properly for our user ids. But we need to provide restricted access for business users so trying to create test user and custom role.
    Thanks
    Nitesh Gupta

    Hi Pinaki and Prabhith,
    Yes, my issue was resolved. Sorry, missed to updated here.
    I was just a beginer for BW on HANA Security at that time and didn't know many small things. The solution was pretty simple.
    Whenever you assign analysis authorizations to a user in BW, you also need to generate corresponding HANA authorization. This is done through tcode RS2HANA_CHECK tcode. This tcode converts  BW analysis authorizations into HANA analysis authorizations and assign to the HANA user. You can see generated HANA authorization table RS2HANA_AUTH_STR in both BW and HANA.
    Once the HANA authorizations are successfully generated for a user, he should be able to see data from Views.
    Let me know if this solves issues. Then I will close this thread.
    Thanks

  • Invalid column Index error - While consuming Calculation view via Native SQL

    Hi Experts,
    I am trying to consume a Calculation view (sql script one) , which has input parameters, via Native SQL in a ABAP program .
    Code snippet for the same would be as follows , Upon execution, it throws an error "Invalid Column Index (8) error " . Can anyone help what could be the issue here ?
    Thanks in Advance,
    Suma
    REPORT ZTEST_HANA2.
    *Report to consume Calculation view (script based) from ABAP
    PARAMETERS: ip_docnr type BELNR_D,
                ip_gjahr type GJAHR,
                ip_bukrs type BUKRS,
                ip_blgr type FAGL_RLDNR.
       DATA: LO_SQL_STMT TYPE REF TO CL_SQL_STATEMENT,
              LO_CONN     TYPE REF TO CL_SQL_CONNECTION,
              LO_RESULT   TYPE REF TO CL_SQL_RESULT_SET,
              LV_SQL      TYPE STRING,
              LR_DATA     TYPE REF TO DATA.
        DATA: LX_SQL_EXC           TYPE REF TO CX_SQL_EXCEPTION,
              LT_SEPMAPPS_CLSDINV  TYPE TABLE OF SEPMAPPS_CLSDINV,
              LV_TEXT              TYPE STRING.
        TRY.
    lv_sql = |SELECT * FROM "_SYS_BIC"."DEMO-ABAP/CA_GET_FI_DATA" | &&
                     |WITH PARAMETERS ('placeholder'= ('$$p_DOCNR$$','{ ip_docnr }'),| &&
                      |'placeholder'=('$$p_GJAHR$$','{ ip_gjahr }')| &&
                      |,'placeholder'= ('$$S_BUKRS$$','{ ip_bukrs }')| &&
                      |,'placeholder'= ('$$p_base_ledger$$','{ ip_blgr }') )| .
             LO_CONN = CL_SQL_CONNECTION=>GET_CONNECTION( ).
             "Create an SQL statement to be executed via the connection
              LO_SQL_STMT = LO_CONN->CREATE_STATEMENT( ).
             "Execute the native SQL query
             LO_RESULT = LO_SQL_STMT->EXECUTE_QUERY( LV_SQL ).
             "Read the result into the internal table lt_sepmapps_clsdinv
             GET REFERENCE OF LT_SEPMAPPS_CLSDINV INTO LR_DATA.
             LO_RESULT->SET_PARAM_TABLE( LR_DATA ).
             LO_RESULT->NEXT_PACKAGE( ).
             LO_RESULT->CLOSE( ).
             LO_CONN->CLOSE( ).
        CATCH CX_SQL_EXCEPTION INTO LX_SQL_EXC.
             LV_TEXT = LX_SQL_EXC->GET_TEXT( ).
             MESSAGE LV_TEXT TYPE 'E'.
        ENDTRY.

    Hi Suma,
    Post the SQL you success run directly on Studio together with error message (even if is the Invalid column index error).
    Check there if the parameters case is working properly... Is it really this confusing options:
    p_GJAHR
    S_BUKRS
    p_base_ledger
    Why not all lower or all upper? Anyhow you must test and find which option works according your modeling
    Regards, Fernando Da Rós

  • WHY HANA VIEW ARE GIVING BAD PERFORMANCE IN DASHBOARD THEN TABLE

    Dear Experts ,
    I have created a dashboard on top of HANA view.
    Scenario 1
    HANA view is taking 3 seconds to fetch data in HANA studio .
    When we create dashboard on that view, the dashboard  is taking around 50sec.
    Report has around 10 queries.
    Scenario 2
    Then we insert data into a table from same above view .
    HANA table is taking 10 ms to fetch data in HANA studio .
    When we create the same dashboard on that table, the report is taking
    around 4 Seconds.
    Report has around 10 query. 
    You may raise finger on dashboard tool. But by only converting view to table dashboard is giving good performance .
    Please suggest what  should we use Table or View for reporting tool ????
    Only performance matter to Users and that's why we have taken HANA.
    Thanks
    Anupam.

    "When you use attribute view in calculation view, hana will first build the attribute view first it will process all the data from memory in attribute view and then only will proceed with the calculation view."
    That's actually completely false.
    Attribute views are not materialized in full every time an Analytic View is queried. On the contrary, only the joins/materialization required to fulfill the query are performed. I have rolled out Analytic views with 50+ attribute views joined to them, if every one was built every time the AV was used, that would be a disaster.
    An attribute view is fully executed if you query it directly with SQL, but the behavior changes when used in an AV.
    Quick observation in good faith of my statement.
    Query an analytic view with one column from a joined attribute view (Material - MARA)
    SELECT "PAPH1", SUM("VVREV")
    FROM "_SYS_BIC"."Main.Analytics.CO/AN_COPA"
    WHERE "PERIO_T" = '2013010'
    GROUP BY "PAPH1"
    Only one join is executed to the fact table
    Query an analytic view with one column from a joined attribute view (Material - MARA), plus another column from a joined table (T179T) inside the attribute view (snowflaked dimension).
    SELECT "PAPH1", "VTEXT_1", SUM("VVREV")
    FROM "_SYS_BIC"."Main.Analytics.CO/AN_COPA"
    WHERE "PERIO_T" = '2013010'
    GROUP BY "PAPH1", "VTEXT_1"
    Only two joins are executed; one to the snowflaked dimension and one to the fact table
    So even though I am issuing a query against an AV with a very large number of dimensions, only what is needed is actually executed.
    Happy HANA,
    Justin

  • Hana view column descriptions are not showing in Crystal 2013

    Hello All,
    I have a hana calculation view which has the column name and label defined perfectly. When I use the HANA view in Crystal Report 2013, the column labels are not showing up in the field explorer even after enabling the show both name and description. Please help.

    hi
    is anyone has answer for this question.
    thanks...!!!!

  • Best Approach for Reporting on SAP HANA Views

    Hi,
    Kindly provide information w.r.t the best approach for the reporting on HANA views for the architecture displayed below:
    We are on a lookout for information mainly around the following points:
    There are two reporting options which are known to us and listed below namely:
    Reporting on HANA views through SAP BW  (View > VirtualProvider > BEx > BI 4.1)
    Reporting on HANA views in ECC using BI 4.1 tools
            Which is the best option for reporting (please provide supportive reasons : as in advantages and limitations)?
             In case a better approach exists, please let us know of the same.
    Best approach for reporting option on a mixed scenario wherein data of BW and HANA views is to be utilized together.

    Hi Alston,
    To be honest I did not understand the architecture that you have figured out in your message.
    Do you have HANA instance as far as I understood and one ERP and BW is running on HANA. Or there might be 2 HANA instance and ERP and BW are running independently.
    Anyway If you have HANA you have many options to present data by using analytic views. Also you have BW on HANA as EDW. So for both you can use BO and Lumira as well for presenting data.
    Check this document as well: http://scn.sap.com/docs/DOC-34403

  • Variables in HANA Views

    BOE Server, Explorer and Client version 2.8
    HANA DB Rlease 21
    I created a HANA view with variable. When I tried doing data preview in the studio, I get prompted to select the values. Where as when I tried using in the Exlorer or IDT, the variable is being ignored.
    Do I need certain version of BOE software to make use of it?
    The latest release from BOE is fix pack 2.8.
    thanks for your help

    Babu,
    Variables has two aspects: development of variables in SAP HANA and second recognition of these variables in BOBJ tools.
    Currently HANA view cannot recogonized by BOBJ reporting tools. As per my understanding based on SAP discussion, there is future released planned however not sure on time-line.
    If you are using Analysis for Office, you may be able to use macros combine with AO functions to achieve it.
    Hope it helps.
    Thanks

  • SQL Script VS HANA views

    Hi Gurus,
    We are in the process of building the SAP HANA views. As we know there are multiple options
    1) Attribute , Analytic & Calc views
    2) Scripted Calculation views and CE functions.
    I have read many articles and as per SAP Documentation, they say build the information view with  Attribute, analytic and calculation View (Graphical) If it does not suffice they go for scripted calculation view.
    Just wanted to understand. Are there any limitations or any issues faced in the projects with scripted calc views. If we look at the John Appleby tips, it suggests that avoid SQL script unless it cannot be done with graphical views.
    http://scn.sap.com/community/hana-in-memory/blog/2013/12/29/6-golden-rules-for-new-sap-hana-developers
    If we build the views with graphical method, then it seems the parallelism can very well achieved ,means query is split into multiple sub queries and executed in parallel as in Visualize plan.
    If we write the Sql script, can this parallel processing  achieved or not ?  If the requirement can be achieved without writing script which method to choose.
    I have included the 10 to 12 attribute views in analytic view then Calculation view; it seems there may be some performance issue which I am going to check. As we know we can use base table directly in calculation view. What is the best method to use .Can we use these base  tables in calculation view directly or build the attribute views first, then analytic  view and after that build calculation view.
    As we know we use the attribute views from re usability perspective.  Is there any other reason that we need to use attribute views instead of joining the base tables in calc view .
    Regards
    Ram Ramanathaiah

    Thank you Krishna for the answers. I have gone through those links. But there is nowhere consensus opinion that the way we use the views. Some of the answers conflict each other .When we are starting the project we need to make decision about the best approach we wanted to take. If possible I would like to understand more about this from you and other experts.
    1) Build the views with Attribute analytic or calc views or
    2) Build the views only with base tables in calc views or
    3) Build everything using the SQL script /CE functions.
    Regards
    Ram

  • HANA views call in ABAP ECC 6.0 via secondary connection

    Dear Folks,
    We have created views in HANA, same views we need to call it in  ABAP ECC 6.0(Netweaver 7.3)  i.e. via secondary database connection.
    So,
    1.Is it possible to call HANA vies in ABAP ECC 6.0?
    2.Is there any version limitations? or will work fine on ECC 6.0
    3. If yes can you give me sample code of abap to access hana as secondary database
    Note : I have gone through Mr. Thomas Jung thread.
    Regards,
    Amol

    Hi Amol,
    so, ADBC is available in your system, but you have to make sure that the correct DBSL library for HANA (HDB) is available in your system. You can then just check if you can correctly communicate with the report ADBC_TEST_CONNECTION (using the secondary connection maintained in table DBCON) to your HANA database.
    You may have a look at the example on how to select from an external view in report ADBC_QUERY (which selects from a DB table), by using a secondary DB connection to your HANA DB and using the HANA view instead of a DDIC table.
    Of course in ADBC you have to take care about the correct type mapping (as you cannot use a DDIC type for definition of your internal table into which you select).
    Best,
    Jasmin
    BTW: One word of precaution, the tasks you try to accomplish is rather cumbersome. We definitively recommend to use a more recent release (e.g. NetWeaver 7.4 SP5 or beyond), however, I think that's not your decision, right?

  • How to Figure Type of HANA View in ABAP?

    Hi,
    Is there a way in ABAP to find out (by looking up some table or calling an FM/method) the type of a HANA view? I have an ABAP system that has a HANA database. Views of different types (calculation, attribute, analytic) have been created in HANA. In my ABAP code, I have the name of the view from which I want to find out the type of the view. Any ideas?
    Thanks,
    Akshat

    Hi Kumar,
    why would you need to know at all?
    Anyways, you would have to know the name of the corresponding HANA entity. That is displayed when you open the external view in the ABAP Development Tools in Eclipse.
    Additionally, you would have to know to which HANA Transport Container the HANA view belongs, have a look at the HTC (in the ABAP Development Tools in Eclipse). There are two tabs "Overview" and "Content". On the "Content" tab, you can find a list including package, name, and the type information you are looking for.
    Cheers,
      Jasmin

  • HANA View

    I need to get the metadata of the hana view. for example if you take any of the view, it will have base tables and columns. I need to get the base tables and columns for hana views.

    Thanks.
      I found the information about table in HANA live view explorer and column names in view definition. In view definition , i dont find table names.

Maybe you are looking for

  • Sub Contracting Report

    Hi Sapians, Is there any standard report to see the stock available with the subcontractor on a particular given date along with value. I tried with MB5B By selecting the special stock as O ,But there I am not getting the value. In MBLB, ME2O , I can

  • 755cm trouble printing pdf

    I have a 755cm.  I print many pdf files from various sources.  I am regularly having the problem where the printer only prints certain elements of the file. If the file contains some gray elements, it will print only these, but if I check the "print

  • HA-SSO pairing possible between LDPE and non LDPE wlc?

    Hi all. I was to day to finalise the migration of a customer network to HA-SSO enabled central controllers. However on one site this failed. Unfortunately the ordering or delivery had been mismatched in a recent additional controller ordered with HA-

  • Pick Ticket Printing when Pressing Add Button in Order ENtry

    Simple question ... All I need to do is when I press the Add button when entering and Order is automatically print a Pick Ticket Not an Order and I do not want to Prompt the Order Entry person if they Want to print a Pick Ticket or an Order or Both. 

  • New Macbook Pro reluctant to connect to Airport Extreme at 5ghz

    I brought the latest 17" 2011 Macbook Pro back in April this year, to replace an older 15" MBP. I'm mostly happy with the new machine, but have noticed one frustrating problem. When waking from sleep, and perhaps even from booting cold, the Macbook P