Case sensitivity select statement without using native sql

please help me ,
i have a selection screen as select-options : s_vbeln, s_kunnr(mandt),s_matnr and
p_name as a parameter (type name1) which is case sensitive in sap abap database and i want to get
output  from these fields in an alv.[vbeln,kunnr,name1,audat,auart,matnr,kwmeng,netwr]
How to do it? Can any one give me solution please.[i have to handle case sensitivity plz give me solution]

this is my code : but its not working as i expected plz tell me where did i went wrong...
type-pools slis.
tables : vbak , vbap.
select-options : s_vbeln for vbak-vbeln,
                 s_kunnr for vbak-kunnr,
                 s_matnr for vbap-matnr.
parameters p_name1 type NAME1_GP.
ranges r_name for kna1-name1.
types : begin of ty_vbak,
        vbeln type vbeln_va,
        audat type audat,
        auart type auart,
        kunnr type kunnr,
        end of ty_vbak,
        begin of ty_vbap,
        vbeln type vbeln_va,
        matnr type matnr,
        netwr type netwr_ap,
       kwmeng type kwmeng,
        end of ty_vbap,
        begin of ty_kna1,
        kunnr type kunnr,
        name1 type name1,
        end of ty_kna1,
        begin of ty_final,
        vbeln type vbeln_va,
        audat type audat,
        auart type auart,
        matnr type matnr,
        netwr type netwr_ap,
       kwmeng type kwmeng,
        kunnr type kunnr,
        name1 type name1,
        end of ty_final.
data : t_vbak type standard table of ty_vbak initial size 1,
       t_vbap type standard table of ty_vbap initial size 1,
       t_kna1 type standard table of ty_kna1 initial size 1.
data : t_final type standard table of ty_final initial size 1,
       w_final type ty_final,
       w_vbap  type ty_vbap,
       w_kna1  type ty_kna1,
       w_vbak  type ty_vbak.
data : t_fcat type slis_t_fieldcat_alv,
       w_fcat type slis_fieldcat_alv.
DATA T_FINAL2 TYPE STANDARD TABLE OF TY_FINAL INITIAL SIZE 1.
data v_name1 type name1.
if p_name1 is not initial.
r_name-sign = 'I'.
r_name-option = 'EQ'.
if p_name1 ca '*'.
r_name-option = 'CP'.
endif.
r_name-low = p_name1.
append r_name.
endif.
start-of-selection.
select vbeln audat auart kunnr from vbak
into table t_vbak
where vbeln in s_vbeln and
      kunnr in s_kunnr.
if sy-subrc <> 0.
message 'plz enter a valid entry' type 'I'.
leave list-processing.
endif.
if t_vbak[] is not initial.
select vbeln matnr netwr kwmeng from vbap
into table t_vbap
for all entries in t_vbak
where vbeln = t_vbak-vbeln and
matnr in s_matnr.
if sy-subrc <> 0.
message 'no rec found' type 'I'.
leave list-processing.
endif.
select kunnr name1 from kna1
into table t_kna1
for all entries in t_vbak
where kunnr = t_vbak-kunnr.
if sy-subrc = 0.
sort t_kna1 by kunnr.
endif.
endif.
end-of-selection.
loop at t_vbap into w_vbap.
read table t_vbak into w_vbak with key vbeln = w_vbap-vbeln binary search.
read table t_kna1 into w_kna1 with key kunnr = w_vbak-kunnr binary search.
w_final-vbeln = w_vbak-vbeln.
w_final-audat = w_vbak-audat.
w_final-auart = w_vbak-auart.
w_final-matnr = w_vbap-matnr.
w_final-netwr = w_vbap-netwr.
w_final-kwmeng = w_vbap-kwmeng.
w_final-kunnr  = w_kna1-kunnr.
w_final-name1  = w_kna1-name1.
append w_final to t_final.
endloop.
delete t_final where name1 not in r_name.
perform sub_fill_fcat using 'VBELN' 'SALE ORDER NUM'.
perform sub_fill_fcat using 'KUNNR' 'CUSTOMER NUMBER'.
perform sub_fill_fcat using 'NAME1' 'NAME OF A CUST'.
perform sub_fill_fcat using 'AUDAT' 'SALE ORDER DATE'.
perform sub_fill_fcat using 'AUART' 'SALE DOC TYPE'.
perform sub_fill_fcat using 'MATNR' 'MATERIAL NUM'.
perform sub_fill_fcat using 'KWMENG' 'QUANTITY'.
perform sub_fill_fcat using 'NETWR' 'PRICE'.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    IT_FIELDCAT                       = T_FCAT
  TABLES
    T_OUTTAB                          = T_FINAL
