Dynamic data select from table is giving dump

Hello Experts,
   Below statement is giving Dump after it move all the data in my dynamic table.
When i see in debug. All my recored are avilable in <T_TAB> Table.
SELECT * FROM (pa_tab) INTO CORRESPONDING FIELDS OF TABLE <T_TAB>.
> IF SY-SUBRC = 0.
Information on where terminated
The termination occurred in the ABAP program "ZFIR_ZTABLE_UPLOAD" in
"F_DOWNLOAD".
The main program was "ZFIR_ZTABLE_UPLOAD ".
The termination occurred in line 403 of the source code of the (Include)
program "ZFIR_ZTABLE_UPLOAD"
of the source code of program "ZFIR_ZTABLE_UPLOAD" (when calling the editor
4030).
Processing was terminated because the exception "CX_SY_OPEN_SQL_DB" occurred in
the
procedure "F_DOWNLOAD" "(FORM)" but was not handled locally, not declared in
the
RAISING clause of the procedure.
The procedure is in the program "ZFIR_ZTABLE_UPLOAD ". Its source code starts
in line 399
of the (Include) program "ZFIR_ZTABLE_UPLOAD ".
please help me.
Regards,
Amit
Message was edited by:
        Amit Gupta

Hi Amit,
Check if you are doing the following in your program
FIELD-SYMBOLS <T_TAB> TYPE STANDARD TABLE.
DATA: g_tabref type ref to data.   "Reference to your table structure
CREATE DATA g_tabref type standard table of (pa_tab).
ASSIGN g_tabref->* to <T_TAB>.
SELECT * FROM (PA_TAB) INTO TABLE <T_TAB>.
Hope this solves your problem.
Let me know if you require any further info.
Enjoy SAP. Reward points of useful
Rajasekhar

