Selecting data from external table

Hi there
I was wondering if somebody could assist me. When I try to select data from an external table, no data is displayed, and in my log file I receive the following error:
KUP-04026: field too long for datatype. Please find attached my external table script.
CREATE TABLE DEMO_FILE_EXT
MACODE               NUMBER(7),
MANO                    NUMBER(7),
DEPNO                    VARCHAR2(2 BYTE),
DEPTYPE                    NUMBER(5),
STARTDATE               NUMBER(8),
ENDDATE               NUMBER(8),
OPTIONSTART               NUMBER(8),
BENEFITSTART     NUMBER(8),
STARTSUSPEND          NUMBER(8),
ENDSUSPEND          NUMBER(8),
INITIALS          VARCHAR2(5 BYTE),
FIRSTNAME          VARCHAR2(20 BYTE),
SURNAME                    VARCHAR2(25 BYTE),
STR1                    VARCHAR2(30 BYTE),
STR2                    VARCHAR2(30 BYTE),
STR3                    VARCHAR2(30 BYTE),
STR4                         VARCHAR2(30 BYTE),
SCODE                    VARCHAR2(6 BYTE),
POS1                    VARCHAR2(30 BYTE),
POS2                    VARCHAR2(30 BYTE),
POS3                    VARCHAR2(30 BYTE),
POS4                    VARCHAR2(30 BYTE),
PCODE                    VARCHAR2(6 BYTE),
TELH                    VARCHAR2(10 BYTE),
TELW                    VARCHAR2(10 BYTE),
TELC                    VARCHAR2(10 BYTE),
IDNUMBER          VARCHAR2(13 BYTE),
DOB                NUMBER(8),
GENDER               VARCHAR2(1 BYTE),
EMPLOYER_CODE               VARCHAR2(10 BYTE),
EMPLOYER_NAME               VARCHAR2(900 BYTE)
ORGANIZATION EXTERNAL
( TYPE ORACLE_LOADER
DEFAULT DIRECTORY DEMO_FILES
ACCESS PARAMETERS
( RECORDS DELIMITED BY newline
     BADFILE 'Tinusb.txt'
     DISCARDFILE 'Tinusd.txt'
     LOGFILE 'Tinusl.txt'
SKIP 1
FIELDS TERMINATED BY '|'
          MISSING FIELD VALUES ARE NULL
     (MACODE,
     MANO,
     DEPNO,
     DEPTYPE,
     STARTDATE,
     ENDDATE,
     OPTIONSTART,
     BENEFITSTART,
     STARTSUSPEND,
     ENDSUSPEND,
     INITIALS,
     FIRSTNAME,
     SURNAME,
     STR1,
     STR2,
     STR3,
     STR4,
     SCODE,
     POS1,
     POS2,
     POS3,
     POS4,
     PCODE,
     TELH,
     TELW,
     TELC,
     IDNUMBER,
     DOB,
     GENDER,
     EMPLOYER_CODE,
     EMPLOYER_NAME
LOCATION (DEMO_FILES:'Test1.txt')
REJECT LIMIT UNLIMITED
LOGGING
NOCACHE
NOPARALLEL;
I have the correct privileges on the directory, but the error seems to be on the EMPLOYER_NAME field. The file I try to upload is in pipe-delimited format. The last field in the file does not have a pipe-delimiter at the end. Can this be the problem? Must I go and look for any trailing spaces? Can I specify in the external table script how many characters I need for the employer_name field? We receive this file from an external company
Thank you very much for the help
Ferdie

common mistake, you gave the field sizes in the
column listing of the table, but not in the file
definition. oracle does not apply one to the other.
in the file defintion section, give explict field
sizes.Hi shoblock
Sorry for only coming back to you now, thank you for your help, I had to give the explicit field size for the last column (employer name).
Thank you once again!!
Ferdie

Similar Messages

  • Error while selecting date from external table

    Hello all,
    I am getting the follwing error while selecting data from external table. Any idea why?
    SQL> CREATE TABLE SE2_EXT (SE_REF_NO VARCHAR2(255),
      2        SE_CUST_ID NUMBER(38),
      3        SE_TRAN_AMT_LCY FLOAT(126),
      4        SE_REVERSAL_MARKER VARCHAR2(255))
      5  ORGANIZATION EXTERNAL (
      6    TYPE ORACLE_LOADER
      7    DEFAULT DIRECTORY ext_tables
      8    ACCESS PARAMETERS (
      9      RECORDS DELIMITED BY NEWLINE
    10      FIELDS TERMINATED BY ','
    11      MISSING FIELD VALUES ARE NULL
    12      (
    13        country_code      CHAR(5),
    14        country_name      CHAR(50),
    15        country_language  CHAR(50)
    16      )
    17    )
    18    LOCATION ('SE2.csv')
    19  )
    20  PARALLEL 5
    21  REJECT LIMIT UNLIMITED;
    Table created.
    SQL> select * from se2_ext;
    SQL> select count(*) from se2_ext;
    select count(*) from se2_ext
    ERROR at line 1:
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04043: table column not found in external source: SE_REF_NO
    ORA-06512: at "SYS.ORACLE_LOADER", line 19

    It would appear that you external table definition and the external data file data do not match up. Post a few input records so someone can duplicate the problem and determine the fix.
    HTH -- Mark D Powell --

  • Problem while selecting data from external tables

    Hi All,
    I am facing a problem with external tabels. I have created an external table
    create table ext_org_table
    ( id varchar2(10)
    , name varchar2(100)
    ,id_parent varchar2(10)
    ,name_parent varchar2(100))
    organization external
    ( type oracle_loader
    default directory MYDIR
    access parameters
    records delimited by newline
         nologfile
         nobadfile
    fields terminated by ','
    missing field values are null
    location ('Orgdata.csv')
    reject limit unlimited;
    The problem is that when i give select * from ext_org_table , i get following error
    ORA-29913: error in executing ODCIEXTTABLEOPEN callout
    ORA-29400: data cartridge error
    KUP-04040: file Orgdata.csv in MYDIR not found
    ORA-06512: at "SYS.ORACLE_LOADER", line 19
    ORA-06512: at line 1
    Now , i have file Orgdata.csv in the specified directory.
    I have created directory in oracle using create directory command.
    I have granted read,write permission on the directory to user.
    I have given all read,write and execute permissions to folder where my files resides.My file resides in /appl/home/kk
    Now i don't understand why it is giving error file in Mydir not found.
    Kindly suggest.
    Regards
    Krish

    Hi,
    You are obviously doing someting wrong.
    May be the direcotry is not present or may be the file is not rpesent in the directory.
    I just tried ths
    Connected to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    Connected as SYS
    create directory mydir as 'c:\csv';
    grant read,write on directory mydir to scott;From Scott
    create table ext_org_table
    ( id varchar2(10)
    , name varchar2(100)
    ,id_parent varchar2(10)
    ,name_parent varchar2(100))
    organization external
    ( type oracle_loader
    default directory MYDIR
    access parameters
    records delimited by newline
    nologfile
    nobadfile
    fields terminated by ','
    missing field values are null
    location ('Orgdata.csv')
    reject limit unlimited;
    select * from ext_org_table;Ofcourse i made up some dummy data to test and its all OK.
    again,
    You may want to check if
    1) If the directory exists (select * from all_directories where directory_name='MYDIR');
    2) If the user has the read/write permissions on that directory
    3) If the file orgdata exists in that directory.
    Regards,
    Bhushan

  • How to select data from a table using a date field in the where condition?

    How to select data from a table using a date field in the where condition?
    For eg:
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
                                                      and bdatu = '31129999'.
    thanks.

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • How to select data from a table by passing document number from another tab

    How to select data from a table by passing document number from another table.
    for eg:-
    I want to display name, adres, region from ADRC table
    by using field delivery document number
    Kind Regards,
    Shanbagavalli.S

    Hi Shanbagavalli,
    There are multiple solutions to this questions a few i will try to answer and then you can take the best required for your requirements.
    **Consider that you have a Internal table having document number from other table..
    SELECT NAME ADRES REGION FROM ADRC
           INTO IT_ADRC
           FOR ALL ENTRIES IN IT_DOC
           WHERE DOCUMENT_NO = IT_DOC-DOCUMENT_NO.
    **Consider that you have 1 document number then
    SELECT NAME ADRES REGION FROM ADRC
         INTO IT_ADRC
         WHERE DOCUMENT_NO = W_DOCUMENT_NO.
    Hope this solves your problem.
    Regards,
    Kunjal

  • Select data from two tables...!

    HI Experts...!
    i m a beginner user and i want to select data from two tables proj and prps.....using joins.....and internal tables i have written a code...
    SELECT prps~pspnr
           prps~objnr
           prps~psphi
           proj~ernam
           proj~erdat
           proj~pspnr
    INTO  table itab   -
    itab is internal table
    FROM prps inner join proj
    WHERE pspnr in p_no and prpspsphi = projpspnr.
    but there is error in from clause ..please help me....
    Advance thanx....

    Hi,
    check the sample code bellow above two reply will solve out your problem but one more extra line in your code pointed out bellow.
    TABLES: prps, proj.
    TYPES:  BEGIN OF ty_test,
            pspnr LIKE prps-pspnr,
            objnr LIKE prps-objnr,
            psphi LIKE prps-psphi,
            ernam LIKE proj-ernam,
            erdat LIKE proj-erdat,
            END OF ty_test.
    DATA: itab TYPE STANDARD TABLE OF ty_test WITH HEADER LINE.
    SELECT-OPTIONS: p_no FOR prps-pspnr.
    SELECT  prps~pspnr
            prps~objnr
            prps~psphi
            proj~ernam
            proj~erdat
    *        proj~pspnr " No need for this you have selected this in
    *     the first line because it is commone so you only need to select from any one
            INTO TABLE itab
    FROM prps INNER JOIN proj ON ( prps~pspnr = proj~pspnr  )
    WHERE prps~pspnr IN p_no.
    Best Regards,
    Faisal
    Edited by: Rob Burbank on Dec 24, 2009 12:24 PM

  • Selecting data from two tables

    I am trying to select data from two tables.  The only problem that I am running into, is that i am only seeing results from my 'uploads' table.  there is also a record in documents where user = 1 that should show up.  here is my sql:
    $userIDNum = 1;
    $sql="Select *
    from uploads, documents
    WHERE uploads.user = documents.user AND uploads.user = $userIDNum
    ORDER BY uploads.title ASC, documents.title ASC";

    You'll need to explain a little more about your data and what you are trying to accomplish. Your current sql will select all columns from both the uploads and documents tables but only rows where the user id in both tables match, AND the user id equals 1. Is that not what you are seeing? Where's the code that outputs the results?

  • How to select data from cluster table

    hi experts,
                   I have a report which picks data from bseg (cluster table ) for a month report it is taking around 4 minutes to process.I feel it is not good when take the report after some months.
    how to select data from these table???how to declare itab for these cluster tables????can we include any search condition or any other kind of internal table???
    please advice.
    mani

    Hi Manikandan,
    The following code may be helpful to understand how to select the data from cluster table.
    Types: Begin of ty_kna1,
    Kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_kna1,
    begin of ty_bseg,
    belnr type bseg-belnr,
    kunnr type bseg-kunnr,
    end of ty_bseg,
    begin of ty_final,
    belnr type bseg-belnr,
    kunnr type kna1-kunnr,
    adrnr type kna1-adrnr,
    end of ty_final.
    Data: it_kna1 type table of ty_kna1,
    wa_kna1 type ty_kna1,
    it_bseg type table of ty_bseg,
    wa_bseg type ty_bseg,
    it_final type table of ty_final,
    wa_final type ty_final.
    Select kunnr adrnr from kna1 into table it_kna1 where....
    if sy-subrc = 0.
    select belnr kunnr into table it_bseg for all entries in it_kna1 where kunnr = it_kna1-kunnr.
    endif.
    sort it_kna1 by kunnr.
    Loop at it_bseg into wa_bseg.
    move wa_bseg-belnr to wa_final-belnr.
    read table it_kna1 into wa_kna1 with kunnr = wa_bseg-kunnr binary search.
    if sy-subrc = 0.
    move: wa_kna1-kunnr to wa_final-kunnr,
    wa_kna1-belnr to wa_final-belnr.
    endif.
    append wa_final to it_final.
    clear wa_final.
    endloop.
    Loop at it_final into wa_final.
    write: / wa_final-belnr, wa_final-kunnr, wa_final-adrnr.
    endloop.
    Reward if useful.
    Thankyou,
    Regards.

  • Load data from external table

    Hi ,
    How to load data from external table to transaction table using SQLLDR ?

    You use an external table to load the data it is described in the link to the manual I provided.
    Here is an example.
    Re: Using DML order to import a .xls file
    You would not be using SQLLDR though as external tables replace that functionality.

  • Craete a simple abap object to select data from a table and display

    Hi,
    I know the concept of abap objects but i never worked on it,
    can any one give me simple example of how to create an abap object to display data from mara table.also please send me documents or info regd ABAP OBJECTS.
    I want to write a simple report in terms of abap object
    Regards,
    Sowjanya

    hi,
    Here is hte sample program in se38.
    REPORT ZFGLI00003
    *-- Include for data declarations and performs
    include ZFGLI00003_f01.
    *--Include for Classes and their Implementation
    include ZFGLI00003_cl.
    *                selection-screen                                      *
    *-- Selection Values : Block1
    selection-screen begin of block b1 with frame title text-001.
    *--         Ledger
    parameters: p_rldnr  like zzprodnt-rldnr default 'NP'.
    *--         Fiscal year
    parameters: p_ryear  like zzprodnt-ryear.
    *--         Period(month)
    parameters: p_rpmax  like zzprodnt-rpmax.
    selection-screen end of block b1.
    *-- Selection Values : Block2
    selection-screen begin of block b2 with frame title text-002.
    *--              Company ID's
    select-options : s_glcomp  for ZZPRODNT-ROBUKRS .
    *--              Profit Center
    select-options : s_prctr   for ZZPRODNT-RPRCTR .
    *--              Product Assignment
    select-options : s_prasn   for ZZPRODNT-RZZWWZ01 .
    *--              Corporate Brand
    select-options : s_crpbd   for ZZPRODNT-RZZWWZ05 .
    selection-screen end of block b2.
    *-- Selection Values : Block3  Download Options
    selection-screen begin of block b3 with frame title text-003.
    parameters : p_local radiobutton group 1,
                 p_unix  radiobutton group 1,
                 p_path  like rlgrap-filename obligatory
                         default 'C:P20Z_Formatted.txt'(009).
    selection-screen end of block b3.
    *            At Selection-Selection on value-request  for file path    *
    at selection-screen on value-request for p_path.
      if p_unix <> 'X'.
    *-- Getting F4 help for output file
        perform get_filename changing p_path.
      else.
        message i999(zi) with
              'Sorry !! Function not available for UNIX file.'(i01).
      endif.
    *-- At selection screen validations
    at selection-screen on p_path.
      if p_unix <> 'X'.
    *-- Validate local file
        if p_path+1(2) <> ':'.
          message e999(zi) with 'Invalid file path'(006).
        endif.
      else.
    *-- Validate unix file
        if p_path+0(1) <> '/'.
          message e999(zi) with 'Invalid file path'(006).
        endif.
      endif.
    *                   Initialization                                    *
    initialization.
    *-- Initialize the period
      perform init_period changing p_rpmax p_ryear.
    *                    start-of-selection                               *
    start-of-selection.
      data : o_tm1_intf type ref to lcl_tm1_intf.
      create object o_tm1_intf.
    *-- Extract the data from ZZPRODNT
      call method o_tm1_intf->get_data exporting e_rldnr  = p_rldnr
                                                 e_ryear  = p_ryear
                                                 e_rpmax  = p_rpmax
                                                 e_glcomp = s_glcomp[]
                                                 e_prctr  = s_prctr[]
                                                 e_prasn  = s_prasn[]
                                                 e_crpbd  = s_crpbd[]
                                       importing i_subrc  = v_subrc.
    *   INCLUDE ZFGLI00003_CL                                              *
    *       CLASS lcl_tm1_intf IMPLEMENTATION
    class lcl_tm1_intf definition.
      public section.
    *-- Data Declaration
        data  : lv_date     type sy-datum,       "Date
                lv_time     type sy-uzeit,       "Time
                lv_count    type i,              "Count for total records
                lv_acsline  type zfgl014-acsline,"ACS line code
                lv_amt_curr type zzprodnt-kslvt, "current month amount
                lv_amt_ytd  type zzprodnt-kslvt, "YTD Amount
                lv_check,                        "check if any record is
                                                 "downloaded
                lv_msg(100),                     "message
                lv_count_s(5)  ,                 "Count for total(char)
                lv_amt_curr_s(23),               "Current month amount(char)
                lv_amt_ytd_s(23),                "YTD Amount(char)
                lv_ksl_pd(17),                   "KSLxx
                lv_period(2) type n.             "month(period)
    *-- Types Declaration
        types : ty_rldnr type zzprodnt-rldnr,    "Type for Ledger
                ty_ryear type zzprodnt-ryear,    "Type for Fiscal Year
                ty_rpmax type zzprodnt-rpmax,    "Type for Period
                ty_glcomp type range of char4,   "Type for company selection
                ty_prctr type range of char10,   "Type for profit center sel
                ty_prasn type range of char6,    "Type for prod assignmt sel
                ty_crpbd type range of char4,    "Type for Corp Brand sel
                begin of ty_file,                "Type for File
                  line(150),
                end of ty_file,
                begin of ty_ZZPRODNT,            "Type-ledger summary table
                  company       type OBUKR,      "Company
                  gl_acct       type RACCT,      "GL Account
                  cst_ctr       type KOSTL,      "Cost Center
                  prt_ctr       type PRCTR,      "Profit Center
                  rfarea        type FKBER,      "Functional Area
                  wbs_ele       type PS_POSID,   "WBS Element
                  prd_***       type RKEG_WWZ01, "Product Assignment
                  corp_bd       type RKEG_WWZ05, "Corporate Brand
                  ksl01         type KSLXX9,     "Total of transactions - 01
                  ksl02         type KSLXX9,     "Total of transactions - 02
                  ksl03         type KSLXX9,     "Total of transactions - 03
                  ksl04         type KSLXX9,     "Total of transactions - 04
                  ksl05         type KSLXX9,     "Total of transactions - 05
                  ksl06         type KSLXX9,     "Total of transactions - 06
                  ksl07         type KSLXX9,     "Total of transactions - 07
                  ksl08         type KSLXX9,     "Total of transactions - 08
                  ksl09         type KSLXX9,     "Total of transactions - 09
                  ksl10         type KSLXX9,     "Total of transactions - 10
                  ksl11         type KSLXX9,     "Total of transactions - 11
                  ksl12         type KSLXX9,     "Total of transactions - 12
                  ksl13         type KSLXX9,     "Total of transactions - 13
                  ksl14         type KSLXX9,     "Total of transactions - 14
                  ksl15         type KSLXX9,     "Total of transactions - 15
                  ksl16         type KSLXX9,     "Total of transactions - 16
                end of ty_ZZPRODNT.
    *-- Structure Declaration
    *           Structure for final file
        data  : x_file         type ty_file,
    *           Structure for Product Ledger Summary table
                x_ZZPRODNT     type ty_ZZPRODNT,
    *           Structure for Functional Area to ACS line mapping
                x_zfgl014      type zfgl014.
    *-- Internal Table Declaration
    *           Table for records of Product Ledger Summary table
        data  : it_ZZPRODNT     type table of ty_ZZPRODNT,
    *           Table for final file
                it_file         type table of ty_file,
    *           Table for Functional Area to ACS line mapping
                it_zfgl014      type table of zfgl014.
    *-- Method Declaration.
        methods : get_data      importing e_rldnr  type ty_rldnr
                                          e_ryear  type ty_ryear
                                          e_rpmax  type ty_rpmax
                                          e_glcomp type ty_glcomp
                                          e_prctr  type ty_prctr
                                          e_prasn  type ty_prasn
                                          e_crpbd  type ty_crpbd
                                exporting i_subrc type sy-subrc.
    endclass.                    "lcl_tm1_intf DEFINITION
    *       CLASS lcl_tm1_intf IMPLEMENTATION
    class lcl_tm1_intf implementation.
    *-- Method get_data selects the North American Product Ledger Summary
    *   table data and then maps the Functional Area to ACS line to get
    *   the ACS line code
      method get_data.
    *-- Local Variable
        DATA: L_ZZPRODNT TYPE TY_ZZPRODNT.
    *-- Get the data from North American Product Ledger Summary table
        select robukrs
               racct
               rcntr
               rprctr
               rfarea
               rzzwbs_el
               rzzwwz01
               rzzwwz05
               ksl01
               ksl02
               ksl03
               ksl04
               ksl05
               ksl06
               ksl07
               ksl08
               ksl09
               ksl10
               ksl11
               ksl12
               ksl13
               ksl14
               ksl15
               ksl16
          from zzprodnt
          into table it_ZZPRODNT
         where rldnr    = e_rldnr
           and ryear    = e_ryear
           and rpmax    = e_rpmax
           and ROBUKRS  in e_glcomp
           and RPRCTR   in e_prctr
           and RZZWWZ01 in e_prasn
           and RZZWWZ05 in e_crpbd.
        if sy-subrc = 0.
          loop at it_ZZPRODNT into l_zzprodnt.
            condense l_ZZPRODNT-rfarea no-gaps.
            if l_ZZPRODNT-rfarea is initial.
              delete it_ZZPRODNT.
            endif.
          endloop.
    *-- Get the Functional Area to ACS line code mapping data
          select *
            from zfgl014
            into table it_zfgl014
             for all entries in it_ZZPRODNT
           where fkber = it_ZZPRODNT-rfarea .
          if sy-subrc = 0.
          endif.
        endif.
        i_subrc = sy-subrc.
      endmethod.                    "get_data
    endclass.                    "lcl_tm1_intf IMPLEMENTATION
    *   INCLUDE ZFGLI00003_F01                                             *
    *                             Table
    tables : zzprodnt.
    *                          Data Declaration
    data : v_subrc type sy-subrc.
    *&      Form  get_filename
    *  Description : This subroutine is used for F4 Prompting
    form get_filename changing p_path like rlgrap-filename.
    *-- Local variables
      data : lv_file  like ibipparms-path, "Local file for upload/download
             lv_repid like syst-cprog,     "ABAP program, caller in external
                                           "procedures
             lv_dynnr type syst-dynnr.     "Current screen No
      lv_repid = syst-cprog.
      lv_dynnr = syst-dynnr.
    *-- Function module used for F4 help
      call function 'F4_FILENAME'
           exporting
                program_name  = lv_repid
                dynpro_number = lv_dynnr
           importing
                file_name     = lv_file.
      move lv_file to p_path.
    endform.                    " get_filename
    *&      Form  init_period
    FORM init_period changing p_rpmax p_ryear.
      if sy-datum+4(2) = 01.
        p_rpmax = 12.
        p_ryear = sy-datum+0(4) - 1.
      else.
        p_rpmax = sy-datum+4(2) - 1.
        p_ryear = sy-datum+0(4).
      endif.
    ENDFORM.                    " init_period
    Hope this helps.
    Regards,
    Richa

  • Select data from a table and a view: field with same content and different type

    hi all,
    I need data from a table hrp1001 and a view V_USR_NAME. What they have in common are the content of the fields SOBID and BNAME .
    It will be easier if those fields add a same type but they dont.
    Any suggestions for a workaround?
    Thanks

    Hi Ramesh,
    Specify the date format as YYYYMMDD in where condition.
    Dates are internally stored in SAP as YYYYMMDD only.
    Change your date format in WHERE condition as follows.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and bdatu = <b>'99991231'.</b>
    I doubt check your data base table EQUK on this date for the existince of data.
    Otherwise, just change the conidition on BDATU like below to see all entries prior to this date.
    data itab like equk occurs 0 with header line.
    select * from equk into table itab where werks = 'C001'
    and <b> bdatu <= '99991231'.</b>
    Thanks,
    Vinay
    Thanks,
    Vinay

  • Select data from database tables with high performance

    hi all,
    how to select data from different database tables with high performance.
    im using for all entries instead of inner joins, even though burden on data base tables is going very high ( 90 % in se30)
    hw to increase the performance.
    kindly, reply.
    thnks

    Also Check you are not using open sql much like distict order by group by , use abap techniques on internal table to acive the same.
    also Dont use select endselect.
    if possible use up to n rows claus....
    taht will limit the data base hits.
    also dont run select in siode any loops.
    i guess these are some of the trics oyu can use to avoid frequent DATA BASE HITS AND ABVOID THE DATA BASE LAOD.

  • How Select data from four tables

    Hi Sdners,
    How select data from four or more tables please give me any suggestion. iam learner please help me
    Advance wishes
    sreenu
    Moderator Message: I've already locked 2 threads of yours. Please read the Rules of Engagement of this forum and abide by it.
    Edited by: kishan P on Sep 5, 2010 9:12 PM

    I think there was a sample of using CURSOR in the XSQL docs.Check section:
    Using the CURSOR Operator for Nested Rowsets
    null

  • Selecting Data from CE1* tables

    Hi guys!
    Why is it that when I select data from our CE1* table, it is faster to select
    PERIO = '2007.007'
    than to select
    GJAHR = '2007' and PERDE = '007'?
    Thanks!

    > Hi,
    >
    > Are you executing the query and Se16 in same client?
    > if you are then the reason can be that some of the
    > fields are case sensitive and you are passing data in
    > all Caps.
    >
    > Also you can check by accepting the data through
    > PARAMTERS rather than hard coding the stuff, the
    > reason can be that there are some converison routines
    > that convert the data into a format that is required
    > to fetch the data which may be Se16 does and your
    > hardcoding does not.
    >
    > Regards,
    > Sesh
    I found out now. It is because actual data for PALEDGER is '010' not '10'.
    Thanks anyway!

  • Selecting data from three tables

    Hi Every one...
    I have three tables, Tbl_FlData, Tbl_Flsubdata,Tbl_OutDirection_Dtl, in these tables the common columns are OUTNO, OUTYEAR. When I am trying to pull data from two tables Tbl_Fldata, Tbl_OutDirection_Dtl by using below query I am getting exact output what i want.
    SELECT Tbl_FLData.OUTNO, Tbl_FLData.OUTHDATE,Tbl_OutDirection_Dtl.OTSERNO FROM Tbl_FLData INNER JOIN Tbl_OutDirection_Dtl ON Tbl_FLData.OUTYEAR = Tbl_OutDirection_Dtl.OUTYEAR AND Tbl_FLData.OUTNO = Tbl_OutDirection_Dtl.OUTNO.
    But the problem is, when I am trying to pull a column from Tbl_FlSubdata.Remarks the out put is coming but the records are duplicating.
    The fields of the tables are
    Tbl_FlData: OUTNO, OUTYEAR, OUTHDATE, SUBJECT,USERDEPTCODE, FDEPTCODE, SENDHDATE, REPLYINDAYS, EXPECTEDHDATE, UD_UID
    Tbl_FLSUBDATA: OUTNO, OUTYEAR, OTSSERNO, SEQNO, EMPCODE, SEQHDATE, REMARKS, UD_UID
    Tbl_OutDirectionDtl : OUTNO, OUTYEAR, OTSERNO, DI_Code, REPLYHDATA, INNO, INHDATE, IN_UD_UID, IN_REMARKS.
    Please help me in this issue.

    Hi,
    Try something like this.
    SELECT distinct Tbl_FLData.OUTNO,
    Tbl_FLData.OUTHDATE,
    Tbl_FLSUBDATA.OTSSERNO
    Tbl_OutDirection_Dtl.OTSERNO
    FROM Tbl_FLData, Tbl_FLSUBDATA, Tbl_OutDirection_Dtl
    where Tbl_FLSUBDATA.OUTNO = Tbl_FLData.OUTNO(+)
    and Tbl_OutDirection_Dtl.OUTNO = Tbl_FLData.OUTNO(+)
    order by Tbl_FLData.OUTNO;
    considering Tbl_FLData as the master table. If there are any other unique fields like "out_no" include it a way as above after "where" with a (+) join and see if you still get duplicates.

Maybe you are looking for

  • No sound, explorer.exe not starting, no event viewer

    I set up a new PC recently and installed Windows 7 Pro. Approximately once every few days I get a problem which, oddly, has several seemingly different manifestations. I mean that if I see one of these, all the others can be observed as well, until I

  • PI 7.1 Sender Interface and Receiver Interface  gets interchanged

    Hi All, I m facing a strange problem in PI 7.1 For many of my scenarios, the Sender Interface, sender namespace and receiver Interface, receiver namespace  information gets interchanged and displayed incorrectly. But sometimes its working fine. When

  • Viewing issue with Adobe Reader

    Hi there, I'm having an issue with Adobe reader, which appears to be not related to platform or version. To cut a long story short. I've created an A4 design in Photoshop. Part of this design includes some boxes, that have been given an outline (bord

  • Authorizations Error  to Access ISR Notifications

    Hi All, Greetings !!! We have created an application form in Abap Webdynpro using function module ZZHRIQ_SCEN_NOTIF_CREATE_RFC (Copied from HRIQ_SCM1_NOTIF_CREATE_RFC) to create ISR notifications. This application is working fine when we have given a

  • Getting list of all BSPs

    Hello all, I'm looking for an ABAP function that I can call from java that will bring me the list of all the BSP's in a certain system. does anyone know such a function? Thanks in advance, Tomer