Error in query ABAP using HANA as secundary data base

Hi Experts,
I have an error when I run a query from ABAP using HANA as alternative database. The query results empty, I do not know if something is missing or if additional error to the connection created by the BASIS consultant.
The example I'm using is:
****Create the SQL Connection and pass in the DBCON ID to state which Database Connection will be used
   DATA lr_sql    TYPE REF TO cl_sql_statement.
   DATA lr_result TYPE REF TO cl_sql_result_set.
   DATA lr_adrc   TYPE REF TO data.
   DATA it_adrc   TYPE STANDARD TABLE OF adrc.
   DATA lv_oref   TYPE REF TO cx_root.
   DATA lv_text   TYPE string.
   CREATE OBJECT lr_sql
     EXPORTING
       con_ref = cl_sql_connection=>get_connection( 'HBT' ).
****Execute a query, passing in the query string and receiving a result set object
   TRY.
       lr_result = lr_sql->execute_query( 'select * from "PRD_300"."ADRC"' ).
       GET REFERENCE OF it_adrc INTO lr_adrc.
****Get the result data set back into our ABAP internal table
       lr_result->set_param_table( lr_adrc ).
       lr_result->next_package( ).
       lr_result->close( ).
     CATCH cx_sql_exception INTO lv_oref.
       lv_text = lv_oref->get_text( ).
       MESSAGE lv_text TYPE 'I'.
   ENDTRY.
Regards.
Richard.

I resolved the problem myself.
Regards,
Richard.

