Disable few record in a table control not all records

Hi 
I have an internal table of   6 rows with table control .first field char 1 (ws_flag) which I am using for line selection of row in the table control .
I have to disable some rows in a table control (user can not select or deselect it).
I don’t want to disable all rows . I just want to disable some rows depending upon the condition .
Loop at screen doesn’t seem to be working .
I already tried the below given code .  how does Screen-name = column name this will besatisfied in  a table control.
Set screen attributes for table control
  loop at zzhb6_0100 with control zhb6ctl
                    cursor zhb6ctl-top_line.
    module modify_screen_0100.
  endloop.
Then:
module modify_screen_0100 output.
  loop at screen.
    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X' or
         zzhb6_sal_phase2_s-zzmed_rec     = 'X' or
         zzhb6_sal_phase2_s-zztr          = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.
    if screen-name = 'ZZHB6_SAL_PHASE2_S-ZZMERIT_AMT_SP'.
      if zzhb6_sal_phase2_s-zzself_funded = 'X'.
        screen-input = '0'.                       "Display
        modify screen.
      endif.
    endif.
  endloop.

When using table control, chances are you have some code like this in the screen flow logic of the screen.
PROCESS BEFORE OUTPUT.
* PBO FLOW LOGIC FOR TABLECONTROL 'I_WOODCAPCON'
* MODULE I_WOODCAPCON_CHANGE_TC_ATTR.
* MODULE I_WOODCAPCON_CHANGE_COL_ATTR.
  LOOP AT   I_WOODCAP
       WITH CONTROL I_WOODCAPCON
       CURSOR I_WOODCAPCON-CURRENT_LINE.
    MODULE I_WOODCAPCON_CHANGE_FIELD_ATTR.
  ENDLOOP.
  MODULE STATUS_0300.
Notice the MODULE I_WOODCAPCON_CHANGE_FIELD_ATTR. in the above code, this is the module which will allow you to change the attributes of the cell per row.  Notice that this MODULE is inside the LOOP statement in the PBO flow logic.
So here is the coding for the module.
module i_woodcapcon_change_field_attr output.
  modify i_woodcap index i_woodcapcon-current_line.
  loop at screen.
    if i_woodcap-level = 'B'
      and  screen-name = 'I_WOODCAP-PDATE'.
          screen-input = '0'.
    endif.
     modify screen.
  endloop.
endmodule.
Notice here that my condition statest that if the LEVEL value for the row is "B", then I want to make the PDATE of the row "not ready for input".   'I_WOODCAP is the name of the internal table associated with the table control.
Help this helps.
Regards,
Rich Heilman