Similar Messages

  • Dynamic field Select from table

    Hi,
    I have to select certain field from table. The field which I have to select I do not know.
    It will come dynamically from program.
    Plz help me what is correct statement to execute.
    Thanks.
    S Sahoo

    Hi Sahoo,
    Pllease follow below steps.
    1, Create internal table with field Fieldname TYPE FIELDNAME (Say ITAB)
    2. Append Fields (thats you want to select) to internal table [at run time]
    3. Use
    SELECT (ITAB)
                  into table <table>
                  from <DB>
                  where <cond>
    Hope this helps,
    Nag

  • Data selection from Table

    Hi ,
    My requirement is to have Commercial Documents which are not Accounted. So that I've used the following logic.
      SELECT a~vbeln
                     a~vbtyp
                     a~fkdat
                     a~bukrs
             a~kunrg
             SUM( b~netwr )
           FROM vbrk AS a INNER JOIN vbrp AS b
           ON avbeln EQ bvbeln
           INTO ls_bill WHERE a~vbtyp EQ 'M'          AND
                              a~fkdat IN s_fkdat      AND
                              a~bukrs IN s_bukrs      AND
                              a~kunrg IN s_kunrg
                        GROUP BY a~vbeln
                                 a~vbtyp
                                 a~fkdat
                                 a~bukrs
                                 a~kunrg.
        l_awkey = ls_bill-vbeln.
        SELECT awkey FROM bkpf INTO l_awkey
                     WHERE awtyp EQ 'VBRK'  AND
                           awkey EQ l_awkey AND
                           bukrs EQ ls_bill-bukrs.
        ENDSELECT.
        IF sy-subrc NE 0.
          APPEND ls_bill TO lt_bill.
        ENDIF.
        CLEAR : ls_bill, l_awkey.
      ENDSELECT.
    Is that the above logic for getting data is correct. or  First taking all the entries from VBRK and VBRP table then selecting entries from BKPF and then if any entry of VBRK is not in BKPF then taking that.
    Regards,
    Rajiv.V
    Moderator message - Moved to the correct forum
    Edited by: Rob Burbank on Dec 10, 2009 9:36 AM

    You should have searched SDN for Performance Tuning.
    Solution :
    Please search SDN for Performance Tuning and then try to understand the use of various statements that you have used in terms of performance.

  • Problem in displaying data onto Form after selecting from table.

    Hi there,
    I keep hitting this error when I tried to display the data after the selection from table. Using backing beans w data control to do it
    Err: java.lang.ClassCastException: java.util.Collections$SingletonList cannot be cast to java.lang.Integer
    Table used ArrayList to retrieve out the wanted data. E.g uses A object
    To display: selected data to retrieve the selected row to display as a read-only form layout below the table. E.g. need to get A.getName() to match with B object B.getName() then uses the B object to retrieve out the data.
    Anyone know how to do it?

    Hi
    use the follwing code
    int rowcount = wdContext.node<Name>().size();
    while(rs.next())
    IPrivate<ViewName>.I<Name>Element tabnode =wdContext.node<Name>().get<Name>ElementAt(i);
    tabnode.nodeAuthoriseNode().invalidate();
    tabnode.nodeAuthoriseNode().addElement(0,authele);
    tabnode.nodeAuthoriseNode().setLeadSelection(0);
    wend
    Regards
    Dhinakar

  • Html form for select * from table a

    Hi all,
    I m looking for report on header/footer part from one apex pages
    which will display context from table a, like sql statement
    select * from table a, written in html.
    Is any examples in java script/html select from tables
    (and same insert into table A (...) select * from table b)
    thanks,
    Gordan

    Hello Gordan,
    Do you want to show the whole report or just some data of it?
    If it's for ex just the name and address you could create two items and have a process or computation to fill it with your select statement.
    If it's the whole report, just create the report and put it in for ex. Region 1. In your page template you can specify that Region 1 needs to come into the footer.
    Regards,
    Dimitri
    -- http://dgielis.blogspot.com/
    -- http://apex-evangelists.com/
    -- http://apexblogs.info/

  • Populate select list when a date selected from date picker in tabular form

    Hi Guys,
    I have a situation where user picks a date from a date picker in tabular form.
    So as soon as he picks a date say 05/31/2011 from the date picker I want to populate a select list with 2 values : Tuesday AM , Tuesday PM.
    I have gone through the forums a lot and figured we can write a Dynamic Action using JQuery Selector. But I am not sure how to figure out the day from a date picker.
    I appreciate if some one can give your thoughts on how to proceed. It seems to be simple but looks like a tricky one. I am not familiar with writing Java Script.
    Thanks ,
    Raj

    I was thinking your date selected from CALENDAR ended in a list_item.
    I don't know I thinking that
    well,
    :master_block.itemdate is your text_item where calendar return date selected.
    and then , following Gerd's step
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :master_block.itemdate := calendar (.........);
    go_block ('master-block');
    execute_query;
    end;
    or set a global or parameter variable date selected from calendar :parameter. xxxxxx
    in a PRE-QUERY
    :master_block.itemdate := :parameter. xxxxxx
    and
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :parameter. xxxxxx := calendar( ....);
    go_block ('master-block');
    execute_query;
    end;
    regards

  • Select * from table as of Scn fails in powercenter

    Hi all, I have written the below query in SQL override of a Powercenter mapping. This fails with 'FROM keyword not found where expected' error. Can you please suggest how else I can fetch last committed data from my source?Select * from table AS OF SCN <Scn no>

    Hi All, I have multiple flat files which i need to load in a single table.I did that using indirect option at session level.But need to dig out on how to populate substring of header in name column in target table. i have two columns Id and Name. in all input file I have only one column 'id' with header like H|ABCD|Date. I need to populate target like below example. File 1                                    File2     H|ABCD|Date.                      H|EFGH|Date.1                                            42                                            5  3                                            6 Target tale: Id    Name1     ABCD2     ABCD3     ABCD4     EFGH5     EFGH6     EFGH can anyone help on what should be the logic to get this data in a table in informatica.

  • Can I simulate SELECT * FROM TABLE WHERE ROW IN (1111,2222) using SQLJ

    I have a fct like
    public void fct(String inStr) {
    String str = "SELECT * FROM TABLE WHERE ROW IN" + inStr;
    // then I xecute the query using JDBC connection
    But I want to do the same thisn using SQLJ like:
    public void fct(String inStr) {
    #sql [nctx] iter = { SELECT * FROM TABLE WHERE ROW IN :inStr}
    When I run the second version and give a parameter like "(1111,2222)" it gives
    ORA-01722: invalid number error.
    Is there a way to give parameters to in clauses of SQLJ statements.
    Thanks in regard.

    This is a SQLJ FAQ. You can find the FAQ at:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html
    Your question is addressed in the following section:
    http://technet.oracle.com/tech/java/sqlj_jdbc/htdocs/faq.html#variablesizevaluelist
    Note that that section has a typo. The lines:
    ? // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),?};
    should read:
    ... // populate mynumbers
    #sql { SELECT * FROM tab WHERE col in (:(a[0]),:(a[1]),...};
    By the way, with the next release SQLJ will support pasting in of dynamic SQL fragments. Then you'll be able to do pretty much what you are trying to accomplish here (albeit with slightly different syntax). Until then you'd have to use the workarounds from the FAQ.

  • Is select from view faster then select from table..???

    Hello Gurus,
    I want to query some data from two tables, both of table have many columns (attributes) and many rows...
    I use several where clauses to retrieve data from those tables..
    witch one is faster, I create a view or I just "select" from those tables???
    Regards.
    Nia...

    riedelme wrote:
    3360 wrote:
    riedelme wrote:
    Selecting through a view almost never helps performance and frequently hurts.Views do not affect performance.
    Views are simply queries and like queries there are fast and slow ones.I disagree.
    First of all, to use a view you are executing a query to get a result set, then accessing the data from that result set - a built-in extra step to perform to get data.First of all that entire explanation of how views work is not correct. The optimizer will rewrite the query to make the view go away if possible.
    SQL> create or replace view v as select * from dual;
    View created.
    SQL> explain plan for select * from dual where dummy = 'X';
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 272002086
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |     2 |     2   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("DUMMY"='X')
    13 rows selected.
    SQL> explain plan for select * from v where dummy = 'X';
    Explained.
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 272002086
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |      |     1 |     2 |     2   (0)| 00:00:01 |
    |*  1 |  TABLE ACCESS FULL| DUAL |     1 |     2 |     2   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter("DUMMY"='X')
    13 rows selected.Exactly the same.
    >
    Second, when accessing the data from the view the result sets don't have indexes for fast lookups and efficient joins on later steps.This is also known as just making stuff up and is not how the database works. care to share any references at all for any of this?
    >
    Third, the systems I've seen that use views extensively - I am looking at one now - tend to perform joins on views using the same tables with the same data over and over. This is a design issue and not specifically a problem with views but they lend themselves to this misuse much too easilyCorrect as I said a view is just a query, and just like queries there are good fast views and bad slow views
    >
    I'll concede that the problem is not specifically with views themselves but as I just said they lend themselves to misuse. Tuning views of views and views joined to views is difficultYes, queries can be misused as can almost all SQL functions and functionality.
    As I said - Views are simply queries and like queries there are fast and slow ones.
    Nothing that you have posted that is accurate changes that.

  • Is it possible to delete data selectively from Business content cubes

    Dear Experts,
             Requesting you to help me out to know, is it possible to delete data selectively from Business content cubes.
    When I'm trying to delete selectively from Business content cubes, the background job gets cancelled with ST22 logs stating
    A RAISE statement in the program "SAPLRSDRD" raised the exception  condition "X_MESSAGE".                                                                               
    Since the exception was not intercepted by a superior program, processing was terminated.  
    and i tried  with few more Technical content cubes but the same thing happens.
    Pls let me know how to selectively delete data from Business content cubes if it's possible?.
    Thanks in advance for your favorable assistance.
    Regards,
    Ramesh-Kumar.

    Hi Ramesh,
    Follow below steps for selective deletion:
    1.     Transaction code: Use the Transaction code DELETE_FACTS.
    2.     Generate selective deletion program:
    A report program will be generated of the given name, here .
    3.     Selection screen:
    Take the deletion program u201CZDEL_EPBGu201D to the transaction code SE38 to see/execute the program.
    After executing it will take you to a selection screen:
    As we need to carry out deletion selective on Calendar week, we need to get the screen field for the field Calendar week. For this, click on the Calendar week field and press F1.
    Click on the technical information button (marked in red box above) you will get below screen:
         ABAP program to carry out the Calendar week calculation
    Problem scenario: As stated earlier the requirement is to delete the data from the cube based on the calendar week. Thus a code must be developed such that the number of weeks should be taken as input and corresponding calendar week should be determined. This calendar week should be then passed to the deletion program in order to carry out the data deletion from the InfoCube.
         Transaction code: Use T-code SE38 in order to create a program.
    Logic: Suppose we need to delete the data older than 100 weeks.
    a.     Get the number of weeks and system date in variables and calculate the total number of days :
    lv_week = 100.      *number of weeks      
    lv_dte = sy-datum.     *system date
    v_totaldays = lv_week * 7.      *total days
    b.     Get the corresponding calendar day from the total days. This is obtained by simply subtracting the total no. of days from the system date.
    lv_calday = lv_dte - v_totaldays. *corresponding calday.     
    c.     Now in order to get the calendar week corresponding to the calculated calendar day we must call a function module 'DATE_TO_PERIOD_CONVERT'. This function module takes input as Calendar day and Fiscal year variant and returns the appropriate fiscal period.
    Get the sales week time elements
      call function 'DATE_TO_PERIOD_CONVERT'
        exporting
          i_date                      = lv_calday
          i_periv                     = lc_sales
        importing
          e_buper                     = lv_period
          e_gjahr                     = lv_year
        exceptions
          input_false                 = 1
          t009_notfound               = 2
          t009b_notfound              = 3.
      if sy-subrc = 0.
        ls_time-calweek(4)      = lv_year.
        ls_time-calweek+4(2)    = lv_period.
      endif.
    v_week = ls_boots_time-calweek.
    Note: We can pass the fiscal year variant which can be obtained from the table T009B.For e.g. here fiscal year variant lc_sales = Z2. LS_TIME will be any table with suitable time units.
    d.     Now we have obtained the required calendar week in the v_week variable. This calendar week is the week till which we need to keep the data. And older data than this week will be deleted. This deletion will be done by the deletion program
    Submitting the Data deletion program for ZEPBGC01 and key field
    SUBMIT ZDEL_EPBG WITH C039 LT v_week.
              Here the calendar week value is submitted to the deletion program ZDEL_EPBG with the screen field of calendar week.
    Hope ... this will  help you..
    Thanks,
    Jitendra

  • Excute_query when new date selected from calender

    hi,
    i have a mater detail form. form is displaying current day values as default.
    i put a calendar to form for users can be select date.
    now,
    i want to excute_query when new date selected from calender.
    i writed below code to text_item(calendar) when_validate_item trigger but it nor woring
    .giving frm-40137 error.
    code is;
    :parameter.GUNLUK_TARIH := Name_In('PARAMATRELER.TARIH_SON');
    SET_RECORD_PROPERTY(1,'XXMOB_YAPBOZ_TAHTASI_GV',STATUS,QUERY_STATUS);
    go_block('XXMOB_YAPBOZ_TAHTASI_GV');
    DO_KEY('Execute_query');
    any help please
    best regards
    aykut

    I was thinking your date selected from CALENDAR ended in a list_item.
    I don't know I thinking that
    well,
    :master_block.itemdate is your text_item where calendar return date selected.
    and then , following Gerd's step
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :master_block.itemdate := calendar (.........);
    go_block ('master-block');
    execute_query;
    end;
    or set a global or parameter variable date selected from calendar :parameter. xxxxxx
    in a PRE-QUERY
    :master_block.itemdate := :parameter. xxxxxx
    and
    Create a WHEN-MOUSE-DOUBLECLICK on the date-item of CALENDAR and write :
    begin
    :parameter. xxxxxx := calendar( ....);
    go_block ('master-block');
    execute_query;
    end;
    regards

  • Program to regenerate user variants for dynamic date selection!

    Hello all:
           We upgraded to ECC6.0 from 4.6C and there are some variants that user created in 4.6C in which they set dates like date = date - 1day something like that (basically dynamic date selection). These variants are not working in ECC6.0 unless the user clicks on the variant button and resaves it!! Does anyone know if there is any SAP program  that I can run that does this automatically? Rewards assured.
    Thanks.
    Mithun

    Thanks for the reply Rob. We already ran RSVARDOC_610! Is there any specific program just for the issue I am having?
    Thanks.
    Mithun

  • Xmlgen.getxml("select * from table") returns null pointer exception

    I am running oracle 8i on solaris server and clinet on windows
    NT and i am this select statement
    select xmlgen.getxml("select * from table") from dual ,its
    returning null pointer exception,i have tried it through
    jdbc,even then its returning xml as
    <?xml version = '1.0'?>
    <ERROR>java.lang.NullPointerException</ERROR>
    can any body tell me the error.Help will be really appreciated.I
    need an urgent response,if some one can guide me please.
    My email is [email protected],if you can give me a quick
    response on this email,your effot will be appreciated.
    thanks
    Masood

    What is actually throwing the NullPointerException? rs.getMetaData() or table.setModel()?

  • How do I do SELECT * FROM TABLE WHERE KEY IN ({list})?

    The title says it all really.
    Is there a reasonable performant way to perform the query
    SELECT * FROM TABLE WHERE KEY IN ({list})where {list} is String []?
    I am currently creating a PreparedStatement with a for loop like this   StringBuffer sb = new StringBuffer ("SELECT * FROM TABLE WHERE ID IN (");
      for (int ii=0;ii<keys.length;ii++) {
        sb.append (keys [ii]);
        if (ii != keys.length-1) sb.append (",");
      sb.append (")");but this means that the prepared statement is created each time I call my method and so I'm not sure that the optimizer will find it easy to cope with. Is there a construction that I'm missing along the lines of SELECT * FROM TABLE WHERE KEY = ? where I can create the PreparedStatement once and just call setObject or something on it when the values in {list} change?

    but this means that the prepared statement is created
    each time I call my method and so I'm not sure that
    the optimizer will find it easy to cope with.You are right, the optimizer won't find that easy to deal with (presuming that is even relevant for your driver/database.) But most optimizers won't do anything with statements that change and that is what you are doing.
    You could create several prepared statements which have a common number of bind variables. For example 10 statements with from 1 to 10 bind values. This will work if most of the queries use those.

  • Select from table containing clob

    If i try to select from table containing clob column in SQL PLus it gives error.
    Tab1 contains 3 clob columns and 1 blob column
    select * from tab 1;
    SP2-0678: Column or attribute type can not be displayed by SQL*Plus
    The same statement works in SQL Developer and I am able to see the result.
    Actually i am writing the queries and they will be used by Java developers in their JSP page.
    So what happens here? Can Java use these select statements or will it throw error like SQL Plus?

    BLOB column content can't be displayed in SQL*Plus:
    SQL> create table t_blob (b blob);
    Table created.
    SQL> edit
    Wrote file afiedt.buf
      1* insert into t_blob values('01')
    SQL> /
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select * from t_blob;
    SP2-0678: Column or attribute type can not be displayed by SQL*PlusBlob and clob columns content can be processed using DBMS_LOB
    package procedures and functions or using client's language (like Java)
    methods. See JDBC specification.
    Rgds.

Maybe you are looking for