Select query and read dataset

i have to read an excel sheet from the application server into an internal table that i hv created.can you help me to write  select query &read dataset statement?
suppose the internal table name is T_a and it has fields f1 to f7 which are all present in the excel sheet.
<REMOVED BY MODERATOR>
Thanks in advance,
Anand.
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:33 PM

Hi
select f1 f2 f3 f4 f5 f6 f7
from TABLE
into table T_a.
read table T_a with key f1 = <val1>.
<REMOVED BY MODERATOR>
Regards,
Mansi.
Edited by: Alvaro Tejada Galindo on Feb 14, 2008 2:33 PM

Similar Messages

  • In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    In oracle rac, If user query a select query and in processing data is fetched but in the duration of fetching the particular node is evicted then how failover to another node internally?

    The query is re-issued as a flashback query and the client process can continue to fetch from the cursor. This is described in the Net Services Administrators Guide, the section on Transparent Application Failover.

  • Performance issue with select query and for all entries.

    hi,
    i have a report to be performance tuned.
    the database table has around 20 million entries and 25 fields.
    so, the report fetches the distinct values of two fields using one select query.
    so, the first select query fetches around 150 entries from the table for 2 fields.
    then it applies some logic and eliminates some entries and makes entries around 80-90...
    and then it again applies the select query on the same table using for all entries applied on the internal table with 80-90 entries...
    in short,
    it accesses the same database table twice.
    so, i tried to get the database table in internal table and apply the logic on internal table and delete the unwanted entries.. but it gave me memory dump, and it wont take that huge amount of data into abap memory...
    is around 80-90 entries too much for using "for all entries"?
    the logic that is applied to eliminate the entries from internal table is too long, and hence cannot be converted into where clause to convert it into single select..
    i really cant find the way out...
    please help.

    chinmay kulkarni wrote:Chinmay,
    Even though you tried to ask the question with detailed explanation, unfortunately it is still not clear.
    It is perfectly fine to access the same database twice. If that is working for you, I don't think there is any need to change the logic. As Rob mentioned, 80 or 8000 records is not a problem in "for all entries" clause.
    >
    > so, i tried to get the database table in internal table and apply the logic on internal table and delete the unwanted entries.. but it gave me memory dump, and it wont take that huge amount of data into abap memory...
    >
    It is not clear what you tried to do here. Did you try to bring all 20 million records into an internal table? That will certainly cause the program to short dump with memory shortage.
    > the logic that is applied to eliminate the entries from internal table is too long, and hence cannot be converted into where clause to convert it into single select..
    >
    That is fine. Actually, it is better (performance wise) to do much of the work in ABAP than writing a complex WHERE clause that might bog down the database.

  • Dynamic From statement in select query and/or outer join not working

    Dear Experts, I have a select query where the select columns are dynamic, the where condition is also dynamic. It is of the below format:
    Select (dynamic columns) INTO <wa>
    FROM a inner join b on af1 = bf1
    inner join c on af2 = cf2......
    WHERE (dynamic conditios)
    ORDER BY ( dynamic sort condition).
    Now I have to include some tables (dynamically depending on the user input) in the inner join statement which will give description for the selected fields. And these database tables may or may no be empty. So in this case, my select query will not return any data if these tables are empty. And I dont want that.
    I tried using outer join for the extra tables but it gave me a runtime error. I also tried forming the inner join statement dynamically but it was not supporting.
    Kindly give me pointers.
    Thanks

    Hey thanks for the reply, but the problem is not solved.
    I am already using  ( fileds, value) like table in my where condition and the select statement was working properly.
    the problem is that now I have to include some tables in the join statement which can be empty and so i want to use Outer join.
    But I am getting a runtime error as below:
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SYNTAX', was not
         caught in
        procedure "ZATSCSNG_RFC_READ_TABLE" "(FUNCTION)", nor was it propagated by a
         RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The running ABAP program wanted to execute a SELECT statement whose
        WHERE condition was (partly) specified dynamically. The part that is
        specified in an internal table at runtime is compared to a field of the
        right table of an LEFT OUTER JOIN. Such comparisons are not supported by
         all database systems and are therefore not allowed.

  • Select Query and Recordset on same page

    I have been workig with Coldfusion for a while now.  Where I work there is a need for web pages to extract data from data sources.  I have been successful at doing this.  Typically I use a form that selects multiple criteria, which when submitted loads a target/action page that displays records that are filtered based on the SQL statement contained on that action page.  What I do is to conditionally check if criteria is passed using cfif.  And if a field parameter is indeed passed it becomes part of the cfquery.  This works out well - especially for reporting.
    But now I am seeing more and more a need to accomplish the same process - but on a single cfm page.  So the page I seek will have both the form (select) and the recordset results on the same page. 
    In this exercise I will be caching results od a query and having several queries to further refine what I seek (QOQ).  What I am seeking is the best practice to follow, I was thinking that using an iframe on the page would be and adequate solution whereby the query would pass the criteria and its form action would pass the variable(s) to the action page, which would be the source of the iframe.  But I am not certain that this is a best proctice.  Nor have I had great success at getting the pages to work in concert. 
    Any advice that you can lend would be appreciated. 

    I ideally start by reducing the 2-page functionality - of form page and action page - to just one. It goes like this:
    <cfset isValidationPassed = false>
    <cfif isDefined("form.someVar")>
    <!--- Do validation. Validated form implies isValidationPassed is true --->
    </cfif>
    <cfif isValidationPassed>
    <!--- Do action page stuff --->
    <cfelseif NOT isDefined("form.someVar") OR NOT isValidationPassed>
    <!--- Display the form. --->
    <!--- If form had been submitted, inform user which validation failed, and what to correct. Display the form. --->
    <cfoutput><form method="post" action="#CGI.SCRIPT_NAME#"></cfoutput>
    </form>
    </cfif>
    The idea is then to pile on the complexity, layer by layer.

  • Select query to read data from a view

    Hi friends,
    We have been using a query to read data from a custom view which used to work perfectly. Now the program sits at that select query forever. We are able to extract same data from se16. Not sure what could be the problem.
    Thanks in advance.

    Dev
    Have a look at the Table Index for the tables involved in the View... I think there is some change in the Indexes.. (Add / Remove / Change)
    Thanks
    Amol Lohade

  • Problems with Firefox 7.0.1 , gmail and MacOSX 10.6.8---gmail not working-can't select, open and read mail!!! help---anyone?

    I can select and delete, but not open and read...
    things are working mighty slow since installing 7.0.1 Firefox upgrade....and losing access to reading gmail is just the last straw.
    Also having issues with non-responsive script messages in same gmail window, huge time lags, some flash plug in error messages (yes three times I have downloaded and reinstalled the latest flash player)....hating 7.0.1 right now mightily....

    I came across this and it worked for me.
    GMail entire message content missing (blank) after header title
    In Firefox, if you have "Adblock Plus" extension.
    1. "Ctrl+Shift+F" Preferences (or right click on ADP symbol, and choose preferences)
    2. 'Filters' menu > "Update all subscriptions"
    reference: https://support.mozilla.com/questions/896267

  • Select Query and Join Between int and Numeric(22)

    I have two tables
    tablea
    Field1 int
    tableb
    Field1 Numeric(22)
    I know this design is wrong but this is what I have ?
    tablea contains about 12M records
    Field1 in tablea is one to one related to Field1 in tableb
    Now I have Select Query
    Select tablea.* from tablea,tableb where tablea.field1=tableb.field1 and tableb.field2 > somrthing
    Query here is
    Does Join Between
    int type

    Yes, avinash said rightly.
    there is another way bit diffict.
    use the indexes properly as available in the mseg table and mkpf table even then it is diffcult
    else try using BAPI.
    some bapi will give the entire details of the MATERAIL DOCUMENT
    go to BAPI explorer tcode BAPI.
    where you can find the BAPI name like the 'GET_LIST'.
    Try this.
    hope this will serve your purpose.
    Thanks and regards
    Ramchander Rao.K

  • Select query and join's

    Hi All,
    I had to modify the current select query coz its taking a lot of database time, please suggest the best solution for the below.
    SELECT msegbukrs mkpfbudat mkpf~bldat
    msegebeln mkpfxblnr mseg~mblnr
    msegmjahr msegzeile mseg~xauto
    msegparent_id msegwerks mseg~umwrk
    msegumlgo msegparent_id ekko~reswk
    msegwerks mseglgort mseg~matnr
    msegerfmg msegerfme mseg~shkzg
    msegsjahr msegsmbln mseg~smblp
    msegcharg ekkobedat
    INTO TABLE g_tbl_main
    FROM mkpf JOIN mseg
    ON mkpfmandt = msegmandt AND
    mkpfmblnr = msegmblnr AND
    mkpfmjahr = msegmjahr
    JOIN ekko ON msegmandt = ekkomandt AND
    msegebeln = ekkoebeln
    JOIN likp  ON mkpfxblnr = likpvbeln
    CLIENT specified
    WHERE mkpf~mandt = sy-mandt AND
    mkpf~budat IN s_budat AND
    ekko~bedat IN s_bedat AND
    mseg~ebeln IN s_ebeln AND
    mkpf~xblnr IN s_vbeln AND
    likp~vstel IN s_vstel AND
    ekko~reswk IN s_reswk AND
    mseg~werks IN r_werks AND
    mseg~lgort IN s_lgort AND
    mseg~matnr IN s_matnr AND
    mseg~smbln = space AND
    mseg~bwart IN s_bwart AND
    mseg~kzzug = c_true.

    Yes, avinash said rightly.
    there is another way bit diffict.
    use the indexes properly as available in the mseg table and mkpf table even then it is diffcult
    else try using BAPI.
    some bapi will give the entire details of the MATERAIL DOCUMENT
    go to BAPI explorer tcode BAPI.
    where you can find the BAPI name like the 'GET_LIST'.
    Try this.
    hope this will serve your purpose.
    Thanks and regards
    Ramchander Rao.K

  • Select query and Insert statement performance

    Hi all,
    Can anyone plz guide us on below problem I am facing ?
    1) One of the simple Insert statement runs very slow..What might be the reason? Its simple table without any LOBs ,LONG or so. Everything else in the DB works fine.
    2) one of the SELECT statement runs very slow. It selects all records (around 1000) from a table..How can i improve its performance?
    3)Which columns in the Master and its detail tables should be indexed to improve Query performance on them.
    Many Thanks
    Regards
    sandeep

    To get an answer to your questions you have to post some informations about your system:
    1. operating system
    2. RAM
    3. oracle version
    4. init.ora
    Thomas

  • Parameter driven query and SSRS Dataset fields

    I have a Parameter in my SSRS Report, @PatientSelection. I use this Parameter within my SQL Stored Procedure to execute one version of the report and get specific columns, or another version of the report with different columns.
    -- @PatientSelection is set to 1 if the Business Report Requestor chooses "New Patients"
    IF @PatientSelection = 1...
    -- @PatientSelection is set to 2 if the Business Report Requestor chooses "Established Patients"
    IF @PatientSelection = 2
    When I do this, none of my fields are showing up within my SSRS Dataset.
    Am I fundamentally doing this the wrong way concerning SSRS and Report Creation???
    Any feedback is greatly appreciated. Thanks for your review and am hopeful for a response.
    PSULionRP

    You can add manually  the missing fields, drag and drop all needed fields to the tablix and see how was it  going. Doo you use one or two tables(based on the parameters) to display the report?
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • Query and selection fields

    Hi,
    I'm creating a query with trx SQ01.
    I want to modify the name of a field in the selection screen of the query.
    How can I do this ?
    Regards

    Hi,
    In SQ01 select query and choose icon "change".
    In the change query screen choose from top menu "goto", followed by "field selection" and "selections". In column "No" you can set sequence, in columns "selection text" you can amend the descriptions.
    Hope it will solve ur problem

  • Workflows and select query

    hi all....
    i want to write a select query in workflow to fetch value from a table which i will be saving in workflow container... i cannot create a business object.... what else can i do... i dont hav exp with classes too.... advise some easy way out.....
    <Thread moved from ABAP General>
    Edited by: Mike Pokraka on Aug 27, 2008 12:47 PM

    Hello Sharma,
    Write a program in which you can give your select query and call the FM, SWU_START_WORKFLOW
    e.g.:
    CALL FUNCTION 'SWU_START_WORKFLOW'
      EXPORTING
        task                  = task
    *   LANGUAGE              = SY-LANGU
        user                  = user
    *   SENDER_ID             = SENDER_ID
    * IMPORTING
    *   RETURN_CODE           = RETURN_CODE
    *   WORKITEM_ID           = WORKITEM_ID
      TABLES
    *   CONTAINER             = CONTAINER
    *   MESSAGE_LINES         = MESSAGE_LINES
        attachment_list       = attachment_list
    Here, in the CONTAINER, pass the workflow container values.
    Give the respective task number and user as sy-uname.
    Regards
    Indu

  • How to create a Type Object with Dynamic select query columns in a Function

    Hi Every One,
    I'm trying to figure out how to write a piplined function that executes a dynamic select query and construct a Type Object in order to assigned it to the pipe row.
    I have tried by
    SELECT a.DB_QUERY INTO actual_query FROM mytable a WHERE a.country_code = 'US';
    c :=DBMS_SQL.OPEN_CURSOR;
    DBMS_SQL.PARSE(c,actual_query,DBMS_SQL.NATIVE);
    l_status := DBMS_SQL.EXECUTE(c);
    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.DEFINE_COLUMN(c,j,v_val,2000);
    END LOOP;
    FOR j in 1..col_cnt LOOP
    DBMS_SQL.COLUMN_VALUE(c,j,v_val);
    END LOOP;
    But got stuck, how to iterate the values and assign to a Type Object from the cursor. Can any one guide me how to do the process.
    Thanks,
    mallikj2

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • Sinlge select query in different schemas for same table(Indentical Structu)

    Scenario :
    Table XYZ is created in Schema A
    After an year, the old data from the previous year would be moved to different schema. However in the other schema the same table name would be used.
    For eg
    Schema A contains table XYZ with data of 2012 yr
    Schema B contains table XYZ with data of 2011 yr
    Table XYZ in both the schemas have identical structure.
    So can we fire a single select query to read the data from both the tables in effective way.
    Eg select * from XYZ where date range between 15-Oct-2011 to 15-Mar-2012.
    However the data resides in 2 different schema altogether.

    Thanks for the reply
    Creating an view is an option.
    But my problem, there is ORM layer(either Hibernate or Eclipse Top Link) between the application and the database.
    So the queries would be formed by the ORM layer and are not hand generated.
    So i cannot use view.
    So is there any option that would allow me to use single query on different schema's ?

Maybe you are looking for

  • General Error 48

    I am trying to render a graphic from motion in FCP and recieving an error message. It gets through the majority of the file and then comes back with a general error (48). It is only in one specific spot in the sequence. I can render other clips with

  • How to tranport XI config from DEV to QAS or PRD

    Dear Sir, We would like to know How to tranport XI config from DEV to QAS or PRD Thank you and best regards, Vimol

  • Problems using I2C on the FPGA of MYRIO

    I made a real time program that talks the the PmodCLS; however, for my fpga program is must run under the fpga, and under communications there is some I2C functions however the documentation is just limited to the context help file. Attached you will

  • Financial Report DB connection lost

    Gurus, Among around 100 Financial Reports in my system, I have this problem with two of the reports where I do not see the DB connection in workspace, hence not able to open it. For example, in Workspace, when I do TOOLS -> CHANGE DATABASE CONNECTION

  • VerifyClient() throws exception that I don't understand...

    I got the following exception but I have no idea what I did wrong. Client verification failure. You must have a valid login to access this page. The error occuried in XXX.cfm line x (where x is the line I have <cfset verifyClient()> Any idea what doe