Dynamic Table selection

Hi All,
Please help me to resolve this Issue.
Internal table - IT which has table name like
KOTH600 
KOTH601 
KOTH602 
KOTH603   , All these table has field KNUMH.
Loop at IT into WA. ( which has table name in it )
select * from (WA-TABNAME) into (New_WA)
            where KNUMH = '100010'.
write:/ New_WA - NAME.
Endloop.
Here issue is table name is dynamic and depending upon this New_WA will change. How can I give both table name and work-area dynamic.  ( I do not wish to define 4 new work-area, one for each to handle this situation as number of tables will increase going further ).
Thanks in advance,
Regards,
Mayank Rajguru.

In this example you have what you are looking for. Create dinamyc tables.
REPORT Z_DUMMY_ATG NO STANDARD PAGE HEADING MESSAGE-ID SAPLWOSA.
*=======================================================================
Variables*
*=======================================================================
DATA DESCR_STRUCT_REF TYPE REF TO CL_ABAP_STRUCTDESCR.
DATA WA_FCAT TYPE LVC_S_FCAT.
DATA IT_FIELDCATALOG TYPE LVC_T_FCAT.
DATA DATAREF TYPE REF TO DATA.
DATA: ONE  LIKE PCFILE-DRIVE,
      TWO  LIKE PCFILE-PATH,
      LONG TYPE I,
      FLAG TYPE C,
      FILEPATH(128) TYPE C,
      FILE_TAB TYPE STRING,
      TABNAME LIKE DD02L-TABNAME.
*=======================================================================
Field-Symbols.*
*=======================================================================
FIELD-SYMBOLS:
              <ROW> TYPE ANY TABLE,
              <TABLE> TYPE STANDARD TABLE,
              <COMPONENT> TYPE ABAP_COMPDESCR,
              <FS>  TYPE ANY.
*=======================================================================
Selection screen*
*=======================================================================
SELECTION-SCREEN BEGIN OF BLOCK DATA WITH FRAME TITLE TEXT-T01.
PARAMETERS:
    TABNAM(128) TYPE C,
    FUNCTION(1) TYPE C OBLIGATORY,
    LISTNAME LIKE RLGRAP-FILENAME.
SELECTION-SCREEN END OF BLOCK DATA.
*=======================================================================
At Selection screen*
*=======================================================================
AT SELECTION-SCREEN ON VALUE-REQUEST FOR LISTNAME.
  PERFORM GET_FILENAME CHANGING LISTNAME.
*=======================================================================
Start-of-selection*
*=======================================================================
START-OF-SELECTION.
  CLEAR FLAG.
  PERFORM LOAD_DATA USING TABNAM.
  PERFORM VERIFY_TABLE USING TABNAM CHANGING FLAG.
  IF FLAG NE 'X'.
    IF FUNCTION EQ 'D'.
      PERFORM CREATE_TABLE USING TABNAM.
      PERFORM DOWNLOAD_TABLE USING TABNAM.
    ELSE.
      PERFORM CREATE_TABLE USING TABNAM.
      PERFORM UPLOAD_TABLE USING TABNAM.
    ENDIF.
  ELSE.
    MESSAGE S000 WITH 'The proposed table doesn''t exist.'.
  ENDIF.
      FORM GET_FILENAME                                             **
      Name of the directory.*
FORM GET_FILENAME CHANGING LISTNAME.
  CALL FUNCTION 'WS_FILENAME_GET'
       EXPORTING
            DEF_FILENAME     = LISTNAME
            DEF_PATH         = 'C:\downloads\list'
            MASK             = ',.,.. '
            MODE             = 'S'
            TITLE            = 'Save as'
       IMPORTING
            FILENAME         = LISTNAME
       EXCEPTIONS
            INV_WINSYS       = 1
            NO_BATCH         = 2
            SELECTION_CANCEL = 3
            SELECTION_ERROR  = 4
            OTHERS           = 5.
ENDFORM.
      FORM LOAD_DATA                                                **
      Specifies the path and table name*
