Converting Native SQL to EJB ql

Hi there
Simple enough question, how would I go about converting the following native SQL query into EJB QL syntax. This by the way is a simple search on keywords attributed to a person.
SELECT PersonId, COUNT(word)
FROM keyword_table
WHERE word = 'a' OR word = 'c' OR word = 'b'
GROUP BY PersonId HAVING COUNT(word) <= 3
ORDER BY COUNT(word) desc
Note that PersonId is a foreign key joinColumn to a Person entity bean, Ideally i want to be returning person objects through a foreign key in my interest table using GROUP BY etc. I had something like this in mind:
select Person p FROM Interest i WHERE i.Word = 'a' OR i.Word = 'c' OR i.Word = 'b'
GROUP BY i.Person.PersonId HAVING COUNT(i.Word) <= 3
ORDER BY COUNT(i.Word) desc
Kind Regards
- Vaughan Cross

suppose there are two beans "Account" and "Transrecord" with 1-to-m relationship, the mapping table is "ACCOUNT"(PK is ACCID) and "TRANSRECORD"(FK is ACCID)
The cmr field in Account is "transrecords" and the cmr field in Transrecord is "theAccount".
For a SQL statement (this statment may be not that meaningful, but it is for testing the function of my translation tool):
SELECT t.* FROM TRANSRECORD t , ACCOUNT A WHERE a.ACCID = t.ACCID
>>
one other way of translation would be
Select object(t) from account a,transrecord t where a.accid = a.transrecords.accid
select q1.*
from TRANSRECORD q1, ACCOUNT q2
where ( q2.\"ACCID\" IS NOT NULL ) and ( q2.\"ACCID\" = q1.\"ACCID\")");
Since ACCID is the primary key of ACCOUNT table, so "q2.ACCID IS NOT NULL " is always true, the >>SQL statement is equivalent
with the oringinal SQL statement.isn't it what is supposed to happen since you cannot have a record in the foreign key table without a corresponding record in the primary key table?
I tested it in Transrecord bean as a defined EJB-QL in WSAD, the generated SQL statement after the >>deployment is:I am using WSAD 5.1, which file has the converted SQLs?
sanjay.