Similar Messages

  • Data of table control not saved in variant of report

    Hi ppl,
    I have created a report program with some selection parameters.
    Also, I have included a table control on the selection screen (using subscreen).
    The report works perfectly.
    But, when I press the SAVE button on the selection screen to save the data on the selection screen into a variant, the variant only stores the values of the parameters and select-options present on the screen. It is not capturing the data in the table control.
    Please let me know if I need to do some additional coding for this.
    Thanks,
    David.

    Hi David,
    I too struggled a lot to find the solution ....atlast got it....It possible by exporting and importing the table control values to Database Index.
    1. AT SELECTION SCREEN OUTPUT event  triggers when you SAVE and GET the variant.
    2. So write the logic in AT SELECTION-SCREEN OUTPUT event.
    CONSTANTS: c_vari TYPE char30 VALUE
                             '(SAPLSVAR)RSVAR-VARIANT'.
      FIELD-SYMBOLS: <lfs_vari> TYPE ANY.
      ASSIGN: (c_vari) TO <lfs_vari>.
      IF sy-subrc = 0.
        IF <lfs_vari> IS NOT INITIAL.
          IF ok_code = 'SPOS'.
            EXPORT gt_chars[] TO DATABASE vari(tc) ID <lfs_vari>.
          ELSEIF ok_code = space.
            IMPORT gt_chars[] FROM DATABASE vari(tc) ID <lfs_vari>.
          ENDIF.
        ENDIF.
      ENDIF.
    In the above logic if OK_CODE is 'SPOS', that is for saving the variant with the name <lfs_vari>.
    Similarly if the OK_CODE is other than, 'GET'....that is for retrieving the variant. But in case of getting the variant OK_CODE is not filled with 'GET', but variant will be filled. We should take variant filling as base and do as done above.
    It worked for me.....

  • Custom fields in migo table control not updating

    hi ,
    This is to have your valuable suggestion , wrt , following issue..
    In transaction MIGO , i have to add two fields uebto and untto in table control .
    I am able to add them in table control, but some how not able to pick data for these fields .
    error coming is :
    " System error: Incorrect Customizing for field
    ZZUEBTO".
    if any face such type of issue , answer me .
    Thanx,
    jeet

    Hi,
    Thanks for your reply.  I have added the custom fields in the item detail.  But the customer wants the custom fields in the table view also.
    Is there any screen exit available to modify the table control of MIGO?
    Thanks.

  • Data in table control not seen for the Standard Transaction Iview

    Hi
    I am creating one Standard Transaction Iview for CATS .
    While doing print preview in IE 6 , I am not able to see data in Table control(Data Entry Area ).
    Can you please provide me the solution for how I can see the data in Table Control
    Regards
    Ruturaj

    Hi David,
    I too struggled a lot to find the solution ....atlast got it....It possible by exporting and importing the table control values to Database Index.
    1. AT SELECTION SCREEN OUTPUT event  triggers when you SAVE and GET the variant.
    2. So write the logic in AT SELECTION-SCREEN OUTPUT event.
    CONSTANTS: c_vari TYPE char30 VALUE
                             '(SAPLSVAR)RSVAR-VARIANT'.
      FIELD-SYMBOLS: <lfs_vari> TYPE ANY.
      ASSIGN: (c_vari) TO <lfs_vari>.
      IF sy-subrc = 0.
        IF <lfs_vari> IS NOT INITIAL.
          IF ok_code = 'SPOS'.
            EXPORT gt_chars[] TO DATABASE vari(tc) ID <lfs_vari>.
          ELSEIF ok_code = space.
            IMPORT gt_chars[] FROM DATABASE vari(tc) ID <lfs_vari>.
          ENDIF.
        ENDIF.
      ENDIF.
    In the above logic if OK_CODE is 'SPOS', that is for saving the variant with the name <lfs_vari>.
    Similarly if the OK_CODE is other than, 'GET'....that is for retrieving the variant. But in case of getting the variant OK_CODE is not filled with 'GET', but variant will be filled. We should take variant filling as base and do as done above.
    It worked for me.....

  • Set cursor on table control not working

    Hi,
      I have a screen with delivery number field on top with Get Data Button next to it. Once I click on Get Data, I want to get all the handling units and show them in a table control below and show the first line of that table control selected by default.
      I m able to get the data but the cursor always goes back to the delivery number field.
    I have the following code in PBO
    Status & title for the screen
      MODULE status_0100.
    And in the module, the last lines are as follows
      if sy-ucomm = 'GET'.
        s_vepo-sel = c_x.
        set cursor field 'TABLE1' line 1. "TABLE1 is name of the table control in screen
                                                      "painter
      endif.
    I debugged and saw that the line " set cursor field 'TABLE1' line 1." is indeed the last line which gets executed but still the cursor goes back to delivery number field and table row doesnt get selected.
    Thanks for reading.

    Try maintaining the "Cursor position" in the screen layout in Attributes tab with the field name that you want the default cursor position to be present.
    Regards,
    Shri Hari.

  • Table Control not displaying selected data

    I have 2 screens, screen 100 is the selection screen where i select the data to be displayed and 300 is my table control.  When I select a single airline in screen 100, it displays all the airlines in my table control in screen 300, how can i fix?

    Table control if built via the screen painter wizard uses the contents of internal table declared in the main program and defined in the wizard to display. Check how you are filling this table, perhaps your filling it incorrectly.

  • How do I delete a column for just one table and not all the others?

    I have multiple tabels in a Pages document. I want to delete some columns on some of the tables but keep them on the other tables. When I delete the columns it deletes all of them on all of the tabels and I dont want that.

    No. To do what you are asking for would require a separate table on each page.
    Of course you can always move blocks of cells around manually, but I can't imagine how you would manage that.
    Jerry

  • How to disable single cell in table control.

    Hi my requirement is to disable single cell in the table control. Please let me know How to do this.
    If possible please provide good module pool examples.
    Harish

    Hi,
    I´m not quite sure if this is gonna work. You have to make a loop over the screen and then you can change some characteristics of it, which includes the Input option:
      LOOP AT SCREEN.
        IF screen-group1 = 'ABC'.
          screen-input = '0'.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    I´ve used this code for selection screens but could help you. Check in SE11 all options for SCREEN.

  • Table Control Modification for Note implementation.

    I am applying a note, wherein I have to add a field TAX1 to a table control. I am able to add the field, but it is shaded grey. Moreover when I run the note after doing the necessary modifications, it is giving an error 'Element TAX1 touches or overlaps other element'. Whats the solution?

    Hi,
    when I removed the text element, which gives the heading for that particular field, its not showing the error. But in the second table control for the same screen, it is giving the same error for an element which i did not place at all in the table control, i.e., i inserted the field ADDTAX1, but it is giving the error for ADDRATE1, which i am not inserting into the table control at all.

  • To Disble the Field in Table Control after clicking Save button

    Hi,
    I have a requirement as follows. i need to disable one field in the table control after clicking save button. i tried with SCREEN elements but it disabling whole the table control but i need to disable that particular one record only in the table control. i found Structure CXTAB_COLUMN in documentaion. it has the properties like invisible. can any body tell how can we disble that particular field in table control only for the one record. and how can we use CXTAB_COLUMN.
    Thanks in advance.

    hi,
    do like this...
    in USER_COMMAND_1000 module of PAI,
    MODULE user_command_1000 INPUT.
      CASE ok_code.
        WHEN 'BACK' OR 'UP' OR 'CANC'.
          LEAVE PROGRAM.
        WHEN 'SAVE'.
          fl = 1.
          GET CURSOR LINE lin.
      ENDCASE.
    ENDMODULE.                 " user_command_1000  INPUT
    and make on module disable in Loop Endloop in PBO.
    and write like this...
    MODULE disable OUTPUT.
      LOOP AT SCREEN.
        IF tab1-current_line = lin AND fl = 1.
          screen-input = 0.
        ELSEIF tab1-current_line < lin.
          screen-input = 0.
        ELSE.
          screen-input = 1.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    ENDMODULE.                 " disable  OUTPUT
    here fl and lin both are type i.....
    and there will b one module in PBO
    MODULE tab1_change_tc_attr.
    in that put if condition....
    MODULE tab1_change_tc_attr OUTPUT.
      IF sy-ucomm <> '' AND sy-ucomm <> 'SAVE'.
        DESCRIBE TABLE itab LINES tab1-lines.
      ENDIF.
    ENDMODULE.                    "TAB1_CHANGE_TC_ATTR OUTPUT
    ur problem will solve...
    reward if usefull....
    Edited by: Dhwani shah on Jan 2, 2008 1:17 PM

  • Columns in table control in display mode in display transaction

    Hi all,
    I have a table control in a custom screen .Now i have few columns in the table control which need to be input enbaled but should be dislay only when thetransaction mode is "display" e.g VL33N.
    I have written the follwoing lines of code:
    IF sy-tcode = 'VL33N'.
        IF g_trtyp = 'A'.
          LOOP AT tc01-cols INTO wa_tc01.
            IF wa_tc01-screen-group1 = 'G2'.
              wa_tc01-screen-input = 0.
              MODIFY tc01-cols FROM wa_tc01.
            ENDIF.
          ENDLOOP.
    ENDIF.
    ENDIF.
    However the specific olumns in table control are not displayed in display mode when in display transaction!
    Can anyone suggest what am i doing wrong?
    thanks.

    I would have answered if you followed forum rules (as I can see in your previous posts, missing feedback, closed without any info)

  • Custom fields for FV50 table control

    Hello,
    The customer has a requirement to add 3 text fields to the table control in Transaction FV50. These fields are currently not available in the table control at all (I checked the Table settings Administrator). Further, no Screen/Transaction Variant has been implemented either to prevent these fields from being displayed. Which is why I'd like to find a way to add these custom fields to this table control. These fields are the text descrptions for the numeric fields Cost Center, Fund and Business Area.
    I've read many posts on this forum regarding potential solutions including the link below which details the SAP std solution. Only problem is this approach adds these fields to the data dictionary tables underlying the screen. The customer says about 1 million records are being generated a month so they would rather not have all that extra data at the line item level.
    Custom column for FB60
    If anybody has done this sort of thing via a user exit I'd much appreciate your input.
    Thanks,
    Tarun

    Hi Rob,
    Yes, I checked IMG configuration and found that Txn OXK3 allows us to extend the underlying tables and customize the generic fields in the table control. However, the client  has nearly 1 million postings to table BSEG each month and I'm guessing this approach will entail adding the custom fields to table BSEG, which won't work for them. I haven't actually tried this approach because the SAP documentation has some dire warnings about proceeding. But if you have any insight as to whether this can be achieved without extending BSEG (possibly just extend VBSEGS??) that would be very valuable.
    Thanks,
    Tarun

  • Table control - validate column

    Dear VC Experts,
    we are using VC with a RFC Data Service. On the output port we create a table control with following columns for example:
    - Amount /MENGE (mandatory field)
    - Checkbox type /BOOL1 (mandatory field) - true,false
    - Expression Box / STATUS2 (validate amount and Checkbox) --> true, false
    For the expression box we use the formula:
    BOOL(@BOOL1==true AND @MENGE==0 OR @BOOL1==false AND @MENGE<>0)==true
    This seems to work. Result: true, false
    Further we have a button, which has to be disabled if the Expression Box has the status "false".
    I dont know how to check all the values in the expression box. The button only gets disabled, if i select a specific row with the status 'false'. I would like to check all the valus in my table control, not only the selected one.
    On the properties tab for my button i use the formula:
    CONTAINS(#ID[ACC153]@STATUS2,'false')==true
    Maybe any suggestions to check all the values in my table column? How can i check all the values in my column 'STATUS2' which contains true or false?
    Moderator message - Please do not offer points or rewards
    Edited by: Rob Burbank on Aug 3, 2010 11:32 AM

    Hello,
    I think you need to attach the output of your table to the input of the form that contains your button, so that this form "is aware" that you have changed the selected line.
    Then you assign an action to the mapping and to the column so that when you click on a line of the table it "calls" the form.
    You can give it a try, but I'm not sure of this.
    Fabien.

  • Table Control in Editable mode

    Hello All,
    I have created an infotype which has a table control. But all the table control lines are in non-editable mode. I would like to have all the lines in editable mode.
    Kindly help out.
    Regards,
    shails

    If your internal table contains no record and when you are refering to the table control then all the lines will get disabled.
    Now you will be knowing the number of lines your table control displays in singe page...say 10 lines.
    So initially in the PBO append 10 initial lines to your itab. then set the property lines of the table control to the total lines of internal table.
    Now in pbo capture the user command page down and append 10 initial lines to your itab.
    Hope you got the idea.
    Now if your itab already has some records , then just set the lines as total record count of your internal table.
    Also change the property in the screen attributes for each field of the control

  • 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

  • HP Laserjet P11102w printer not inslalling on Windows 8

    I  tried to install HP Laserjet P1102w printer on HP Envy dv7 Windows 8 laptop. First I used  CD  provide to install driver.  After running sometime it gives an error " The configuration registry basedata is corrupt". Secondly Itried to install  suit

  • SOS Unable to Connect Report Server

    hi alll i have to present my project 9/1/2008 i have two days and i have three report i set all the details i set the name of the server RepSrv but at the run time this message apear Unable to connect Report Server should i write something in .DEV wh

  • Getting music back after formatting computer

    I am a music teacher and use iTunes for all my recorded music. Over the summer, my school upgraded our computers to WIndows 7. Is there a way to get my music back? I spent a ton of money on all of it and would hate for it to all be gone... I have it

  • "Emegency Mode" Woes

    Alright, here's the deal: My mother's iPhone 2G was stuck in a pseudo-recovery/emergency call mode after dropping her phone from a very short distance. Even when sliding to enter emergency call mode, it'd hang on every keypress..and sometimes it woul

  • Is Javascript worth learning?

    Is there significant learning curve to master Javascript if you know Java reasonably well? And is there much of any point to learning Javascript? Don't Java servelets largely eliminate the need for Javascript?