Make cells of Table control grayed out(input disabled) based on condition

Hello Experts,
I have a requirement where the data is getting populated in table control from my custom tables.
Now in three columns of the table control if the data is coming as blank from z table then I have to show the cell as editable so that user can put the data and it can be saved back in custom table but If some data is coming from custom table and it is shown in the table control then the cell should be grayed out(Non Editable).
To achive this I'm using the Following piece of code but it is not working still.
In PBO 
loop at   gi_actual_tc
       into gw_actual_tc
       with control tc_actual
       cursor tc_actual-current_line.
       module tc_get_lines. 
endloop.
MODULE tc_get_lines OUTPUT.
data : lv_index  TYPE sy-index,
       lv_index1 TYPE sy-index.
lv_index = sy-tabix.
CHECK gw_actual_tc-zlc_subcon IS NOT INITIAL.
LOOP AT SCREEN.
  IF screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON'.
     lv_index1 = sy-tabix.
     IF lv_index = lv_index1.
     screen-active  = 0.
     exit.
     ENDIF.
    screen-intensified = 1.
  ENDIF.
MODIFY SCREEN.
ENDLOOP.
ENDMODULE.    
Please let me know where I'm missing the trick here.
Thanks,
Jai

hi ,
LOOP AT SCREEN.  
IF ( screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON' AND
gw_actual_tc-zlc_subcon IS NOT INITIAL )
OR ( screen-name = ' GW_ACTUAL_TC-ZLC_SCWORK' AND
gw_actual_tc-zlc_scwork IS NOT INITIAL )
OR ( screen-name = 'GW_ACTUAL_TC-ZLC_VALJOB' AND
gw_actual_tc-zlc_valjob IS NOT INITIAL ) .
change code  to  below code  if it is character field 
IF ( screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON' AND
gw_actual_tc-zlc_subcon IS  INITIAL )
OR ( screen-name = ' GW_ACTUAL_TC-ZLC_SCWORK' AND
gw_actual_tc-zlc_scwork IS  INITIAL )
OR ( screen-name = 'GW_ACTUAL_TC-ZLC_VALJOB' AND
gw_actual_tc-zlc_valjob IS  INITIAL ) .
IF field is type P or I 
then
IF ( screen-name = 'GW_ACTUAL_TC-ZLC_SUBCON' AND
gw_actual_tc-zlc_subcon =0 )
OR ( screen-name = ' GW_ACTUAL_TC-ZLC_SCWORK' AND
gw_actual_tc-zlc_scwork =0 )
OR ( screen-name = 'GW_ACTUAL_TC-ZLC_VALJOB' AND
gw_actual_tc-zlc_valjob =0 ) .
screen-input = 1.
MODIFY SCREEN .
ENDIF.
ENDLOOP.
regards
Deepak.

