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

Similar Messages

  • 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 get one column of ALV table as dropdown by key.

    Hi experts,
                  How can I get one column of ALV table as dropdown and editable. If  user wants to change that column value he can just select from that dropdown and click on update button. Can I provide tool tip to that column as " Select from drop down to change the status "?
      Please Help.
    Thanks,
      Pratibha

    You just need to change the cell editor of that column in ALV.
    So first get access to the alv model object (adjusting the code below for your ALV Component Usage name - mine was ALV_ADV):
    DATA: l_ref_cmp_usage TYPE REF TO if_wd_component_usage.
      l_ref_cmp_usage =   wd_this->wd_cpuse_alv_adv( ).
      IF l_ref_cmp_usage->has_active_component( ) IS INITIAL.
        l_ref_cmp_usage->create_component( ).
      ENDIF.
      DATA l_salv_wd_table TYPE REF TO iwci_salv_wd_table.
      l_salv_wd_table = wd_this->wd_cpifc_alv_adv( ).
      DATA l_table TYPE REF TO cl_salv_wd_config_table.
      l_table = l_salv_wd_table->get_model( ).
    Then access the column object you want to change:
    DATA l_column TYPE REF TO cl_salv_wd_column.
      l_column = l_table->if_salv_wd_column_settings~get_column( 'REGION' ).
    Then create the cell editor for DDLB and set it as the new cell editor for this column:
    DATA ddlb TYPE REF TO cl_salv_wd_uie_dropdown_by_key.
      create object ddlb
        exporting
          selected_key_fieldname = 'REGION'.
      ddlb->set_tooltip( `Select from drop down to change the status` ).
      l_column->set_cell_editor( ddlb ).

  • How to make screen field enable when table control gives an error

    Hi,
        I had a scneario like when table control data wrong then one parameter of the screen should be enabled for the input, i knew that screen-name will not work since it will have always table control fields only when table control gives an error.
    How to make the other parameter enable when table control throws an error.
    Regards,
    Jaya

    Hi Gobi,
         Thanks for your response, but issue is - how to make other screen fields enable when there was an error in the table control data.
    For table control - lets say we will use the code as i mentioned above.i am sure that we cant write the code for field enable in between loop & endloop.
    as you said if we right outside the loop-endloop, the module wont be triggered when table control throws an error, because that statement was not there in the loop-endloop.
    please let me know if you need any more information on the issue. I hope there is alternative for this in SAP.
    Thanks
    Jaya

  • How to make  a particular field in table control invisible?

    i have a field in my table control but im not able to make it invisible
    im using the following code
    PBO
    LOOP AT itab_ctrl INTO wa2_ctrl WITH CONTROL ztabctrl
        CURSOR Ztabctrl-current_line.
        MODULE modify_scrn_100.
      ENDLOOP.
    module modify_scrn_100.
    LOOP AT SCREEN.
       IF SCREEN-NAME = 'WA_CTRL-ZITEM'.
          SCREEN-INVISIBLE = 1.
          MODIFY SCREEN.
       ENDIF.
         ENDLOOP.
    endmodule
    ...here WA_CTRL-ZITEM is my table control field name
    ...even if i make invisible = 1 or 0 the field is not getting invisible

    Hi,
    Check the Demo Program <b>RSDEMO02</b>.here you can have option to make the column invisible.
    also check these..
    How to Hide a entire column in a Table Control?
    Hiding table control columns along with header
    Hiding of Table control
    Regards
    Vijay

  • How to optimize the column width in Table Control

    Hi all,
          When I am displaying fields in Table Control, the columns are displayed in full length, and I am unable to see all the fields at once.
    So as in grid , where we optimize the column width using layout, do we had any property for TC to do so.
    thanks for your help.
    Points would be awarded .
    Regards,
    Anil .

    Hi,
    In Se51, you can do this one, ust open your table control and resize the TC, there is no direct option to do this for entire TC, you need to do this field by field, and arrage the TC to adjust in a Single screen. In the field parameters, you have the field lenghts, there you can minimize the length of a field
    Regards
    Sudheer

  • How to use selection column in a table control

    I have given the name of the selection column to be 'DEF_SEL',now i want to select rows in the table control using the 'selection column attribute' and maniupulate it programmatically so that i would transport the rows selected using selection coulmn to a different table control.How would i do this?

    Hi raja,
      Once you have the table cobtrol built using the extra field in the internal table, all the selected rows will have DEF_SEL = 'X'.
    Now you can loop your internal table and filter the records which were selected.
    in pai modules:
    loop at itab where DEF_SEL = 'X'.
    Move itab information inrto another internal table.
    append itab_new.
    endloop.
    have another table control which shows the data in the itab_new.
    regards,
    Ravi

  • How to make editable the colums of table control in the PBO

    Hello Experts!
    I`m using the table control in dynpro, and i want to make editable some colums depending of some values.
    How can i do that?
    Thanks!

    Hi
    U need to change the screen attributes of colunm by statament LOOP AT SCREEN/ENDLOOP into the loop of table control in PBO:
    PROCESS PBO.
       LOOP AT ITAB ......
            MODULE LOOP_SCREEN_TC.
      ENDLOOP.
    MODULE LOOP_SCREEN_TC.
      IF ITAB-FIELD1 = .........
         LOOP AT SCREEN.
            IF SCREEN-NAME = 'ITAB-FIELD2'.
               SCREEN-INPUT = 0.
               MODIFY SCREEN.
            ENDIF.
        ENDLOOP.
      ENDIF.
    ENDMODULE.
    Max

  • Make Select rows and columns as read only in Table Control

    Hi All,
    I would like to know how to make certain cells in a Table Control as display only.
    Table control should look like-(Those in bold are read only or in display mode)
    <b>Name1            Idno1 </b>         Address1
    <b>Name2            Idno2</b>          Address2
    <b>Name3            Idno3  </b>        Address3
    <b>Name4            Idno4</b>          Address4
    (Blank row to enter name idno and address)
    (Blank row to enter name idno and address)
    (Blank row to enter name idno and address)
    My table control should display all the above fields the way it is above of which first two colums and 4 rows should be read only,and the rest of the empty rows in the TC should be in change mode.i.e it must have provision to add new rows but not change the first two columns of existing rows.
    In short I am looking at solution to hide particular no of rows and columns and <b>not the entire column.</b>

    In the PBO of the table control loop. just write these statements
    NAME and IDNO considering the fields on the screen.
    and WA_TAB is the table work area being passed to the table control to display the rows.
    if not WA_TAB-NAME is initial and not WA_TAB-IDNO is initial.
    loop at screen.
    if screen-name = 'NAME' or
       screen-name = 'IDNO'.
    screen-input = <b>0</b>.
    modify screen.
    endif.
    endloop.
    endif.
    which means that the fields are disabled only if NAME and IDNO are not initial.
    Regards
    - Gopi

  • HOW TO MAKE THE CONTENT OF THE TABLE PRINT IN A TABLE CONTROL SCREEN?

    Can any one tell me how to make the content of the table control print in a table control screen!!?
    Please help!!
    I have to make the contents of a table in the table control screen print ? any idea
    Regards,
    Vj

    Please refer to Demo Program,
    DEMO_DYNPRO_TABCONT_LOOP
    Its very clear.
    Shreekant

  • 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

  • How to make a column in Table popin read only

    Hi Everyone
    Could anyone let me know how to make a column in table popin read only.
    Regards

    if you ar eusing an ALV table
    try this
      DATA: lr_salv_wd_table TYPE REF TO iwci_salv_wd_table,
            r_table TYPE REF TO CL_SALV_WD_CONFIG_TABLE.
    * get reference to ALV component interface
      lr_salv_wd_table = wd_this->wd_cpifc_alvmain( ).
    * get ConfigurationModel from ALV Component
      wd_this->r_table = lr_salv_wd_table->get_model( ).
    * init ColumnSettings
      DATA: lr_column_settings TYPE REF TO if_salv_wd_column_settings,
            lr_col_header TYPE REF TO cl_salv_wd_column_header.
      lr_column_settings ?= wd_this->r_table.
    * get table of column settings - each line one column
      DATA: lt_columns TYPE salv_wd_t_column_ref.
      lt_columns = lr_column_settings->get_columns( ).
    * loop over table - in each loop another column can be modified
      DATA: ls_column TYPE salv_wd_s_column_ref.
    * define visible columns (fields) by naming them,
    * exclude others by setting visibility to none
      DATA: ls_tooltip TYPE string.
      LOOP AT lt_columns INTO ls_column.
        " get header of column
        lr_col_header = ls_column-r_column->get_header( ).
        " do settings here
    ENDLOOP.
    Or see this document for more tips.
    <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4">https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40794172-b95a-2910-fb98-b86d8a0918b4</a>
    regards,
    Joris

  • How to make few columns of single record inactive in Table conrol?

    Hi all,
    Scenario is like this : i have one table control , it is displaying 10 records , in that first four columns are editable. Now my requirement is, whenever record having intial values( suppose one record having initial values among ten) except key field , we need to deactive that particular  record , now table control  should contain ten records , but nine records are in editable state and one record in non editable state .
    How to make few columns of single record inactive in Table conrol?
    Thanks in advance.

    hi there...
    select the column that u want to convert to non editable mode in the screen layout. then double click on it. go to the attributes tab and uncheck the input chk box. the check box will become disabled for input. u can do this for any number of columns.
    if u want to do it dyanamically, loop at screen. check for the screen element's name. when itmatches the column u want to disable, simply set the input value as 0.
    dont forget to modify sscreen after setting the attribute values.
    i hope this helps.
    do reward if helpful.

  • How do I make one (and only one) device use my Apple ID and iCloud account?

    How do I make one (and only one) device use my Apple ID and iCloud account? I currently have an iPad mini, iPhone 5, and MacBook pro attached to my apple accounts, but I want only my iPhone 5 to be assosiated with either one. Whenever I use any of the three devices, I get a notification on the other two telling me that these devices are now using these accounts from these services, etc. and I want these notifications to stop, along with the devices using to them. How do I do this? I completely reset the iPad mini so I don't know how I'm still getting notifications from it, and I deleted and signed of of all of my accounts everywhere I could find on my Mac. So, to restate exactly what I want to do, I want ONLY my iPhone 5 to use ANY of my Apple/iCloud accounts and ONLY it can receive emails, iMessages, and FaceTime calls. Thanks!

    If you want to disconect your Mac from iCloud, go to System Preferences>iCloud and click Sign Out.  If you only want to stop using iCloud email, just uncheck Mail.  To stop iMessage, open the Messages app, go to Messages>Preferences, click the Accounts tab, click your iCoud ID on the left-hand side, then to the right click Sign Out.  To stop FaceTime, open the FaceTime app, then click "Apple ID" then click Sign Out.
    On your iPad, go to Settings>iCloud and tap Delete Account (or if you only want to stop using iCloud email, turn Mail off).  For FaceTime, go to Settings>FaceTime, tap the ID and sign out.  For iMessage, go to Settings>Messages>Send & Receive, tap the ID and sign out.

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

Maybe you are looking for

  • Two subnets with different mask on a single router?

    router 1941 Hello. I'm needing assistance with the setup of two subnets within a single router. Here's my information: Router has only two GigabitEthernet interfaces. GigabitEthernet0/0 has 172.20.0.1 ip and 255.255.252.0 mask. GigabitEthernet0/1 has

  • Interest rates as part of Payment Terms

    Dear Experts, I have the following scenario :- - Client has a Payment Term of 28 days for its Customer - If the Csutomer pays within 14 days, they are not chanrged any inerest (hence client gives 14 day inerest free credit to its Customers) - Once 14

  • IC WebClient cookbook - CRM 5.0

    Hi all, Can anyone please send me IC Web Client Cookbook for CRM 5.0. I have the Cook book for 4.0 but there are few things that have been changed in the new release. Thanks, Preethi

  • ITunes on two computers - keeping ratings and file info in synch?

    I have my iTunes files on two computers (and thus have used two of the 10 that I am permitted). When I rate a file on one computer, or change the info (to add genre or artist info) on one computer, how can I can duplicate it on the second computer? I

  • Monitor stays black

    Since I have bought my 17"PB I had, once a while, colored horizontal stripes all over the monitor. When using the mouse the stripes dissapeared. Two days ago this happened quite often, but still I worked and switched off my PB as usual. Yesterday I t