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

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

  • 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

  • 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 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?

  • 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

  • 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

  • How to Call HANA Procedure in ABAP

    Hi Everyone,
    I am new to ABAP
    I have created a procedure in HANA that accepts two input parameters and outputs a table
    I am using HANA as a Secondary Database
    How can I call this procedure in my ABAP program?
    Regards,
    Vivek

    Hi Vivek,
    depends on how you would like to call it :-)
    1. Use native SQL to call the procedure (see report ADBC_DEMO_PROC_CALLS_HDB; available in any system with a minimum NetWeaver release 7.40 SP5).
    2. Create a DB Procedure Proxy and call the DB Procedure Proxy (Tutorial: How to consume SAP HANA Procedures in ABAP; only "directly" available if HANA is the primary DB underlying your system, for secondary DB system see discussion Execute Procedure with input parameters as table from ABAP).
    3. (Method of choice available as of NetWeaver 7.4 SP5): Create an ABAP managed DB procedure (instead of the native HANA procedure) as described in ABAP Managed Database Procedures - Introduction
    Cheers,
      Jasmin

  • 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.

  • IE Script error when double clicking on a view in Abap Webdynpro component

    Hello experts,
    I am running mini SAP trial version 2004 with Internet explorer 7.0 and also installed gui patch 23.
    I am making a sample application in SE80 and when double clicking on a view in Abap Webdynpro component I get following error:
    <b>Internet Explorer Script Error</b>
    An error has occured in the script on this page.
    Line: 1
    Char: 1
    Error: 'wdp_show_menu' is undefined
    Code: 0
    URL: http://satellite5200:8000/sap/bc/wdvd/painting.html?_vdrespkey=EOJ6V1JQMX0VLTQ7AP6DQM64Y&_vdframe=painting&sap-client=000
    Do you want to continue running scripts on this page?
    Thanks in advance.
    Bhupendra

    Hi Bhupendra,
       If you are seeing this error in the Se 80 editor , i guess you can ignoire that ...While running the application it will not show any error.
    Thanks
    Anzy

  • 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

  • Trying to call HANA procedure via ABAP

    Hi everyone,
       I am using ABAP in Eclipse in order to call a HANA procedure within a BPC process chain. While referring to an SCN blog written by Baris Cekic, I have put together a working ABAP Class. This works as my proxy to a functioning HANA stored procedure. My issue is with the ABAP program I am using for the process chain. I believe that I'm passing my input parameter using the wrong format. Please bear with me, as I am not an ABAP programmer! Any help would be much appreciated! Please take a look at the screenshots. Thanks!
    ABAP CLASS - ZCL_BPC_AMDP:
    HANA PROCEDURE - ZPROC_BPC_AMDP:
    ABAP PROGRAM - ZBW_BPC_AMDP:
    This is my issue!! -----> INPUT of SP Name: (I've tried with and without the schema):
    ABAP PROGRAM ERROR:

    Hi Anand,
    you should preferentially use "NVARCHAR" instead of the non-unicode derivate "VARCHAR". As ABAP supports both unicode and non-unicode systems, we only allow the mapping of Strings/character literals from ABAP to NVARCHAR variables in HANA in all ABAP on HANA systems.
    Please find an example of a _SYS_BIC procedure in an AMDP in class CL_EPM_OIA_SIMP_BP_CLSF_AMDPDT (method AMDP_GET_BP_CLASSIFICATION). Should be available in your system.
    And you can additionally try to execute the call you put into the AMDP directly in the HANA SQL console.
    Cheers,
      Jasmin

  • How to consume Web Service in ABAP WebDynpro

    Hi
    I want to know the entire details about how to consume Web Service in WebDynpro application.
    regards
    Piyush

    hI piyush,
    Have a look at this Blog by Thomas Jung.
    /people/thomas.jung/blog/2007/12/17/consuming-services-with-abap
    on consuming webservies thru webdynpro ABAP
    Cheers
    Mary

  • Windows authentification while consuming web service from ABAP

    Hi All,
    We are consuming web service from ABAP, we have created client proxy in SE80 and configured logical port in LPCONFIG.
    This one was working fine. Now we have added  windows user authentification to access this service.
    Now when I'm trying to regenerate this proxy in R/3 it is asking for user and password. When I enter these details this one is not working.
    If I access this service direcly from internet explorer and I enter same user and password then I would able to access this service.
    Could you please let me know how to handle this.
    Regards
    Vikram

    The dialog that is produced by HTTP Destination object of the logical port is designed only for use within Classic Dynpro applications.  There is no prompt produced when running in Web Dynpro.  If possible assign a generic user within the logical port definition and this will be used automatically by all users.

  • Consume web service in ABAP proxy with SOAP header

    Hi Thomas ,
    I am trying to consume web service in  ABAP . I have followed the procedure from one of your web blog <a href="/people/thomas.jung3/blog/2004/11/17/bsp-a-developers-journal-part-xiv--consuming-webservices-with-abap a Developer's Journal Part XIV - Consuming WebServices with ABAP</a> . (640 release).
    I need to pass SOAP header along with SOAP body. As you mentioned I have used if_wsprotocol_ws_header interface to pass header but it is still failing.
    Please see below code and please give some direction to fix the issue.
    1.Create ABAP proxy for WSDL (http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL). It has created structures only for SOAP body.
    2.Create Logical port
    3.Create following program to call proxy
    REPORT  zproxy.
    DATA: ref_stock TYPE REF TO zzco_stock_quotes_soap ,
          ws_header TYPE REF TO if_wsprotocol_ws_header,
          name TYPE string,
          namespace TYPE string.
    TRY.
        CREATE OBJECT ref_stock
      get WS_HEADER protocol
        ws_header ?= ref_stock->get_protocol('IF_WSPROTOCOL_WS_HEADER').
      set somehow header as iXML-DOM tree
        DATA: ixml TYPE REF TO if_ixml,
              xml_document TYPE REF TO if_ixml_document,
              xml_root TYPE REF TO if_ixml_element,
              xml_element TYPE REF TO if_ixml_element,
              xml_node TYPE REF TO if_ixml_node.
        DATA l_xstring        TYPE xstring.
        DATA l_string         TYPE string.
        FIELD-SYMBOLS <fs_xstring> TYPE xstring.
      Additional Header:
        CONCATENATE
    '<soap:Header>'
    '<s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">'
    '<s1:RegisteredUser>'
    '<s1:UserID>[email protected]</s1:UserID>'
    '<s1:Password>aaaaaaaa</s1:Password>'
    '</s1:RegisteredUser></s1:LicenseInfo>'
    '</soap:Header>' INTO l_string.
      convert to xstring
        l_xstring = cl_proxy_service=>cstring2xstring( l_string ).
        IF NOT l_string IS INITIAL.
        create iXML DOM document from XML xstring
          CALL FUNCTION 'SDIXML_XML_TO_DOM'
            EXPORTING
              xml           = l_xstring
            IMPORTING
              document      = xml_document
            EXCEPTIONS
              invalid_input = 1
              OTHERS        = 2.
          IF sy-subrc = 0 AND NOT xml_document IS INITIAL.
            xml_root = xml_document->get_root_element( ).
            xml_element ?= xml_root->get_first_child( ).
          add header element by element to SOAP header
            WHILE NOT xml_element IS INITIAL.
              name = xml_element->get_name( ).
              namespace = 'http://swanandmokashi.com' . "xml_element->get_namespace_uri( ).
              IF NOT xml_element IS INITIAL.
              ENDIF.
              ws_header->set_request_header(
                          name = name
                          namespace = namespace
                          dom = xml_element ).
              xml_element ?= xml_element->get_next( ).
            ENDWHILE.
          ENDIF.
        ENDIF.
      CATCH cx_ai_system_fault .
    ENDTRY.
    *Call soap body using abap proxy class.
    DATA: get_quotes TYPE zzget_quotes_soap_out .
    DATA: get_quotes1 TYPE zzget_quotes_soap_in .
    get_quotes1-quote_ticker = 'GE'.
    TRY.
        CALL METHOD ref_stock->get_stock_quotes
          EXPORTING
            get_quotes1 = get_quotes1
          IMPORTING
            get_quotes  = get_quotes.
      CATCH cx_ai_system_fault .
      CATCH cx_ai_application_fault .
    ENDTRY.
    4.It is throwing cx_ai_system_fault error.
    SOAP details:
    Input:
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding" >
    <soap:Header>
    <s1:LicenseInfo xmlns:s1="http://ws.strikeiron.com">
    <s1:RegisteredUser>
    <s1:UserID>[email protected]</s1:UserID>
    <s1:Password>aaaaaaaa</s1:Password>
    </s1:RegisteredUser>
    </s1:LicenseInfo>
    </soap:Header>
    <soap:Body>
    <tns:GetQuotes xmlns:tns="http://swanandmokashi.com">
    <tns:QuoteTicker>GE</tns:QuoteTicker>
    </tns:GetQuotes>
    </soap:Body>
    </soap:Envelope>
    Thanks,
    Kavitha.

    Hi ,
    Thank you for the response. Did you passed user email and password ([email protected] /aaaaaaaa) part of licenseinfo->resisteredUser along with Quoteticker GE in analyzer?
    <a href="http://www.strikeiron.com/Analyzer/OnlineAnalyzer.aspx?WSDL=http://ws.strikeiron.com/SwanandMokashi/StockQuotes?WSDL">ANALYZER</a>
    Thanks,
    Kavitha.

Maybe you are looking for

  • 2011 MacBook Pro Runs slow and Freezes

    I have a Macbook Pro 2.8 GHz Intel Core i7 running 8 GB of RAM and it runs like a dog - freezing and crashing like a PC would - have to keep rebooting it. What is going on. Has Bill Gates poisoned the Apple?

  • Network Question: How Do I See the Macs from the PC?

    I'm a PC-to-Mac switcher. I'm trying to move all my activites to the Mac platform, so at the moment I'm sort've one foot in each world. One problem I have encountered is transferring files from the PC to the Macs over my network. When I'm on the Mac,

  • TREX creation process fails - directory name is invalid

    Hello All, I've installed a TREX instance to be linked up to two SRM instances (SRD and SRT).  I had done this successfully on a prior server, but recently we got a new server to run TREX on. When I reinstalled TREX on the new server, I have success

  • My trial is about to end and I have never been able to use this.

    My trial subscription is about to end and I have never been able to use it. I had the Adobe for$19.99 a year but when it changed to $19.99 a month I could not afford it. I am a pro bono attorney mostly representing battered women and juveniles at ris

  • COPA from CO or SD,FI

    Would it be easier for BI to extract COPA from CO or would it be easier if BI did it directly from SD and FI ? Also what kind of development time are we looking for the COPA extraction compared to bringing it in from CO or SD and FI directly? What do