Select DREF(xy) from table

Hi
I'm try to select Data from a Reference Attribute. ("SELECT DEREF(ABT) from angestellter")
When i do this in SQLPlus, it works.
But when I try to get the Result as XML in Java, i get following error:
<ERROR>oracle.xml.sql.OracleXMLSQLException: Symbol ')' is in a XML-Tag-NAME not allowed.</ERROR>
How can i solve this problem ?
Regards Felix
null

I would like to use the xml Syntax like it is generated from the DEREF Select Statement.
I'm trying to insert in a Table angestellter (employee) with a Ref to a Table abteilung (department).
The xml code is like this:
<ABT>
<ABTNR>1</ABTNR>
<NAME>Entwicklung</NAME>
</ABT>
But i think it can't work, because it needs this xml Code:
<ABT REFTYPE="INFO.ABTEILUNGSTYP">0202A9F..</ABT>
The error message is following:
java.lang.reflect.InvocationTargetException: oracle.xml.sql.OracleXMLSQLExceptio
n: 'invalid REF-Element - 'ABT' - Attribut 'REFTYPE' is expected.'

Similar Messages

  • Select * into Table1 from Table not working

    Hi,
    How to copy data from one table to other new table using select * into statement.
    I am getting missing keyword error when I use the statement
    select * into Table1 from Table
    Thanks a lot in advance.
    Regards,
    Praveen

    the syntax is
    INSERT INTO table1 SELECT * FROM table2;

  • Can I select element number from table collection expression?

    Hi, I know I can use COLUMN_VALUE to select column values from table collection expression. Is there any way to select the number of the element as well? (with Oracle 11.2.0.1.0)
    CREATE OR REPLACE TYPE plch_numbers_nt IS TABLE OF NUMBER;
    DECLARE
       l_numbers   plch_numbers_nt
                      := plch_numbers_nt (10,
                                          20,
                                          30,
                                          40,
                                          50);
    BEGIN
       -- This would be nice...
       FOR rec IN (SELECT COLUMN_VALUE, VALUE_INDEX FROM TABLE (l_numbers))
       LOOP
          DBMS_OUTPUT.put_line (rec.COLUMN_VALUE, rec.VALUE_INDEX);
       END LOOP;
    END;
    /

    First of all, I would like to thank you all for your replies. I really appreciate your help.
    The problem I'm trying to solve is more complicated than what I have shown so far. Right now I'm trying to decompose the problem into smaller problems. Maybe I should show you the full problem and hope that I still get a reply.
    I have a spatial column with collections of geometries (SDO_GTYPE 2004) and I have a VARRAY column of objects. For each row, each geometry in the geometry collection has some information in one element in the VARRAY. So I have this table
    -- +----+------------------+-----------------------------------------------------------------------------------+
    -- | ID | GEOM_COLL        | GEO_INFO                                                                          |
    -- +----+------------------+-----------------------------------------------------------------------------------+
    -- | 98 | sdo_geom(2004)_1 | ((geo_info_1_1_1; geo_info_2_1_1; ...);(geo_info_1_1_2; geo_info_2_1_2; ...) ...) |
    -- +----+------------------+-----------------------------------------------------------------------------------+
    -- | 99 | sdo_geom(2004)_2 | ((geo_info_1_2_1; geo_info_2_2_1; ...);(geo_info_1_2_2; geo_info_2_2_2; ...) ...) |
    -- +----+------------------+-----------------------------------------------------------------------------------+
    --  ...and I need this
    -- +----+--------------------+----------------+----------------+-----+
    -- | ID | SDO_GEOM           | GEO_INFO_1     | GEO_INFO_2     | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- | 98 | sdo_geom(2001)_1_1 | geo_info_1_1_1 | geo_info_2_1_1 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- | 98 | sdo_geom(2002)_1_2 | geo_info_1_1_2 | geo_info_2_1_2 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- +----+--------------------+----------------+----------------+-----+
    -- | 99 | sdo_geom(2002)_2_1 | geo_info_1_2_1 | geo_info_2_2_1 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- | 99 | sdo_geom(2001)_2_2 | geo_info_1_2_2 | geo_info_2_2_2 | ... |
    -- +----+--------------------+----------------+----------------+-----+
    -- ...I need a flat version of the original table, if you will. My original plan was to convert the VARRAY values to rows and extract the geometries into rows. Then join both using their ROWNUMs. But this does not work as i need numbers that start at 1 for each ID and I'm not sure if ROWNUM will give me the right order. Hence my question for consecutive element numbers. I have no idea how to do it with SQL. I'm working on a PL/SQL solution right now. Sample code follows. Sorry for the length of this post.
    CREATE OR REPLACE TYPE geo_info AS OBJECT (
      just INTEGER,
      txt  VARCHAR2 (255)
    CREATE OR REPLACE TYPE geo_info_array AS VARRAY (10000) OF geo_info;
    CREATE TABLE geometries (
      id NUMBER (38) PRIMARY KEY,
      geom_coll SDO_GEOMETRY,
      geo_info geo_info_array
    INSERT INTO geometries (id, geom_coll, geo_info) VALUES (
      98,
      sdo_geometry (2004, NULL, sdo_point_type (0, 0, 0),
                    sdo_elem_info_array (1, 1, 1, 3, 2, 1, 7, 1, 1, 9, 1, 1),
                    sdo_ordinate_array (5408562.081181, 5696027.239777, 5408563.398, 5696028.369, 5408568.192, 5696028.132, 5408562.643029, 5696038.558968, 5408565.328059, 5696027.0783)),
      geo_info_array (geo_info (7, '10.9'),
                      NULL,
                      geo_info (7, '0.0'),
                      geo_info (7, '-4.8-'))
    INSERT INTO geometries (id, geom_coll, geo_info) VALUES (
      99,
      sdo_geometry (2004, NULL, sdo_point_type (0, 0, 0),
                    sdo_elem_info_array (1, 2, 1, 5, 1, 1, 7, 2, 1, 11, 1, 1, 13, 1, 1),
                    sdo_ordinate_array (5408575.262, 5696017.841, 5408575.255, 5696017.341, 5408573.318578, 5696016.67559, 5408575.255, 5696017.341, 5408574.155, 5696017.357, 5408573.359578, 5696017.97359, 5408572.012251, 5696017.299678)),
      geo_info_array (NULL,
                      geo_info (7, '0.5'),
                      NULL,
                      geo_info (7, '0.0'),
                      geo_info (7, '-1.1-'))
    /

  • How to get selected/focused cell from table, and action on clicked

    Hello Web Dynpro Community!
    i have a view with a table, (id "Table_0");
    table is 3x3 size, as celleditors i used inputfields; (standard binding to context with string atributes)
    below table i have textarea.
    when i select any cell in table i want to add that cell coords to textarea (col and row)
    i know that i should use onLeadSelect action, but i dont know exacly how. or to be precise.. how to access to ID and row variables in that action.
    the other problem is.. that onLeadSelect seems to work only when i change lead not the cell in same row.. so prabobly there is better way to do that..
    any ideas?
    Looking to hear from You.
    EDIT:
    Now i have following problem:
    i have a table 3x3 with one column as dropdownbykey box and 2 as TableSingleMarkableCell (and inputFields As editors).
    it works as i wanted:
    so when i click on one of those input cells, insert vale AND click enter then the action onEnter( for inputfield) is fired... i can get the coords of that cell..
    problem is.. that i want to get the coords before i click enter.. just when i click in cell.
    i tried to use onAction event for column.. but it doesnt work for TableSingleMArkableCells (but it works for ddk column correctly).
    so there is any way to do that?
    ie:
    below table i have inputfield (called  value).
    when i click on cell (and DO NOT press enter) i want to see the cell value in inputfield value.
    future (and target need) is that i need to show some additional text for specific Cell. (i have an Object with 2 strings attributes, one i want to show in cell, and one in inputfield when cell is clicked).
    M.
    Edited by: Michal Rowinski on Jan 16, 2008 9:51 AM

    You can use cell variant  for your requirement . Go through the below link
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/c0310fd2-f40d-2a10-b288-bcbe0810a961
    Regards,
    Nethaji

  • What is the column name when use select ... from table(my_table)

    I have some code that takes a csv and loads it into a type table. I am now trying to select from this table but am not sure what column name to use in my cursor. (See below I have c2.???).
    FUNCTION in_list_varchar2 (p_in_list IN VARCHAR2) RETURN VARCHAR2_TT is
    l_tab VARCHAR2_TT := VARCHAR2_TT();
    l_text VARCHAR2(32767) := p_in_list || ',';
    l_idx NUMBER;
    BEGIN
    LOOP l_idx := INSTR(l_text, ',');
    EXIT WHEN NVL(l_idx, 0) = 0;
    l_tab.extend;
    l_tab(l_tab.last) := TRIM(SUBSTR(l_text, 1, l_idx - 1));
    l_text := SUBSTR(l_text, l_idx + 1);
    END LOOP;
    RETURN l_tab;
    END in_list_varchar2;
    schema_list := 'SCOTT, TOM, MIKE';
    schema_names := regexp_replace(schema_list, '([^,]+)', '''\1''');
    schema_list_t := DATAPUMP_UTIL.in_list_varchar2(schema_list);
    for c2 in
    select *from table(schema_list_t)   
    loop
    dml_str := 'DROP USER ' || c2.??? || 'CASADE';
    EXECUTE IMMEDIATE dml_str;
    end loop;

    Chris wrote:
    I have some code that takes a csv and loads it into a type table. I am now trying to select from this table but am not sure what column name to use in my cursor. (See below I have c2.???).
    FUNCTION in_list_varchar2 (p_in_list IN VARCHAR2) RETURN VARCHAR2_TT is
    l_tab VARCHAR2_TT := VARCHAR2_TT();
    l_text VARCHAR2(32767) := p_in_list || ',';
    l_idx NUMBER;
    BEGIN
    LOOP l_idx := INSTR(l_text, ',');
    EXIT WHEN NVL(l_idx, 0) = 0;
    l_tab.extend;
    l_tab(l_tab.last) := TRIM(SUBSTR(l_text, 1, l_idx - 1));
    l_text := SUBSTR(l_text, l_idx + 1);
    END LOOP;
    RETURN l_tab;
    END in_list_varchar2;
    schema_list := 'SCOTT, TOM, MIKE';
    schema_names := regexp_replace(schema_list, '([^,]+)', '''\1''');
    schema_list_t := DATAPUMP_UTIL.in_list_varchar2(schema_list);
    for c2 in
    select *from table(schema_list_t)   
    loop
    dml_str := 'DROP USER ' || c2.??? || 'CASADE';
    EXECUTE IMMEDIATE dml_str;
    end loop;
    I have some code that takes a csv and loads it into a type table.Why a type table? Where is type table defined as such?
    with PL/SQL, objects must be declared before they can be referenced.
    You need to correct syntax errors before tackling any runtime/logic flaws.

  • Selecting duplicate rows from table

    Hi all,
    How to select the duplicates rows present in the table...

    SQL> select * from customer;
    CUST_ID CUST_NAME LOC
    1 Jeff Miami
    2 Andrew Michigan
    3 Julia Chicago
    1 Linda Miami
    1 Martha Miami
    3 Randy Chicago
    3 John Chicago
    7 rows selected.
    SQL> select * from customer where rowid != (select min(rowid) from customer C where C.cust_id = customer.cust_id);
    CUST_ID CUST_NAME LOC
    1 Linda Miami
    1 Martha Miami
    3 Randy Chicago
    3 John Chicago
    SQL>

  • Newbie question: Select one row from table in PL/SQL

    Hi,
    I want to select one row from the table Employee where Emplyoyee Number is say 200. This is a simple SQL query, but I don't know the equivalent PL/SQL format. I will have 3 out params here - Id itself, Name, Salary. I will then have to populate a java resultset object from these out params.
    Later, I'll have to use cursors to retrieve more than one row.
    Thanks for any help.

    Perhaps something like
    CREATE OR REPLACE PROCEDURE get_employee( l_id IN OUT employee.id%TYPE,
                                              l_name OUT employee.name%TYPE,
                                              l_salary OUT employee.salary%TYPE )
    AS
    BEGIN
      SELECT name, salary
        INTO l_name, l_salary
        FROM employee
       WHERE id = l_id;
    END;Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Help: Error on SELECT INTO TABLE2 FROM TABLE AS E1 JOIN...

    Can anyone help? I am getting an error in my sql statement below:
    SELECT E1.COL1, E1.COL2, E2.COL3, E1.COL4
    INTO TABLE2
    FROM TABLE AS E1
    JOIN TABLE AS E2 ON
    (E1.COL1 = '10000' AND E2.COL1 = '20000') OR
    (E1.COL1 = '20000' AND E2.COL1 = '10000')
    WHERE
    E1.COL3 = E2.COL3 AND E1.COL4 = '11000' AND E1.COL3 < '2011/04/01'
    The script works fine on SQL Server (2008) but I am unable to run it in Oracle.
    I am using Oracle SQL Developer v1.5.4 Build MAIN-5940.
    Thanks in advance for anyone who can help.

    Tubby wrote:
    850777 wrote:
    Thanks for the immediate reply Tubby. I will try removing the AS for aliasing.
    I still have one more problem though (about removing the line INTO TABLE2) because
    I am actually using it to store the SELECTed data into the new TABLE2. Is there a workaround for this? ThanksWhat are you trying to do here? View the data produced by the query, or create a pl/sql routine?
    What's the point behind creating a table to store the results in?
    Tubby wrote:850777 wrote:
    Thanks for the immediate reply Tubby. I will try removing the AS for aliasing.
    I still have one more problem though (about removing the line INTO TABLE2) because
    I am actually using it to store the SELECTed data into the new TABLE2. Is there a workaround for this? ThanksWhat are you trying to do here? View the data produced by the query, or create a pl/sql routine?
    What's the point behind creating a table to store the results in?What I am trying to do is copy the data in TABLE to TABLE2 but with the data in E1.COL3 swapped with the one in E2.COL3 based on certain conditions.
    Basically I am just trying to swap the values of a column (COL3) and store it in my new table (TABLE2) together with all the (unswapped) values from all the other columns.
    Ex.
    TABLE
    COL1 COL2 COL3 COL4
    1 1 1 1
    2 2 3 2
    3 3 2 2
    4 4 4 1
    Target result:
    TABLE2
    COL1 COL2 COL3 COL4
    1 1 1 1
    2 2 2 2 <-swapped values
    3 3 3 2 <-in COL3
    4 4 4 1

  • Is there an alternate (newer) way to select value 9 from table containing values 1-10 instead of usign MAX?

    I have a table with one column (rowID) and ten rows. The values are the numbers 1 thru 10. I want to select 9. I used the MAX function as follows:
    create table #tmp1(rowID int)
    insert into #tmp1
    values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
    select MAX(rowID) as rwID from #tmp1
    where rowID < (select MAX(rowID) from #tmp1)
    --Is there any built in function that can perform this operation -- without the subquery?
    Rich P

    create table #tmp1(rowID int)
    insert into #tmp1
    values(1),(2),(3),(4),(5),(6),(7),(8),(9),(10)
    --select MAX(rowID) as rwID from #tmp1
    --where rowID < (select MAX(rowID) from #tmp1)
    --row_number in a derived table
    select RowID from (
    Select rowID,row_number() Over(Order by rowID DESC) rn from #tmp1) t
    Where rn=2
    --row_number in a CTE
    ;with mycte as (
    Select rowID
    ,row_number() Over(Order by rowID DESC) rn from #tmp1
    SELECT RowID
    FROM mycte
    WHERE rn = 2
    --Lead funtion
    ;with mycte as (
    Select rowID
    ,Lead(rowID,1) Over(Order by rowID DESC) leadRowID from #tmp1
    SELECT top 1 leadRowID
    FROM mycte
    Order by leadRowID DESC
    --Last_Value
    ;with mycte as (
    Select rowID
    ,Last_Value(rowID) Over(ORDER BY rowID DESC ROWS BETWEEN CURRENT ROW AND 1 FOLLOWING ) LastRowID from #tmp1
    SELECT top 1 LastRowID
    FROM mycte
    Order by LastRowID DESC
    --another option to combine top and min
     SELECT min(rowID) 
      FROM (
            SELECT TOP 2 rowID
              FROM #tmp1
             ORDER BY rowID DESC) t
    You can check all these solutions on your table and add an index to the column and test again.You may find one that works better for you.
    drop table #tmp1

  • "select * from table" and "select top 14260 from table" get nothing but select top 14259 get result successful

    select * from tablename                   ------always running,but get nothing
    select top 1 *  from tablename         -------get result quickly
    select top 2 *  from tablename         -------get result quickly
    select top 14259 * from tablename  --------get result quickly
    select top 14260 * from tablename  --------always running,but get nothing
    the thread is:
    java.net.SocketInputStream.socketRead0(Native Method)
    java.net.SocketInputStream.read(SocketInputStream.java:150)
    java.net.SocketInputStream.read(SocketInputStream.java:121)
    com.microsoft.sqlserver.jdbc.TDSChannel.read(IOBuffer.java:1782)
    com.microsoft.sqlserver.jdbc.TDSReader.readPacket(IOBuffer.java:4838)
       - 已锁定com.microsoft.sqlserver.jdbc.TDSReader@54269910
    com.microsoft.sqlserver.jdbc.TDSCommand.startResponse(IOBuffer.java:6150)
    com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(SQLServerPreparedStatement.java:402)
    com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(SQLServerPreparedStatement.java:350)
    com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:5696)
    com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:1715)
       - 已锁定java.lang.Object@320b1499
    com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(SQLServerStatement.java:180)
    com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(SQLServerStatement.java:155)
    com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(SQLServerPreparedStatement.java:332)

    when I run the below sql of Uri Dimant,I get many rows,I think you are right!
    Do you have some method to handle this problem?
    Or do you have some information for me to Learn?
    Thanks a lot.
    SELECT
    owt.session_id AS waiting_session_id,
        owt.blocking_session_id,
    DB_NAME(tls.resource_database_id) AS database_name,
        (SELECT SUBSTRING(est.[text], ers.statement_start_offset/2
    + 1,
    (CASE WHEN ers.statement_end_offset = -1
    THEN LEN(CONVERT(nvarchar(max), est.[text])) * 2
    ELSE ers.statement_end_offset
    END
    - ers.statement_start_offset
    ) / 2)
    FROM sys.dm_exec_sql_text(ers.[sql_handle]) AS est) AS waiting_query_text,
    CASE WHEN owt.blocking_session_id > 0 
    THEN (
    SELECT
    est.[text] FROM sys.sysprocesses AS sp
    CROSS APPLY sys.dm_exec_sql_text(sp.[sql_handle]) as est
    WHERE sp.spid = owt.blocking_session_id)
    ELSE
    NULL
    END AS blocking_query_text,
        (CASE tls.resource_type
    WHEN 'OBJECT' THEN OBJECT_NAME(tls.resource_associated_entity_id, tls.resource_database_id)
    WHEN 'DATABASE' THEN DB_NAME(tls.resource_database_id)
    ELSE (SELECT  OBJECT_NAME(pat.[object_id], tls.resource_database_id)
    FROM sys.partitions pat WHERE pat.hobt_id = tls.resource_associated_entity_id)
    END
    ) AS object_name,
    owt.wait_duration_ms,
    owt.waiting_task_address,
    owt.wait_type,
    tls.resource_associated_entity_id,
    tls.resource_description AS local_resource_description,
    tls.resource_type,
    tls.request_mode,
    tls.request_type,
    tls.request_session_id,
    owt.resource_description AS blocking_resource_description,
    qp.query_plan AS waiting_query_plan
    FROM sys.dm_tran_locks AS tls
    INNER JOIN sys.dm_os_waiting_tasks owt ON tls.lock_owner_address = owt.resource_address
    INNER JOIN sys.dm_exec_requests ers ON tls.request_request_id = ers.request_id
    AND owt.session_id = ers.session_id
    OUTER APPLY sys.dm_exec_query_plan(ers.[plan_handle]) AS qp
    GO

  • Get selected row values from Table view control

    Hi ,
    I am using transaction ME23N, would like to access row values from item table for selected row. I have written a script as in screen shot and its giving me error at java script step two. I want to get the PR number from item table for selected row.
    With Regards
    Vishal Lokapur

    H Vishal,
    Can you please share how you were able to resolve the issue regarding the selected row
    in case of a table control .
    Regards

  • Selecting all columns from table in a model query

    I have written a model query which joins 4 tables, applies some rules and returns updated rows by selecting 4 columns out of this. Currently it works fine because all 4 columns are from MODEL aliases. Now I need to select 16 more columns in the same query but none of these columns is added in MODEL aliases. When I tried selecting these columns I got oracle error ORA - 32614. Can someone please guide me to include these columns in the same model query?
    I tried couple of options but no luck. Here are those options for ready reference:
    1. I cannot nest existing model query into another select because there are no columns avaiable to join in output of current query to map with other records.
    2. I cannot include all 16 columns in MODEL aliases because some of these columns are actually output of user defined functions.
    I am using Oracle database version 11g Release 11.2.0.1.0.
    Edited by: Anirudha Dhopate on Jan 23, 2011 5:43 PM

    Thank you Avijit for your reply. There is a syntax error on the ON in this part of the statement which I don't know how to fix - I tried messing around with another INNER JOIN but am not confident that I'm doing the right thing:
    SENAlertType.SENAlertTypeIDONClassMember.ClassMemberStudentID
    Thanks for your help! I will need to do some more bedtime reading on joins.
    Daniel

  • Database Adapter: Selecting all data from table

    Hi All
    I am new to SOA Suite and I am using Soa Suite version 10.1.3.1 and Jdev version 10.1.3.3. It is required to select data from one database using the database adapter and insert it in a table in another database. I implemented the flow using DBadapters select operation the problem is everytime I am running the instance it transfers only one row though no condition has been specified on the select. Could anyone please help me out and let me know how to transfer a complete table from one database to another using DBadapters and in a single instance.
    Thanks

    Well Stupid me, got the answer, I think m just at the begining of the learning curve.

  • How to Enable a Selected single record from Table control...

    Hi,
    I have 5 records in my table control and in screen Painter in Made all the fields in Table control as Output field.
    and  successfully all my Table control fields are disabled...
    Now Now i want to enable the record which i selected n rest all the 4 records should be in Disable.
    what i did is:
    in PBO.
    loop at itab into wa with contol TBC1 .
    Module XYZ.
    endloop.
    Module XYZ.
    loop at screen.
    if screen-group = 'x'.
    screen-input =  1.
    modify screen.
    endif.
    End Module.
    Please help me....
    Thanks,

    hi
    in the layout of the screen u might have dragged and dropped the table control
    double click on it u will get attributes screen in that u select MULTIPLE or SINGLE under Line-Selection
    under attributes tab based on ur requirement.
    table control declaration:
    controls : control type tableview using screen 8000.
    the internal table in table control must be like
    data : begin of itab occurs 0,
    empno type .......,
    empname......,
    empcity.....,
    check(1), " for tab selection"
    end of itab.
    data : itab1 like itab occurs 0 with header line.
    data : flag.
    data : wk_init type i.
    data : lines type i.
    in the attributes screen of the table control
    pass the value ITAB-CHECK to the field W/SELECTION
    in SE51
    PBO
    Module_status_0800
    loop with control table_control_name.
    module_fill_tcontrol.
    endloop.
    PAI
    Module_user_command_0800
    loop with control table_control_name.
    module_read_tcontrol.
    endloop.
    in se38
    Module_status_0800.
    describe table itab1 lines lines.
    control-lines = lines.
    endmodule.
    Module_fill_tcontrol.
    describe table itab1 lines wk_init.
      if wk_init is not initial.
        read table itab1 into itab index control-current_line.
      endif.
    for enabling a row in the table control:
    if sy-ucomm = 'EDIT'.
        loop at screen.
          if flag is initial.
            screen-input = 0.
          elseif ( flag eq 'Y' ).
            if  ( ( screen-name = 'ITAB-EMPNO' or
                    screen-name = 'ITAB-EMPNAME' or
                    screen-name = 'ITAB-EMPCITY' )   
              and control-line_selector eq itab-check
              and control-current_line le lines ).
              screen-input = 1.
            else.
            endif.
          endif.
          modify screen.
        endloop.
      endif.
    endmodule.
    Module_read_tcontrol.
    READ TABLE itab1 INDEX control-current_line.
    IF sy-subrc EQ 0.
    MODIFY itab1 FROM itab INDEX control-current_line.
    ELSE.
    MOVE-CORRESPONDING itab TO itab1.
    APPEND itab1.
    CLEAR itab1.
    ENDIF.
    endmodule.
    module_user_command.
    case sy-ucomm.
    when 'EDIT'. -
    > Function Code assigned to the pushbutton to enable the field 
          flag = 'Y'.
    endcase.
    endmodule.
    Regards
    Murali.M

  • Selecting a value from table

    hi experts,
    i am usng a table in my wd-abap compent. the table has to 2 columns. one of them is a text view and other is a link to action. the table can contain multiple values which are fetched from some database table. now i want that when i click on any one of the link to action, a pop up window is opened which contains data that is fetched from some data base table according to the perticular link clicked.
    eg : say my link in the first row of the table is "link1"
    and  link in the second row of the table is "link2".
    so when i click on link1, a pop up window containing some data gets opened and when i click link2 another pop up window is opened containing different data. How can i do it.....
    According to the requirement i have to set the "selection mode " property of the table as 'none'.
    Plz help.
    regards
    arjun

    Hi Arjun,
    You can proceed as explained in here. In the onAction event of the LinkToAction place the following coding:
    method ONACTIONONLINKCLICK .
      data: lr_element type ref to if_wd_context_element,
              lv_index type i.
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lr_element->get_index( ).
    Now lv_index will contain the table row number in which the LinkToAction was clicked upon. I guess that you would know as to how to proceed from here. Use this index number to read the internal table which you are using to bind to the table ui element.
    ex:
    read table lt_sflight into wa_sflight index lv_index.
    Thought to try edit my previous post again...  Once you obtain the reference of type if_wd_context_element you can directly read the value of the attribute in the first column. You dont have to read the internal table using a READ or anything as how I had said earlier...  Directly code like as shown below:
    CALL METHOD lr_element->get_attribute
        EXPORTING
          name   = 'MATNR'   " Give the name of your first column in here
        IMPORTING
          value  = lv_matnr.   " Your first columns value would get saved into this variable
    I had declared lv_matnr as a local variable of type mara-matnr & I could get the value of the MATNR which is present in the 1st column of the same row.
    Regards,
    Uday
    Edited by: Uday Gubbala on Oct 10, 2008 4:32 PM

Maybe you are looking for

  • Adding Text to a photo...Need help

    I'm new to Adobe Photoshop Elements 7. I'm following the instructions for adding text to a photo, but I can't see what I'm typing. I can see the cursur, but nothing else. I can see the text in the Layer, but not on the photo. Please help.

  • How to merge two Oracle SSO IDs?

    As many have noticed, I have 2 SSO ids: 'Hans Forbrich' that I have had for many years; and Hans Forbrich (alt ID) that was created by the OU group for SSO access to OU sites. I'm wondering how to merge these two IDs while retaining the Oracle Univer

  • Doubt in pass of connection by parameter

    I have a technical doubt about pass of parameters. I have a method to which I pass as parameter a connection with database like 'public void ejecutarSelect (Connection with, String selec)'. The connection comes opened to the method, and it only execu

  • Pull images from SQL/PHP into Flash

    I have a website that displays images that are stored in a SQL database using PHP as a method for pulling and displaying the images. These images are stored in the database as text (ex: image1), then the PHP looks for the image like this: <img src="i

  • Encrypted Maxl "Parse error near in" error

    Hello, I'm facing a "Parse error near in" error when trying to use encrypted Maxl scripts deploying Essbase Studio cubes. The problem seems to be in the deploy command. If I do not use encrypted Maxl ( -D option ), the same deploy command works fine.