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

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

  • 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 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

  • Can you programmatically change the width of columns in a table control\indicator

    Is it possible to programmatically change the width of columns in a table control\indicator ie to fit to width of the data or in my case the header information.

    Create a property node (or reference) and use the 'Active Cell' property to select which column you want to change and then use the 'Cell size'--> 'Width' property to change the size.
    "There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
    Attachments:
    table.vi ‏33 KB

  • 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.

  • New columns in the table control do not appear

    Hi,
    We have a requirement to add two fields(columns) in a table control  for a transaction upon clicking Create button and those two fields should be editable. We have added the two fields in the table control. But, they do not appear in the transaction ( If I delete an existing column, then I am able see the new column).  Have checked everywhere, but not sure if I am missing something here. There is no hide statement used.
    Appreciate help on this.
    Thanks,
    Pavan

    Hi Pavan,
    What I understood is you are adding fields to the table control dynamically.\
    For that you have to use field-symbols to add fields to the work area dynamically.
    ( If this is not your actual requirement share your code with me I will try to solve it. )
    Regards,
    Swaroop

  • Add a new column in item table control of va01 screen

    Hi All,
    i have requirement to add new column in item table control of va01 screen 4900 for the custome field of vbap table
    the required coloum is add with the help of access key
    however whem i am trying to save data, that custom field is not populate
    please let me know if any one had work on this

    I think i solved the problem . The single way to to that is to modify the SAP standard Screen.

  • 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

  • Is it possible to change nunmber of columns dynamically in table control

    Is it possible to change number of columns dynamically in table control? if so how it could be done?
    Thnaks in advance.
    Sounder

    You can update the table control in your program, the table control is a structure of the type CXTAB_CONTROL of TYPE-POOLS cxtab.
    There you can hide or display column the same way you do for fields in LOOP AT SCREEN. there you will ahve to LOOP AT <control>-COLS.
    TYPE-POOL CXTAB .                                                                               
    TYPES:                                                                               
    BEGIN OF CXTAB_COLUMN,                                                          
             SCREEN      LIKE SCREEN,     "Attributes struktur SCREEN                      
             INDEX       TYPE I,         "Position of a column on the screen               
             SELECTED(1) TYPE C,          "Indicator 'column selected'                     
             VISLENGTH   LIKE ICON-OLENG, "Visualised length of a column                   
             INVISIBLE(1) TYPE C,         "Indicator 'column invisible'                    
           END   OF CXTAB_COLUMN,                                                                               
    BEGIN OF CXTAB_CONTROL,                                                         
             FIXED_COLS    TYPE I, "Number of fixed columns                                
             LINES         TYPE I, "Number of lines to display                             
             TOP_LINE      TYPE I, "Top line during next PBO                               
             CURRENT_LINE  TYPE I, "Current line during LOOP/ENDLOOP                       
             LEFT_COL       TYPE I, "Fist scrollable column after fixed area               
             LINE_SEL_MODE    TYPE I, "Line-selection  : none(0), single(1),               
             COL_SEL_MODE     TYPE I, "Column-selection:        multiple(2)                
             LINE_SELECTOR(1) TYPE C, "Indicator: 'With line-selection col'                
             V_SCROLL(1) TYPE C,            "not used                                      
             H_GRID(1) TYPE C,        "Indicator: 'Horizontal  grid-lines'                 
             V_GRID(1) TYPE C,     "Indicator: 'Vertikal    grid-lines'                    
             COLS      TYPE STANDARD TABLE OF CXTAB_COLUMN                                 
                            WITH NON-UNIQUE DEFAULT KEY,                                   
             INVISIBLE(1) TYPE C,                                                          
           END   OF CXTAB_CONTROL,                                                         
    Regards

  • 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.

  • Sort functionality using MULTIPLE columns in a table control

    Hi all,
    I have a custom screen with table control.Now i need to provide SORT functinality in this screen for the columns in the table control.
    My questins:
    1.Is it possible to seelct MULTIPLE columns in a table control for SORTING?If yes,what explicit settings do i need to do while creatng the TABEL CONTROL in the screen?DO I need to select "Column selection " as MULTIPLE??
    2.How do I write the code for SORT functinonality for multiple columns?
    I know how to write the code for SORTING on basis of single column .
    Thanks!

    Hi Rob,
    Thanks for the reply.
    However I was thinking to apply the same logic as for single columns as follows:
    types : begin of ty_fields,
                c_fieldname(20),
               end of ty_fields.
    data  : t_fields type table of ty_fields,
               wa_fields like line of t_fields.
    WHEN 'SORTUP'.(Ascending)
          loop at TABLE tc01-cols INTO wa_tc01  where  selected = 'X'.
          SPLIT wa_tc01-screen-name AT '-' INTO g_help g_fieldname.
          wa_fields-c_fieldname = g_fieldname.
          append wa_fields to t_fields.
          endloop.
          describe table t_fields lines l_index.
          c_count = 1.
          if c_count  <= l_index.
          read table t_fields into wa_fields index c_count.
          case c_count.
          when '1'.
          l_field1 = wa_fields-c_fieldname.
          when '2'.
         l_field2 = wa_fields-c_fieldname.
        and so on depending on the no of columns in the table control...
          endcase.
          endif.
          SORT t_tvbdpl_scr BY  l_fields1 l_fields 2......l_fieldn.
    Let me know if the above method will work!Also for the above method to work will the type of fields(columns on whihc sort function will be applied) matter???
    Thanks again for your time.

  • How to make one column only in table control automatically filled in ?

    Hi ,all.
    I meet an issue while doing my screen programming. I have a table control on screen which has a few of column. And I want to display date in my first column each row automatically when user open that table/table control. All other column must be in empty in order to let user key in.
    Hope anyone can help me in this issue.
    Thanks in advance.

    Hi
    Flow Logic:
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_2209.
    MODULE GET_DATA.             "enters required no of dates in ur itab
    loop at itab with control TBL1.
         module POPULATE_TBL.     "fills date col alone in tbl ctrl
    endloop.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_2209.
    loop at itab.
       module UPDATE.
    endloop.
    Code:
    *& Report  YFEB2_SCREEN_TBL                                            *
    REPORT  YFEB2_SCREEN_TBL                                            .
    TABLES: YSTUDENT.
    CONTROLS TBL1 TYPE TABLEVIEW USING SCREEN 2209.
    DATA: OK_CODE LIKE SY-UCOMM,
          itab TYPE TABLE OF YSTUDENT WITH HEADER LINE,  "ystudent is the db tbl i use
          WA LIKE LINE OF ITAB,
          v_date like sy-datum.
    v_date = " initialise to start date.
    CALL SCREEN 2209.
    *&      Module  GET_DATA  OUTPUT
    *       text
    MODULE GET_DATA OUTPUT.
      do 10 times.
         itab-date = v_date.
         append itab.
         v_date = v_date + 1.
      enddo.
    ENDMODULE.                 " GET_DATA  OUTPUT
    *&      Module  POPULATE_TBL  OUTPUT
    *       text
    MODULE POPULATE_TBL OUTPUT.
        MOVE ITAB TO YSTUDENT.
    ENDMODULE.                 " POPULATE_TBL  OUTPUT
    *&      Module  UPDATE  INPUT
    *       text
    MODULE UPDATE INPUT.
    WA-DATE = YSTUDENT-DATE.
    WA-ID = YSTUDENT-ID.
    WA-NAME = YSTUDENT-NAME.
    INSERT YSTUDENT FROM WA.
    ENDMODULE.                 " UPDATE  INPUT
    *&      Module  STATUS_2209  OUTPUT
    *       text
    MODULE STATUS_2209 OUTPUT.
    SET PF-STATUS 'BACK'.
    *  SET TITLEBAR 'xxx'.
    ENDMODULE.                 " STATUS_2209  OUTPUT
    *&      Module  USER_COMMAND_2209  INPUT
    *       text
    MODULE USER_COMMAND_2209 INPUT.
    OK_CODE = SY-UCOMM.
    CASE OK_CODE.
      WHEN 'BACK'.
        LEAVE PROGRAM.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_2209  INPUT
    If you have a specific date upto which you want you can declare a var for that and while filling the itab you can use it in condition.
    Hope this helps
    Regards,
    Jayanthi.K

Maybe you are looking for

  • Questions on dataguard

    I have quick couple of questions on dataguard. 1) how much time time it will take to generate (move ) the logfiles from production to standby database ? 2) Can we speed up the transfer the logfile from PROD to Standby? 3) If 2nd Questions is YES. How

  • About:lose i phone 5 and how to locate it.already use find my i phone but always off that phone..how do i locate it?

    i lose i phone 5 and how to locate it.already use find my i phone but always off that phone..how do i locate it?or got another way to locate it...hope u can help me solve this problem...

  • Remove "Java Applet Window" from the window

    Hi, can anyone tell me how to remove the word "Java Applet Window" from a applet/frame/dialog running on the browser? Thank you very much. yunhe

  • Report unauthorized activity

    Unauthorized activity was made on my account today. Skype charged me 3 of $10 charged by autopayment. it stop charged me after I changed password and disable the autopayment. I tired report in support, but your support system down to report this issu

  • Error occured while saving PO in Extended Classic Scenario

    Hi All, I have set up Extended Classic Scenario. While I try to make any changes in PO through manager or purchser I get following error: "Cannot get process info from WF archive; function AS_API_READ causes exceptn No Infostruc Found." Please sugges