Similar Messages

  • How I can create dynamically-formed requests or use native SQL in EJB?

    Hi all.
    I'm working around modify an example from NetWeaver Developer Studio (CarRental). I want to get ordered data from table and allow users to specify the ordering field, not in the code. EJB QL doesn't support dynamically-formed queries like "select object(b) from QuickBooking b where b.status like ?1 order by b.<b>?2</b>" so i can't passing field name as parameter into query. Creating a sorting method for every field is not good solution because I need a dynamically-formed requests.
    I think using native SQL will help but I don't know how I can use SQL in EJB.
    Thanks,
    Lev

    import javax.persistence.EntityManager;within class, place
    protected EntityManager  entityManager;of course make it public, private, whatever you need.
    Then, in your method
    entityManager.createNativeQuery(....);R. Grimes

  • Converting Native SQL to OPEN SQL

    Any inputs on how the following Native SQL can be converted to OPEN SQL.
    Especially self join of same table .
    EXEC SQL PERFORMING APPEND_ITAB.
        SELECT /+ ORDERED/
               A.VTYPE,          A.LIFNR,          G.MTNO,
               A.ASYTR,          A.DATAB,          A.DATBI,
               D.MAKTX,          F.NAME1,          G.COMP,
               C.PREF,           C.COMP,           E.MAKTX,
               C.QNTY,           C.UNIT,           B.MEINS,
               A.EKGRP,          A.SEQNO,          C.STGB,
               C.DATUV,          C.DATUB
          INTO :WA_MODULE-VTYPE, :WA_MODULE-LIFNR, :WA_MODULE-MATNR,
               :WA_MODULE-ASYTR, :WA_MODULE-DATAB, :WA_MODULE-DATBI,
               :WA_MODULE-MAKTX, :WA_MODULE-NAME1, :WA_SUB-UPGVC,
               :WA_SUB-PREF,     :WA_SUB-COMP,     :WA_SUB-MAKTX,
               :WA_SUB-QNTY,     :WA_SUB-UNIT,     :WA_SUB-MEINS,
               :WA_MODULE-EKGRP, :WA_MODULE-SEQNO, :WA_SUB-STGB,
               :WA_SUB-DATAB,    :WA_SUB-DATBI
          FROM ZTMM_ASSY_COST1 A, ZTBM_ABXDULDT G,
               ZTBM_ABXDULDT   C, MARA B,  MAKT D,  MAKT E, LFA1 F
         WHERE A.MANDT    =       :SY-MANDT
           AND A.VTYPE    BETWEEN :WA_VTYPE_F AND :WA_VTYPE_T
           AND A.MCODE    BETWEEN :WA_MCODE_F AND :WA_MCODE_T
           AND A.LIFNR    BETWEEN :WA_LIFNR_F AND :WA_LIFNR_T
           AND A.EKGRP    BETWEEN :WA_EKGRP_F AND :WA_EKGRP_T
           AND A.DATAB    <=      :P_DATUM
           AND A.DATBI    >=      :P_DATUM
           AND F.MANDT    =       A.MANDT
           AND F.LIFNR    =       A.LIFNR
           AND G.MANDT    =       A.MANDT
           AND G.MTNO     LIKE    CONCAT(CONCAT(A.VTYPE,A.MCODE),'%')
           AND G.MTNO     BETWEEN :WA_MATNR_F AND :WA_MATNR_T
           AND G.PLNT     =       :C_WERKS
           AND G.USAG     =       '2'
           AND G.ALTN     in      ('1','01')
           AND G.DATUV    <=      :P_DATUM
           AND G.DATUB    >=      :P_DATUM
           AND B.MANDT(+) =       G.MANDT
           AND B.MATNR(+) =       G.MTNO
           AND B.LVORM(+) =       ' '
           AND C.MANDT(+) =       G.MANDT
           AND C.MTNO(+)  =       G.COMP
           AND C.PLNT(+)  =       G.PLNT
           AND C.USAG(+)  =       '2'
           AND C.ALTN(+)  =       '01'
           AND C.DATUV(+) <=      :P_DATUM
           AND C.DATUB(+) >=      :P_DATUM
           AND D.MANDT(+) =       B.MANDT
           AND D.MATNR(+) =       B.MATNR
           AND D.SPRAS(+) =       :SY-LANGU
           AND E.MANDT(+) =       C.MANDT
           AND E.MATNR(+) =       C.COMP
           AND E.SPRAS(+) =       :SY-LANGU
         ORDER BY A.VTYPE, A.LIFNR, G.MTNO
      ENDEXEC.

    Then why don't you post the code you have. It would be a lot easier for us to improve that rather than try do redo what you have already done.
    Rob

  • Convert OpenSQL to Native SQL

    Does someone know of a function module that will accept a SQL statement in OpenSQL format, and convert it to Native SQL (Oracle) format?
    We cannot turn on a trace in our system.
    Thanks.

    Check these threads ...
    Converting OPEN SQL to NATIVE SQL
    Open SQL to Native SQL conversion
    Regards,
    Santosh
    Message was edited by: Santosh Kumar P

  • Abap sql convert to native sql fuction

    hi expert!
    exist a function can do follow things:
      convert selection-screen's select-options which user key in
         to oracle where condition expression
    or exist one function can convert abap sql to oracle sql
    thank you very much

    example:
      EXEC SQL.
            CONNECT TO :'DATA BASE NAME'
          ENDEXEC.
          IF sy-subrc EQ 0 .
             TRY.
                  EXEC SQL .
                    SELECT COUNT(*) FROM <TABLE NAME>
                    INTO :recount
                    WHERE code = :itab-<FIELD>
                  ENDEXEC .
                CATCH cx_sy_native_sql_error INTO exc_ref.
                  error_text = exc_ref->get_text( ).
                  MESSAGE error_text TYPE 'I'.
              ENDTRY.

  • Mapping Problem with Native SQL query

    My application uses a native SQL query to locate certain entities. It looks like this:
    SELECT UPLOADATTEMPTREF, STUDENTNUMBER, USERID, WORKITEMCODE, WORKITEMINSTURN, WORKITEMTITLE, MODULERUNCODE, STUDENTNAME, SUBMISSIONDEADLINE, UPLOADATTEMPTSERVERDATE, FILENAME, UPLOADCOMPLETESERVERDATE, NEWFILENAME, FILESIZE, FILEPATH, DOWNLOADSERVERDATE, MODULECODE, MODULETITLE
    FROM Submission_Attempt WHERE UPLOADATTEMPTREF IN (
    SELECT uploadAttemptRef FROM (" +<br /><br />                         "SELECT MAX(uploadAttemptRef) AS uploadAttemptRef, UserID, workItemInstUrn, " +<br /><br />                         "workItemCode FROM Submission_Attempt where workiteminsturn = ?1 " +<br /><br />                         "GROUP BY UserID, workItemInstUrn, workItemCode) Table1 ) " +<br /><br />                         "and uploadCompleteServerDate is not null;"<br />
    My expectation was that EclipseLink would be able to handle the mapping of the results to the entity quite happily. However, I get a NonSynchronizedVector of Objects - each Object representing one field of data.
    I need help with either:
    Converting the above SQL into JPQL so that I (hopefully) don't have to worry about the SQL or
    Understanding why this isn't working properly...
    Anyone able to help?
    Edited by: phunnimonkey on Nov 6, 2008 3:33 AM

    Never mind - the problem was to do with not specifying a class when creating the native query.

  • Who to use Native SQL statements in ABAP

    hi all,
    who to use native sql staements in abap bypassing Application server.
    with regards,
    suresh babu aluri.

    Hi
    Native SQL statements define an area in an ABAP program in which one or more Native SQL statements are to be carried out. The area between EXEC and ENDEXEC is not completely checked by the syntax check. The statements entered there are passed to the Native SQL interface and processed there as follows:
    Almost all SQL statements that are valid for the addressed database system can be included between EXEC and ENDEXEC, in particular the DDL statements. These SQL statements are passed from the Native SQL interface to the database system largely unchanged. The syntax rules are specified by the database system, in particular the case sensitivity rules for database objects. If the syntax allows a separator character between individual statements, you can include several Native SQL statements between EXEC and ENDEXEC. Generally, the semicolon ( is used as the separator character.
    You can also include SAP-specific Native SQL language elements between EXEC and ENDEXEC. These statements are not passed directly from the Native SQL interface to the database, but are converted appropriately.
    All Native SQL statements bypass SAP buffering.
    The ENDEXEC statement sets sy-dbcnt to the number of table rows processed in the last Native SQL statement. After implicit cursor processing with PERFORMING, sy-dbcnt contains the total number of lines read.
    Programs with Native SQL statements are generally dependent on the database system used, so that they cannot be executed in all ABAP systems. This is especially true for the examples in this section, which was written for Informix database systems.
    Example
    Inserting two rows in the database table SCARR. If neither of these rows exists, sy-subrc is set to 0 by ENDEXEC and sy-dbcnt to 1. Otherwise, an exception is raised and handled.
    DATA: exc_ref    TYPE REF TO cx_sy_native_sql_error,
          error_text TYPE string.
    TRY.
        EXEC SQL.
          INSERT INTO scarr
                      (MANDT, CARRID, CARRNAME, CURRCODE, URL)
            VALUES ('000', 'FF', 'Funny Flyers', 'EUR',
                    'http://www.ff.com');
          INSERT INTO scarr
                     (MANDT, CARRID, CARRNAME, CURRCODE, URL)
            VALUES ('000', 'EF', 'Easy Flyers', 'EUR',
                    'http://www.ef.com');
        ENDEXEC.
      CATCH cx_sy_native_sql_error INTO exc_ref.
        error_text = exc_ref->get_text( ).
        MESSAGE error_text TYPE 'I'.
    ENDTRY.
    Reward points if useful
    Regards
    Anji

  • Using Select option in Native SQL

    Hi,
    Can any one tell me, how to use select option value in native SQL.
    ie.,
    I want to use select option in where condition. Need to select all the records from table(non-SAP) where date in given range.
    Please suggest.
    Thanks,
    Amal

    Hi
    No!
    U need to find a way to convert a range of select-option to a range for Native SQL, probably it should be better doesn't use a select-option for the date but two parameters: one for date from and one for date to.
    Max

  • Using native sql

    I have a program, which will using native to query data. The following is db connection.
       EXEC SQL.
         connect to :lv_qtn
       ENDEXEC.
       EXEC SQL.
         SET CONNECTION :lv_qtn
       ENDEXEC.
    Can i locate the database structure in sap, like using se11. Thanks!

    Hi
    see this and do accordingly
    Native SQL statements define an area in an ABAP program in which one or more Native SQL statements are to be carried out. The area between EXEC and ENDEXEC is not completely checked by the syntax check. The statements entered there are passed to the Native SQL interface and processed there as follows:
    Almost all SQL statements that are valid for the addressed database system can be included between EXEC and ENDEXEC, in particular the DDL statements. These SQL statements are passed from the Native SQL interface to the database system largely unchanged. The syntax rules are specified by the database system, in particular the case sensitivity rules for database objects. If the syntax allows a separator character between individual statements, you can include several Native SQL statements between EXEC and ENDEXEC. Generally, the semicolon ( is used as the separator character.
    You can also include SAP-specific Native SQL language elements between EXEC and ENDEXEC. These statements are not passed directly from the Native SQL interface to the database, but are converted appropriately.
    All Native SQL statements bypass SAP buffering.
    The ENDEXEC statement sets sy-dbcnt to the number of table rows processed in the last Native SQL statement. After implicit cursor processing with PERFORMING, sy-dbcnt contains the total number of lines read.
    Programs with Native SQL statements are generally dependent on the database system used, so that they cannot be executed in all ABAP systems. This is especially true for the examples in this section, which was written for Informix database systems.
    Example
    Inserting two rows in the database table SCARR. If neither of these rows exists, sy-subrc is set to 0 by ENDEXEC and sy-dbcnt to 1. Otherwise, an exception is raised and handled.
    DATA: exc_ref    TYPE REF TO cx_sy_native_sql_error,
          error_text TYPE string.
    TRY.
        EXEC SQL.
          INSERT INTO scarr
                      (MANDT, CARRID, CARRNAME, CURRCODE, URL)
            VALUES ('000', 'FF', 'Funny Flyers', 'EUR',
                    'http://www.ff.com');
          INSERT INTO scarr
                     (MANDT, CARRID, CARRNAME, CURRCODE, URL)
            VALUES ('000', 'EF', 'Easy Flyers', 'EUR',
                    'http://www.ef.com');
        ENDEXEC.
      CATCH cx_sy_native_sql_error INTO exc_ref.
        error_text = exc_ref->get_text( ).
        MESSAGE error_text TYPE 'I'.
    ENDTRY.
    Regards
    Anji

  • Insertion / Update of field of type "TIME" using Native SQL

    Hi ABAP gurus,
    We are trying to perform inserts and updates within an ORACLE table where a TIME field exists without suscess. We are trying to code it using Native SQL.
    EXEC SQL.
    INSERT INTO table (field1[name], field2[age], field3[birthday], field4[hour])
    VALUES (:name, :age, TO_DATE(:date_birth), ¿:hour?)
    ENDEXEC.
    EXEC SQL.
    UPDATE table SET field3[birthday] = TO_DATE(:date_birth), field4[hour] = ¿:hour?
    WHERE field1[name] = :name AND field2[age] = :age
    ENDEXEC.
    Which is the right coding sentence in order to achieve our goal?
    Many thanks in advance. Best regards,
       Imanol

    >
    Imanol Beguiristain wrote:
    > Hi all,
    >
    > I am sorry for being unclear.
    >
    > I do want to code both INSERT and UPDATE. That is clear.
    >
    > The problem we are having is that we don't know how to code (using Native SQL) such instructions using in the SQL sentence a field of TIME type.
    >
    > Any helps?
    >
    > Thanks in advance.
    >
    >   Imanol
    I've not heard of an Oracle TIME datatype; we used to use the timestamp which is stored as part of the date or we set up a separate column to hold the time defined as CHAR.  Still, it is possible that they have created such a thing since I last did SQL.  In which case, there would have to be a function like TO_DATE which you would use to convert your time to its time format.
    If you mean TIMESTAMP you can use something like the following to do the data conversion.
    TO_TIMESTAMP(LOCALTIMESTAMP, 'DD-MON-RR HH.MI.SSXFF')

  • Native sql DBCO, CONNECT statement short dump

    Hi ALL ,
    I am facing the  problem here.  please help me out in this.
    i am trying to connce to the external database MSS, i made all the entries in the DBCO t-code and writing the follwoing native sql statement.
    EXEC SQL.
    CONNECT TO 'AAJ' AS 'V'
    ENDEXEC.
    EXEC SQL.
    SET CONNECTION 'V'
    ENDEXEC.
    The above statement is not giving any error  when i activate it but when i execute it is giving me shortdump error .
    I already maintan   entries in DBCON table or DBCO t-code
    And also tel me once it is connect how can i access the data from MSS (Microsoft sql server)i mean what kind of statement.
    helpfull answer will be rewarded.
    Anees
    9886358645
    Message was edited by:
            anees jawad

    Native SQL
    Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using. Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.
    As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.
    Native SQL Statements in ABAP Programs
    To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
    EXEC SQL [PERFORMING  )
    The parameters are separated by commas. You must also specify whether the parameter is for input (IN), output (OUT) or input and output (INOUT). For further information, refer to SAP Note 44977.
    EXEC SQL
       EXECUTE PROCEDURE proc1 ( IN , OUT :y )
    ENDEXEC.
    Cursor Processing
    Cursor processing in Native SQL is similar to that in Open SQL:
    OPEN
      ENDIF.
    ENDDO.
    EXEC SQL.
      CLOSE c1
    ENDEXEC.
    This example opens a cursor, reads data line by line, and closes the cursor again. As in Open SQL, SY-SUBRC indicates whether a line could be read.
    Data Types and Conversions
    Using Native SQL, you can
    Transfer values from ABAP fields to the database
    Read data from the database and process it in ABAP programs.
    Native SQL works without the administrative data about database tables stored in the ABAP Dictionary. Consequently, it cannot perform all of the consistency checks used in Open SQL. This places a larger degree of responsibility on application developers to work with ABAP fields of the correct type. You should always ensure that the ABAP data type and the type of the database column are identical.
    If the database table is not defined in the ABAP Dictionary, you cannot refer directly to its data type. In this case, you should create a uniform type description in the ABAP Dictionary, which can then be used by all application programs.
    If the table is defined in the ABAP Dictionary, you should remember that the sequence of fields in the ABAP Dictionary definition may not be the same as the actual sequence of fields in the database. Using the asterisk (*) in the SELECT clause to read all columns into a corresponding work area would lead to meaningless results. In the worst case, it would cause an error.
    The Native SQL module of the database interface passes a description of the type, size, and memory location of the ABAP fields used to the database system. The relevant database system operations are usually used to access and convert the data. You can find details of these operations in the manuals for the programming interface of the relevant database system. In some cases, Native SQL also performs other compatibility checks.
    The documentation from the various database manufacturers provides detailed lists of combinations of ABAP data types and database column types, both for storing ABAP field values in database tables (INSERT, UPDATE) and for reading database contents into ABAP fields (SELECT). You can also apply these descriptions for the input and output parameters of database procedures. Any combinations not listed there are undefined, and should not be used.
    The following sections provide details of the data types and conversions for individual databases. Although they are database-specific, there are also some common features.
    Recommended type combinations are underlined. Only for these combinations is behavior guaranteed from release to release. For any other combinations, you should assume that the description only applies to the specified release.
    The results of conversions are listed in a results column:
    "OK": The conversion can be performed without loss of data.
    Operations that fail are indicated by their SQL error code. Errors of this kind always lead to program termination and an ABAP short dump.
    In some cases, data is transferred without an SQL error occurring. However, the data is truncated, rounded, or otherwise unusable:
    Right truncation.
    "Left" or "right" applies to the normal way of writing a value. So, for example, if a number is truncated, its decimal places are affected.
    : Left truncation
    : Number is rounded up or down during conversion
    : A number that was "too small" is rounded to 0 (underflow)
    : The conversion result is undefined.
    There are several possible results. The concrete result is either not known at all, or can only be described using a set of rules that is too complicated for practical use.
    : The conversion returns the SQL value NULL.
    : The conversion is performed without fields and unchecked.
    The original data is converted, but without its format being checked. The result may therefore be a value invalid for the result type, which cannot be processed further. An example of this is a date field containing the value "99999999" or "abcdefgh" after conversion.
    Combinations of ABAP data type and database column type can be divided into finer subcategories. Here, for example, using the transfer direction ABAP ® database (INSERT, UPDATE):
    If the width of the ABAP field is greater than that of the database column, the ABAP field may contain values for which there is not enough space in the database column. This can produce other cases: The concrete data value in ABAP finds space in the database column, or not.
    If the ABAP field is at most as long as the database column, there is always space for the ABAP value in the database column.
    Some types, such as numeric columns, expect values in a particular format. This is particularly important in connection with character types, for example, when you want to write an ABAP character field (type C) into an integer column.
    Native SQL for Oracle
    Native SQL for Informix
    Native SQL for DB2 Common Server
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb3b8b358411d1829f0000e829fbfe/content.htm

  • Native sql connect to sql server

    hello everyone!
    my r/3 application server is unix os,versio is 620,I want to connect outer sql server,how can I make it?
    thanks in advance!
    if the suggest is helpfull,point will be rewarded.

    hi Bruce,
    in R3 we can use SQL statements which are native to particular RDBMS (ie that too execute as it like on their  SQL server) we enclose them with
    EXEC SQL [PERFORMING subr].
    ENDEXEC.
    Effect
    These statements define an area in an ABAP program in which one or more Native SQL statements are to be carried out. The area between EXEC and ENDEXEC is not completely checked by the syntax check. The statements entered there are passed to the Native SQL interface and processed there as follows:
    Almost all SQL statements that are valid for the addressed database system can be included between EXEC and ENDEXEC, in particular the DDL statements. These SQL statements are passed from the Native SQL interface to the database system largely unchanged. The syntax rules are specified by the database system, in particular the case sensitivity rules for database objects. If the syntax allows a separator character between individual statements, you can include several Native SQL statements between EXEC and ENDEXEC. Generally, the semicolon ( is used as the separator character.
    You can also include SAP-specific Native SQL language elements between EXEC and ENDEXEC. These statements are not passed directly from the Native SQL interface to the database, but are converted appropriately. These SAP-specific language elements are::
    Host variables
    Statements for cursor processing
    Database procedure calls
    Statements for establishing database connections
    All Native SQL statements bypass SAP buffering. Automatic client handling is not performed.
    System fields
    The statement ENDEXEC sets the system fields sy-subrc and sy-dbcnt. When using the addition PERFORMING, note that implicit cursor processing is carried out and the system fields are set for every read process.
    sy-subrc Meaning
    0 The statements between EXEC and ENDEXEC were executed successfully.
    4 The statements between EXEC and ENDEXEC were not executed. After implicit cursor processing with PERFORMING, sy-subrc always contains the value 4.
    The ENDEXEC statement sets sy-dbcnt to the number of table rows processed in the last Native SQL statement. After implicit cursor processing with PERFORMING, sy-dbcnt contains the total number of lines read.
    Note
    Programs with Native SQL statements are generally dependent on the database system used, so that they cannot be executed in all ABAP systems. This is especially true for the examples in this section, which was written for Informix database systems.
    Example
    Inserting two rows in the database table SCARR. If neither of these rows exists, sy-subrc is set to 0 by ENDEXEC and sy-dbcnt to 1. Otherwise, an exception is raised and handled.
    DATA: exc_ref    TYPE REF TO cx_sy_native_sql_error,
          error_text TYPE string.
    TRY.
        EXEC SQL.
          INSERT INTO scarr
                      (MANDT, CARRID, CARRNAME, CURRCODE, URL)
            VALUES ('000', 'FF', 'Funny Flyers', 'EUR',
                    'http://www.ff.com');
          INSERT INTO scarr
                     (MANDT, CARRID, CARRNAME, CURRCODE, URL)
            VALUES ('000', 'EF', 'Easy Flyers', 'EUR',
                    'http://www.ef.com');
        ENDEXEC.
      CATCH cx_sy_native_sql_error INTO exc_ref.
        error_text = exc_ref->get_text( ).
        MESSAGE error_text TYPE 'I'.
    ENDTRY.
    Regards
    Raju Mummidi

  • Native SQL Regarding

    Hai Experts,
    I need To  Insert Values Into Sql Server Table Using EXEC And ENDEXEC Commands.
    Can Any one Give Some Suggestion.
    <REMOVED BY MODERATOR>
    Thanks In Adv,
    Jai.M
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 4:38 PM

    Hi,
    EXEC SQl statement does Native SQL .Normally we use OPEN sql statement.
    This is not database specific.So datbase convetor converts into database specific sql statements for our sql statements.This is slow fetching compared to Native sql.
    Open SQL allows you to access database tables declared in the ABAP Dictionary regardless of the database platform that you R/3 System is using. Native SQL allows you to use database-specific SQL statements in an ABAP program. This means that you can use database tables that are not administered by the ABAP Dictionary, and therefore integrate data that is not part of the R/3 System.
    As a rule, an ABAP program containing database-specific SQL statements will not run under different database systems. If your program will be used on more than one database platform, only use Open SQL statements.
    Native SQL Statements in ABAP Programs
    To use a Native SQL statement, you must precede it with the EXEC SQL statement, and follow it with the ENDEXEC statement as follows:
    REPORT demo_native_sql.
    DATA: BEGIN OF wa,
    connid TYPE spfli-connid,
    cityfrom TYPE spfli-cityfrom,
    cityto TYPE spfli-cityto,
    END OF wa.
    DATA c1 TYPE spfli-carrid VALUE 'LH'.
    EXEC SQL PERFORMING loop_output.
    SELECT connid, cityfrom, cityto
    INTO :wa
    FROM spfli
    WHERE carrid = :c1
    ENDEXEC.
    FORM loop_output.
    WRITE: / wa-connid, wa-cityfrom, wa-cityto.
    ENDFORM.
    <REMOVED BY MODERATOR>
    Cheers,
    Chandra Sekhar.
    Edited by: Alvaro Tejada Galindo on Feb 22, 2008 4:40 PM

  • What is native sql?

    hi all,
    what is native sql? can any one provide me some examples with native sql? and when do we go for writing prgm in native sql?
    is native sql stms are supported for pool and cluster tables?
    regds
    hari

    Hi Hari,
    DATA: BEGIN OF wa,
            connid   TYPE spfli-connid,
            cityfrom TYPE spfli-cityfrom,
            cityto   TYPE spfli-cityto,
          END OF wa.
    DATA c1 TYPE spfli-carrid VALUE 'LH'.
    EXEC SQL PERFORMING loop_output.
      SELECT connid, cityfrom, cityto
      INTO   :wa
      FROM   spfli
      WHERE  carrid = :c1
    ENDEXEC.
    FORM loop_output.
      WRITE: / wa-connid, wa-cityfrom, wa-cityto.
    ENDFORM.
    The system displays the following information:
    The program uses the work area WA and the field C1 in the Native SQL SELECT statement. WA is the target area into which the selected data is written. The structure WA in the INTO clause is treated as though its components were all listed individually. INTO :WA-CONNID, :WA-CITYFROM, :WA-CITYTO. C1 is used in the WHERE clause. The subroutine LOOP_OUTPUT writes the data from WA to the screen.
    Scope of Native SQL
    Native SQL allows you to execute (nearly) all statements available through the SQL programming interface (usually known as SQL Call Interface or similar) for executing SQL program code directly (using EXEC IMMEDIATE or a similar command). The following sections list the statements that are not supported.
    The parameters are separated by commas. You must also specify whether the parameter is for input (IN), output (OUT) or input and output (INOUT). For further information, refer to SAP Note 44977.
    EXEC SQL
       EXECUTE PROCEDURE proc1 ( IN :x, OUT :y )
    ENDEXEC.
    Cursor Processing
    Cursor processing in Native SQL is similar to that in Open SQL:
    OPEN <cursor name> FOR <statement>
    FETCH NEXT <cursor name> INTO <target(s)>.
    CLOSE <cursor name>
    EXEC SQL
      OPEN c1 FOR
        SELECT client, arg1, arg2 FROM table_001
         WHERE client = '000' AND arg2 = :arg2
    ENDEXEC.
    DO.
      EXEC SQL.
        FETCH NEXT c1 INTO :wa-client, :wa-arg1, :wa-arg2
      ENDEXEC.
      IF sy-subrc <> 0.
        EXIT.
      ELSE.
        <verarbeite Daten>
      ENDIF.
    ENDDO.
    EXEC SQL.
      CLOSE c1
    ENDEXEC.
    This example opens a cursor, reads data line by line, and closes the cursor again. As in Open SQL, SY-SUBRC indicates whether a line could be read.
    Data Types and Conversions
    Using Native SQL, you can
    Transfer values from ABAP fields to the database
    Read data from the database and process it in ABAP programs.
    Native SQL works without the administrative data about database tables stored in the ABAP Dictionary. Consequently, it cannot perform all of the consistency checks used in Open SQL. This places a larger degree of responsibility on application developers to work with ABAP fields of the correct type. You should always ensure that the ABAP data type and the type of the database column are identical.
    If the database table is not defined in the ABAP Dictionary, you cannot refer directly to its data type. In this case, you should create a uniform type description in the ABAP Dictionary, which can then be used by all application programs.
    If the table is defined in the ABAP Dictionary, you should remember that the sequence of fields in the ABAP Dictionary definition may not be the same as the actual sequence of fields in the database. Using the asterisk (*) in the SELECT clause to read all columns into a corresponding work area would lead to meaningless results. In the worst case, it would cause an error.
    The
    Native SQL module of the database interface passes a description of the type, size, and memory location of the ABAP fields used to the database system. The relevant database system operations are usually used to access and convert the data. You can find details of these operations in the manuals for the programming interface of the relevant database system. In some cases, Native SQL also performs other compatibility checks. 
    The documentation from the various database manufacturers provides detailed lists of combinations of ABAP data types and database column types, both for storing ABAP field values in database tables (INSERT, UPDATE) and for reading database contents into ABAP fields (SELECT). You can also apply these descriptions for the input and output parameters of database procedures. Any combinations not listed there are undefined, and should not be used.
    The following sections provide details of the data types and conversions for individual databases. Although they are database-specific, there are also some common features.
    Recommended type combinations are underlined. Only for these combinations is behavior guaranteed from release to release. For any other combinations, you should assume that the description only applies to the specified release.
    The results of conversions are listed in a results column:
    "OK": The conversion can be performed without loss of data.
    Operations that fail are indicated by their SQL error code. Errors of this kind always lead to program termination and an ABAP short dump.
    In some cases, data is transferred without an SQL error occurring. However, the data is truncated, rounded, or otherwise unusable:
    Right truncation.
    "Left" or "right" applies to the normal way of writing a value. So, for example, if a number is truncated, its decimal places are affected.
    : Left truncation
    : Number is rounded up or down during conversion
    : A number that was "too small" is rounded to 0 (underflow)
    : The conversion result is undefined.
    There are several possible results. The concrete result is either not known at all, or can only be described using a set of rules that is too complicated for practical use.
    : The conversion returns the SQL value NULL.
    : The conversion is performed without fields and unchecked.
    The original data is converted, but without its format being checked. The result may therefore be a value invalid for the result type, which cannot be processed further. An example of this is a date field containing the value "99999999" or "abcdefgh" after conversion.
    Combinations of ABAP data type and database column type can be divided into finer subcategories. Here, for example, using the transfer direction ABAP ® database (INSERT, UPDATE):
    If the width of the ABAP field is greater than that of the database column, the ABAP field may contain values for which there is not enough space in the database column. This can produce other cases: The concrete data value in ABAP finds space in the database column, or not.
    If the ABAP field is at most as long as the database column, there is always space for the ABAP value in the database column.
    Some types, such as numeric columns, expect values in a particular format. This is particularly important in connection with character types, for example, when you want to write an ABAP character field (type C) into an integer column.
    Reward pts if found usefull :)
    regards
    Sathish

  • 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

Maybe you are looking for

  • BPM Exception Branch: Condition?

    Hi everybody, sometime our JAVA-stack makes some problems: SYSTEM FAILURE" during JCO-Call. In this cases some mappings fail and the BPM processes the exception branch. So we got the idea to put a wait step (e.g. 5 minutes) in the exception branch an

  • Creating PDF's from VISIO diagrams

    Hi, We are storing the VISIO documents in a network folder, we want to give users a TCODE in SAP to view these VISIO documents based on some criteria. To do so we want to convert it into PDF so that they can't Edit it accidentally. Appreciate your Id

  • Bi beans got a error when connect to olap

    i tried to install patch 2499827 on windows2000 server,after all operations by this installtion done ,i got a error message:BIB-16631 Cannot connect to the database because a required patch has not been correctly . i have installed these things on my

  • Can't download photos from iMac to iPad.

    I have my iPad connected to my iMac. When I bring up iTunes on the mac, it does not show the iPad under devices. What am I doing wrong? Thanks.

  • CS6 Configuration Error 16 - urgent

    I've been on chat help for over three hours. I've reassigned permisssions, used cleaner and reinstalled my programs. The only programs available are Acrobat and Air. I spent 4 hours yesterday trying to find a resolution without adobe's help. I have a