FORM LOAD_DATA USING MY_TAB.
  DATA: W_FILE LIKE PCFILE-PATH.
  W_FILE = LISTNAME.
  CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
       EXPORTING
            COMPLETE_FILENAME = W_FILE
       IMPORTING
            DRIVE             = ONE
            PATH              = TWO
       EXCEPTIONS
            INVALID_DRIVE     = 1
            INVALID_EXTENSION = 2
            INVALID_NAME      = 3
            INVALID_PATH      = 4
            OTHERS            = 5.
  CONCATENATE ONE ':' TWO INTO FILEPATH.
  CONCATENATE FILEPATH MY_TAB '.txt' INTO FILE_TAB.
ENDFORM.
      FORM DOWNLOAD_TABLE                                           **
      Downloads the table data.*
FORM DOWNLOAD_TABLE USING MY_TAB.
  *SELECT **
  INTO TABLE <ROW>
  FROM (MY_TAB).
  ASSIGN <ROW> TO <TABLE>.
  CALL FUNCTION 'GUI_DOWNLOAD'
       EXPORTING
            FILENAME                = FILE_TAB
            FILETYPE                = 'ASC'
       TABLES
            DATA_TAB                = <TABLE>
       EXCEPTIONS
            FILE_WRITE_ERROR        = 1
            NO_BATCH                = 2
            GUI_REFUSE_FILETRANSFER = 3
            INVALID_TYPE            = 4
            NO_AUTHORITY            = 5
            UNKNOWN_ERROR           = 6.
  IF SY-SUBRC EQ 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              TITEL = 'Successful Download'
              TXT1  = 'All the data from the table'
              TXT2  = 'was correctly downloaded.'.
  ELSE.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              TITEL = 'Download Error!'
              TXT1  = 'The data of the table'
              TXT2  = 'couldn''t be downloaded.'.
  ENDIF.
ENDFORM.
      FORM UPLOAD_TABLE                                           **
      Table Upload.*
FORM UPLOAD_TABLE USING MY_TAB.
  ASSIGN <ROW> TO <TABLE>.
  CALL FUNCTION 'GUI_UPLOAD'
       EXPORTING
            FILENAME                = FILE_TAB
            FILETYPE                = 'ASC'
       IMPORTING
            FILELENGTH              = LONG
       TABLES
            DATA_TAB                = <TABLE>
       EXCEPTIONS
            FILE_OPEN_ERROR         = 1
            FILE_READ_ERROR         = 2
            NO_BATCH                = 3
            GUI_REFUSE_FILETRANSFER = 4
            INVALID_TYPE            = 5
            NO_AUTHORITY            = 6
            UNKNOWN_ERROR           = 7.
  MODIFY (MY_TAB) FROM TABLE <TABLE>.
  IF SY-SUBRC EQ 0.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              TITEL = 'Successful Upload'
              TXT1  = 'All the data from the table'
              TXT2  = 'was correctly uploaded.'.
  ELSE.
    CALL FUNCTION 'POPUP_TO_INFORM'
         EXPORTING
              TITEL = 'Upload Error!'
              TXT1  = 'The data of the table'
              TXT2  = 'couldn''t be uploaded.'.
  ENDIF.
ENDFORM.
      FORM CREATE_TABLE                                             **
      Creates a dynamic internal table.*
FORM CREATE_TABLE USING MY_TAB.
  CREATE DATA DATAREF TYPE (MY_TAB).
  ASSIGN DATAREF-> TO <FS>.*
  DESCR_STRUCT_REF ?= CL_ABAP_TYPEDESCR=>DESCRIBE_BY_DATA( <FS> ).
  LOOP AT DESCR_STRUCT_REF->COMPONENTS ASSIGNING <COMPONENT>.
    WA_FCAT-FIELDNAME     = <COMPONENT>-NAME.
    WA_FCAT-REF_TABLE     = MY_TAB.
    WA_FCAT-REF_FIELD     = <COMPONENT>-NAME.
    APPEND WA_FCAT TO IT_FIELDCATALOG.
  ENDLOOP.
  CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE
     EXPORTING
       IT_FIELDCATALOG           = IT_FIELDCATALOG
     IMPORTING
       EP_TABLE                  = DATAREF
     EXCEPTIONS
       GENERATE_SUBPOOL_DIR_FULL = 1
       OTHERS                    = 2.
  ASSIGN DATAREF-> TO <ROW>.*
ENDFORM.
*&      Form  VERIFY_TABLE
      The table must exist!*