Similar Messages

  • Insert Table is grayed out

    In my DW CS3 insert tables is grayed out also in the Common
    tab area it's grayed out?
    [email protected]

    Now - whatever you do, DO NOT GO BACK to layout mode. It's
    the source of a
    high percentage of all the posts here (in one way or
    another).
    In my opinion, there are three serious problems with Layout
    Mode -
    1. Perhaps most importantly, it sits between you and *real*
    HTML tables,
    and fools you into believing that concepts like "layout cell"
    and
    "autostretch" really mean something. They do not. As long as
    you use
    Layout Mode, you'll never learn one of the most important
    things for new web
    developers - how to build solid and reliable tables.
    2. Actually, #1 wouldn't be *so* bad, except that the code
    that is written
    by Layout Mode is really poor code. For example, a layout
    table contains
    MANY empty rows of cells. This can contribute to a table's
    instability.
    In addition, if your initial positioning of the table's cells
    is a bit
    complex,
    Layout Mode will throw in col- and rowspans aplenty as it
    merges and splits
    cells willy-nillly to achieve the pixel-perfect layout you
    have specified.
    Again,
    this is an extremely poor method for building stable tables,
    because it
    allows
    changes in one tiny cell's shape (i.e, dimensions) to ripple
    through the
    rest
    of the table, usually with unexpected and sometimes
    disastrous consequences.
    This is one of the primary reasons for the final result's
    fragility - read
    this -
    http://apptools.com/rants/spans.php
    3. The UI for Layout Mode is beyond confusing - many options
    that you might
    want to use are inaccessible, e.g., inserting another table,
    or layer onto
    the page.
    I can understand the new user's desire to use this tool to
    make their life
    easier,
    but the cost is just too heavy in my opinion.
    To make good tables, keep it simple. Put a table on the page,
    and begin to
    load your content. If you would want a different table
    layout, instead of
    merging or splitting cells, consider stacking tables or
    nesting simple
    tables instead, respectively.
    And above all, do not try to build the whole page with a
    single table!
    Luckily, Adobe understands the problems created for the
    unsuspecting user
    who falls into this trap, and has elected to remove this
    feature altogether
    from the next version of DW. The time is right for you to
    begin working
    with tables properly!
    To read more about this approach, visit the DW FAQ link in my
    sig, and run
    through the table tutorials.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    ==================
    "James Bechdel" <[email protected]> wrote in
    message
    news:[email protected]...
    > Thank you, that fixed it.

  • Why is my itunes video controls grayed out on mac?

    why is my itunes video controls grayed out on mac?
    How do I fix this problem so I can watch purchased videos ?

    In many cases, they are related, I have many users who have reported the repair of QuickTime fixed the issue.
    See if these articles will help:
    iTunes for Windows plays video files without any audio
    http://support.apple.com/kb/TS1696
    Troubleshooting iTunes for Windows Vista or Windows 7 video playback performance issues
    http://support.apple.com/kb/TS1718

  • Gray out or disable text box

    Hi,
         I have a drop down menu called CN_Entry_Initials that has options of a "C" or an "N". I also have a text box called Part_Number to enter a part number into. I want the Part Number text box to be grayed out or disabled until either a "C" or an "N" has been chosen out of the CN_Entry_Initials drop down menu. I have this working, except that I cannot get the Add button to do anything. I think it’s something to do with the way I have the If statement for this disabled text box, or do I have to change the button to a submit button. Does anyone know how to fix this? Below is the javascript and the drop down menu and text box code along with the Add or submit button. There is extra stuff in the Javascript that I have on the page, but I don't need to worry about those things since they are working correctly. I have the disabled text box code at the top of the javascript under the function verify() code. Thanks.
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Original:  Wayne Nolting ([email protected]) -->
    <!-- This script and many more are available free online at -->
    <!-- Begin
    function verify()
    if (document.getElementById('CN_Entry_Initials').value == "C"
    || document.getElementById('CN_Entry_Initials').value == "N")
        document.getElementById('Part_Number').disabled = false;
    else
        document.getElementById('Part_Number').disabled = true;
    var PartNum=document.AddECNumber.Part_Number.value;
    var regularExpression = new RegExp(/[cC][0-9]/); //regular expression to check for a letter C followed by a number
    if(regularExpression.test(PartNum)&& document.AddECNumber.CN_Entry_Initials.value == "N" && document.AddECNumber.Validation_Qty.value == "") { //this will return true if the input passes the regular expression
    alert("Enter a Validation Quantity for this new Custom");
    else if(document.AddECNumber.CN_Entry_Initials.value == "N" && document.AddECNumber.P_Drive_Docs_Initials.value == "i") { //this will return true if the input passes the regular expression
    alert("You cannot select 'i' for docs to be removed for a new part");
    else if(document.AddECNumber.CN_Entry_Initials.value == ""  && document.AddECNumber.SW_Model_Only.value == "0") { //this will return true if the input passes the regular expression
    alert("ECO type required - Select (N)ew or (C)hange for eco line item");
    else if(document.AddECNumber.PNR_BOM_Change_Only.value == "1" && document.AddECNumber.CN_Entry_Initials.value != "C" && (document.AddECNumber.Release_Status_Initials.value == "U"
    || document.AddECNumber.Release_Status_Initials.value == "N")) { //this will return true if the input passes the regular expression
    alert("ECO type required - Select (C)hange for eco line item and Select N for Release Status if PNR/BOM Change Only is yes");
    else if(document.AddECNumber.PNR_BOM_Change_Only.value == "1" && document.AddECNumber.CN_Entry_Initials.value == "C" && document.AddECNumber.Release_Status_Initials.value == "U") { //this will return true if the input passes the regular expression
    alert("ECO type required - Select (C)hange for eco line item and Select N for Release Status if PNR/BOM Change Only is yes");
    else if(document.AddECNumber.Doc_Changes_Only.value == "1" && document.AddECNumber.CN_Entry_Initials.value != "C") { //this will return true if the input passes the regular expression
    alert("ECO type required - Select (C)hange for eco line item since Doc Changes Only is yes");
    <!--- else if (document.AddECNumber.P_Drive_Docs_Initials.value == "i")
    // self.location='eco_search.cfm'; --->
    else
    document.AddECNumber.submit();
    //  End -->
    </script>
    <cfform name="AddECNumber" action="add_new_ec_number_action.cfm" method="post">
    <tr>
    <td class="edit" align="right">Change or new entry:</td>
    <td>
              <select name="CN_Entry_Initials" id="CN_Entry_Initials" onchange="verify();">
                <option value="">Select</option>
    <!--------- POPULATE SELECT BOX WITH P_Drive_Docs_Initials FIELDS --------->
                <CFOUTPUT QUERY="ShowCNEntryInitials">
                <option value="#CN_Entry_Initials#">#CN_Entry_Initials#
                </CFOUTPUT>
              </select>
    </td>
    </tr>
    <tr>
    <td class="edit" align="right" valign="middle">Part Number:<br><h6>(Limit to 25 characters)</h6></td>
    <td><input type="text" name="Part_Number" id="Part_Number" maxlength="25" size="27" disabled="disabled"></td>
    <td><textarea name="Description" cols="30" rows="3"></textarea></td>
    </tr>
    <input type="button" value="Add" onclick="verify();">
    </cfform>
    Thanks.
    Andy

    I don't understand about using the alert box to output the variables. I know that everything was working with alert boxes, etc. before I added the code for the disable text box code. The difference I see is on the disable text box code I use document.getElementById and on the other code I use document.AddECNumber. Could this cause the Add button to not work? If so, how do I change this code to make it work? I tried just changing it be like the document.AddECNumber code, but that didn't work.
    Andy

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

  • Ok-code to scroll down in a table control on batch input

    Hello,
    I'm trying to create a batch input session for transaction VA02 (Change  sales  order) :
    I need to go scroll down in the table control of the screen (item -> Conditions) 3 times to delete the a line; In the batch input (SHDB), i go scroll down by clicking on the scroll bar of the table control, mark the line of the page and delete it.
    The recording show me the ok-code /00 to scroll down (with BDC_CURSOR in the second line), but in the program it don't work, the ok do nothing the 3 times and mark the incorrect line.
    Can anyone tell an idea of what is the correct ok-code to scroll down?
    Thanks in advance
    Alvaro
    PD:  My SAP system is an ECC 6.0

    Hi Alvaro
    One time i had to do similar work for Creation of General Task List in PM module and this is how i did it
                             'X'      'SAPLCMDI'             '3500',
                             ' '      'BDC_CURSOR'          'RIHSTPX-DISP(01)',
                             ' '      'BDC_OKCODE'          '=P+',
                             ' '      'RIHSTPX-IDNRK(01)'    itab-idnrk,
                             ' '      'RIHSTPX-MENGE(01)'    itab-menge,
                             ' '      'RIHSTPX-MEINS(01)'    itab-meins,
                             ' '      'RIHSTPX-DISP(01)'     itab-disp.
    I had to select line 1 hence you can see the position number ( 01 ) in the field name. As you can see based on this positioning you can select the appropriate line and make modifications as you like and also use okcode of  '=P+' to scroll done. Hope this  helps. Reward if appropriate.
    Best Regards
    Sid Arora

  • Grayed out input screen field

    Hi all,
    How can I check the status of a screen field if it is displayed only in some case?
    e.g. an input field in a sales order is grayed out
    Thanks.

    http://www.sapdevelopment.co.uk/reporting/selscr/selscr_loopscreen.htm
    In the event AT SELECTION SCREEN OUTPUT you can do a LOOP AT SCREEN and turn off the ACTIVE indicator. Use the debugger to determine what the name of the field is that you want to hide.
    something like
    LOOP AT SCREEN. 
    IF SCREEN-FIELDNAME = 'the name'. 
      SCREEN-ACTIVE = '0'.   
    MODIFY SCREEN.
    ENDLOOP
    parameters : fname like rlgrap-filename.
          DATA : filename TYPE string.
          DATA : table1 TYPE filetable,
                 rc TYPE i.
    DATA : VAL LIKE DYNPREAD-FIELDVALUE.
    data: dynfields type table of dynpread with header line.
    PARAMETERS : R1 RADIOBUTTON GROUP RG  modif id abc.
    PARAMETERS : R2 RADIOBUTTON GROUP RG modif id def.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR fname.
      CALL METHOD cl_gui_frontend_services=>file_open_dialog
          EXPORTING
            default_filename = '*.*'
          CHANGING
            file_table       = table1
            rc               = rc.
        IF sy-subrc <> 0.
          MESSAGE e000(zXXX) WITH 'Error'.
        ENDIF.
    read table table1 index 1 into fname.
    IF fname cs '.XLS'.             "substitute .csv
    dynfields-fieldname = 'R1'.
    dynfields-fieldvalue = 'X'.
    append dynfields.
    dynfields-fieldname = 'R2'.
    dynfields-fieldvalue = ' '.
    append dynfields.
    elseif fname cs '.DOC'.
    dynfields-fieldname = 'R1'.
    dynfields-fieldvalue = ' '.
    append dynfields.
    dynfields-fieldname = 'R2'.
    dynfields-fieldvalue = 'X'.
    append dynfields.
    ENDIF.
    call function 'DYNP_VALUES_UPDATE'
    exporting
    dyname = sy-cprog
    dynumb = sy-dynnr
    tables
    dynpfields = dynfields
    exceptions
    others = 8.

  • Track mixer controls grayed out

    I have a track (loops) blue color, that the pan knob and volume slider is grayed out and I can make changes on the us. I did do some tweaking in the track info window. Does that knock out the track control onthe track mixer? If so, Can I restore it?

    http://www.thehangtime.com/gb/gbfaq2.html#pandisabled

  • How to delete a row in table control(accepts only input)?

    Hi All,
    I have an empty table control which is only use for data input(this data will then be use to store information to a custom table). I have two buttons, Create Entry and Delete Entry.
    In my screenPainter for the table control, I have the checkbox w/SelColumn ticked and assign variable T_DATA-MARK on it.
    Please see the actual screenshots and code below:
    The aim of the table control is just to accept inputs, so the internal table in the PBO is always empty.
    Table Control Screen Painter ScreenShot and Actual SAP Output:
    http://img710.imageshack.us/img710/4751/tablecontrolrowdelete.jpg
    PBO
    PROCESS BEFORE OUTPUT.
      LOOP WITH CONTROL TC_ID.
        MODULE LOAD_TABLECTRL.
      ENDLOOP.
    module LOAD_TABLECTRL output.
      READ TABLE T_ID_CHECK INTO WA_ID_CHECK INDEX TC_ID-current_line.
      IF SY-SUBRC EQ 0.
        MOVE-CORRESPONDING T_ID_CHECK TO TC_ID.
      ELSE.
          "EXIT FROM STEP-LOOP.
          CLEAR ZQID_CHECK.
      ENDIF.
    PAI
    PROCESS AFTER INPUT.
       LOOP WITH CONTROL TC_ID.
         CHAIN.
          MODULE CHECK_ENTRIES     ON CHAIN-INPUT.     
          MODULE MODIFY_T_ID_CHECK ON CHAIN-INPUT.
          MODULE DELETE_ROW        ON CHAIN-INPUT
         ENDCHAIN.
       ENDLOOP.
    module CHECK_ENTRIES input.
      CASE ok_code.
        WHEN 'DEL'.
            PERFORM F_FILL_ITABCREATE USING ZQID_CHECK-MATNR
                                            ZQID_CHECK-LICHA
                                            ZQID_CHECK-LIFNR.
      ENDCASE.
    endmodule.    
    form F_FILL_ITABCREATE  using    us_zqid_check_matnr LIKE MARA-MATNR
                                     us_zqid_check_licha LIKE MCHA-LICHA
                                     us_zqid_check_lifnr LIKE LFA1-LIFNR.
      MOVE: us_zqid_check_matnr TO WA_ID_CHECK-MATNR,
            us_zqid_check_licha TO WA_ID_CHECK-LICHA,
            us_zqid_check_lifnr TO WA_ID_CHECK-LIFNR.
      APPEND WA_ID_CHECK TO T_ID_CHECK.
      CLEAR WA_ID_CHECK.
    endform.
    module MODIFY_T_ID_CHECK input.
    DATA W_TEMPMARK(1) TYPE C.
      MOVE: T_ID_CHECK-MARK TO W_TEMPMARK,
            W_TEMPMARK TO T_ID_CHECK-MARK.
    MODIFY T_ID_CHECK INDEX SY-TABIX TRANSPORTING MARK.
    endmodule.
    module DELETE_ROW input.
      LOOP AT T_ID_CHECK WHERE MARK EQ 'X'.
        DELETE T_ID_CHECK.
      ENDLOOP.
    endmodule.   
    Edited by: Jaime Cabanban on Jan 7, 2010 8:46 PM

    Debugging the PBO part after deletion will help you know why the rows are getting deleted
    This is the sap doc answer for you question regarding LINE.
    Controls the scroll bar of the table control. At LOOP without internal table, LINES has the initial value zero and must be set in the program so that the scroll bar can be used. At LOOP AT <itab> the system sets this component to the number of rows of the internal table, whenever the table control is processed for the first time. The initialization event of a table control is not determined uniquely. If the corresponding internal table is not fully created at this event, then the LINES variable receives an incorrect value. If LINES in the LOOP loop is smaller as the number of rows of the internal table, then the table control contains blank rows at the end.
    Therefore you should always set the LINES component explicitly in the ABAP program, including at LOOP AT <itab>. In this way you have full control over the dimensions of the vertical scroll bar and so can control the number of rows that are ready for input. Initialization should usually occur at PBO directly before the LOOP statement for the table control.

  • Why are the adjustment layer controls grayed out?

    I have used an adjustment layer in CS5 and when it was first used I could adjust everything.  Now most of the controls have grayed out and whilst I can slide the sliders I can not type figures in nor use the radio buttons!  Why has it locked me out?  It has happened on a few images and with both Colour Balance and Hue and Saturation Layers.
    The image above shows the problem with the top Colour Balance layer where I can not select Shadows or Highlights, nor type in figures for the sliders BUT I can slide them and change the tick on Preserve Luminosity!  The basic image being edited is an 8-bit RGB file. 
    Adding a new adjustment layer (Colour Balance) on top of this one initially showed the same problem but after adding 3 more new adjustment layers suddenly eveything came back to fully working again - even the original problem layer!
    This problem keeps happening with some of my images.  It is happening on all 3 of our photoshop PC's, so it looks like a basic PS bug.  Has anyone else seen this or know why it happens?

    Thanks for the suggestion but that has no effect on them being grayed out or not.  When this problem occurs it does not matter if the Mask is highlighted OR the adjustment itself.
    But thanks anyway.
    I am currently without the issue on the above example having removed the problem by adding additional adjustment layers and removing them again. Even if I now select just the adjustment mask I can still access ALL adjustment controls without problem.
    But it will occur again as it has done over the last few months on a random basis.  Hopefully someone else has seen this occur and found a solution?

  • Why is the volume control grayed out?

    Hi,
    I am attempting to record from a Sony ECM-MS957 mike that is connected to my iBook with a Griffin iMic onto GarageBand3.
    I am following the "Learn to Podcast" tutorials from Apple. With the Sony mic connected the volume control in the track info window is grayed out. If I un-plug the Sony mic and use the built in mic the volume control becomes active.
    I have the iMic selected in the System Preferences and the volume indicator responds to the mic. The iMic is also selected in the GarageBand preferences.
    Can someone explain to me what I am doing wrong here.
    Thanks

    http://www.thehangtime.com/gb/gbfaq2.html#volumesliderdimmed
    (BTW, there's no need to select the iMic in System Prefs) --Hang

  • Visa Control grayed out when executable used with Run-time Engine

    When I run an executable on a machine with only the Run-time Engine the Visa Control for Com Ports is grayed out. I'm guessing that I am missing a library, but do not know which one.

    You need to install the VISA run-time. If you are just using VISA for serial communication, then there is an option on the app builder (Installer Settings>Advanced) for Serial Port Support. This will add a much smaller version of the VISA run-time engine to the installer you create. If you are using GPIB, etc., you have to install the hardware driver (i.e. NI-GPIB) and the full VISA run-time engine.

  • Audio A/V controls grayed out - no audio

    Hello,
    I am on a PC running Windows XP. I have purchased Quicktime PRO and the MPEG plugin.
    MY Question is: My Audio A/V controls are grayed out. When I go to Window->Show A/V Controls my Audio A/V controls are completely grayed out. No audio.
    However, audio is fine on my PC running numerous applications?
    Any ideas,
    Gary Young

    Thanks for responding, no there is no sound from the headphone jack either. It seems like the problem started with the last update installation. A couple of weeks before that I had changed out the memory for a 1g in the upper slot. Everything else working well and memory seems to be happy. Those are the only two things I can think of that have gone on with the system. Internal speakers show up as the choices in sys pref and it switches back and forth from internal to headphone promptly when you insert/remove plug. The tex instr sound card is showing up in the hardware description in about this mac. Most of this detail may be meaningless, but figured there might be a clue in there for someone more clued up than I am.
    Thanks

  • Why is Keyword Controls grayed out?

    What condition(s) cause the Show Keyword Controls under the Windows menu to be grayed out? I've searched the manual and can't seem to find the answer.
    Thanks// Chris

    I seem to remember that it sometimes disappears if the Viewer pane is hidden.
    Ian

  • Why do my Boolean control get a different display when I the controls grayed out?

    I have some Boolean control in a cluster which I grayed out programmatically. If I do that this control's get grey as expected. But if I do that with Boolean which are grouped in a decoration field then the control become a blue style. How can I change the grayed out color?
    Solved!
    Go to Solution.

    Hi Gerd,
    attached a VI with this behavior. The Boolean are on page Battery Test and they are called Save Test and Load Test.
    Attachments:
    grayed out example.vi ‏34 KB

Maybe you are looking for

  • Upgraded MacBook Pro to 10.8.5 but no longer detects any WiFi networks!

    Was working just fine prior to today's upgrade from 10.8.4 to OS X 10.8.5 (12F37) - Serial W8*******71C Wi-Fi: Looking for networks... does not look up any availanble networks home or usual suspects around me. Software Versions:   CoreWLAN:         

  • Bubble chart title

    Hi, i want to split the title into 2 lines for Bubble chart in obiee 11g. how can i do that. Thanks

  • Import XML files from different server

    Hi All, We have successfully used JavaScript to import local XML files and generated the PDF files on InDesign Server CS4. Now, we need to import the XML files which are dynamically generated on the other Server. (Data Managemnt Server). Wondering wh

  • I accidentally removed/deleted the Printer icon from my dock - how can I get it back?

    I accidentally removed/deleted the Printer icon from my dock - how can I get it back?  I've tried dragging and dropping from the Print window - no luck.  I tried to drag from the Systems folder - no luck.   IOS 10.9.4

  • How do you do a save as in OSX 10.8.5?

    I have an iMac with Mountain Lion and there's no Save As feature. I use this all the time and it's frustrating to not have it available. is there a hack to get it back?