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

Similar Messages

  • 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

  • Native and open  sql - oracle

    hi all,
    <dynamic >  = SELECT matnr  FROM mara .
    EXEC SQL.
      OPEN c1 FOR <dynamic >ENDEXEC.
    ENDEXEC.
    can  i use dynamic native sql in open sql-oracle .
    cheers
    senthil

    EXEC SQL doesn't allow for dynamic constructs. In order to get native SQL features dynamically you can use the JDBC-like classes CL_SQL_STATEMENT, CL_SQL_CONNECTION, and so on.
    Best regards
      Ulrich

  • 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

  • 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

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

  • 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

  • Reporting Services in both SharePoint 2013 connected and native mode?

    Is it possible to configure Reporting Services (SQL Server 2014) to support both SharePoint 2013 connected mode and local Report Server in native mode on the same server using multiple instances of RS? The reason for this setup is to avoid having to purchase
    SharePoint Enterprise CALs for other users than analysts and still be able to publish standard reports to all employees.
    Management and analysts -> Custom reports published through SharePoint 2013 Enterprise (SP2013 ECALs and SQL Server 2014 core license). Data alerts and Power View enabled if possible.
    All employees -> Standard reports published through Native Mode Report Server (SQL Server 2014 core license). Possible subscriptions.
    I find the official documentation a bit lacking in this area but can't find anything stating against the above. It would be greatly appreciated if someone could confirm before planning the installs.
    What I'm aiming for is somewhat similar to the "2 Tier Topology" described at: Example
    License Topologies and Costs for SQL Server 2014 Self-Service Business Intelligence
    With the difference that there is a separate SQL Server 2014 server used both by SharePoint and as a standalone BI-server.
    SharePoint EE + SQL Server 2014 EE
    Excel Services
    SSRS Add-in (Reporting Services, Power View)
    SQL Server DB for SP Content, Configuration and Service Application DB:s
    SQL Server 2014 EE - SharePoint + Standalone for BI
    SSRS SharePoint Mode
    SSRS Native Mode
    SSAS (Not in SharePoint mode, skipping PowerPivot for now. Would Power View still work?)
    SQL Server DB for Data Warehouse
    = 1 x SharePoint EE Server Licence, 2 x SQL Server 2014 EE Server Licenses?
    Deployment
    Topologies for SQL Server BI Features in SharePoint - Actually gives a good overview in the section "PowerPivot for SharePoint
    2013 and Reporting Services Three Server Deployment". Just remove PowerPivot Service from Server 1 and change the Analysis Services in Server 2 to a regular native multidimensional mode. Server 2 would also be used for native Reporting Services.
    Fallback or even beneficial option to install SSRS in SharePoint mode on the SQL Server instance used for content and configuration?

    Hi Daniel Wikar,
    As per my understanding, you want to install two SQL Server instances on the same server, and configure one of the Reporting Services to SharePoint integrated mode, another to native mode.
    According to my knowledge, multiple instances of Reporting Services on the same computer, where one instance runs in SharePoint integrated mode and the other instance runs in native mode is supported. But we must run all report server instances at the same
    level. For example, if we are using SQL Server 2014, all report server instances must be SQL Server 2014.
    Besides, Analysis Services and Reporting Services can be installed as standalone servers, in scale-out configurations, or as shared service applications in a SharePoint farm. Installing the services in a farm enables BI features that are only available in
    SharePoint, including PowerPivot for SharePoint and Power View.
    For more information about Feature Comparison of SharePoint and Native Mode and Supported and Unsupported Configurations, please refer to the following documents:
    http://msdn.microsoft.com/en-us/library/ms157231.aspx
    http://technet.microsoft.com/en-US/library/bb510781(v=SQL.105).aspx
    For detailed information regarding to the license issue, please call
    1-800-426-9400,
    Monday through Friday, 6:00 A.M. to 6:00 P.M. (Pacific Time) to speak directly to a Microsoft licensing specialist. For international customers, please use the Guide to Worldwide Microsoft Licensing Sites to find contact information in your locations.
    You can also visit the following site for more information and support on licensing issues:
    http://www.microsoft.com/licensing/mla/default.aspx
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.

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

  • Native SQL "Table does not exist in database"

    Hi Developers,
    I'm doing a database connection to an Oracle db and trying to read data using native SQL - I keep getting the runtime error "table does not exist in database" on the statement Fetch Next Cursor. The following is the code snippet (I've commented out the Exec SQL and Fetch Next to make sure I have a connection and I do). HR is a schema in the database and T_Donation is a table in HR.
    Data: w1(3),
             c1 type cursor.
    start-of-selection.
      if con_name is initial.
        write: 'No connection specified'.                       "#EC NOTEXT
        return.
      endif.
    try to open the connection and catch the errors (if any)
      try.
          con_ref = cl_sql_connection=>get_connection( con_name ).
        catch cx_sql_exception into sqlerr_ref.
        error occured
          write:
            'Could not open connection', con_name, '.'.         "#EC NOTEXT
          if sqlerr_ref->unknown_connection = 'X'.
            write:
              / con_name, 'is not defined in DBCON'.            "#EC NOTEXT
          elseif sqlerr_ref->db_error = 'X'.
            write:
              / 'sql error', sqlerr_ref->sql_code, 'occured:',
              / sqlerr_ref->sql_message.                        "#EC NOTEXT
          else.
            perform get_trace_file using dev_file.
            write:
              / 'DBI error', sqlerr_ref->internal_error, 'occured.',
              / 'See trace file for further info:',
                icon_read_file as icon hotspot, dev_file.       "#EC NOTEXT
          endif.
          return.
      endtry.
    connection successfully opened
      write:
        / 'Connection', con_name, 'successfully opened.'.       "#EC NOTEXT
    *- Get the data from MS-SQL Server
      EXEC SQL.
        open C1 for
        SELECT HR.T_DONATION.DN_DONATIONYEAR
        FROM HR.T_DONATION
      ENDEXEC.
      do.
        EXEC SQL.
          FETCH NEXT C1 into :w1
        ENDEXEC.
        if sy-subrc = 0.
          perform loop_output.
        else.
          exit.
        endif.
      enddo.
      EXEC SQL.
        CLOSE C1
      ENDEXEC.
    close connection again
      con_ref->close( ).
      write:
        / 'Connection', con_name, 'closed'.                     "#EC NOTEXT
    end-of-selection.
    *& Form LOOP_OUTPUT
    Output
    form loop_output .
      write: /5 w1.
    endform. " LOOP_OUTPUT
    Thanks for your help.
    Jim
    Message was edited by:
            James Barnes

    Well my advice is to check the question in the sql tutorial, it will be quicker then getting an answere.

  • TIME_OUT when accessing Oracle table from SAP using native SQL

    Hi,
    I have a problem in one of my native SQL statement. It takes a long time accessing the table considering that the number of records to be retrieved is only small.
    Something happened on the Oracle system. But, stilll to be confirmed. Looking further at the issue, it seems that when the value in the where clause equated is a literal (meaning the value is not declared in DATA or CONSTANTS in the ABAP Program)
    Example
    1.
    EXEC.
    WHERE FIELD = '1'
    ENDEXEC.
    instead of
    2.
    CONSTANTS: c_1 value '1'.
    EXEC.
    WHERE FIELD = c_1
    ENDEXEC.
    i found that when the way of coding is same as Example 1, a time-out error occurs. But when in Example 2, no issue.
    Can someone explain this?
    Thanks!

    Repetitively asking the same question again and again is against the forum rules.
    Please post an explain of the SQL statement on the remote machine.
    Markus

  • Possible to do "grant" sql statement in Native SQL?

    We have a need to do a grant of access from one of our systems out for various applications.  In order for this to work we need to run a grant access command on the table and are trying to put a wrapper around this so we can use an abap.  Below is the code I am unit testing.  Two questions.  First, can a grant be done via native SQL in abap?  Second, if it can be done, what is the error with the logic where I am trying to put in the table name via a parameter.
    REPORT  ZLJTEST2.
    tables dd02l.
    DATA scarr_carrid TYPE dd02l-tabname.
    SELECT-OPTIONS s_carrid for dd02l-tabname no intervals.
    DATA s_carrid_wa LIKE LINE OF s_carrid.
    DATA name TYPE c LENGTH 20.
    TRY.
        EXEC SQL.
          CREATE FUNCTION selfunc( input CHAR(20) )
            RETURNING char(20);
            DEFINE output char(20);
            set schema sapr3;
            grant select on table input to group infouser;
            RETURN output;
            END FUNCTION;
        ENDEXEC.
        LOOP AT s_carrid INTO s_carrid_wa
                         WHERE sign = 'I' AND option = 'EQ'.
          TRY.
             EXEC SQL.
                EXECUTE PROCEDURE selfunc( IN  :s_carrid_wa-low,
                                           OUT :name )
              ENDEXEC.
              WRITE: / s_carrid_wa-low, name.
            CATCH cx_sy_native_sql_error.
              MESSAGE `Error in procedure execution` TYPE 'I'.
          ENDTRY.
        ENDLOOP.
        EXEC SQL.
          DROP FUNCTION selfunc;
        ENDEXEC.
      CATCH cx_sy_native_sql_error.
        MESSAGE `Error in procedure handling` TYPE 'I'.
    ENDTRY.

    Hi,
    Yes it is posible.
    I made one program like you want. But it need very long code.
    Here I explain the idea:
    1. Create Screen with input TEXT EDIT CONTROL.
        This is for input SQL Statement.
    2. Get SQL Statement from Text Edit Control using method <b>get_text_as_r3table</b>.
    3. Now we need to separate SQL Statement into different table.
        We Separate SELECT, FROM, WHERE, GROUP, HAVING, ORDER, etc.
    4. We need dynamic internal table to store the data.
    5. Select the data according SQL statement.
          SELECT (IT_SELECT)
            into corresponding fields of table  <dyn_table>
          FROM (IT_FROM)
          WHERE (IT_WHERE)
          GROUP BY (IT_GROUP)
          HAVING (IT_HAVING)
          ORDER BY (IT_ORDER).
    6. Display our data using ALV GRID
    Hopefully it will help you.
    Regards,

  • 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

Maybe you are looking for

  • Playlist isn't showing up on iTunes?

    I created a playlist on my iPod touch but when I plug it into my computer and open up iTunes, the playlist doesn't show up under the "on my device" panel. I'm not sure if iTunes has always been like this, where it does not recognize the playlist mayb

  • Error while report execution

    Hi, We are getting the following error while running of the Query '0PA_C01_Q014'. Error Meassage: Program error in class SAPMSSY1 method : UNCAUGHT_EXCEPTION System Error in Program SAPLRRI2 and from REP_ASSIGN_INITIAL_0PT-01- Diagnosis This internal

  • Can't get optical input to w

    I have my XBox hooked up through my Audigy 2 Platinum Pro, and I was wanting to route the sound signal to my speaker system. I have the optical cord plugged into the Xbox output and into the Platinum Pro input, I have set the XBox up through the bios

  • Jboss compatibility with Solaris 10

    Hi, Did anyone install Jboss 3.2.6. on Solaris 10? I still did not decide whether should I install this version or the newest.

  • File transfer through IBM SAP Adapter

    Hi, We are developing a solution where our SAP ECC 6 needs to receive transactional information via the IBM SAP ADAPTER. The Adapter will make a call to a remote function module that we will expose. I would like to know whether it is advisable to pas