FORM VERIFY_TABLE USING TABNAM CHANGING FLAG.
  SELECT SINGLE TABNAME
  INTO (TABNAME)
  FROM DD02L
  WHERE TABNAME EQ TABNAM.
  IF SY-SUBRC NE 0.
    FLAG = 'X'.
  ENDIF.
ENDFORM.

Similar Messages

  • Dynamic table  selection from database

    Hi ;
    I want to create  variable field that I will use at database selection.I tried to do it with   select *  from ( tabname )..... but I couldn't do it how you any offer fot this issue.

    Hi,
    DATA FCAT1 TYPE LVC_T_FCAT."fieldcat of type internal table
    DATA:DYN_ITAB TYPE REF TO DATA,"holding the dynamic internal table
    WA TYPE REF TO DATA."holding the wa for dynamic internal table
    FIELD-SYMBOLS: <DISP_TABLE> TYPE TABLE,
    <WA> TYPE ANY.
    SELECT SINGLE tab_name FROM table INTO DB_TABLE.
      CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
            EXPORTING
              I_STRUCTURE_NAME = DB_TABLE
            CHANGING
              CT_FIELDCAT      = FCAT1[].
    CALL METHOD CL_ALV_TABLE_CREATE=>CREATE_DYNAMIC_TABLE"creating dynamic internal table using fieldcat
        EXPORTING
        IT_FIELDCATALOG = FCAT1[]
        IMPORTING
        EP_TABLE = DYN_ITAB.
        ASSIGN DYN_ITAB->* TO <DISP_TABLE>."creating internal table by refering the dynamically generated internal table structure
        CREATE DATA WA LIKE LINE OF <DISP_TABLE>."creating work area for the internal table
        ASSIGN WA->* TO <WA>.
        SELECT * FROM (DB_TABLE) INTO <WA> UP TO MAX_HITS ROWS."filling the internal table
        APPEND <WA> TO <DISP_table>.
        ENDSELECT.
    <b>REWARD ALL HELPFUL ANSWERS.</b>
    rgds,
    bharat.
    Message was edited by:
            Bharat Kalagara

  • Discriminator and dynamic table selection

    Is there a way (in DSP 3.0) to use a discriminator to dynamically determine a related table to join in a select or update? On the java client I have a base class with extended class that I would like to model in related tables.
    Thanks,
    Jeff
    Edited by jhoffmanme at 02/08/2008 4:09 AM

    Ok - so you want something like
    <CASE>
    <BASE_CASE>
    <BASE_CASE>
    <LAB_CASE>
    </LAB_CASE>
    <CASE>
    <CASE>
    <BASE_CASE>
    <BASE_CASE>
    <CS_CASE>
    </CS_CASE>
    <CASE>
    So you will need to define a CASE schema element that contains a BASE_CASE, and optionally a LAB_CASE, CS_CASE etc. element.
    your queries will look like :
    function getLABCases()
    for $base_case in BASE_CASES()
    return
    <CASE>
    {$base_case}
    {for $lab_case in LAB_CASES()
                where $lab_case/ID eq $case/ID
                return
                  $lab_case
    </CASE>
    function getCSCases()
    for $base_case in BASE_CASES()
    return
    <CASE>
    {$base_case}
    {for $cs_case in CS_CASES()
                where $cs_case/ID eq $case/ID
                return
                  $cs_case
    </CASE>
    getAllCases()
    ( getLABCases(),
    getCSCases() )
    Use the nested for's as I have shown above rather than...
    for $base_case in BASE_CASES()
    for $lab-case in LAB_CASES()
    where $lab_case/ID eq $base_case/ID
    as the second way forces LAB_CASE table to be read even when it is not required in the output.
    For updates, you will need visit the update template documentation to see how you tell DSP that a CASE with a LAB_CASE came from the LAB_CASES table.

  • Dynamic Table Selection function module

    Dear Friends,
      We have got critical requirement on Custom BAPI function module :
         we have to pass one field name of table and table name : Eg (Matnr and MARC).
         we have to get table contents w.r.t field name of table and table : Has to display MARC based on Matnr.
    (It is something like we display table contents in SE11 and SE16, Our requirement is to get the data by giving  random field name of table and table name ).
    My View : Imports Tab of F.M of is static
                   Tables Tab of F.M could be dynamic....if so how to achieve or any other approach?
    Note :  Eg1 : Matnr and MARA  (Input to F.M) -
    > Get MARA contents (Table from F.M)
               Eg2 : Matnr and MARC (Input to F.M) -
    > Get MARC contents (Table from F.M)
               Eg3 : Lifnr and LFA1 (Input to F.M)  -
    > Get LFA1 contents (Table from F.M)       
               Eg1 : Ebeln and EKKO (Input to F.M)  -
    > Get EKKO contents (Table from F.M)
    Awaiting for positive and quick views.
    Regards
    Sekhar

    Dear Sarcevic,
       I have created zfunction module with imports and tables.
      I'm able to manage import parameters as dynamical, but tables declaration gives fuzzy.
      How do we make tables tab declaration in function module as dynamic? any other views?
    Regards
    Sekhar

  • Dynamic Table Selection in Forms?

    Hi,
    In form creation the options available are,
    1. Selecting schema name(only one)
    2. Selecting table name(only one).
    My requirement is we are having same table in many schemas. We need to create a form on this table but user should be given with a list to select the schema name they want so the form should point to table from the selected schema.
    Is it possible?
    Thanks,
    karthick
    Actually we dont even have separate schemas in Apex. We are connectin to different schemas using DBLINK's feature of oracle.
    But if it possible to switch between schemas present in the Apex means then that will be fine for me as of now

    Anyone faced this issue before?
    Please help
    Edited by: kart on Jun 16, 2010 3:58 PM
    Edited by: kart on Jun 17, 2010 12:30 PM

  • Dynamic table in Oracle report data model using laxical parameter is giving error Ora-00936: missing expression

    Hi ,
    I am using Oracle report 10G
    And trying to create report with dynamic table
    SELECT &COL1, &COL2
    FROM &TAB
    If I put this on data model it gives below error
    ORA-00936: missing expression
    ==> from
    Can anybody advise to solve this issue.
    Regards,
    Brajesh

    Look in the Reports Builder Help:
    If you want to use lexical references in your SELECT clause, you should create a separate lexical reference for each column you will substitute. In addition, you should assign an alias to each lexical reference.
    Does adding the column alias solve the problem?

  • Dynamic Select Query including Dynamic Tables with For all Entries

    Hello everyone,
    I need to create a select query which involves using of Dynamic Tables.
    Suppose I have a dynamic table <d1> which consist of let say 10 records.
    Now i need to make a select query putting data into another dynamic table <d2>
    CONCATENATE keyfield '=' '<d1>' INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <d1>
            FOR ALL ENTRIES IN <d1>
    WHERE (g_condition).
    But it is giving dump.
    Please help me on this....

    Short text
        A condition specified at runtime has an unexpected format.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "ZNG_CUSTOMWRITE" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "WRITE_ARCHIVE_PROD" "(FORM)", 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 current ABAP program has tried to execute an Open SQL statement
        which contains a WHERE, ON or HAVING condition with a dynamic part.
        The part of the WHERE, ON or HAVING condition specified at runtime in
        a field or an internal table, contains the invalid value "ZCOURIER-ZCOURIERID".
    CONCATENATE keyfield '=' g_header INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <dyn_table1>
    FOR ALL ENTRIES IN <dyn_table>
      WHERE (g_condition).

  • 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

  • Dynamic table name in an inner join - select statement

    Hi,
    Please can you let me know if is possible to use a Dynamic table name in an inner join?
    Something like the statement below? (It works in a simple select statement but not in an inner join)
    SELECT  *
         INTO CORRESPONDING FIELDS OF <t_itab>
          FROM <Dynamic table name> INNER JOIN pa0050 ON
          ( <Dynamic table name>pernr =  pa0050pernr )
           WHERE <Dynamic table name>~pernr = it_pernr-l_pernr
           AND pa0050~bdegr = f_bdegr.
    Any help would be apprecited very much.
    Thanks & Regards.

    Hi,
    Check this link.
    [http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb39c4358411d1829f0000e829fbfe/frameset.htm]
    [Re: accessing dynamic internal table's fields??;
    hope it'll help u.
    Regards,
    Sneha.
    Edited by: sneha kumari on Jun 18, 2009 1:57 PM

  • Creating and selecting from a dynamic table

    Hi,
    Iam trying to create a table dynamically and selecting from it in same plsql block, but am getting "table doesnot exist" error. however if i just create a table dynamically and then do a select on it seperately it works..
    below is sample code for the same,
    working
    Line: -----
    DECLARE
    loc VARCHAR2(20):='bglr';
    l_cnt pls_integer;
    BEGIN
    -- create an employee information table
    EXECUTE IMMEDIATE
    'CREATE TABLE ' || 'emp_bglr' ||
    empno NUMBER(4) NOT NULL,
    ename VARCHAR2(10),
    job VARCHAR2(9),
    sal NUMBER(7,2),
    deptno NUMBER(2)
    end;
    select count(*) from emp_bglr ...works and return me 0 rows
    Line: -----
    but when i include select in plsql block ..it throws "Table does not exists" error...(iam running below plsql block after dropping the created table)
    not working
    Line: -----
    DECLARE
    loc VARCHAR2(20):='bglr';
    l_cnt pls_integer;
    BEGIN
    -- create an employee information table
    EXECUTE IMMEDIATE
    'CREATE TABLE ' || 'emp_bglr' ||
    empno NUMBER(4) NOT NULL,
    ename VARCHAR2(10),
    job VARCHAR2(9),
    sal NUMBER(7,2),
    deptno NUMBER(2)
    --COMMIT;
    END;
    Select count(*) into l_cnt from emp_bglr;
    dbms_output.put_line('cnt is '||l_cnt);
    end;
    Line: -----

    Becuase your code is first checked for syntax/object existance during compilation and throws an error saying the table does not exist.
    Try this:
    SQL> ed
    Wrote file afiedt.buf
      1   DECLARE
      2   loc VARCHAR2(20):='bglr';
      3   l_cnt pls_integer;
      4   BEGIN
      5   -- create an employee information table
      6   EXECUTE IMMEDIATE 'CREATE TABLE emp_bglr(
      7   empno NUMBER(4) NOT NULL,
      8   ename VARCHAR2(10),
      9   job VARCHAR2(9),
    10   sal NUMBER(7,2),
    11   deptno NUMBER(2)
    12   )';
    14  Select count(*) into l_cnt from all_objects where object_name = 'EMP_BGLR';
    15  dbms_output.put_line('tab cnt is '||l_cnt);
    16  IF (l_cnt = 1) THEN
    17  l_cnt := 0;
    18  EXECUTE IMMEDIATE 'SELECT count(*) from apps.emp_bglr' into l_cnt;
    19  dbms_output.put_line('data cnt is '||l_cnt);
    20  END IF;
    21* end;
    SQL> /
    tab cnt is 1
    data cnt is 0
    PL/SQL procedure successfully completed.
    SQL> Edited by: AP on Aug 5, 2010 5:51 AM
    Edited by: AP on Aug 5, 2010 5:52 AM

  • Dynamic table field for filtering a selection criteria

    Hi Friends
    I am using a table a981 and fetching data in internal table but the table has a fieil Country whose technical name is ALAND in dev and LAND1 in production.Now i cannot use LAND1 as it wont let me to activate the report and if i use ALAND i cannot move the request to production as it fails. So how can i achive dynamic table field in the select query based on server.My query is-
        select kschl
               wkreg
               matnr
               knumh
       from a981 into corresponding fields of table it_a981
       for all entries in it_marc where matnr = it_marc-matnr
                                    and kschl in ('MWST','ZSER')
                                    and aland = 'IN'
                                    and datab le sy-datum
                                    and datbi ge sy-datum.
    I need to make aland dynamic.Pls suggest

    Hi,
    this forum is for the BusinessObjects Integration Kit for SAP but I don't see how you entry is related to it.
    Ingo

  • Select all instances of cells form a dynamic table

    HI,
    I've an issue with a table.
    I've found some answers here : http://forums.adobe.com/thread/849841 but don't work.
    Let me explain.
    I've got a dynamic table (with addInstance button and remove one).
    There is 4 columns: 2 open and 2 readOnly.
    Some users are allowed to change the readOnly ones.
    Then, I've created a password field.
    with :
    if (formulaire1.titre.pw.pass.rawValue == "123")
    and here... I'm bloqued
    I've tried :
    for (i=0;i<=formulaire1.check.tab1.r1.instanceManager.count;i++){
         xfa.resolveNode{"formulaire1.check.tab1.r1.[" + i + "].materiel").access = "open" ;
    but failed (notting happend)
    I've tried :
    xfa.formulaire1.check.tab1.r1.resolveNodes("materiel[*]").access = "open";
    failled, too
    I've tried just : formulaire1.check.tab1.r1.materiel.access = "open";
    Just open the first instance...
    I'm not developper just designer... And here, I'm lost.
    Thanks to help me.
    Nath_lost

    Hi,
    The finished version of the SOM Expression example is here: http://assure.ly/kUP02y.
    Try this in the exit event of the pass object:
    var nMateriel = xfa.resolveNodes("formulaire1.check.tab1.r1[*].materiel");
    var nFinishes = xfa.resolveNodes("formulaire1.check.tab1.r1[*].finishes");
    if (this.rawValue == "123") {
         for (var i=0; i<nMateriel.length; i++) {
              nMateriel.item(i).access = "open";
              nFinishes.item(i).access = "open";
    else  {
         for (var i=0; i<nMateriel.length; i++) {
              nMateriel.item(i).access = "readOnly";
              nFinishes.item(i).access = "readOnly";
    This covers the material object and a fictional "finishes" to represent the second object that you want to set to open.
    Also in your for script you were using an "i" variable, but you did not declare it, eg "var i=0". This is a hit on performance.
    Hope that helps,
    Niall
    Message was edited by: Niall O'Donovan: there was an extra . in the xfa.resolveNodes. r1.[*] should have read r1[*].

  • Error while insert data using execute immediate in dynamic table in oracle

    Error while insert data using execute immediate in dynamic table created in oracle 11g .
    first the dynamic nested table (op_sample) was created using the executed immediate...
    object is
    CREATE OR REPLACE TYPE ASI.sub_mark AS OBJECT (
    mark1 number,
    mark2 number
    t_sub_mark is a class of type sub_mark
    CREATE OR REPLACE TYPE ASI.t_sub_mark is table of sub_mark;
    create table sam1(id number,name varchar2(30));
    nested table is created below:
    begin
    EXECUTE IMMEDIATE ' create table '||op_sample||'
    (id number,name varchar2(30),subject_obj t_sub_mark) nested table subject_obj store as nest_tab return as value';
    end;
    now data from sam1 table and object (subject_obj) are inserted into the dynamic table
    declare
    subject_obj t_sub_mark;
    begin
    subject_obj:= t_sub_mark();
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,subject_obj from sam1) ';
    end;
    and got the below error:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7
    then when we tried to insert the data into the dynam_table with the subject_marks object as null,we received the following error..
    execute immediate 'insert into '||dynam_table ||'
    (SELECT

    887684 wrote:
    ORA-00904: "SUBJECT_OBJ": invalid identifier
    ORA-06512: at line 7The problem is that your variable subject_obj is not in scope inside the dynamic SQL you are building. The SQL engine does not know your PL/SQL variable, so it tries to find a column named SUBJECT_OBJ in your SAM1 table.
    If you need to use dynamic SQL for this, then you must bind the variable. Something like this:
    EXECUTE IMMEDIATE 'insert into op_sample (select id,name,:bind_subject_obj from sam1) ' USING subject_obj;Alternatively you might figure out to use static SQL rather than dynamic SQL (if possible for your project.) In static SQL the PL/SQL engine binds the variables for you automatically.

  • HR Logical database PNP. OO to fill table dynamic table  from PNP  ?

    Hi all
    I want to get some stuff from the HR logical database into a dynamic table
    Here's a real simple example that writes info out to a normal list.
    (report is based on using Logical DB PNP)
    tables: pernr.
    INFOTYPES: 0001,                     "Organizational Assignment
               0002.                     "Personal Data
    SELECT-OPTIONS: language FOR p0002-sprsl.
    INITIALIZATION.
      pnptimed = 'D'.
    GET pernr.
      PROVIDE * FROM p0002 BETWEEN pn-begda AND pn-endda.
        CHECK language.
        WRITE: / p0002-pernr,
                 sy-vline,
                 p0001-ename,
                 sy-vline,
                 p0002-sprsl,
                 sy-vline,
                 p0002-gbdat.
      ENDPROVIDE.
    endform.
    Now what I want to do is replace the write stuff by appending the entries into a dynamic table which I will display as an ALV Grid.
    so I add my structure in the data declarations
    types:  begin of s_elements,
       pernr  type  p0002-pernr,
       ename  type p0001-ename,
       sprsl  type p0002-sprsl,
       gbdat   type p0002-gbdat.
      drop_down_handle  type int4.
    types: end of    s_elements.
    include zz_jimbo_incl.
    build the dynamic table
    create data dref type s_elements.
      assign dref->* to <fs>.
      i_routine = 'POPULATE_DYNAMIC_ITAB'.*
    i_names   = 'NAME_COLUMNS'.
      i_gridtitle = 'HR  TEST'.
    invoker = sy-repid.
    i_zebra = 'X '.
    i_edit = '  '.
    call function 'ZZ_CALL_SCREEN'
         exporting
              invoker     = invoker
              my_line     = <fs>
              i_gridtitle = i_gridtitle
              i_edit      = i_edit
              i_zebra     = i_zebra
              i_names     = i_names
              i_routine   = i_routine
         importing
              z_object    = z_object
              dy_table    = dy_table.
    Now to populate the dynamic Itab the routine below is entered.
    form populate_dynamic_itab changing dy_table.
      assign dy_table->* to <dyn_table>.
      create data dy_line like line of <dyn_table>.
      assign dy_line->* to <dyn_wa>.
    However I can't use GET / PROVIDE / ENDPROVIDE in a Form.
    Anyway round this ---seems HR has an aversion to OO.
    Cheers
    jimbo

    Hi,
    well, GET_PERNR is a so called event_statement. It has nothing to do with ABAP 00.
    Normally it will be like this:
    START-OF-SELECTION.
    GET_PERNR.
    PROVIDE ....
    END-OF-SELECTION.
    -> and here the CALL SCREEN NNNN for ALV-Display.
    Provide-statements you can use in forms of course, and as many times you want during GET and END-OF-SELECTION.
    But as I understood : you just want to save the write-statements?
    I always develop a DDIC-Structure, declarate the data objects in the programm, read the data via Provide into the infotypes, and then make a move-corresponding to my structure. and display it.
    Normally no problem.
    kind regards
    maik

  • Regarding dynamic tables in interactive forms

    Hi All,
            I have designed a webdynpro view which contains a table,i have to generate a pdf format file which also contains
    a table as there in the webdynpro view.
            I  have designed a dynamic table in interactive form and binded the interactive form ui element with the datasource and pdfSource.
    In the interactive form i am getting only one row data of webdynpro view table.In the Object palette, I selected Repeat Row For Each Data Item.
           share with me if u have any idea or send any document regarding table binding(dynamic) in interactive form.
    Thanks & Regards,
    saleem

    Hi saleem..
    Check this link..
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e0401535-f81c-2a10-0192-ffd41e8e8d59">Dynamic interactive forms an example</a>
    https://www.sdn.sap.com/irj/sdn/webdynpro?rid=/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d#47
    Urs Gs

Maybe you are looking for

  • Message Driven Beans replying to messages

    Hi I'm trying to send a reply message from an MDB. What I have in mind is this: 1) in the onMessage() method of the bean, analyze the message and get the replyTo property of the message. 2) Set up the reply message and send the message back to the or

  • Data Reconcilation - GL Account Balances

    Hello All From the BI presepective, I would like to reconcile Financial data to the source tables. I would appreciate, if you tell me all the standard GL reports available to me to run it in DISPLAY only mode. Thanks

  • Search people of particluar role

    Is it possible to search for people of particular role in JNDI programming. For example, given data below, I would like to search people who have "Accounting Managers" role (as scarter has this role) , is it possible to do this? Is yes how to do it?

  • Flash Player / DEP error

    The latest Flash Player update is not working! I need my Flash Player! PLEASE HELP!!! - Whenever I open a website on any browser (Firefox, IE, etc) I receive this message: "Adobe Flash Player 11.5 r502 has stopped working." - When I click "Check onli

  • Can you use Apple Mac speakers with Macmini?

    My old Apple mac speakers - the ones in transparent plastic hemispheres - come with a 1.5mm jack, but the Macmini has a standard 2.5mm socket. Is that because the voltage or something is different? If you fit the right jack, will they work OK?