EXCEPTIONS
   PROGRAM_ERROR                     = 1
   OTHERS                            = 2
IF SY-SUBRC <> 0.
* Implement suitable error handling here
ENDIF.
*&      Form  SUB_FILL_FCAT
*       text
*      -->P_0389   text
*      -->P_0390   text
FORM SUB_FILL_FCAT  USING P_FNAM P_TEXT.
clear w_fcat.
w_fcat-fieldname = p_fnam.
w_fcat-seltext_m = p_text.
append w_fcat to t_fcat.
ENDFORM.

Similar Messages

  • Select statement without using Rownum or Rowid

    Hi,
    I have a requirement where I have delete the first 100 records from table without using the rownum or rowid.
    Thanks to all for your time
    Narain

    Hi
    delete from yourtab x where (select count(*) from yourtab where yourpk <= x.yourpk) < 101;HTH
    Laurent Schneider
    OCM DBA

  • How to use Native SQL statement in JDBC receiver interface

    Dear All,
    Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    Select Field1 Field2 from TABLE Where Field3 like "%Name'
    I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    Hence I need to know:-
    1. What message mapping I should use in case if I have to use Native SQL statement.
    2.What operation mapping I should use in case if I have to use Native SQL statement.
    If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    3 .How do to go about it to do the Java mapping.
    Thanks
    Ameet

    >
    Ameet Deshpande wrote:
    > Dear All,
    >
    > Can any one please help us in using Native SQL statement in a JDBC receiver channel. The reason why I need to use Native SQL statement instead of standard XML structure is that I need to execute a dynamic SQL query in third party database system lke:-
    >
    > "
    > Select Field1 Field2 from TABLE Where Field3 like "%Name'
    > "
    > I expect the the response in the form of XML file which I can pick up using synchornous interface as mentioned on help.sap.com:-
    >
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    > http://help.sap.com/saphelp_nw04/helpdata/en/64/ce4e886334ec4ea7c2712e11cc567c/frameset.htm
    >
    > The value for %Name can change dynamically according to the transaction and hence cannot be inluded as a KEY element in standard XLM structure,
    >
    > Hence I need to know:-
    >
    > 1. What message mapping I should use in case if I have to use Native SQL statement.
    > 2.What operation mapping I should use in case if I have to use Native SQL statement.
    > If guess correclty I may have to use Java mapping to do the above activities. Hence I want to know
    > 3 .How do to go about it to do the Java mapping.
    >
    > Thanks
    > Ameet
    You can use a stored procedure, and call it from jdbc receiver adapter.
    I also solve this issue, with a DBLookup in message mapping. You can refer to my blog, and this usefull 3d:
    http://simonlesflex.wordpress.com/2010/12/07/pi-oracle-dblookup/
    /people/alessandro.guarneri/blog/2006/03/27/sap-xi-lookup-api-the-killer
    /people/siva.maranani/blog/2005/08/23/lookup146s-in-xi-made-simpler

  • Using native sql for update

    Hello ,
    I have a reqaust to update a db table declared "outside" our R3 db.
    I mennage to select the data using native sql with a connection to the db.
    Now i need to modify the data on the db.
    Is there a similliar command like "fetch next" ' for update?
    Mybe i need to build a procedure in th "host" db and use its own commands to update?
    Thanks,
    koby

    Hello Kobi,
    Which release of SAP are you woking on?
    If you're on ECC6.0, instead you using Native SQL to call the stored procs of external DBs you can use the [ADBC APIs |http://help.sap.com/abapdocu_702/en/abenadbc_procedure.htm](CL_SQL* classes).
    BR,
    Suhas

  • 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

  • # coming when I select data from oracle table using Native SQL

    Hi Gurus,
    I am selecting 'First name' from oracle table directly using native sql. I am fetching 65000 records but 10+ records having '#' at the end of firstname. For eg: John#.
    But oracle team couldn't find '#' in their table for those records. What could be problem?
    or what could be the character in oracle which comes as '#' in abap?
    Pls help...
    Saj

    Thanks for replies.
    My DB NLS_PARAMETER is AL32UTF8. I am able to pullout data with older version of ojdbc jar file. So I think there is no issue regarding NLS setting.
    So please guide me with proper solution as soon as possible.

  • Case in Select Statement - Ramya

    Hi All,
    Could any body help me out ,how to use the CASE in select Statement
    Thanks in Advance

    here is an example:
    SQL> select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7566 JONES      MANAGER         7839 02-APR-81       2975       1000         20
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       5000                    10
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       2450                    10
          7369 SMITH      CLERK           7902 17-DEC-80        800                    20
          7499 ALLEN      SALESMAN        7698 20-FEB-81       1600        300         30
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7788 SCOTT      ANALYST         7566 09-DEC-82       3000                    20
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 12-JAN-83       1100                    20
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7934 MILLER     CLERK           7782 23-JAN-82       1300                    10
    14 rows selected.
    SQL> select empno,
      2         ename,
      3         job,
      4         case when job = 'PRESIDENT' then 1
      5              when job = 'MANAGER' then 2
      6              when job = 'SUPERVISOR' then 3
      7              else 4
      8         end rank
      9    from emp;
         EMPNO ENAME      JOB             RANK
          7566 JONES      MANAGER            2
          7902 FORD       ANALYST            4
          7839 KING       PRESIDENT          1
          7698 BLAKE      MANAGER            2
          7782 CLARK      MANAGER            2
          7369 SMITH      CLERK              4
          7499 ALLEN      SALESMAN           4
          7521 WARD       SALESMAN           4
          7654 MARTIN     SALESMAN           4
          7788 SCOTT      ANALYST            4
          7844 TURNER     SALESMAN           4
          7876 ADAMS      CLERK              4
          7900 JAMES      CLERK              4
          7934 MILLER     CLERK              4
    14 rows selected.
    SQL>

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

  • Performance issue using Native SQL

    Hi
        I am getting the data from Oracle database using Native SQL in ABAP. I am facing performance problem when i am using Native SQL to get data from Oracle database.Its been very slow and getting timed out.
    This is the code i am using for this.
    EXEC SQL PERFORMING BUILD_TAB.
    Get the territory id
        SELECT TERR_ID
          FROM DWPROD.VW_ARDETAIL_PRD1@DWP
          INTO :IT_TERR-TERR_ID
               :DG_TERR_ID
         WHERE COMPANY     = :dt_output-bukrs
           AND PAY_ADDR_ID = :dt_output-kunnr
           AND DOC_NO      = :dt_output-belnr
           AND DOC_ITEM_NO = :dt_output-buzei
      ENDEXEC.
      IF sy-dbcnt >= 1.
        READ TABLE it_terr INDEX 1.
        dg_terr_id = it_terr-terr_id.
        EXEC SQL.
    Get the Saled rep id, name
          SELECT MR_USER_ID,
                 MR_NAME
            FROM DWPROD.VW_TERR@DWP
            INTO :dt_output-srep_id,
                 :dt_output-srep_name
           WHERE TERR_ID = :DG_TERR_ID
        ENDEXEC.
    *Get sales manager id and sales manager name
        EXEC SQL.
          SELECT SALES_GRP_ID
            FROM DWPROD.VW_TERRRPT@DWP
            INTO :DG_SGRPID
           WHERE TERR_ID = :DG_TERR_ID
        ENDEXEC.
        IF sy-dbcnt >= 1.
          EXEC SQL.
            SELECT MGR_USER_ID,
                   MGR_NAME
              FROM DWPROD.VW_SGRP@DWP
              INTO :dt_output-sman_id,
                   :dt_output-sman_name
             WHERE SALES_GRP_ID = :DG_SGRPID
          ENDEXEC.
        ENDIF.
      ENDIF.
    Can any one suggest a solution to improve the performance.
    Thnaks
    Vianney

    Hi John!
    Looks like you need just one entry out of the tables, but you select 'into table'.
    Try to add a 'up to 1 rows' restriction, then Oracle will be much faster with the execution.
    To get an idea, who this parameter looks like in native SQL for Oracle, write a simple test program with an open SQL statement (including this parameter / select single) and run a SQL-trace (ST05). Here you can see in 'explain' how native translation looks like, can also maintain some small tests with 'enter SQL statement'.
    Regards,
    Christian

  • Program using Native SQL ... Need suggestion.. Look into code

    Hi Friends ,
    I need your Inputs to solve the new requirement , which need to be solve using Native SQL,
    For this i need to connet to data base 'SIP'.
    The table used for this  are SAPI.TRANSACTION
    fields in SAPI.TRANSACTION
             -  SYSTEMCODE
             - BATCH_ID
         and more
    the above two fields are selection parameters based on which i need to get data :
    please rectify the code and also  help me in this
      TRY.
          EXEC SQL.
            CONNECT TO :'SIP'
          ENDEXEC.
          IF sy-subrc NE 0.
    Error Message
          ENDIF.
          EXEC SQL.
            OPEN dbcur FOR
              SELECT SYSTEM CODE   BATCH_ID
                     FROM SAPI.TRANSACTION
    can i use where condition here , i tried to put the selection parameters here
    and tried to put the internal table , but the programs gets terminated,
    How should i get the fields from table SAPI.TRANSACTION
           IF sy-subrc <> 0.
           RAISE EXCEPTION TYPE cx_sy_native_sql_error.
           ENDIF.
          ENDEXEC.
    DO.
      EXEC SQL.
          FETCH NEXT dbcur INTO :BATCH_ID
    Here i want to get batch id and delete data from other table SAPI.BATCH
      ENDEXEC.
      IF sy-subrc <> 0.
        EXIT.
      ELSE.
      ENDIF.
    ENDDO.
          EXEC SQL.
            CLOSE dbcur
          ENDEXEC.
          EXEC SQL.
            DISCONNECT :'SIP'
          ENDEXEC.
      ENDTRY.

    Hi Anirban, I tried that and it still gives the same error:
    - "itab_mytable" cannot be a table, a reference, a string, or contain any of these objects. any of these objects"
    itab_mytable has been declare as an internal table.
    Basically, from the code in the link you gave me, I have made the following changes:
    REPORT demo_native_sql.
    TYPES: BEGIN OF st,
            connid   TYPE spfli-connid,
            cityfrom TYPE spfli-cityfrom,
            cityto   TYPE spfli-cityto,
          END OF st.
    DATA: itab_mytable TYPE TABLE OF st.
    <...>
    EXEC SQL.
      SELECT connid, cityfrom, cityto
      INTO   :itab_mytable
      FROM   spfli
    ENDEXEC.
    But this doesn't work. If the internal table is replaced with a one-lined work area, then the select statement works.

  • How to compile the hint to force selection statement to use index

    Hello expert,
    will you please tell me how to compile the hint to force selection statement to use index?
    Many Thanks,

    Not sure what you mean by compile, but hint is enclosed in /*+ hint */. Index hint is INDEX(table_name,index_name). For example:
    SQL> explain plan for
      2  select * from emp
      3  /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 3956160932
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |    14 |   546 |     3   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| EMP  |    14 |   546 |     3   (0)| 00:00:01 |
    8 rows selected.
    SQL> explain plan for
      2  select /*+ index(emp,pk_emp) */ *
      3  from emp
      4  /
    Explained.
    SQL> @?\rdbms\admin\utlxpls
    PLAN_TABLE_OUTPUT
    Plan hash value: 4170700152
    | Id  | Operation                   | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT            |        |    14 |   546 |     2   (0)| 00:00:01 |
    |   1 |  TABLE ACCESS BY INDEX ROWID| EMP    |    14 |   546 |     2   (0)| 00:00:01 |
    |   2 |   INDEX FULL SCAN           | PK_EMP |    14 |       |     1   (0)| 00:00:01 |
    9 rows selected.
    SQL> Hint in the above example is forcing optimizer to use index which resul;ts in a bad execution plan. Most of the time optimizer does not need hints and chooses an optimal plan. In most cases sub-optimal plan is result of stale or incomplete statistics.
    SY.

  • How to use Native SQL String

    Hi all,
    How do i use Native SQL String in the Reciver JDBC Adapter.
    Do i need to change the message format could u suggest me some blogs on the same.
    Also please can anyone let me knw if i can use this for stored procedure.

    hi aditya,
    there shud be no format as such. for sql xml format there are specific structure. but for native sql there shudnt be any specific structure.
    as pointed in sap documentaion:
    Instead of an XML document format, a text is expected that represents any valid SQL statement.
    When inserting a line into a table the corresponding document looks as follows:
    INSERT INTO tableName  (column-name1, column-name2, column-name3) VALUES(‘column-value1’, ‘column-value2’, ‘column-value3’)
    so jus make sure that u give a valid sql statement becoz if will be passed as it is to the database and try ur scenario.
    regards,
    latika.

  • How do you include static text in select statement in Dynamic pl/sql

    I want to include some atatic text and get the output of 4 columns joined with a ":" delimiter within them in a select statement built using Dynamic PL/SQL. How do I build it.
    e.g.
    Normal select statement would be
    select 'MY SKU IS : ', col1||':'||col2||':'||col3||':'||col4 from table1 where ....where condition
    and output looks like :
    MY SKU IS A:B:C:D
    MY SKU IS a:b:c:d
    Dynamically I have -
    SQL_Stmt := 'select 'MY SKU IS : ', col1||':'||col2||':'||col3||':'||col4 from table1 where '|| wherecondition;
    I understand that this does not work because the single quote terminates the string. But my question is how do I achieve the same result with dynamic PL/SQL ? How do I include the static strings and the delimiters. I have tried using double quote, '\'....
    ????

    SQL_Stmt := 'select ''MY SKU is ' || col1 || '':'' ||
                                         col2 || '':'' ||
                                         col3 || '':'' ||
                                         col4 ||
                 ' from table1 where ' || wherecondition;

  • Insert / Update of a TIME field using Native SQL

    Hi Oracle 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

    Hi
    There is no TIME datatype in oracle. There is only a TIMESTAMP or DATE type or the field is VARCHAR2 as most date fields in a SAP database are. To help you we would need the real field type. If possible you please do a desc <owner>.<table> in a sqlplus session and give us the field type.
    If possible also supply the error you get.
    Regards, Michael

  • 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

Maybe you are looking for

  • Report for Planned Delivery Costs

    Hi, Is there any Report for Planned delivery costs per month/day.One of our client needs separate report for frieght charges so that he can be able to pay service tax (GTA) for the same. Thanks Prasad

  • Mac Pro is stuck - please help

    The power went out briefly today while my MacPro was powered up. Once power was restored I booted up and when the log in screen came up, the field was already filled in and over the speaker was the sound of you get when you have depressed a key but r

  • Urgent help : Need to recover a database without backup and archivelogs

    Hi, We are in urgent need to recover a database without backup and archivelogs one datafile seems corrupted SQL> recover automatic database until cancel using BACKUP CONTROLFILE; ORA-00279: change 10527325422479 generated at 07/27/2011 03:13:04 neede

  • Error  with source system

    hi alll,    I am working with BI.In that i am getting the following  error while scheduling      "Job terminated in source system --> Request set to red"      no other error messages are displayed.any one know the reason why i am getting like this pl

  • Verizon better not drop WJAR or I will switch back to Cox

    I will swich back to Cox even though it will kill me to do so.  Time to act responsibly and reach a deal.