How to define Column Header text table control

Hi All,
I have to create a function in which user will pass Field Name, Field Description.
I have to show that field description in Table Control Columns as Text for columns.
Like if a user pass Material , PLant etc, then first column header text will be Material and so on and in rows it will show the data.
One more thing, is it possible to define the technical attributes like length based on field passed through function.
Please help me to find out the solution.
Thanks
Piyush Mathur

Hi Piyush,
here are the some components of the screen . you can change tehm at run time in your code.
components: name,input,output,required,length,active,invisible,intensified,group1,group2...etc.
at ruin time you modify these attributes..
your requirement is to change the name attribute.
regards,
sateesh

Similar Messages

  • Column Header In Table Control

    Hi all,
    how to mentain the column header in table control,
    in case of manually table control( not with wizard).
    Thanks.

    Hi,
    First just drag and drop all the fields that are to be a part of the table control. Then drag the label on the column header. Give name and text to the label.
    Regards,
    Nikhil

  • Dynamic Column Header On Table Control

    Dear Friend
       How I can set Dynamic Column Header Text On Table Control
    Regards
    Supperkorn

    Just set it to a global variable name, and then set the value of that global variable as needed, e.g. in your TOP include define "g_my_header(20) type c" and then use g_my_header in the "Table column header" definition in the Dynpro... and in your PBO code put a value in g_my_header.
    Jonathan

  • How to create column header text while downloading file

    How can we create column header text while downloading file using function GUI_DOWNLOAD(in SAP Release 4.6c) because there is no FIELDNAMES parameter in
    4.6c version.

    Hii,
      Check this sample code. I have called GUI_DOWNLOAD twice. Onetime to download header of table and next time data of table
    REPORT  z_file_download.
    DATA: w_name(90) TYPE c.
    DATA:
      BEGIN OF fs_flight,
        carrid   LIKE sflight-carrid,
        connid   LIKE sflight-connid,
        fldate   LIKE sflight-fldate,
        price    LIKE sflight-price,
        currency LIKE sflight-currency,
      END OF fs_flight.
    DATA:
      BEGIN OF fs_head,
        carrid(10) TYPE c,
        connid(10) TYPE c,
        fldate(10) TYPE c,
        price(10) TYPE c,
        curr(10) TYPE c,
      END OF fs_head.
    DATA:
      t_head LIKE
       TABLE OF
             fs_head.
    DATA:
      t_flight LIKE
         TABLE OF
               fs_flight.
    fs_head-carrid = 'CARRID'.
    fs_head-connid = 'CONNID'.
    fs_head-fldate = 'FLDATE'.
    fs_head-price  = 'PRICE'.
    fs_head-curr   = 'CURRENCY'.
    APPEND fs_head TO t_head.
    SELECT-OPTIONS:
      s_carrid FOR fs_flight-carrid.
    START-OF-SELECTION.
      SELECT carrid
             connid
             fldate
             price
             currency
        FROM sflight
        INTO TABLE t_flight
       WHERE carrid IN s_carrid.
    CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
    *   BIN_FILESIZE                  =
        filename                      = 'D:\flight.xls'
       FILETYPE                      = 'ASC'
    *   APPEND                        = ' '
        WRITE_FIELD_SEPARATOR         = 'X'
    *   HEADER                        = '00'
    *   TRUNC_TRAILING_BLANKS         = ' '
    *   WRITE_LF                      = 'X'
    *   COL_SELECT                    = ' '
    *   COL_SELECT_MASK               = ' '
    *   DAT_MODE                      = ' '
    *   CONFIRM_OVERWRITE             = ' '
    *   NO_AUTH_CHECK                 = ' '
    *   CODEPAGE                      = ' '
    *   IGNORE_CERR                   = ABAP_TRUE
    *   REPLACEMENT                   = '#'
    *   WRITE_BOM                     = ' '
    * IMPORTING
    *   FILELENGTH                    =
      tables
        data_tab                      = t_head
    EXCEPTIONS
       FILE_WRITE_ERROR              = 1
       NO_BATCH                      = 2
       GUI_REFUSE_FILETRANSFER       = 3
       INVALID_TYPE                  = 4
       NO_AUTHORITY                  = 5
       UNKNOWN_ERROR                 = 6
       HEADER_NOT_ALLOWED            = 7
       SEPARATOR_NOT_ALLOWED         = 8
       FILESIZE_NOT_ALLOWED          = 9
       HEADER_TOO_LONG               = 10
       DP_ERROR_CREATE               = 11
       DP_ERROR_SEND                 = 12
       DP_ERROR_WRITE                = 13
       UNKNOWN_DP_ERROR              = 14
       ACCESS_DENIED                 = 15
       DP_OUT_OF_MEMORY              = 16
       DISK_FULL                     = 17
       DP_TIMEOUT                    = 18
       FILE_NOT_FOUND                = 19
       DATAPROVIDER_EXCEPTION        = 20
       CONTROL_FLUSH_ERROR           = 21
       OTHERS                        = 22
    IF sy-subrc NE 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
      CALL FUNCTION 'GUI_DOWNLOAD'
        EXPORTING
          filename                = 'D:\flight.xls'
          filetype                = 'ASC'
          append                  = 'X'
          write_field_separator   = 'X'
        TABLES
          data_tab                = t_flight
        EXCEPTIONS
          file_write_error        = 1
          no_batch                = 2
          gui_refuse_filetransfer = 3
          invalid_type            = 4
          no_authority            = 5
          unknown_error           = 6
          header_not_allowed      = 7
          separator_not_allowed   = 8
          filesize_not_allowed    = 9
          header_too_long         = 10
          dp_error_create         = 11
          dp_error_send           = 12
          dp_error_write          = 13
          unknown_dp_error        = 14
          access_denied           = 15
          dp_out_of_memory        = 16
          disk_full               = 17
          dp_timeout              = 18
          file_not_found          = 19
          dataprovider_exception  = 20
          control_flush_error     = 21
          OTHERS                  = 22.
      IF sy-subrc EQ 0.
        MESSAGE 'Download successful' TYPE 'I'.
      ENDIF.
      IF sy-subrc NE 0.
    *  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards
    Abhijeet

  • Variable column header in table control

    Hi all, I need a variable column header text in table control. I am doing the following but is not working,
    I have deleted the header field that the wizard created me thorugh a internal table, and put a I/O field instead.
    I have assigned a variable in the name of this field.
    In the PBO I am writing the following:
      LOOP AT   i_details
           WITH CONTROL tc_detail
           CURSOR tc_detail-current_line.
        MODULE m_modify.
      ENDLOOP.
    MODULE m_modify OUTPUT.
      IF tc_detail-current_line EQ '1'.
        var1(header column text) = 'text1'.
        var2(header column text) = 'text2'.
      ENDIF.
    ENDMODULE.
    But with this is not working, the rare thing is that the first time that the screen is shown, this value is not appearing. After press Enter or some action, the value appears.
    I am not doing anything in PAI. The only code that is in PAI is:
    Loop at i_details.
    endloop.
    Nothing more.

    Hi,
    First just drag and drop all the fields that are to be a part of the table control. Then drag the label on the column header. Give name and text to the label.
    Regards,
    Nikhil

  • How to get column header text in IWDTable

    Hi
    Just want to know how to get column header name in IWDTable.
    I know that you can get it with
    IWDAbstractTableColumn[] groupedColumns = table.getGroupedColumns();
    for (int i = 0; i < groupedColumns.length; i++) {
         IWDAbstractTableColumn column = groupedColumns<i>;
         column.getHeader().getText();
    But what if text isnt set on header level but its rendered from cellEditor  model binding (im not sure if its like that).

    Finally after your suggestion i did it with this code
    String header = column.getHeader().getText();
                       if ((header == null || header.length() == 0) && column instanceof IWDTableColumn){
                            IWDTableCellEditor tableCellEditor = ((IWDTableColumn) column).getTableCellEditor();
                            if (tableCellEditor instanceof IWDTextView){
                                 String bindingPath = ((IWDTextView)tableCellEditor).bindingOfText();
                                  StringTokenizer tokenizer = new StringTokenizer(bindingPath,".");
                                  String token = "";
                                  IWDNodeInfo nodeInfo = context.getNodeInfo();
                                  while (tokenizer.hasMoreTokens()){
                                       token = tokenizer.nextToken();
                                       if (tokenizer.hasMoreTokens()){
                                            nodeInfo = nodeInfo.getChild(token);          
                                  IWDAttributeInfo attribute = nodeInfo.getAttribute(token);
                                  ISimpleType simpleType = attribute.getSimpleType();
                                  simpleType.getDescription();
                                 header = simpleType.getDescription();

  • Dynamic Column Heading in Table Control

    Hi
    I have a table Control which needs dynamic heading for the first column. So i dragged a label and placed it on the Column 1 header. I gave the corresponding declaration and assignment in TOP include for that screen field. I also tried assigning values in the PBO of the screen also. I even tried replacing the Label with an I/O field. It is not allowing.
    Nothing is working. Any suggestions.

    Instead of the text field for your column heading, put an input/output field there, and specify the field for output only. Then assign the field with the header that you want on your PBO.

  • How to set column attributes in table control?

    I have the following requirement to build a table by using table control:
    if content of col 1 = 'Y', enable input for col 2 for that line only.
    if content of col 1 = 'N', disable input for col 2 for that line only.
    So the input attribute for col 2 in each line can be different.
    How can I achieve this?
    I have tried using loop at screen or loop at tablecontrol-cols into wa_cols statements,
    but these will change the entire column attributes to either on or off, and not on individual line.
    Instead of changing the COLUMN attributes, I think I should change the CELL attributes. 
    What is the syntax for that, is there something like tablecontrol-field?
    Thanks for any help in advance.

    I still not able to get the field attributes set on individual lines.
    These are my codes, can you help again.
    PROCESS BEFORE OUTPUT.
      MODULE pbo_0200.
      MODULE zitem_change_tc_attr.
      LOOP AT   lt_asset_item
           INTO ls_asset_item
           WITH CONTROL zitem
           CURSOR zitem-current_line.
        MODULE ZITEM_CHANGE_FIELD_ATTR.
        MODULE zitem_get_lines.
      ENDLOOP.
    MODULE zitem_change_field_attr OUTPUT.
    loop at screen.
      if ls_asset_item-replace_asset = 'X'.
         if screen-group1 EQ 'FR4'.        "these are the columns I want to turn input ON or OFF.
          screen-input = '1'.
          modify screen.
         endif.
      endif.
    endloop.
    Endmodule.
    At debug mode, the screen-input did change to '1'.  Can I check the return code of the MODIFY SCREEN statement?
    I tried to initialize the colums to be output only at screen definition, but it still doesn't help.
    I don't think I have to do anything at the PAI event.
    PROCESS AFTER INPUT.
    MODULE save_cursor_position.
      LOOP AT lt_asset_item.
       FIELD ls_asset_item-replace_asset
         MODULE get_replace_asset ON REQUEST.
        CHAIN.
         FIELD LS_ASSET_ITEM-REPLACE_ASSET.
         FIELD ls_asset_item-replace_cost.
          MODULE zitem_modify ON CHAIN-REQUEST.
        ENDCHAIN.
        FIELD ls_asset_item-mark
          MODULE zitem_mark ON REQUEST.
      ENDLOOP.
      MODULE zitem_user_command.
    Thanks again.

  • Change Table control Column Header text dynamically

    Hi,
    I have an requirement to change table control column header text dynamically.
    i.e. I have about 10 columns in table control, out that need to change 5 columns header text. These header texts are stored in an internal table.
    I had looked into the below link but could not get exactly how to do it.
    Dynamic headers in table control
    Could you please tell me how to do that.
    Thanks in Advance.

    Hi Saba,
    What you will need to do is this.....
    1. First replace the column Header Text box by I/O Fields and name them accordingly.
    Say for example we will consider the same example which i had explained in the link.
    there in the column header we want the header to change when some dates and entered into two fields which are out of table control say
    Start Date: 01.01.2010 to End Date: 06.01.2010
    Now we want the header to look like this,
    Column  No.    -        1               2             3                  4               5               6
    Header label   -    01/FRI       02/SAT     03/SUN       04/MON     05/TUE      06/WED
    Header name -    SPOTS1   SPOTS2    SPOTS3      SPOTS4     SPOTS5    SPOTS6
    then you go as per the instructions in the link......
    Let me know if you need further help,
    Hope this solves your problem....
    Regards,
    Abhijit G. Borkar

  • How to increase text size of a Column header of table in webdypro

    Hi All,
    Can anybody suggest me how to increase the text size of a column header of table in webdyrpo. I didnt find any option anywhere. can anybody help me out to solve this issue?
    Regards
    Ravikumar

    Hi Ravikumar,
    As Sukanta has suggested create a Simpletype of String Type and Length 40.
    Then create a context for the column header and for its type, instead of choosing
    from the drop down, choose the 3 dots.
    In the window that appears, select Local Dictionary, and Select the Simpletype
    that you have created, from the respective package name. And click OK.
    This will make the text of ColumnHeader of type String and Length 40.
    Hope it helps.
    Regards,
    Alka.

  • Table column header text orientation

    Hi ,
    Is it possible using UI element TABLE or ALV component SALV_WD_TABLE to set the column header text orientation to 90 Degrees?  Like in Excel if you right click on cell then go to format cells then go to alignment tab where you can set text orientation.   I looked at cl_salv_wd_column_header and did not see method to do so.
    Thanks,
    Gary

    Currently this is not possible.
    If you do have a need to display (and I would probably emphasis display ) data in an Excel like manner, then consider using the Office control and supplying a formatted XML version of an Excel file to the control - then you can use all the Excel formatting capabilities to your heart's content.
    Cheers,
    Chris

  • How to delete a column from the table control in module pool?

    Hi,
      can any one please tell How to delete a column from the table control in module pool?
    thanks in advance
    warm regards
    HareeshKumar N

    hi hareesh,
    I think it is better to hide it.
    How to hide: You can check this link
    Dynamic Hide column in table control

  • How to grey out one single column in a table control of TPMOE

    Hi Experts,
    Any body please tell me how to greyout a single column in a table control of TPMOE.
    Help needed ASAP.
    Thanks,
    sreenivas.

    lr_result      TYPE REF TO if_bol_bo_property_access
    lr_iterator TYPE REF TO if_bol_bo_col_iterator
          CALL METHOD lr_iterator->get_by_index
            EXPORTING
              iv_index  = index
            RECEIVING
              rv_result = lr_result.
          CALL METHOD lr_result->get_property_as_value
            EXPORTING
              iv_attr_name = 'TRANSFER_STATUS'
            IMPORTING
              ev_result    = lv_status.
    if  lv_status = x and component = cost_category.
    rv_disabled = true.
    else.
    call super.
    endif.
    INDEX will have the row number.
    Frame ur logic based on this.

  • How to Hide a entire column in a Table Control?

    Can we hide an entire column in a Table control? Plz give some hints in doing the same...

    Here is a sample, if you wish to do it programattically.   If you used the table control wizard, then you should have a module which is listed in the flow logic PBO of the screen.  Its probably commented out.
    itabcon_change_col_attr
    Uncomment it and create the module.  Then put the code that I have in the module below into your module.
    report zrich_0003 .
    *&spwizard: declaration of tablecontrol 'ITABCON' itself
    controls: itabcon type tableview using screen 0100.
    data: begin of itab occurs 0,
          fld1 type c,
          fld2 type c,
          end of itab.
    start-of-selection.
      call screen 100.
    *&      Module  STATUS_0100  OUTPUT
    *       text
    module status_0100 output.
    *  SET PF-STATUS 'xxxxxxxx'.
    *  SET TITLEBAR 'xxx'.
    endmodule.                
    *&      Module  ITABCON_change_col_attr  OUTPUT
    *       text
    module itabcon_change_col_attr output.
    <b>  data: wa like line of itabcon-cols.
      loop at itabcon-cols into wa.
        if wa-screen-name = 'ITAB-FLD2'.
          wa-invisible = '1'.
          modify itabcon-cols from wa.
        endif.
      endloop.</b>
    endmodule.               
    Regards,
    Rich Heilman

  • How to change "Details" column header text in AdvanceTable in AdvancedTable

    Hi All,
    i am using adavanced table in advanced table in OAF page to show the master and details ,
    my requirement is to change the header text of "Details" to some other meaning ful text .
    "Details' column will be visible at runtime ,no we cant change using process request ,
    Please help me on this ,its urgent
    Thanks & Regards
    Maheswara Raju

    You can get the handle to the Detail column by using the following:
    UINode d = outerTable.getDetail();
    However, as per OAF developer guide, it is not possible to change the label for the detail column. The devloper guide has the following:
    "In accordance with BLAF guidelines, the Detail column header text for the detail disclosure column and the Show/Hide link texts within the cells of the detail disclosure column can not be modified."
    Cheers,
    Saurabh

Maybe you are looking for

  • Connect new MacPro to 27" monitor with 2560x1440 resolution

    Hello community, I'm looking for help connecting my new Mac Pro (late-2013, 3 GHz 8-core, 64 gb ram, currently running OS X 10.9.5) to a 27" Monoprice IPS-ZERO-G monitor.  The monitor only has VGA and Dual-Link DVI inputs, and is supposed to support

  • 5 Devices for 1 iTunes account ?

    I ordered a 11" MacBook Air and it is arriving anytime now. Now my main computer is my 13" MacBook Pro. One thing that bothers me is that I want my new MacBook Air to have all the music I have on my MacBook Pro. I am going to use the MacBook Air in a

  • Need more info on Java SE 6 after downloading my new operating system to Yosemite

    I updated my operating system on my MacBook Pro to Yosemite 10.10.2, now when I try to open CS4 it directs me to download Java SE 6, but the "more info" button which is to direct to the website to download the Java, does not work, and I can't find an

  • Co-Product and By-Product Costing in SAP PP Scenario

    Frds, Somebody can tell me, settings/enhancement in PP for Co-Product and By-product Costing along with Header Material? Thanx

  • Time/Date/Usage Stats Wonkiness?

    Hey, who says battery life is subpar? I'm showing 750 hours/31 days Usage! This "seems" to be related to the time/date errors that show up periodically. Not sure if it is related to syncing - I tend to leave iPhone on the "manual" time date setting a