Native SQL and CMP

Hi
In our application we are using Swing-clients that access our Informix database through CMP beans in SUN One 2004 Q2 appserver.
We thought we could rely on the database constraints when creating and updating ie. if a column in a table violated the constraint the native Informix errorcode and info could be retrieved/exposed to our applicationcode.
Now it doesn't seem like this, all we get is a corba marshalling exception.
Is there really noway to inform our sessionbeans of what native SQL error occured ? Informix have a error-structure and from that naive structure you can extract information about what constraint was violated - a useful information when trying to find the errors.

Hi,
finally I could solve this problem by myself.
First of all i used the wrong lookup name (deployedAdapters/testPMF).
Right one's are
-  java:comp/env/testPMF
-  deployedAdapters/testPMF/shareable/testPMF
Additionally I didn't get it working with an DataSource created by the Visual Administrator. So I deployed a DataSource with my EAR project using data-sources.xml
I hope this is helpfull for other developers having this problem
peter

Similar Messages

  • Regarding Native SQL and UNIX

    Hi guys. I've developed some programs using Native SQL to connect to a SQL Server database. To do so, i configured a connection on DBCO transaction. The develop SAP server runs on Windows platform, but QA and Production runs on UNIX. So, now i need to modify my programs to run on UNIX
    I know that in order to use DBCO conection to SQL Server requires the server to be on Windows, but i've been reading some postings and SAP notes, and i've read somewhere that you need at least ONE app server to be on windows...
    My question is this: is there a way to specify when connecting to DBCO to use a different app server? is this automatic?
    I hope i made miself clear...
    Jesus

    Solved it on my own

  • Named parameters in Native SQL

    A little background first:
    Our website uses Hibernate as it's JPA provider, but we've run into several issues with it, one of which they actively refuse to fix out of pure arrogance, even when we gave them a good patch for it. The other one is a performance issue that can be greatly improved by passing arrays as parameters, which I've read rumours is supported in EclipseLink. I first tried implementing a Hibernate UserType as they've specified and it turns out they never read them into the Map that looks-up parameter types during binding, even though it's loaded from their hibernate.cfg.xml. In other words, they're only pretending to support custom user types, but unless you're writing-out the full manual loading of their configuration, there's no way to do it.
    After a day of trying to fix all the relation annotations that EclipseLink finds unacceptable in our project (which only uses native SQL and EntityManager.find for selects) I finally got it running and came to discover you don't support named parameters in native SQL. That was really disappointing, because a few months ago we migrated all our queries to named parameters, because positioning ones were too difficult to track and caused more bugs when we had to add more criterias.
    My questions are these:
    Are named parameters for native SQL not supported by JPA specifications or because they are considered low priority?
    Would you accept a patch that supports them?
    Can we really use arrays and/or lists as parameters in queries like this "SELECT * FROM some_table WHERE my_column_a IN ? AND my_column_b NOT IN ?"
    If yes to above, would it still work if the first one is an array of integers and the second is an array of strings?
    Would it work if it's in native SQL and the column types cannot be resolved due to query complexity?

    A little background first:
    Our website uses Hibernate as it's JPA provider, but we've run into several issues with it, one of which they actively refuse to fix out of pure arrogance, even when we gave them a good patch for it. The other one is a performance issue that can be greatly improved by passing arrays as parameters, which I've read rumours is supported in EclipseLink. I first tried implementing a Hibernate UserType as they've specified and it turns out they never read them into the Map that looks-up parameter types during binding, even though it's loaded from their hibernate.cfg.xml. In other words, they're only pretending to support custom user types, but unless you're writing-out the full manual loading of their configuration, there's no way to do it.
    After a day of trying to fix all the relation annotations that EclipseLink finds unacceptable in our project (which only uses native SQL and EntityManager.find for selects) I finally got it running and came to discover you don't support named parameters in native SQL. That was really disappointing, because a few months ago we migrated all our queries to named parameters, because positioning ones were too difficult to track and caused more bugs when we had to add more criterias.
    My questions are these:
    Are named parameters for native SQL not supported by JPA specifications or because they are considered low priority?
    Would you accept a patch that supports them?
    Can we really use arrays and/or lists as parameters in queries like this "SELECT * FROM some_table WHERE my_column_a IN ? AND my_column_b NOT IN ?"
    If yes to above, would it still work if the first one is an array of integers and the second is an array of strings?
    Would it work if it's in native SQL and the column types cannot be resolved due to query complexity?

  • How to get oracle 9i blob column into an itab  in sap using Native SQL

    Hi ,
    We are using SAP ECC 5.0  and we need to coonect to an oracle database ver 9i rel2.
    We need to get the data stored in a blob(pdf/jpeg) into an itab and later
    use it for futher processing.
    I am familiar with using native SQL and I wrote a stored procedure in the non sap oracle database to send the blob info into an internal table in sap.
    But the information is in hex format and the long raw of SAP does not handle this very well.
    Plz see my code below.
    data: itab_insp_drawing like zpicture_cluster(which is of type lraw - 7902 )
          occurs 100 with header line.
    EXEC SQL.
        EXECUTE PROCEDURE
           proc_get_insp_drawings  (
                   IN  :itab-aq_id,
                   IN  :itab-section_id,
                   IN  :t_in_position,
                   out :itab_insp_drawing-picture,
                   OUT :t_blob_length,
                   out :t_out_position,
                   OUT :t_status  )
       ENDEXEC.
      append itab_insp_drawing.
      while t_out_position < t_blob_length.
       EXEC SQL.
        EXECUTE PROCEDURE
           proc_get_insp_drawings  (
                   IN  :itab-aq_id,
                   IN  :itab-section_id,
                   IN  :t_in_position,
                   out :itab_insp_drawing-picture,
                   OUT :t_blob_length,
                   out :t_out_position,
                   OUT :t_status  )
       ENDEXEC.
       append itab_insp_drawing.
       endwhile.
    Any ideas of how to handle blobs from non sap oracle table. I need this blob into an itab in sap.
    Help appreciated.
    Thanks
    Mala

    Please refer the example in this link which deals with Oracle date format.
    You can finnd a command DECODE which is used for date formats. If you have a look at whole theory then you will get an idea.
    Link:[Bulk insert SQL command to transfer data from SAP to Oracle|http://sap.ittoolbox.com/groups/technical-functional/sap-dev/bulk-insert-sql-command-to-transfer-data-from-sap-to-oracle-cl_sql_connection-3780804]

  • Query SAP Database with Native Sql.

    Hi,
    I would like to query the table MARA with native sql and return all headings and data
    Select * from MARA where MATNR = '00000000151515'          
    <i>I need this to be able to TEST my Sql statements.</i>
    In SqlServer you have the Query Analyser where I can do just this, but is there some nice in SAP Tool for this as well ?
    [Unfortanely I can't connect to SAP_U01 database from QA...]
    //Martin

    Hi Martin,
    maybe you give ST05 a try: last button gives the possibility to enter a SQL-statement directly - and for explanation it has to be executed (somehow).
    Regards,
    Christian

  • How can I extract the native SQL generated by TopLink?

    How can I extract the native SQL generated by TopLink?
    This is useful for example to use pagination, or pass the SQL to a stored procedure that may do many things, like using a cursor, or apply security.
    Pagination example where the SQL inside the inner parentheses are generated from Toplink, and the outer SQL is generic:
    select *
    from
    (select xx.*, rownum as rn
    from
    (select o.order_id, r.name, ...
    from placed_order o, restaurant r
    where o.restaurant_id = r.restaurant_id
    order by o.order_ext_id
    ) xx
    where rownum < 21)
    where rn > 10

    Alternatively, you can open your sessions.xml in the Mapping Workbench and for a specific session, you can Click the Login Tab and then the Options tab. Then select "Native SQL" and it will be outputted to the console (assuming that is where you outputing it).
    zb

  • Use of Native SQL

    Can i use all sql statementsa which are used in oracle ? Basically I am more interested in oracle data conversion functions like to_date(),To_Char() with appropriate formats.
    I know that to use oracle's native commands i have to use Native SQL and for that i have to write my query between EXEC SQL and ENDEXEC.  But i am not able to use query that uses date conversion fuctions like to_date() and to_char().
    Also i want to know the list of SQL statements which can be used with Native SQL in Oracle.

    HI.
    please refer this one.
    To avoid the standard F4 help to be show, insert the event PROCESS ON-VALUE-REQUEST request in the program and add a field statement for the field that should trigger the F4 help. In the module called from PROCESS ON-VALUE-REQUEST request, call function module F4IF_FIELD_VALUE_REQUEST.
    Example Code :
    process before output.
    process after input.
    PROCESS ON VALUE-REQUEST.
    FIELD sflight-carrid MODULE f4_help_for_carrid.
    MODULE f4_help_for_carrid INPUT.
    NOTE:
    Tabname/fieldname is the name of the table and field
    for which F4 should be shown.
    Dynprog/Dynpnr/Dynprofield are the names of the Progran/Dynpro/Field
    in which the f4 value should be returned.
    Value: The value of the Dynpro field when calling the F4 help.
    You can limit the values shown, by inseting a value in this parameter
    e.g 'A*' to show only values beginning with A
    CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
    EXPORTING
    tabname = 'SFLIGHT'
    fieldname = 'CARRID'
    SEARCHHELP = ' '
    SHLPPARAM = ' '
    dynpprog = 'ZDANY_F4_OWN_CALL'
    dynpnr = '0100'
    dynprofield = 'SFLIGHT-CARRID'
    STEPL = 0
    value = 'A*'
    MULTIPLE_CHOICE = ' '
    DISPLAY = ' '
    SUPPRESS_RECORDLIST = ' '
    CALLBACK_PROGRAM = ' '
    CALLBACK_FORM = ' '
    TABLES
    RETURN_TAB =
    EXCEPTIONS
    FIELD_NOT_FOUND = 1
    NO_HELP_FOR_FIELD = 2
    INCONSISTENT_HELP = 3
    NO_VALUES_FOUND = 4
    OTHERS = 5
    IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    ENDMODULE. " F4_help_for_carrid
    To control F4 help in a selection screen use the AT SELECTION-SCREEN ON VALUE-REQUEST FOR event.Note that for ranges both the low and high value of the field must have there own ON VALUE-REQUEST
    Example:
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-low.
    PERFORM f4_help_carrid.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR s_prctr-high.
    PERFORM f4_help_carrid
    Rewards all helpfull answers.
    Regards.
    Jay

  • UpdateAllQuery and Native SQL

    Hi,
    I have below three update statements, and need to be in one transaction. How can I accomplish it using UpdateAllQuery? Finance_Management is a child table of Org mapped through org_id; Org_Finance is a child table of Finance_Management linked by finance_management_id.
    Update Org
    Set Account_Balance = Account_Balance + 25, Update_User = 'Jeff_Org', Update_Date = Systimestamp
    Where Org_Id = 10226;
    Update Finance_Management
    Set Account_Balance = (Select Account_Balance From Org Where Org_Id = 10226),
    Transaction_Amount = 25, Transaction_Date = Systimestamp
    where finance_management_id = 1701152;
    Update Org_Finance
    Set Check_Mo_Number = 5432, Payment_Type = 'C'
    where Finance_Management_Id = 1701152;
    Alternatively, when I tried native SQL with executeNonSelectingCall within unit of work like below, it appears that even through the second SQLCall failed, the first one still committed to the database. How can I ensure the three SQLCalls are in one transaction?
    UnitOfWork uow = getSessionFactory().acquireUnitOfWork();
    uow.executeNonSelectingCall(new SQLCall(orgSql));
    uow.executeNonSelectingCall(new SQLCall(fmSql));
    uow.executeNonSelectingCall(new SQLCall(orgFnSql));
    uow.commit();
    Thanks for your help!
    Jeffrey

    I think I have figured it out.
    For using UpdateAllQuery, three different UpdateAllQueries need to be constructed. One critical piece is that, use beginEarlyTransaction() before execute the three queries inside UOW. Same is true when using native SQLs.
    Few questions though that I need some experts to clear my mind:
    - so all database Queries can run inside unit of work, become part of the single transaction within UOW by using beginEarlyTransaction(), is this correct?
    - How about insert? InsertObjectQuery and WriteObjectQuery don't seem allow to use expression, which I need for populating a field like "Account_Balance = (Select Account_Balance From Org Where Org_Id = 10226)". Any suggestions on what API call I should use without using native SQL?
    Thanks,
    Jeffrey

  • Native SQL Performance Difference Between Hard-Coded Value and Parameter

    Hi,
    I have a native SQL (Oracle) query (fairly long & complex with a few sub-queries) that returns in under a second in both ODSI and using an external SQL tool. This query has a hard-coded value for a particular column, namely, a date column.
    When I modify the ODSI function signature so that I pass in a parameter and then replace the hard-coded value in the native SQL with the appropriate parameter binding notation (i.e. '?'), the query takes much longer (2-30 seconds). The duration of the query depends on how many records are actually returned, so it must be running a separate query for each of the results (i.e. the more results returned, the longer the query takes to return).
    What can I do to keep the duration of my ODSI query low while allowing for the parameter?

    OSDI plan with date parameter:
    <?xml version="1.0"?>
    <source ns="fn-bea" name="jdbc.wcb.fineos" kind="relational" tip="jdbc.wcb.fineos">
    <![CDATA[select codeid, description, FEE_CODE_DOC_TYPE, ismax, isovr
    from
    select distinct
    sd.codeid, sd.description,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-MAX (MAXIMUM AMOUNT)'
    ) ISMAX,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-OVR (Overrideable)'
    ISOVR,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-INT (Internet Enterable)'
    ISINT
    ,trow.answerstr FEE_CODE_DOC_TYPE
    from wcbapp.tocorganisation o, wcbapp.tolpartydetails pd, wcbapp.tolserviceagrmtforprovider safp,
    wcbapp.tolserviceagreement sa, wcbapp.tolserviceagreementversion sav, wcbapp.rsrvchrgrsrvagrvrserviceagreem scg_sav,
    wcbapp.tolservicechargegroup scg, wcbapp.tolservicechargegroupversion scgv, wcbapp.tolserviceprovisionagreement spa,
    wcbapp.tolservicedefinition sd
    ,wcbapp.trow trow, wcbapp.tlookupversion tlookupversion, wcbapp.tlookup tlookup
    where
    trow.i_lkpver_rows = tlookupversion.i
    and trow.c_lkpver_rows = tlookupversion.c
    and tlookupversion.i_lookup_versions = tlookup.i
    and tlookupversion.c_lookup_versions = tlookup.c
    and sd.codeid = trow.minstr_1
    and sd.codeid = trow.maxstr_1
    and tlookup.name = 'FeeCodeToDocumentLookup' and
    spa.i_service_serviceratede = sd.i and
    spa.c_service_serviceratede = sd.c and
    spa.i_srchrgrv_serviceratede = scgv.i and
    spa.c_srchrgrv_serviceratede = scgv.c and
    scgv.i_srvchrgr_servicecharge = scg.i and
    scgv.c_srvchrgr_servicecharge = scg.c and
    scg.i = scg_sav.i_from and
    scg.c = scg_sav.c_from and
    scg_sav.i_to = sav.i and
    scg_sav.c_to = sav.c and
    sav.i_srvcagrm_serviceagreem = sa.i and
    sav.c_srvcagrm_serviceagreem = sa.c and
    sa.i = safp.i_srvcagrm_provider and
    sa.c = safp.c_srvcagrm_provider and
    safp.i_prtdtls_serviceagreem = pd.i and
    safp.c_prtdtls_serviceagreem = pd.c and
    pd.i_ocprty_party = o.i and
    pd.c_ocprty_party = o.c and
    ? between safp.effectivedate and safp.enddate and
    o.customerno = ? || ?
    order by sd.codeid
    where ISINT = 1]]>
    <variable name="__fparam0" kind="EXTERNAL">
    </variable>
    <variable name="__fparam1" kind="EXTERNAL">
    </variable>
    <variable name="__fparam2" kind="EXTERNAL">
    </variable>
    </source>
    OSDI plan with date constant:
    <?xml version="1.0"?>
    <source ns="fn-bea" name="jdbc.wcb.fineos" kind="relational" tip="jdbc.wcb.fineos">
    <![CDATA[select codeid, description, FEE_CODE_DOC_TYPE, ismax, isovr
    from
    select distinct
    sd.codeid, sd.description,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-MAX (MAXIMUM AMOUNT)'
    ) ISMAX,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-OVR (Overrideable)'
    ISOVR,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-INT (Internet Enterable)'
    ISINT
    ,trow.answerstr FEE_CODE_DOC_TYPE
    from wcbapp.tocorganisation o, wcbapp.tolpartydetails pd, wcbapp.tolserviceagrmtforprovider safp,
    wcbapp.tolserviceagreement sa, wcbapp.tolserviceagreementversion sav, wcbapp.rsrvchrgrsrvagrvrserviceagreem scg_sav,
    wcbapp.tolservicechargegroup scg, wcbapp.tolservicechargegroupversion scgv, wcbapp.tolserviceprovisionagreement spa,
    wcbapp.tolservicedefinition sd
    ,wcbapp.trow trow, wcbapp.tlookupversion tlookupversion, wcbapp.tlookup tlookup
    where
    trow.i_lkpver_rows = tlookupversion.i
    and trow.c_lkpver_rows = tlookupversion.c
    and tlookupversion.i_lookup_versions = tlookup.i
    and tlookupversion.c_lookup_versions = tlookup.c
    and sd.codeid = trow.minstr_1
    and sd.codeid = trow.maxstr_1
    and tlookup.name = 'FeeCodeToDocumentLookup' and
    spa.i_service_serviceratede = sd.i and
    spa.c_service_serviceratede = sd.c and
    spa.i_srchrgrv_serviceratede = scgv.i and
    spa.c_srchrgrv_serviceratede = scgv.c and
    scgv.i_srvchrgr_servicecharge = scg.i and
    scgv.c_srvchrgr_servicecharge = scg.c and
    scg.i = scg_sav.i_from and
    scg.c = scg_sav.c_from and
    scg_sav.i_to = sav.i and
    scg_sav.c_to = sav.c and
    sav.i_srvcagrm_serviceagreem = sa.i and
    sav.c_srvcagrm_serviceagreem = sa.c and
    sa.i = safp.i_srvcagrm_provider and
    sa.c = safp.c_srvcagrm_provider and
    safp.i_prtdtls_serviceagreem = pd.i and
    safp.c_prtdtls_serviceagreem = pd.c and
    pd.i_ocprty_party = o.i and
    pd.c_ocprty_party = o.c and
    '01-MAY-11' between safp.effectivedate and safp.enddate and
    o.customerno = ? || ?
    order by sd.codeid
    where ISINT = 1]]>
    <variable name="__fparam0" kind="EXTERNAL">
    </variable>
    <variable name="__fparam1" kind="EXTERNAL">
    </variable>
    </source>
    ODSI Audit with date parameter:
    [Thu May 12 13:02:23 GMT-06:00 2011] Starting...
    Query compilation time: 0 ms
    Query evaluation time: 16142 ms
    Operation duration: 16189 ms
    Audit Event:
    common/application
    user: weblogic
    name: ClaimsDataspace
    server: AdminServer
    eventkind: evaluation
    query/cache/queryplan
    found: false
    type: XQUERY_PLAN_CACHE
    query/cache/queryplan
    type: XQUERY_PLAN_CACHE
    inserted: true
    query/performance
    compiletime: 0
    common/session/query/invocation
    time: Thu May 12 13:02:07 GMT-06:00 2011
    blocksize: 65536
    duration: 16001
    common/session/query/invocation
    time: Thu May 12 13:02:23 GMT-06:00 2011
    blocksize: 65536
    duration: 47
    common/session/query/invocation
    time: Thu May 12 13:02:23 GMT-06:00 2011
    blocksize: 65536
    duration: 46
    common/session/query/invocation
    time: Thu May 12 13:02:23 GMT-06:00 2011
    blocksize: 35779
    duration: 16
    query/wrappers/relational
    source: jdbc.wcb.fineos
    sql:
    select codeid, description, FEE_CODE_DOC_TYPE, ismax, isovr
    from
    select distinct
    sd.codeid, sd.description,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-MAX (MAXIMUM AMOUNT)'
    ) ISMAX,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-OVR (Overrideable)'
    ISOVR,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-INT (Internet Enterable)'
    ISINT
    ,trow.answerstr FEE_CODE_DOC_TYPE
    from wcbapp.tocorganisation o, wcbapp.tolpartydetails pd, wcbapp.tolserviceagrmtforprovider safp,
    wcbapp.tolserviceagreement sa, wcbapp.tolserviceagreementversion sav, wcbapp.rsrvchrgrsrvagrvrserviceagreem scg_sav,
    wcbapp.tolservicechargegroup scg, wcbapp.tolservicechargegroupversion scgv, wcbapp.tolserviceprovisionagreement spa,
    wcbapp.tolservicedefinition sd
    ,wcbapp.trow trow, wcbapp.tlookupversion tlookupversion, wcbapp.tlookup tlookup
    where
    trow.i_lkpver_rows = tlookupversion.i
    and trow.c_lkpver_rows = tlookupversion.c
    and tlookupversion.i_lookup_versions = tlookup.i
    and tlookupversion.c_lookup_versions = tlookup.c
    and sd.codeid = trow.minstr_1
    and sd.codeid = trow.maxstr_1
    and tlookup.name = 'FeeCodeToDocumentLookup' and
    spa.i_service_serviceratede = sd.i and
    spa.c_service_serviceratede = sd.c and
    spa.i_srchrgrv_serviceratede = scgv.i and
    spa.c_srchrgrv_serviceratede = scgv.c and
    scgv.i_srvchrgr_servicecharge = scg.i and
    scgv.c_srvchrgr_servicecharge = scg.c and
    scg.i = scg_sav.i_from and
    scg.c = scg_sav.c_from and
    scg_sav.i_to = sav.i and
    scg_sav.c_to = sav.c and
    sav.i_srvcagrm_serviceagreem = sa.i and
    sav.c_srvcagrm_serviceagreem = sa.c and
    sa.i = safp.i_srvcagrm_provider and
    sa.c = safp.c_srvcagrm_provider and
    safp.i_prtdtls_serviceagreem = pd.i and
    safp.c_prtdtls_serviceagreem = pd.c and
    pd.i_ocprty_party = o.i and
    pd.c_ocprty_party = o.c and
    ? between safp.effectivedate and safp.enddate and
    o.customerno = ? || ?
    order by sd.codeid
    where ISINT = 1
    parameters:
    2011-05-01T00:00:00
    DOC
    007492
    time: 16048
    rows: 1967
    query/performance
    evaltime: 16142
    query/service
    result:
    *** removed due to length ***
    query/service
    function: getFeeCodeByCaregiverEffectiveDate1
    arity: 3
    dataservice: ld:org/wcb/claims/payment/FINEOS/physical/SQL.ds
    query:
    import schema namespace t1 = "http://www.test.com/claims/payment" at "ld:org/wcb/claims/payment/FINEOS/physical/schemas/SQL.xsd";
    declare namespace ns0="ld:org/wcb/claims/payment/FINEOS/physical/SQL";
    declare namespace ns1="http://www.w3.org/2001/XMLSchema";
    declare variable $__fparam0 as ns1:dateTime external;
    declare variable $__fparam1 as ns1:string external;
    declare variable $__fparam2 as ns1:string external;
    fn:subsequence(
    for $FeeCode3 in ns0:getFeeCodeByCaregiverEffectiveDate1($__fparam0,$__fparam1,$__fparam2)
         return
                   $FeeCode3
    ,1,5000)
    parameters:
    2011-05-01T00:00:00
    DOC
    007492
    common/time
    duration: 16189
    timestamp: Thu May 12 13:02:07 GMT-06:00 2011
    [Thu May 12 13:02:23 GMT-06:00 2011] End
    ODSI Audit with date constant:
    [Thu May 12 13:10:00 GMT-06:00 2011] Starting...
    Query compilation time: 0 ms
    Query evaluation time: 359 ms
    Operation duration: 375 ms
    Audit Event:
    common/application
    user: weblogic
    name: ClaimsDataspace
    server: AdminServer
    eventkind: evaluation
    query/cache/queryplan
    found: true
    type: XQUERY_PLAN_CACHE
    query/performance
    compiletime: 0
    common/session/query/invocation
    time: Thu May 12 13:10:00 GMT-06:00 2011
    blocksize: 59256
    duration: 359
    query/wrappers/relational
    source: jdbc.wcb.fineos
    sql:
    select codeid, description, FEE_CODE_DOC_TYPE, ismax, isovr
    from
    select distinct
    sd.codeid, sd.description,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-MAX (MAXIMUM AMOUNT)'
    ) ISMAX,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-OVR (Overrideable)'
    ISOVR,
    select count(*) from wcbapp.tolserviceset ss, wcbapp.RSERVICESRVCSETSERVICESETS sss, wcbapp.tolservicedefinition sd1 where
    sss.i_from = sd.i and
    sss.c_from = sd.c and
    sss.i_to = ss.i and
    sss.c_to = ss.c and
    sd1.codeid = sd.codeid and
    ss.name = 'FEEGROUP-INT (Internet Enterable)'
    ISINT
    ,trow.answerstr FEE_CODE_DOC_TYPE
    from wcbapp.tocorganisation o, wcbapp.tolpartydetails pd, wcbapp.tolserviceagrmtforprovider safp,
    wcbapp.tolserviceagreement sa, wcbapp.tolserviceagreementversion sav, wcbapp.rsrvchrgrsrvagrvrserviceagreem scg_sav,
    wcbapp.tolservicechargegroup scg, wcbapp.tolservicechargegroupversion scgv, wcbapp.tolserviceprovisionagreement spa,
    wcbapp.tolservicedefinition sd
    ,wcbapp.trow trow, wcbapp.tlookupversion tlookupversion, wcbapp.tlookup tlookup
    where
    trow.i_lkpver_rows = tlookupversion.i
    and trow.c_lkpver_rows = tlookupversion.c
    and tlookupversion.i_lookup_versions = tlookup.i
    and tlookupversion.c_lookup_versions = tlookup.c
    and sd.codeid = trow.minstr_1
    and sd.codeid = trow.maxstr_1
    and tlookup.name = 'FeeCodeToDocumentLookup' and
    spa.i_service_serviceratede = sd.i and
    spa.c_service_serviceratede = sd.c and
    spa.i_srchrgrv_serviceratede = scgv.i and
    spa.c_srchrgrv_serviceratede = scgv.c and
    scgv.i_srvchrgr_servicecharge = scg.i and
    scgv.c_srvchrgr_servicecharge = scg.c and
    scg.i = scg_sav.i_from and
    scg.c = scg_sav.c_from and
    scg_sav.i_to = sav.i and
    scg_sav.c_to = sav.c and
    sav.i_srvcagrm_serviceagreem = sa.i and
    sav.c_srvcagrm_serviceagreem = sa.c and
    sa.i = safp.i_srvcagrm_provider and
    sa.c = safp.c_srvcagrm_provider and
    safp.i_prtdtls_serviceagreem = pd.i and
    safp.c_prtdtls_serviceagreem = pd.c and
    pd.i_ocprty_party = o.i and
    pd.c_ocprty_party = o.c and
    '01-MAY-11' between safp.effectivedate and safp.enddate and
    o.customerno = ? || ?
    order by sd.codeid
    where ISINT = 1
    parameters:
    DOC
    007492
    time: 344
    rows: 500
    query/performance
    evaltime: 359
    query/service
    result:
    *** removed due to length ***
    query/service
    function: getFeeCodeByCaregiverEffectiveDate1
    arity: 2
    dataservice: ld:org/wcb/claims/payment/FINEOS/physical/SQL.ds
    query:
    import schema namespace t1 = "http://www.test.com/claims/payment" at "ld:org/wcb/claims/payment/FINEOS/physical/schemas/SQL.xsd";
    declare namespace ns0="ld:org/wcb/claims/payment/FINEOS/physical/SQL";
    declare namespace ns1="http://www.w3.org/2001/XMLSchema";
    declare variable $__fparam0 as ns1:string external;
    declare variable $__fparam1 as ns1:string external;
    fn:subsequence(
    for $FeeCode3 in ns0:getFeeCodeByCaregiverEffectiveDate1($__fparam0,$__fparam1)
         return
                   $FeeCode3
    ,1,500)
    parameters:
    DOC
    007492
    common/time
    duration: 375
    timestamp: Thu May 12 13:10:00 GMT-06:00 2011
    [Thu May 12 13:10:00 GMT-06:00 2011] End
    ------------------------------------------------------------------------

  • Native Abap and SQL server table

    Hi,
    i am new to this topic:
    can you please write me about:
    how to connect to sql database(to insert-update-delete) records to sql table from sap side(specifially i will insert data into sql table).
    Where can i start to code such a thing?
    What kind of info shoul i get from basis team(sql server's ip or what) and how to use this data(for example to connect to sql and insert a record for testing purposes)?
    please write me detailly and if possible a code sample.
    Note: sap application is installed on db6(windows).
    Thanks.
    Edited by: sapsdn2011 on Jul 27, 2011 3:12 PM

    Hi,
    the starting point how to access a secondary database is provided here: http://help.sap.com/abapdocu_70/en/ABENOPENSQL_MULTICONNECT.htm
    Feel free to revert back if you have any more specific question.
    BR
    Sandra

  • What is native Sql data types and does oracle support this?

    what is native Sql data types
    Does oracle support this?

    http://download-east.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#g31099

  • While running the livecache server test a native sql error occures

    We are using scm4.1 livecache 7.5.0 And every time we are running the livecache test program he is dumping
    whith the following dump
    patch level scm & scm_basis is 8
    Runtime Errors         DBIF_DSQL2_SQL_ERROR
    Except.                CX_SY_NATIVE_SQL_ERROR
    Date and Time          31.10.2005 16:50:55
    ShrtText
    An SQL error occurred when executing Native SQL.
    What happened?
    Error 600 occurred in the current database connection "LCA".
    What can you do?
    Print out the error message (using the "Print" function)
    and make a note of the actions and input that caused the
    error.
    To resolve the problem, contact your SAP system administrator.
    You can use transaction ST22 (ABAP Dump Analysis) to view and administer
    termination messages, especially those beyond their normal deletion
    date.
    is especially useful if you want to keep a particular message.
    How to correct the error
    Database error text........: "Work rolled back: DbpError -28814 in
    APS_ORDER_CH"
    Database error code .......: 600
    Triggering SQL statement...: " ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?
    ? ? ? ? ? ? ? or'"
    Internal call code.........: "[DBDS/NEW DSQL]"
    Please check the entries in the system log (Transaction SM21).
    You may able to find an interim solution to the problem
    in the SAP note system. If you have access to the note system yourself,
    use the following search criteria:
    "DBIF_DSQL2_SQL_ERROR" CX_SY_NATIVE_SQL_ERRORC
    "/SAPAPO/SAPLOM_PLANNING" or "/SAPAPO/LOM_PLANNINGU08"
    "/SAPAPO/OM_ORDER_CHANGE"
    If you cannot solve the problem yourself and you wish to send
    an error message to SAP, include the following documents:
    1. A printout of the problem description (short dump)
    To obtain this, select in the current display "System->List->
    Save->Local File (unconverted)".
    2. A suitable printout of the system log
    To obtain this, call the system log through transaction SM21.
    Limit the time interval to 10 minutes before and 5 minutes
    after the short dump. In the display, then select the function
    "System->List->Save->Local File (unconverted)".
    3. If the programs are your own programs or modified SAP programs,
    supply the source code.
    To do this, select the Editor function "Further Utilities->
    Upload/Download->Download".
    4. Details regarding the conditions under which the error occurred
    or which actions and input led to the error.
    The exception must either be prevented, caught within the procedure
    "/SAPAPO/OM_ORDER_CHANGE"
    "(FUNCTION)", or declared in the procedure's RAISING clause.
    To prevent the exception, note the following:
    System environment
    SAP Release.............. "640"
    Application server....... "bebruap2"
    Network address.......... "195.213.49.227"
    Operating system......... "Windows NT"
    Release.................. "5.2"
    Hardware type............ "4x Intel 801586"
    Character length......... 16 Bits
    Pointer length........... 32 Bits
    Work process number...... 1
    Short dump setting....... "full"
    Database server.......... "BEBRUAP2"
    Database type............ "MSSQL"
    Database name............ "APD"
    Database owner........... "apd"
    Character set............ "C"
    SAP kernel............... "640"
    Created on............... "Aug 23 2005 00:00:49"
    Created in............... "NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10"
    Database version......... "SQL_Server_8.00 "
    Patch level.............. "87"
    Patch text............... " "
    Supported environment....
    Database................. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version..... "640"
    Operating system......... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
    Memory usage.............
    Roll..................... 8176
    EM....................... 24040336
    Heap..................... 0
    Page..................... 1687552
    MM Used.................. 1516920
    MM Free.................. 572032
    SAP Release.............. "640"
    User and Transaction
    Client.............. 000
    User................ "CGRAULS"
    Language key........ "E"
    Transaction......... "/SAPAPO/OM03 "
    Program............. "/SAPAPO/SAPLOM_PLANNING"
    Screen.............. "SAPMSSY0 1000"
    Screen line......... 6
    Information on where terminated
    The termination occurred in the ABAP program "/SAPAPO/SAPLOM_PLANNING" in
    "/SAPAPO/OM_ORDER_CHANGE".
    The main program was "/SAPAPO/OM_TB_FLOW_QUANTITY ".
    The termination occurred in line 91 of the source code of the (Include)
    program "/SAPAPO/LOM_PLANNINGU08"
    of the source code of program "/SAPAPO/LOM_PLANNINGU08" (when calling the
    editor 910).
    Processing was terminated because the exception "CX_SY_NATIVE_SQL_ERROR"
    occurred in the
    procedure "/SAPAPO/OM_ORDER_CHANGE" "(FUNCTION)" but was not handled locally,
    not declared in the
    RAISING clause of the procedure.
    The procedure is in the program "/SAPAPO/SAPLOM_PLANNING ". Its source code
    starts in line 5
    of the (Include) program "/SAPAPO/LOM_PLANNING$08 ".
    Source Code Extract
    Line
    SourceCde
    61
    is_gen_params-simversion
    62
    is_gen_params-dont_set_netchg_flag
    63
    space.
    64
    65
    Kontrollstruktur IS_GET_CHANGED_OPTIONS anpassen.
    66
    IF NOT et_changed_orders IS REQUESTED.
    67
    is_get_changed_options-send_chg_top_order = gc_false.
    68
    ENDIF.
    69
    IF NOT et_changed_cap_reqs IS REQUESTED.
    70
    is_get_changed_options-send_chg_cap_req = gc_false.
    71
    ENDIF.
    72
    IF NOT et_changed_io_nodes IS REQUESTED.
    73
    is_get_changed_options-send_chg_ionode = gc_false.
    74
    ENDIF.
    75
    IF NOT et_changed_io_pp_nodes IS REQUESTED.
    76
    is_get_changed_options-send_chg_io_pp = gc_false.
    77
    ENDIF.
    78
    IF NOT et_changed_pegids IS REQUESTED.
    79
    is_get_changed_options-send_chg_pegid = gc_false.
    80
    ENDIF.
    81
    IF NOT et_deleted_fix_pegging IS REQUESTED.
    82
    is_get_changed_options-send_del_fix_peg = gc_false.
    83
    ENDIF.
    84
    start_function 'OM_ORDER_CHANGE'.                         "#EC *
    85
    Verbindung zum liveCache aufbauen
    86
    check_server.
    87
    connect_to_livecache.
    88
    COM-Routine zum Anlegen bzw. Überschreiben eines Zeitstrahls
    89
    90
    EXEC sql.
    >>>>>
    execute procedure                  "APS_ORDER_CHANGE" (
    92
    in  :ls_gen_com_params,
    93
    out :lv_rc,
    94
    in  :et_rc,
    95
    in  :it_order_method,
    96
    in  :it_ordkeys,
    97
    in  :it_ordmaps,
    98
    in  :it_orders,
    99
    in  :it_activities,
    100
    in  :it_mode,
    101
    in  :it_cap_reqs,
    102
    in  :it_positions,
    103
    in  :it_inputs,
    104
    in  :it_outputs,
    105
    in  :it_prodflow,
    106
    in  :it_intern_constraints,
    107
    in  :it_extern_constraints,
    108
    in  :it_charact_val_acts,
    109
    in  :it_charact_req_inpnode,
    110
    in  :it_charact_val_outnode,
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    0
    SY-TABIX
    1
    SY-DBCNT
    1
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    Flow Quantity Test
    SY-MSGTY
    S
    SY-MSGID
    /SAPAPO/OM_TEST
    SY-MSGNO
    001
    SY-MSGV1
    Create transSim
    SY-MSGV2
    SY-MSGV3
    SY-MSGV4
    Active Calls/Events
    No.   Ty.          Program                             Include                             Line
    Name
    3 FUNCTION     /SAPAPO/SAPLOM_PLANNING             /SAPAPO/LOM_PLANNINGU08                91
    /SAPAPO/OM_ORDER_CHANGE
    2 FORM         /SAPAPO/OM_TB_FLOW_QUANTITY         /SAPAPO/OM_TB_FLOW_QUANTITY           802
    CHANGE_DATA
    1 EVENT        /SAPAPO/OM_TB_FLOW_QUANTITY         /SAPAPO/OM_TB_FLOW_QUANTITY            11
    START-OF-SELECTION
    Chosen variables
    Name
    Val.
    No.       3 Ty.          FUNCTION
    Name  /SAPAPO/OM_ORDER_CHANGE
    IS_ATP_INFO
    01ATP0000001~CGRAULSXX##
    334553333333744545455500
    011400000001E37215C38800
    000000000000000000000000
    000000000000000000000000
    IS_CONTROLPARAMETERS
    &#38657;&#4096;#&#3074;&#770;&#9073;&#13586;&#40084;#####
    2222222222222222222222001007190000022
    0000000000000000000000100221240000100
    0000000000000000000000910002390000000
    0000000000000000000000700C335C000C000
    IS_GEN_PARAMS
    01PLV0000001~CGRAULS
    3354533333337445454522222
    010C60000001E37215C300000
    0000000000000000000000000
    0000000000000000000000000
    IS_GET_CHANGED_OPTIONS
    2222222
    0000000
    0000000
    0000000
    IT_ACTIVITIES
    Table IT_274[1x256]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ACTIVITIES
    Table reference: 41
    TABH+  0(20) = 5087FFDF00000000000000002900000012010000
    TABH+ 20(20) = 0100000000010000FFFFFFFF0487000000290000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x5087FFDF
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 41    (0x29000000)
    label        = 274   (0x12010000)
    fill         = 1     (0x01000000)
    leng         = 256   (0x00010000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000205
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x180112E0
    pghook       = 0x00000000
    idxPtr       = 0x00000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x10000000)
    lineAlloc    = 16    (0x10000000)
    store_id     = 126   (0x7E000000)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_CAP_REQS
    Table IT_276[1x112]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_CAP_REQS
    Table reference: 39
    TABH+  0(20) = 48BB06E000000000000000002700000014010000
    TABH+ 20(20) = 0100000070000000FFFFFFFF04870000C0290000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x48BB06E0
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 39    (0x27000000)
    label        = 276   (0x14010000)
    fill         = 1     (0x01000000)
    leng         = 112   (0x70000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000209
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x188D04E0
    pghook       = 0x00000000
    idxPtr       = 0x00000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x10000000)
    lineAlloc    = 16    (0x10000000)
    store_id     = 124   (0x7C000000)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_CHARACT_REQ_INPNODE
    Table IT_418[0x140]
    FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_CHARACT_REQ_INPNODE
    Table reference: 32
    TABH+  0(20) = 00000000000000000000000020000000A2010000
    TABH+ 20(20) = 000000008C000000FFFFFFFF04870000301D0000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x00000000
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 32    (0x20000000)
    label        = 418   (0xA2010000)
    fill         = 0     (0x00000000)
    leng         = 140   (0x8C000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000142
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    store_id     = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_CHARACT_VAL_ACTS
    Table IT_417[0x156]
    FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_CHARACT_VAL_ACTS
    Table reference: 50
    TABH+  0(20) = 00000000000000000000000032000000A1010000
    TABH+ 20(20) = 000000009C000000FFFFFFFF04870000901D0000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x00000000
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 50    (0x32000000)
    label        = 417   (0xA1010000)
    fill         = 0     (0x00000000)
    leng         = 156   (0x9C000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000144
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    store_id     = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_CHARACT_VAL_OUTNODE
    Table IT_419[0x156]
    FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_CHARACT_VAL_OUTNODE
    Table reference: 60
    TABH+  0(20) = 0000000000000000000000003C000000A3010000
    TABH+ 20(20) = 000000009C000000FFFFFFFF04870000901D0000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x00000000
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 60    (0x3C000000)
    label        = 419   (0xA3010000)
    fill         = 0     (0x00000000)
    leng         = 156   (0x9C000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000144
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    store_id     = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_EXTERN_CONSTRAINTS
    Table IT_416[0x124]
    FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_EXTERN_CONSTRAINTS
    Table reference: 71
    TABH+  0(20) = 00000000000000000000000047000000A0010000
    TABH+ 20(20) = 000000007C000000FFFFFFFF04870000E02A0000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x00000000
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 71    (0x47000000)
    label        = 416   (0xA0010000)
    fill         = 0     (0x00000000)
    leng         = 124   (0x7C000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000215
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    store_id     = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_INPUTS
    Table IT_278[1x420]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_INPUTS
    Table reference: 63
    TABH+  0(20) = 087400E0C0E303E0000000003F00000016010000
    TABH+ 20(20) = 01000000A4010000FFFFFFFF04870000202A0000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x087400E0
    ext1         = 0xC0E303E0
    shmId        = 0     (0x00000000)
    id           = 63    (0x3F000000)
    label        = 278   (0x16010000)
    fill         = 1     (0x01000000)
    leng         = 420   (0xA4010000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000211
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x78DC11E0
    pghook       = 0x00000000
    idxPtr       = 0x00000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x10000000)
    lineAlloc    = 16    (0x10000000)
    store_id     = 123   (0x7B000000)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = 0x2029FFDF
    hsdir        = 0x00000000
    ext2         = 0x00000000
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_INTERN_CONSTRAINTS
    Table IT_415[0x124]
    FUNCTION=/SAPAPO/OM_ORDER_CHANGEDATA=IT_INTERN_CONSTRAINTS
    Table reference: 49
    TABH+  0(20) = 000000000000000000000000310000009F010000
    TABH+ 20(20) = 000000007C000000FFFFFFFF04870000E02A0000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x00000000
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 49    (0x31000000)
    label        = 415   (0x9F010000)
    fill         = 0     (0x00000000)
    leng         = 124   (0x7C000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000215
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = Not allocated
    pghook       = Not allocated
    idxPtr       = Not allocated
    refCount     = Not allocated
    tstRefCount  = Not allocated
    lineAdmin    = Not allocated
    lineAlloc    = Not allocated
    store_id     = Not allocated
    shmIsReadOnly = Not allocated
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_MODE
    Table IT_275[1x164]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_MODES
    Table reference: 52
    TABH+  0(20) = A03C00E000000000000000003400000013010000
    TABH+ 20(20) = 01000000A4000000FFFFFFFF0487000060290000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0xA03C00E0
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 52    (0x34000000)
    label        = 275   (0x13010000)
    fill         = 1     (0x01000000)
    leng         = 164   (0xA4000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000207
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0xC8F611E0
    pghook       = 0x00000000
    idxPtr       = 0x00000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x10000000)
    lineAlloc    = 16    (0x10000000)
    store_id     = 125   (0x7D000000)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_ORDERS
    Table IT_293[1x320]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ORDERS1
    Table reference: 47
    TABH+  0(20) = 20B403E000000000000000002F00000025010000
    TABH+ 20(20) = 0100000040010000FFFFFFFF0400000030380000
    TABH+ 40( 8) = 01000000C1308000
    store        = 0x20B403E0
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 47    (0x2F000000)
    label        = 293   (0x25010000)
    fill         = 1     (0x01000000)
    leng         = 320   (0x40010000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000286
    occu         = 1     (0x01000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x9080FFDF
    pghook       = 0x00000000
    idxPtr       = 0x00000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 1     (0x01000000)
    lineAlloc    = 1     (0x01000000)
    store_id     = 130   (0x82000000)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_ORDER_METHOD
    Table IT_268[2x62]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ORDER_METHOD
    Table reference: 51
    TABH+  0(20) = 8882FFDF0000000000000000330000000C010000
    TABH+ 20(20) = 020000003E000000FFFFFFFF04000000B0360000
    TABH+ 40( 8) = 10000000C1248000
    store        = 0x8882FFDF
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 51    (0x33000000)
    label        = 268   (0x0C010000)
    fill         = 2     (0x02000000)
    leng         = 62    (0x3E000000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000278
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 2     (cmpSingleMcmpR)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0
    isShmLockId  = 0
    gcKind       = 0
    isUsed       = 1
    >>>>> Shareable Table Header Data <<<<<
    tabi         = 0x0868FFDF
    pghook       = 0x00000000
    idxPtr       = 0x00000000
    refCount     = 0     (0x00000000)
    tstRefCount  = 0     (0x00000000)
    lineAdmin    = 16    (0x10000000)
    lineAlloc    = 16    (0x10000000)
    store_id     = 122   (0x7A000000)
    shmIsReadOnly = 0     (0x00000000)
    >>>>> 1st level extension part <<<<<
    regHook      = Not allocated
    hsdir        = Not allocated
    ext2         = Not allocated
    >>>>> 2nd level extension part <<<<<
    tabhBack     = Not allocated
    delta_head   = Not allocated
    pb_func      = Not allocated
    pb_handle    = Not allocated
    IT_ORDKEYS
    Table IT_271[1x332]
    PROGRAM=/SAPAPO/OM_TB_FLOW_QUANTITYFORM=CHANGE_DATADATA=LT_ORDKEYS
    Table reference: 29
    TABH+  0(20) = 80E303E000000000000000001D0000000F010000
    TABH+ 20(20) = 010000004C010000FFFFFFFF04870000E0270000
    TABH+ 40( 8) = 10000000C1308000
    store        = 0x80E303E0
    ext1         = 0x00000000
    shmId        = 0     (0x00000000)
    id           = 29    (0x1D000000)
    label        = 271   (0x0F010000)
    fill         = 1     (0x01000000)
    leng         = 332   (0x4C010000)
    loop         = -1    (0xFFFFFFFF)
    xtyp         = TYPE#000199
    occu         = 16    (0x10000000)
    access       = 1     (ItAccessStandard)
    idxKind      = 0     (ItIndexNone)
    uniKind      = 2     (ItUniqueNon)
    keyKind      = 1     (default)
    cmpMode      = 8     (cmpManyEq)
    occu0        = 1
    collHash     = 0
    groupCntl    = 0
    rfc          = 0
    unShareable  = 0
    mightBeShared = 0
    sharedWithShmTab = 0

    Hi,
    the error DbpError -28814 denotes that an object cannot be found.
    Can you maybe tell me your exact liveCache version (incl. Build level) and LCA Build?
    Additionally, please copy the relevant error information from the file (/sapdb/data/wrk/<SID>/)knldiag.err into this thread.
    Which exact 'liveCache test program' are your referring to (which of the /SAPAPO/... transactions)?
    Kind regards,
    Roland

  • Not able to get the connection to mssql server thro native sql

    Dear Experts,
               I have created a database connection to mssql server thro DBCO t.code.Am not able to get the connection when i am executing Native SQl for geting connection of mssql server.
    DATA: CON_NAME LIKE DBCON-CON_NAME VALUE 'BIW'.
    EXEC SQL.
      CONNECT TO :con_name AS 'C1'
    ENDEXEC.
    Am always getting sy-subrc = 4. The user name and password i have given in dbcon table having full authorization to access mssql database. I am working SAP ecc 5.0. Also both servers are running in windows.
    could anyone hlep me on this issue.
    Thanks in advance.

    Hello, the submitted error must be analyzed according to the Syntaxis and characteristics of the MSSQL database. See explanation of error.
    http://doc.ddart.net/mssql/sql2000/html/trblsql/tr_reslsyserr_1_1o1i.htm
    Error 156
    Severity Level 15
    Message Text
    Incorrect syntax near the keyword '%.*ls'.
    Explanation
    This error indicates that the syntax of a Transact-SQL statement is incorrect and that the syntax error was detected near the keyword specified in the error message. The most frequent causes for syntax errors are misspellings of Transact-SQL keywords or operators, and specifying the syntax of a Transact-SQL statement in the wrong order.
    One of the more complicated causes for this error may be a compatibility level mismatch for the current database. If the current database has a compatibility level other than 70, Microsoft® SQL Serveru2122 will not recognize any of the keywords that a database with a compatibility level of 70 would recognize.
    Action
    First, check the Transact-SQL statement syntax near the keyword specified in the error message. Because Transact-SQL language syntax can be very complex, SQL Server may incorrectly report the position of the syntax error as later in the Transact-SQL statement than it actually occurred. Second, reexamine the entire Transact-SQL statement that generated the error. Verify the syntax order of the statement.
    Ensure that the database does not have a compatibility level of 65 and has a compatibility level of 70.

  • Performance for join 9 custom table with native SQL ?

    Hi Expert,
    I need your opinion regarding performance to join 9 tables with native sql. Recently i have to tunning some customize extraction cost  report. This report extract about 10 million cost of material everyday.
    The current program actually, try to populate the condition data and insert into customize table and join all the table to get data using native sql.
    SELECT /*+ ordered use_hash(mst,pg,rg,ps,rs,dpg,drg,dps,drs) */
                mst.werks, ....................................
    FROM
                sapsr3.zab_info mst,
                sapsr3.zab_pc pg,
                sapsr3.zab_rc rg,
                sapsr3.zab_pc ps,
                sapsr3.zab_rc rs,
                sapsr3.zab_g_pc dpg,
                sapsr3.zab_g_rc drg,
                sapsr3.zab_s_pc dps,
                sapsr3.zab_s_rc drs
            WHERE mst.zseq_no = :p_rep_run_id
            AND mst.werks = :p_werks
            AND mst.mandt = rg.mandt(+)
            AND mst.ekorg = rg.ekorg(+)
            AND mst.lifnr = rg.lifnr(+)
            AND mst.matnr = rg.matnr(+)
            ...............................................   unitl all table (9 tables)
            AND ps.mandt = dps.mandt(+)
            AND ps.knumh = dps.knumh(+)
            AND ps.zseq_no = dps.zseq_no(+)
            AND COALESCE (dps.kbetr, drs.kbetr, dpg.kbetr, drg.kbetr) <> 0
    It seems the query ask for database to using hashed table. would that be it will burden the database ? and impacted to others sap process ?
    Please advise
    Thank You and Best Regards

    you can only argue coming from measurements and that is not the case.
    Coming from the code, I see only that you do not understand it at all, so better leave it as it is. It is not a hash table, but a hash join on these table.

  • Performance: Open SQL vs. Native SQL (Oracle)

    Hi everybody,
    I have an interesting issue here. For a DB selection I use an Open SQL query from a table view into an internal table. It works fine, but the performance is not very well. The SELECT uses LIKE and wildcards (%) to search for customer master data (names and address fields).
    Because of the bad performance I made some tests in transaction DB02 with native SQL, but exactly the same SELECT structure. It looks like this:
      SELECT *
        FROM zzrm_cust_s_hlp
       WHERE client = 100
         AND mc_name1      LIKE '<name>%'
         AND mc_name2      LIKE '<name>%'
         AND valid_from    <= <timestamp>
         AND valid_to      >= <timestamp>
    Ok, now I tried exactly the same SELECT statement with the same data to search for (<name> and <timestamp) with Open SQL and Native SQL. The Difference is quite suprising, the Native SQL query is about 5-10 times faster (arount 1 sec) than the Open SQL query (around 5-10 sec). Even with the LIKE keywords and the wildcards.
    Any ideas what could be the problem with the Open SQL query?
    And: what can I do to achive the same performance as with the Native SQL query?
    Kind regards and thanks in advance for any help,
    Matthias

    Ok, here is the the SQL explaination from the DB02 query:
    SELECT STATEMENT ( Estimated Costs = 194 , Estimated #Rows = 1 )
           9 COUNT STOPKEY
             Filter Predicates
               8 NESTED LOOPS
                 ( Estim. Costs = 193 , Estim. #Rows = 1 )
                 Estim. CPU-Costs = 1,665,938 Estim. IO-Costs = 193
                   5 NESTED LOOPS
                     ( Estim. Costs = 144 , Estim. #Rows = 98 )
                     Estim. CPU-Costs = 1,162,148 Estim. IO-Costs = 144
                       2 TABLE ACCESS BY INDEX ROWID BUT000
                         ( Estim. Costs = 51 , Estim. #Rows = 93 )
                         Estim. CPU-Costs = 468,764 Estim. IO-Costs = 51
                         Filter Predicates
                           1 INDEX SKIP SCAN BUT000~NAM
                             ( Estim. Costs = 6 , Estim. #Rows = 93 )
                             Search Columns: 1
                             Estim. CPU-Costs = 59,542 Estim. IO-Costs = 6
                             Access Predicates Filter Predicates
                       4 TABLE ACCESS BY INDEX ROWID BUT020
                         ( Estim. Costs = 1 , Estim. #Rows = 1 )
                         Estim. CPU-Costs = 7,456 Estim. IO-Costs = 1
                         Filter Predicates
                           3 INDEX RANGE SCAN BUT020~0
                             ( Estim. Costs = 1 , Estim. #Rows = 1 )
                             Search Columns: 2
                             Estim. CPU-Costs = 3,661 Estim. IO-Costs = 1
                             Access Predicates
                   7 TABLE ACCESS BY INDEX ROWID ADRC
                     ( Estim. Costs = 1 , Estim. #Rows = 1 )
                     Estim. CPU-Costs = 5,141 Estim. IO-Costs = 1
                     Filter Predicates
                       6 INDEX UNIQUE SCAN ADRC~0
                         Search Columns: 4
                         Estim. CPU-Costs = 525 Estim. IO-Costs = 0
                         Access Predicates
    And this is the one from the Open SQL query in ABAP:
    SELECT STATEMENT ( Estimated Costs = 15,711 , Estimated #Rows = 29 )
           7 NESTED LOOPS
             ( Estim. Costs = 15,710 , Estim. #Rows = 29 )
             Estim. CPU-Costs = 3,021,708,117 Estim. IO-Costs = 15,482
               4 NESTED LOOPS
                 ( Estim. Costs = 15,411 , Estim. #Rows = 598 )
                 Estim. CPU-Costs = 3,018,711,707 Estim. IO-Costs = 15,183
                   1 TABLE ACCESS FULL BUT020
                     ( Estim. Costs = 9,431 , Estim. #Rows = 11,951 )
                     Estim. CPU-Costs = 2,959,067,612 Estim. IO-Costs = 9,207
                     Filter Predicates
                   3 TABLE ACCESS BY INDEX ROWID ADRC
                     ( Estim. Costs = 1 , Estim. #Rows = 1 )
                     Estim. CPU-Costs = 4,991 Estim. IO-Costs = 1
                     Filter Predicates
                       2 INDEX UNIQUE SCAN ADRC~0
                         Search Columns: 4
                         Estim. CPU-Costs = 525 Estim. IO-Costs = 0
                         Access Predicates
               6 TABLE ACCESS BY INDEX ROWID BUT000
                 ( Estim. Costs = 1 , Estim. #Rows = 1 )
                 Estim. CPU-Costs = 5,011 Estim. IO-Costs = 1
                 Filter Predicates
                   5 INDEX UNIQUE SCAN BUT000~0
                     Search Columns: 2
                     Estim. CPU-Costs = 525 Estim. IO-Costs = 0
                     Access Predicates
    Of course I can see the difference.
    But since the statements are identical, I don't understand why this difference exists
    Thanks for your help!
    Kind regards, Matthias

Maybe you are looking for