Controle the WD table column position Sequence

HI All,
How to  controle the WD table column position  (not ALV) in webdynpro as per custom requirnment.
Column1, Column2, Column3, Column4…………
I looked into CL_WD_TABLE to see any possibility.
Can anyone suggest me the right one?
Thanks
Gopal

Hi,
Can we rearrange the existing columns of nodes by passing the index and column name.
Unfortunately, No! you have to remove the column and add it.
As I have already have a component with table need to rearrange the columns.
Is it a standard component or custom component?
If it is a custom component, you can rearrange by right click on column and move up/down.
If it is a standard component, consider deleting the table( Remove Element) in enhancement mode and then create a new Table UI with specified order.  Or, create a post exit in wddomodifyview and then get the table reference and use remove_column( ) add_column( ) methods
code snippet:
DATA: lr_table    TYPE REF TO cl_wd_table,
       lr_abs_col TYPE REF TO cl_wd_abstr_table_column,
       lr_col     TYPE REF TO cl_wd_table_column.
  IF first_time EQ abap_true.
* get table reference
      lr_table ?= view->get_element( id = 'TABLE ). " ID of Table UI
     CALL METHOD lr_table->remove_grouped_column
       EXPORTING
         id                = 'COL1' " column
         index             = 1      " index
       RECEIVING
        the_grouped_column = lr_abs_col.
      lr_col ?= lr_abs_col.
     CALL METHOD lr_table->add_column
       EXPORTING
         index              = 20  " new index
         the_column     = lr_col.
  ENDIF.
hope this helps u,
Regards,
Kiran

Similar Messages

  • Dynamically changing the Advance table column Header.

    Dear All,
    I want to change dynamically the Advance table column header.
    I tried the below code and its working process request,not in process form request when button pressing.
    Please suggest me.
             OAAdvancedTableBean tableBean =
                               (OAAdvancedTableBean)webBean.findIndexedChildRecursive("advanceTableRN");
                           if (tableBean != null) {
                           System.out.println("tableBean");
                               OAColumnBean columnBean =
                                   (OAColumnBean)tableBean.findIndexedChildRecursive("column3");
                               if (columnBean != null) {
                                   System.out.println("columnBean");
                                   OASortableHeaderBean colHeaderBean =
                                       (OASortableHeaderBean)columnBean.getColumnHeader();
                                   if (colHeaderBean != null) {
                                       System.out.println("colHeaderBean");
                                       colHeaderBean.setText("Segment3");

    You can try 2 options:
    1. Try to call pageContext.forwardImmediatlytoCurrentPage();
    2. Try yo set a vo attribute to the columnbean text property and set the vo attribute programmatically. (I have not tried this but I think it should work)
    Cheers
    AJ

  • Create Table Column position matters?

    Hi All,
    I am just confused the saying that the column positioning in creating tables does not matter for relational database?
    Do you agree or disagree.
    For me I do not agree. Why?
    SQL>  create table a (a char(10),b number);
    Table created.
    SQL> create table b (b number, a char(10));
    Table created.
    SQL> insert into a values ('a',1);
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> insert into b select * from a;
    insert into b select * from a
    ERROR at line 1:
    ORA-01722: invalid numberSo it does matter.
    Thanks

    KinsaKaUy? wrote:
    Ok maybe I interpreted it in the wrong way : )
    Can you help me handle this issue.
    I have a table EMP with more than 500 columns, and with 10,000 rows.
    The developer asked to modify a column ATTRIBUTE1 from VARCHAR2(10) to NUMBER;
    It says that the column needs to be empty to change datatype, so I created a backup:
    CREATE TABLE EMP_BAK AS SELECT * FROM EMP;
    TRUNCATE TABLE EMP;
    ALTER TABLE EMP MODIFY(ATTRIBUTE1 NUMBER);
    How can I insert it back using...INSERT INTO EMP SELECT * FROM EMP_BAK;
    To aggraviate the situation the designer wants to move the column position from 100th place to 10th place.
    Assuming that you can not reason them out, how do you make this task easier?
    ThanksInstead of creating a new table and your above mentioned complications you could follow the below method i guess.
    ALTER TABLE EMP ADD DUMMY_ATTRIBUTE1 NUMBER;
    UPDATE EMP
    SET ATTRIBUTE1 = DUMMY_ATTRIBUTE1
    WHERE 1=1;
    COMMIT;
    UPDATE EMP
    SET ATTRIBUTE1 = NULL
    WHERE 1=1;
    COMMIT;
    ALTER TABLE EMP MODIFY ATTRIBUTE1 NUMBER;
    UPDATE EMP
    SET DUMMY_ATTRIBUTE1 = ATTRIBUTE1
    WHERE 1=1;
    COMMIT;
    ALTER TABLE EMP DROP COLUMN DUMMY_ATTRIBUTE1;

  • Unable to capture the adf table column sort icons using open script tool

    Hi All,
    I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
    1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
    2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.

    Hi keerthi,
    1. I have pasted the code for the first issue
    web
                             .button(
                                       122,
                                       "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
                             .click();
                        adf
                        .table(
                                  "/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
                        .columnSort("Ascending", "Name" );
         }

  • How to increase width of the complex table column in Agentry?

    I am using Agentry 6.0.38.1 client and Smart service manager 3.0 and Agentry 6.0.32 plugin, developing for Android client
    I increased no of characters for that complex table column in Agentry editor still its width is same in Android device.
    How can I increase the displayed width so that values in that column will not truncate?
    Tags edited by: Michael Appleby

    Hi Merten,
    I'm using Agentry Android client v6.1.4.179 (latest one). In Work Manager Add Component screen, Plant and Item ID fields's edit type is Complex table drop down and Complex table search respectively.
    Now we have requirement to fixed Column Width of this fields. Kindly let me know if there is any way to fix this. if than how?
    Thanks-
    Dipak Jotaneeya

  • How to execute query to store the result in the target table column ?

    Hi
    Source: Oracle
    Target: Oracle
    ODI: 11g
    I have an interface which loads the data from source table to target. Some of the columns in the target tables are automatically mapped with source table. Some of the column remain un-mapped. Those who remain un-mapped, I want to load the values in that column by executing an query. So can anybody tell me where I should mention that query whose result would become the value of the specific column.
    -Thanks,
    Shrinivas

    Actually I select the column from the target table then in the Property Inspector-->Mapping properties-->Implementation
    tab I have written the query which retrieve the value for that column. Is the right place to write the query? How can do this ?
    -Shrinivas

  • I am not able to read the xslt table column value.

    Hi,
    I have the scenario like this.
    I have two irpt pages  first.irpt and  second.irpt and saperate xslt tables for each page  and common js file for two pages.
    when I click on first.irpt   page xslt table row that opens  the  second.irpt as a popup window then I click on the column in second.irpt xslt row  after that  column value should be inserted  in to first.irpt  xslt table column.
    In above I have done everything except I am not able to update the first.irpt  xslt table column as Even I am not able to read that value.
    For your reference:
    /* This function will be called when we select the row in first.irpt xslt table here SelectBatch_b.irpt means second.irpt
    function getBatch(row)
    var id=row;
    var material=document.getElementById('Material_'+row).value;
    var location=document.getElementById('StoreLoc_'+row).value;
    var plant=1000;
    var strUrl = "SelectBatch_b.irpt";
    strUrl = "?plant="plant"&""location="location"&""material="material;
         window.open (strUrl,"mywindow");
    /*This function will be called when we select the row in second.irpt (SelectBatch_b.irpt)
    function getBatchID(row)
    var Batch=document.getElementById('Batch_'+row).value;  // reading second.irpt xslt table column value
    document.getElementById('Batchc1').value=Batch;  // reading first.irpt xslt table column value and inserting.
    window.close();  // here I am getting error like object expected.
    Please help me in this .
    Edited by: rajkumar12345 on Feb 29, 2012 1:45 PM

    Hi Rajkumar,
    Please find below the method to pass the variable back and forth in .irpt page.
    First Page:
    var Toaccessinchildpage = "value";
    function getBatch(row)
    var id=row;
    var material=document.getElementById('Material_'+row).value;
    var location=document.getElementById('StoreLoc_'+row).value;
    var plant=1000;
    var strUrl = "SelectBatch_b.irpt";
    strUrl += "?plant="plant"&"+"location="location"&"+"material="+material;
    window.open (strUrl,"mywindow");
    function populate(strBatch)
         document.getElementById('Batchc1').value=strBatch;
    Second Page:
    function getBatchID(row)
    var Batch=document.getElementById('Batch_'+row).value;
    window.opener.populate(Batch);
    window.close();
    You have to call parent page function from child page.
    No need to use common js.
    If you want to access variable from parent page use
    window.opener.<variable name>.
    Example
    window.opener.Toaccessinchildpage
    You have to declare that variable as global variable in Parent page js file.
    Refer First page code.
    Regards,
    Selva

  • SSRS 2005 - Dynamically control the width of columns in Matrix report or Hide any column

    Hi All,
    I just want to hide some column without having white space in Matrix report in SSRS 2005. Although I am aware of that perhaps this feature is not available on SSRS 2005. So, I just want to know if we can handle the width of column dynamically(using expressions)
    in matrix report?
    Please help. Thanks in Advance.
    Regards
    Kumud

    Hi Kumud,
    Based on my test, SSRS is not support column dynamically width. It has property “CanGrow” of text box. If we configure the property to True, it will wraps to next line if needed. In SSRS 2008, we can hide some columns without white space. If possible, I
    recommend you update your SSRS 2005 to SSRS 2008.
    There is a similar issue, you can refer to it.
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/9e6043f1-c458-4540-be59-d37b02feab8a/dynamic-column-width-for-a-report?forum=sqlreportingservices
    Alternatively, I recommend you that submit a wish to the Microsoft Connect at
    https://connect.microsoft.com/SQLServer/Feedback. Your feedback is valuable for us to improve our products and increase the level of service provided.
    Regards,
    Alisa Tang
    Alisa Tang
    TechNet Community Support

  • How can I create checkbox as many as the current table column?

    I have an table that binds from emploeyeeView,.. I want to create some checkbox as many as the number of the column that is shown,..how can i do that?
    thanks,
    Amir,,..

    You are going to want a <af:selectManyCheckbox>. Try this:
    <af:selectManyCheckbox label="Label 1" value="#{myBackingBean.selectedAttributes}>
      <af:forEach items="#{bindings.EmpView1Iterator.attributeDefs}"
                  var="item">
        <af:selectItem value="#{item.name}" label="#{item.name}"/>
      </af:forEach>
    </af:selectManyCheckbox>In the backing bean named "myBackingBean" there will be a "String[] selectedAttributes" with getter and setter methods. When the form is submitted, this will contain the names of the attributes that the user selected.

  • How to control the visibility of column in ALV

    Hi,Expert,
    I'm using class CL_GUI_ALV_GRID to dispaly informations,but I want to hide
    some columns using code,how could I achieve that?
    Thanks a lot

    Hi Ray,
    Herewith a portion of sample code to hide the columns.
      DATA : wa_fieldcat_alv TYPE LINE OF lvc_t_fcat ,
                 it_fieldcat_alv TYPE lvc_t_fcat .
        Create ALV Field Catalog utk Header
          CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
            EXPORTING
              i_structure_name = 'ZP119H'
            CHANGING
              ct_fieldcat      = it_fieldcat_alv[].
          LOOP AT it_fieldcat_alv[] INTO wa_fieldcat_alv.
            CASE wa_fieldcat_alv-fieldname .
                 WHEN 'HIDE1'.
                        wa_fieldcat_alv-no_out = 'X'.
                 WHEN 'HIDE2'.
                        wa_fieldcat_alv-no_out = 'X'.
                 WHEN 'HIDE3'.
                        wa_fieldcat_alv-no_out = 'X'.
            ENDCASE.
            MODIFY it_fieldcat_alv FROM wa_fieldcat_alv.
          ENDLOOP.
    Rgds,
    TS WINEDYA

  • Table control change column position or number

    Hi Guys,
    I need to move a column from position 10 to position 5 in the standard program. I did change the table control position in screen painter by doing cut and past of columns at required positions and it does change there but it does not show column positions in the actual screen. Is there config for table control in the standard program?
    In the attributes the position number is disable. Is there some other way that I can move the columns.
    Please advise.
    Thanks,
    FS

    Thanks Manesh,
    I am using travel overview transaction PR05. Can you recommend any config area where the table column positions are maintained. Thanks.
    Regards,
    FS

  • Changing the order of columns in a table

    Can anyone tell me how to change the order of column in a table.
    I want a new column to be added in a table in 2nd position.
    Is there any way out for it?

    1) Does this have something to do with security? If not, it really ought to be posted in a more appropriate forum (Database - General for example).
    2) Why? If you care about the order of columns in a table, you're almost certainly doing something wrong. You can control the order of columns in a view, however, so you can put a view layer on top of the table to present the columns in a friendly fashion.
    3) Not without recreating the table. You can use the DBMS_REDEFINITION package to recreate the table with zero or minimal downtime but behind the scenes, you're really just creating a new table, copying the data over, dropping the old table, and renaming the new table to use the old table's name. DBMS_REDEFINITION does some extra work to track changes so that the original table can be available until the last possible moment.
    Justin

  • Is it possible to controll the positioning of a new window when someone clicks  one of my links

    I was wondering if it was possible to control the positoning of a new window that pops up  when someone clicks one of my site document links on my dreamweaver site. When a link is clicked and the new window pops up, I'd like to control the window size and positioning of the new window. Is this possible without having to use a tooltip or other option?

    Some browsers will display pop-up windows in the parent window, some will open them in a new tab or new window.  I'm afraid there is nothing you can do about end user settings.
    Creating link to open in a Pop-Up window using DW and the Behaviors Panel
    http://www.cbtcafe.com/dreamweaver/popup_text/index.html
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    http://alt-web.com/
    http://twitter.com/altweb

  • What table column size is needed to accomodate Unicode characters

    Hi guys,
    I have encounter something which i dont understand and i hope gurus here will shed some light on me.
    I am running a non-unicode database and i decided to port the data over to a unicode database.
    So
    1) i export the schema out --> data.dmp
    2) then i create the unicode database + create a user
    3) then i import the schema into the database
    during the imp i can see that character conversion will take place.
    During importing of data into the unicode database
    I encounter some error
    saying column size is too small
    so i went to check the row that has the column value that is too large to fit in the table.
    I realise it has some [][][][] data.. so i went to the live non-unicode database and find the row. Indeed it has some [][][][] rubbish data which i feel that someone has inserted other language then english into the database.
    But regardless,
    I went to modify the column size to a larger size, now the row can be accommodated. However the data is still [][][].
    q1) why so ? since now my database is unicode, during the import, this column data [][][] should be converted to unicode already but i still have problem seeing what language it is.
    q2) why at the non-unicode database, the [][][] data can fit into the table column size, but on unicode database, the same table column size need to be increase ?
    q3) while doing more research on unicode, it was said that unicode character takes up 2 byte per character. Alot of my table data are exactly the same size of the table column size.
    E.g Name VARCHAR2(5);
    value - 'Peter'
    Now if converting to unicode, characters will take 2byte instead of 1, isnt 'PETER' going to take up 10byte ( 2 byte per character ),
    why is it that i can still accomodate the data into the table column ?
    q4) now with unicode database up, i will be supporting different language characters around the world. How big should i set my column size to ? the longest a name can get ? or ?
    Thanks guys!

    /// does oracle automatically "look" at the each and individual characters in a word and determine how much byte it should take.
    Characters usually originate from a keyboard, which has an associated keyboard layout and an associated character set encoding (a.k.a code page, a.k.a. encoding). This means, the keyboard driver knows that when a key with a letter "á" on it is pressed on a French keyboard, and the associated character set encoding is MS Code Page 1252 (Oracle name WE8MSWIN1252), then one byte with the value 225 is generated. If the associated character set encoding is UTF-16LE (standard internal Windows encoding), two bytes 225 and 0 are generated. When the generated bytes travel through APIs, they may undergo character set conversions from one encoding to another encoding. The conversion algorithms use translation tables to find out how to translate given byte sequence from one encoding to another encoding. In case of translation from WE8MSWIN1252 to AL32UTF8, Oracle will know that the byte sequence resulting from conversion of the code 225 should be 195 followed by 161. For a Chinese characters, for example when converting it from ZHS16GBK, Oracle knows the resulting sequence as well, and this sequence is usually 3 bytes.
    This is how AL32UTF8 data gets into a database. Now, when Oracle processes a multibyte string, and needs to look at individual characters, for example to count them with LENGTH, or take a substring with SUBSTR, it uses information it has about the structure of the character set. Multibyte character sets are of two type: fixed-width and variable-width. Currently, Oracle supports only one fixed-width multibyte character set in the database: AL16UTF16, which is Oracle's name for Unicode UTF-16BE encoding. It supports this character set for NCHAR/NVARCHAR2/NCLOB data types only. This character set uses two bytes per each character code. To find the next code, 2 is simply added to the string pointer.
    All other Oracle multibyte character sets are variable-width character sets, including AL32UTF8. In most cases, the length of each character code can be determined by looking at its first byte. In AL32UTF8, the number of 1-bits in the most significant positions in the first byte before the first 0-bit tells how many bytes a character has. 0 such bits means 1 byte (such codes are identical to 7-bit ASCII), 2 such bits mean two bytes, 3 bits mean 3 bytes, 4 bits mean four bytes. 1 bit (e.g. the bit sequence 10) starts each second, third or fourth byte of a code.
    In other ASCII-based multibyte character sets, the number of bytes is usually determined by the value range of the first byte. Bytes below 128 means a one-byte code, bytes above 128 begin a two- or three-byte sequence, depending on the range.
    There are also EBCDIC-based (mainframe) multibyte character sets, a.k.a shift-sensitive character sets, where a sequence of two-byte codes is introduced by inserting the SO character (code 14=0x0e) and ended by inserting the SI character (code 15=0x0f). There are also character sets, like ISO-2022-JP, which use more complicated byte sequences to define the length and meaning of byte sequences but Oracle supports them only in limited number of places.
    /// e.g i have a word with 4 character. the 3rd character will be a chinese character..the rest are ascii character
    /// will oracle use 4 byte per character regardless its ascii(english) or chinese
    No.
    /// or it will use 1 byte per english character then 3 byte for the chinese character ? e.g.total - 6 bytes taken
    It will use 6 bytes.
    Thnx,
    Sergiusz

  • New table/column in publication breaks replication

    Hi, 
    SQL 2008R2 
    I added a control table to a database that is being replicated to a different server.  The tabled called [__Updated] has one column called [DateUpdated] of type datetime2.  I manually created the table in the subscriber, added the new table/column
    to the list of articles and ran the replication. 
    It falls over with the error shown below, any ideas? 
    2015-02-24 16:23:34.32 [95%] Generating schema scripts for article 'AAA'
    2015-02-24 16:23:34.32 [95%] Generating schema scripts for article '__Updated'
    2015-02-24 16:23:34.33 [95%] The replication agent had encountered an exception.
    2015-02-24 16:23:34.33 Source: Unknown
    2015-02-24 16:23:34.33 Exception Type: Microsoft.SqlServer.Management.Smo.FailedOperationException
    2015-02-24 16:23:34.33 Exception Message: Script failed for Table 'dbo.__Updated'.
    2015-02-24 16:23:34.33 Message Code: Not Applicable
    2015-02-24 16:23:34.33
    Exact version is: 
    SELECT @@VERSION
    Microsoft SQL Server 2008 R2 (SP2) - 10.50.4000.0 (X64)
    Jun 28 2012 08:36:30
    Copyright (c) Microsoft Corporation
    Standard Edition (64-bit) on Windows NT 6.2 <X64> (Build 9200: ) (Hypervisor)

    Replication is considered to be a mature technology which means there are little changes. Oracle publishing is gone and updateable subcriptions are gone. Other than that it is the same.
    looking for a book on SQL Server 2008 Administration?
    http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
    http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941

Maybe you are looking for

  • How to use access keys in 10g

    hi, i have migrated my form from 4.5 to 10g but i am not able to use access keys Please help... thanks in advance smdedp

  • Messages Contact Names Appear as Numbers Now Instead

    I have OS X 10.8.5, my Messages app has all of my contacts as their phone numbers now instead of their names.  There are a few contact that have their name appear still, but a majority of them appear as phone numbers.  I don't remember if this happen

  • Is there any id's in the sessionstore.js file linked to the places.sqlite??

    I have seen the sessionstore.js file. It has the tabs and windows information in it.The information is very unclear.Is that data in js is similar to places.sqlite. When i see the id number in js file it is not matching with any of the table in the mo

  • Error exception thrown

    I have 2 files. One named Main.java and one named Keyboard.java which are shown below. I get an error in the method getBluetoothConnection(), must be caught or declared to be thrown - createBluetoothConnection(). But when I add throws Exception to al

  • No trayicon for gajim in plasma (kde5)

    Gajim is a python/gtk2 xmpp application. In preferences -> notifications the option "Show notification area icon" is set to "Always" but I don't get a tray icon in Plasma. Any ideas how to enable it? (the problem is that if I close the roster window