Similar Messages

  • Error - InfoObject cannot be used to read master data

    Hi All,
    We am working on mapping objects in a transformation, on some of the transformation I am using the master data attribute to fill the infoobject.  In some cases the mapping happens without incident but in others we are getting the following error
    InfoObject  cannot be used to read master data
    Inside the long text of the message it says:
    InfoObject  does not have the correct attributes to be used to read master data for the target field
    The object is one of the master data attributes, so we are not sure why we are recieving this error?
    We have recieved it with 0COMP_CODE trying to load Fiscal Year Variant and with a non standard enhanced object ZMATERIAL which is a copy of 0MATERIAL with added attributes for Product Class, Product Group and Product Line wich come from the product hierarchy and are populated on the load of the material from product hierarchy.
    Has anyone else had an issue with this error and can you tell us how you fixed it???
    Thank you!
    Caroline

    You received this error for loading 0FISCVARNT (Fiscal Year Variant) because that InfoObject isn't an attribute of 0COMP_CODE (Company Code) and it cannot therefore determine what data to populate based on your input. Instead of using 0COMP_CODE, you may have to enter a constant value for the Fiscal Year Variant if you don't have it in your source InfoProvider.
    When you created ZMATERIAL, did you use 0MATERIAL as a reference so that it would inherit the attributes and texts? If so, Product Class, Product Group and Product Line would have to be attributes of 0MATERIAL. If you didn't reference 0MATERIAL and are loading attributes directly to the custom InfoObject attributes, then Product Class, Product Group and Product Line would have to be attributes in ZMATERIAL in order to use the Use Master Data function for transformations. You may have to derive the values for these different, such as add ABAP for lookup routines.

  • Error 91 - Trying to Use the Variant to Data Function

    I am running into a problem when trying to use variants in my application. I have a state machine set-up in that one state creates a task list (cluster of arrays) and then converts it to variant. The variant is fed into a shift register that allows me to access the task list from a different state.
    The problem comes when I try to use the Variant to Data function. I right click on the task cluster to create a constant, and then wire that to the TYPE terminal of the Variant to Data Function. I wire the task cluster variant to the VARIANT terminal. When I run the VI, i get error 91: Possible reason(s): LabVIEW: The data type of the variant is not compatible with the data type wired to the type input.".
    How can I get this error when the type I wired to the TYPE terminal of the Variant to Data terminal is a constant created from the exact type created a variant from???
    Section of the state machine where I wire the cluster to variant:
    Section of the state machine where I use the Variant to Data to get the cluster out:
    The constant wired to the Variant to Data TYPE terminal was created from the cluster that is wired to the Data to Variant. I do not understand how there can be a type mismatch???
    Solved!
    Go to Solution.

    Charles_CLA wrote:
    crossrulz wrote:
    Are there any other state that run between these two?  I am noticing you have some "Use default if unwired" tunnels comming out of your case structure.  First of all, disable that on the tunnels.  Secondly, for those cases where you are not affecting that data, wire the data straight from the input tunnel to the output tunnel.  I recommend using the linked tunnels to make it even easier on yourself.
    With the default tunnels being output, your variant coming in could really be empty, therefore the conversion fails.
    Are you stalking me today?  Every single post I've clicked comment on, you beat me by a hair!
    No, just 12 hour days (due to the holiday) get really long...and you are just slow.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Can I use Aperture as a data-base? Meaning I would like to access it on multiple desktops.

    I am working on projects with one other person and we would like to see the updates from one another. In preference we'd like to share the same data base. However we do in fact have our own seperate copies of the program.

    I don't know if the aplibrary can be on a network attached storage drive. You could try that. Still, only one person can work on the library at a time.
    See this support article: The library needs to be on a local volume:
    Aperture: Use locally mounted Mac OS X Extended volumes for your Aperture library:http://support.apple.com/kb/TS3252

  • Error in query when using offset in variable

    Hi,
    I have a query in which I use av variable (0CWEEK) for the current week. The query works fine with this varable. But when I use an offset of for example minus 1, the query displays an error:
    (A299(BRAIN)) Terminate: System error in program SAPLRRI2 and form REP_ASSIGN_INITIAL_OPT-01
    We use offset of 0CALWEEK in other info cubes, and there are no problems with that.
    In this case we have implemented 0CALWEEK in a DSO. Perhaps this somehow causes the problem? On the other hand the variable works fine in the DSO, as long as we don't use offset.
    So - why is there a error, and how to solve it?
    BR,
    Niclas

    Managed to solve the problem. The reason was that there was no column (or row) with the variable without offset. I.e. there needs to be a column for the actual week in the query as well, not only week with offset. In this case I didn't want the actual week, only an offset to it. So I just hid the column with the actual week from presentation.
    /Niclas

  • Error thrown while trying to connect the remote data base

    Hello,
    I am trying to connect the database(orcale 7) which is in the remote machine using Microsoft JDBC driver. But the following errors are thrown. If any one know how to solve this, pl let me throw some lite on this.
    Errir message as/./.......................
    java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12505: TNS:listener could not resolve SID given in connect descriptor
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:4089)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:4246)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:1136)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:148)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:167)
    at java.sql.DriverManager.getConnection(DriverManager.java:457)
    at java.sql.DriverManager.getConnection(DriverManager.java:159)
    at lucasCustomization.processmgmt.helper.EISConnector.getConnectEIS(EISConnector.java:24)
    at wt.workflow.expr.WfExpression2570849.execute_ROBOT_EXPRESSION_(WfExpression2570849.java:27)
    at java.lang.reflect.Method.invoke(Native Method)
    at wt.workflow.definer.WfExpression.executeTransition(WfExpression.java, Compiled Code)
    at wt.workflow.definer.WfExpression.execute(WfExpression.java, Compiled Code)
    at wt.workflow.robots.WfExpressionRobot.run(WfExpressionRobot.java, Compiled Code)
    at wt.workflow.engine.StandardWfEngineService.runRobot(StandardWfEngineService.java, Compiled Code)
    at java.lang.reflect.Method.invoke(Native Method)
    at wt.queue.QueueEntry.execute(QueueEntry.java, Compiled Code)
    at wt.queue.ProcessingQueue.execEntry(ProcessingQueue.java, Compiled Code)
    at wt.queue.ProcessingQueue.execEntries(ProcessingQueue.java, Compiled Code)
    at wt.queue.PollingQueueThread.run(PollingQueueThread.java, Compiled Code)
    error..>java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-12505: TNS:listener could not resolve SID given in connect descriptor
    ########################error ends...###############
    And also i added i code for your reference
    import java.util.*;
    import java.sql.*;
    public class EISConnector
    public static String getConnectEIS() throws Exception
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Connection3 :");
    Connection con1=DriverManager.getConnection("jdbc:odbc:eiscon","scott","tiger");
    System.out.println("statement2");
    PreparedStatement stmt1=con1.prepareStatement("insert into tryout(toolnumber,toolname) values(?,?)");
    stmt1.setString(1,doc.getNumber());
    stmt1.setString(2,doc.getName());
    System.out.println("st");
    int i=stmt1.executeUpdate();
    System.out.println("i :"+i);
    System.out.println("End");
    con1.close();
    catch(Exception e)
    e.printStackTrace();
    System.out.println("error..>"+e);
    return new String("End of Connection");
    }

    http://otn.oracle.com/tech/java/sqlj_jdbc/htdocs/jdbc_faq.htm#_59_
    The thin drivers are classes12.zip/classes111.zip. classes12.zip being the most recent release. You can download it from
    http://otn.oracle.com/software/tech/java/sqlj_jdbc/htdocs/winsoft.html
    (the general download site is http://otn.oracle.com/software/tech/java/sqlj_jdbc/content.html )
    Jamie

  • Can I use a tableData provider without to use a table of data base

    i need add rows in a table using the IDE sun java studio creator but I dont need to connect to a table to a database... only add rows in runtime when I do click in a button.. please help me...

    All supported carriers require a data plan with the iPhone.
    If your carrier will permit it, you can put a Micro-SIM in the phone that does not have a data plan.  Make sure, however, that you turn off mobile (cellular) data in settings or you're going to potentially rack up some serious charges.  Not to mention tha fact that you are in effect, crippling the phone.
    If you're in the US, attempting to use AT&T, they will automatically add a data plan to the account when they detect you are using an iPhone without one.

  • " The query cannot use the cache

    Hi , I am testing my query on RSRV and also running it using RSRT but neither RSRV is working and RSRV is throwing a error
    " The query cannot use the cache"
    How to resolve ?
    Tried RSRCACHE and everything looks fine there.

    Hi,
    Thanks for your update.
    for this new error try to Generate this query in RSRT.
    GOTO -> RSRT -> GENERATE tab is there.
    Try it and please update me back.
    Thanks & Regards,
    Vipin

  • Hiding dynamic selections which is default if Logical Data Bases is  used

    Hi All,
       Am making use of PNP logical data base in my report .On the selection screen there is a default icon with text dynamic selections is visible besides the execute icon.Can please anyone tell me how to hide this,i have gone through the DBPNPSEL include but was not able to find the solution for the same.
       Pointers will be appriciated.
    Regards,
    Zareena.

    Create your own report catogory
    Goto --> Attributes --> Report Catogory
    with all the fields that you require
    That will solve your problem

  • Error while trying to use '{' in the query

    Hi,
    The below mentioned query is giving Error while trying to use '{'
    Query:
    select s,x from table(SEM_MATCH(
    '{?s rdf:type <http://www.cs.com/sbip/dwh/mdm/data_modeling#Base_Term> .
    ?s ?p ?x}',
    SEM_Models('foundation'),
    SEM_RuleBases('OWLPRIME'),
    SEM_ALIASES(SEM_ALIAS('dm','http://www.cs.com/sbip/dwh/mdm/data_modeling#'),
    SEM_ALIAS('owl','http://www.w3.org/2002/07/owl#')), null, 'INVALID'))
    where regexp_like(x,'Customers','i');
    Error details:
    ORA-29532: Java call terminated by uncaught Java exception: oracle.spatial.rdf.server.TokenMgrError: Lexical error at line 1, column 1. Encountered: "{" (123), after : ""
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 178
    ORA-06512: at "MDSYS.RDF_MATCH_IMPL_T", line 67
    ORA-06512: at line 4
    I am unable to use Option, Filter in query.
    Any solution?
    Please let me know do i need to apply any patch?
    Note: I am using Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Regards,
    Kavitha.

    Hi,
    For OPTIONAL support in 11.1.0.7.0, you need the following patch
    Patch 7600122: CURLY BRACE SYNTAX,VIRTUAL MODELS, NETWORK INDEXES AND HINTO FRAMEWORK SUPPORT
    Support for SPARQL FILTERs in SEM_MATCH is not available for 11.1.0.7.0. You will need version 11.2.0.1.0 or later for FILTER support. With 11.2.0.1.0, we recommend that you apply our latest patch set:
    Patch 9819833: SEMANTIC TECHNOLOGIES 11G R2 FIX BUNDLE 2
    All of the above patches are available through My Oracle Support.
    Thanks,
    Matt

  • Regarding ABAP query when using the LDB

    Hi Experts,
    Iam preparing one ABAP query by using LDB.
    And i added two more table VBPA and KNA1.
    When i add the VBPA table the system will automatically generate
    the sql query and we need to pass the where condition to thet query.
    system generated like this..
    SELECT SINGLE * FROM VBPA
    WHERE VBELN                =
       AND POSNR                  =
       AND PARVW                 =
    but in the above query i need to pass the values to PARVW as 'AG' or 'SP'.
    how can i pass the two values to that query?
    rgds,
    Sruthi.

    HI,
    It is system generated....just we need to pass the values to where condition.
    in normal ABAP we can do like this...
    SELECT SINGLE * FROM VBPA
    WHERE VBELN                = EKPO-ZZVBELN
       AND POSNR                  = EKPO-ZZPOSNR
       AND PARVW                in  ( 'AG' , 'SP').
    or
    SELECT SINGLE * FROM VBPA
    WHERE VBELN                = EKPO-ZZVBELN
       AND POSNR                = EKPO-ZZPOSNR
       AND                             ( PARVW  =  'AG' or  PARVW  =  'SP' ).
    Rgds,
    Sruthi.

  • Error erase Queries in Query Manager- The query is used with user-define...

    Hello Experts
    I have deleted a User Field that had a Formatted Search and now I can not remove it because it is linked according to a UF, the error message is as follows:
    "The query is used with user-defined values [Message 952-23]"
    There will be a way to resolve this issue???
    Thanks in advance

    Hi Juan,
    I have tried this very limited, but the formid, is this a number in your case?
    SELECT * from cshs t0 inner join ouqr t1 on t0.queryid = t1.intrnalkey
    where t1.qname = '[%0]'
    Running this query I can get the form id that I need to recreate, but I have a feeling you already know the form id, is this correct?
    - Is there an error when you try to recreate the form id?
    - Will it not let you recreate the same form id because the id is given by the system?
    If it is not possible to recreate the form id, please prepare a backup and log a message. Support should be able to correct the entry in table cshs.
    Hope it helps.
    Jesper

  • Error when used hana studio to import Delivery Unit

    HANA version:1.00.80.00.391861
    HANA studio version:1.80.3
    Plantform :SUSE Linux Enterprise Server 11.2
    I meet a error when used hana studio followed that steps to import Delivery Unit:
    Launch HANA Studio 
    Select your HANA instance
    On the Quick launch page, choose Content -> Import
    Now Select HANA Content -> Delivery unit.
    Choose Next
    Select the server, browse the Service DU (Service DU on server: SYS/global/hdb/content): HCO_INA_SERVICE.tgz
    Who can help me what shoud i do.
    thanks.

    I has Resolved.
    You must set the OS directory privileges which has listed on the picutre  to 777 by 'chmod' command ,
    if it's 775 or  others.

  • What are the query errors can be rectified using trns code rsrt?

    Hi all,
    Can anyone let me know the sigifiance of trns code rsrt? with examples. Nor can anyone send me a documentation about rsrt describing its functions and significance.
    What are all the errors will be rectified using rsrt ?
    regds
    hari

    hi,
    RSRT : Query monitor to debug and test the queries. U can test IGS(internet Graphical Service) also.RSRT is to scan the query as to how the query gets executed, whether it uses aggregates or cubes, full table scan or uses index, etc.
    You can also change the performance of a query under the 'Properties' tab.
    If you switch the Read Mode to 'A' - 'Query to Read All Data at Once', it can really kill the query performance. Instead of reading data with each navigation, it reads it all before it loads. It will speed up navigation after the report has rendered, but kill the load time.
    The 'Generate Report' button can be used with the report has become corrupt. It will regenerate the report. It hasn't happened many times, but I've had reports that just failed to run when no change has been made. Regenerating the report fixed it.
    Execute + Debug is a lifesaver when you need to trace user exits in your report. It has a lot of neat options
    chk this link..
    http://help.sap.com/saphelp_nw04/helpdata/en/a0/2a183d30805c59e10000000a114084/content.htm
    hope it helps..

  • ORA-0907 error when querying XMLDB Table using XMLExists

    Hi All,
    Get ORA-00907 error when trying to use XMLExists:
    SELECT *
    FROM tnmab_agreement_xml_binary A
    WHERE
    ( XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/ShippingPartyGroups/ShippingParties/CustomerHolder[SAP_ID="$ARG"]')
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")
    OR
    ( XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/NamedCustomerGroups/NamedCustomer/SAP_IDs/StringWrappers[Value="$ARG"]')
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")
    ORA-00907: missing right parenthesis
    *00907. 00000 - "missing right parenthesis"*
    **Cause:*
    **Action:*
    Error at Line: 6 Column: 176
    Any help is appreciated
    Thanks
    Auro

    XMLExists('declare default element namespace "http://com.oocl.schema.tnm.agreementbuilder"; $XML/Agreement/ShippingPartyGroups/ShippingParties/CustomerHolder[SAP_ID="$ARG"]'
    passing agreements.AGREEMENT_XML as "XML", '5000003001' as "ARG")no ')' after the closing quote

Maybe you are looking for

  • [Solved-sortof] Mounting dvd drive /dev/hdc

    My dvd drive is not mounting for some reason, I thought maybe I just needed to restart and that it would mount again but no luck, this is what I get: mount /dev/hdc /test mount: no medium found I put the same DvD in my cdrom/dvd drive and it mounts s

  • Create connection between 2 backends

    Hi , I need to create connection between 2 system , do i need to do that via RFC destination via SM59 ? if so hOW I can know the IP adress and the the target host between the BE ? Thanks in advance Chris

  • Why can't I open excel files larger than 500 kb?

    Seems as though Excel files (.xlsx format) smaller than 500 KB's that are sent via email open just fine, but anything larger will not open. I'm not sure if this is a Numbers issue or an issue with the Mail app. Started happening ever since the iOS 7.

  • Accordion Spry Blue Bounding Box

    I have created a spry accordion and can not find a way to get rid of the bounding box that appears when you select it in the browser.  In Safari it's blue, Firefox it is a black dash, and Explorer it is a blue dash.

  • FrankenWM - Yet another tiling wm

    I am mainly posting this here so I have a place to discuss the future of FrankenWM somewhere else than in the Github issues or in private emails. TL;DR FrankenWM is a monsterwm-xcb fork, thus coming from monsterwm, thus coming from dminiwm, thus comi