ALV: how to disable editable cell and F4 in certain rows only.

I am building a table maintenance front-end with an ALV grid using OOP concept.  Certain fields are editable and also have customised search helps assigned to them in the ALV structure defined for the grid. What I want is where I have identified an entry in my database table as being locked by another user, I want to grey the line out on the ALV grid so that the entry cannot be edited and not have f4 input whilst this entry is locked by another user.
I can grey the line out or disable F4 but not both at the same time.  If I disable the cells of the row concerned using MC_STYLE_DISABLED, the F4 is still active and will change the contents of the cell concerned via the data_changed event method in CL_GUI_ALV_GRID.
I have used MC_STYLE_DISABLED where I have declared  a layout in my table similiar to this:
DATA: BEGIN OF OUTPUT OCCURS 0,
FIELD1,
FIELD2,
STYLE TYPE LVC_T_STYL,
LOCK TYPE C.
END OF OUTPUT.
DATA: ls_celltab TYPE lvc_s_styl.
* Where lock identified, field LOCK set to 'X'.
LOOP AT OUTPUT where lock = 'X'.
ls_celltab-fieldname = 'FIELD1'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_celltab TO OUTPUT-STYLE.
ls_celltab-fieldname = 'FIELD2'.
ls_celltab-style = cl_gui_alv_grid=>mc_style_disabled.
APPEND ls_celltab TO OUTPUT-STYLE.
ENDIF.
append OUTPUT.
I have tried adding MC_STYLE_F4_NO to field LS_CELLTAB-STYLE2 but this does not do both actions atthe same time.
Can anyone suggest what I might be doing wrong or an alternative way around this?
Many thanks
Regards
Larissa

As I have explained, I have fields that are editable AND are F4 enabled.  What I want is for certain rows of the ALV that I do not want any procesing to occur to make all fields in that row not available for input AND not f4 enabled.  I read a lock using a lock object.  If the entry in my ALV matches the key locked in the lock object, I want that line to be in display mode only in the ALV with no F4 help being able to be called.  It happens on the grid frontend when I press enter and have checked if any of my entries in my ALV are already locked by another user. The code is too long to post here. I can disbale the editable fields using MC_STYLE_DISABLED as described above but then the little drop down to enable F4 input is still visible against the field. 
I have got round it by calling the f4 in event HANDLE_ON_F4 to not go via the search help and set er_event_data->m_event_handled = c_yes so that the F4 hit list does not appear, but I want to get rid of the drop down marker in that field in that instance.
Hope this is a little clearer now.
Larissa

Similar Messages

  • How to make editing cell to show up caret and taking keyboard event

    Hello everyone:
    I have the following problem with table editing.
    1. using mouse clicking, the editing cell will have cursor and taking keyboard event.(no problem with it)
    2. just type in data, it will show up in the selected cell, but the editing cell do not have cursor visible and also do not fire the keyboard event.
    I have problem with this one. So how to make editing cell to have caret visible and taking keyboard event.
    Thank you very much!
    --tony                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Hi,
    you should subclass JTable and overwrite two methods.
    1. protected boolean processKeyBinding(javax.swing.KeyStroke ks,
    java.awt.event.KeyEvent e,
    int condition,
    boolean pressed)
    to store the current keyboard event,
    2.public boolean editCellAt(int row,int column,java.util.EventObject e)
    to fix the problem with isCellEditable and curret position and direct the event into proper place.

  • How to Disable edit option in Logon pad

    Hi,
    How to disable edit option in logon pad
    thanks

    Actually if you are looking to disable the "Edit" option so end users cannot change or modify the existing  Logon Pad options systems, you can.
    What version are you using for SAP GUI?
    7.10 has icons to the right which allow changes. (New, edit, etc)
    7.20 has icons across the toolbar at the top. (pencil, paper, trashcan)
    For both versions, Navigate to C:\Program Files\SAP\FrontEnd\SAPgui (Default location)
    In there you will find 2 executeables:
    saplgpad.exe
    saplogon.exe
    If you run the saplogon.exe it will allow edit, delete and modify
    If you run the saplgpad.exe:
    On the 7.10 version the buttons are gone.
    On the 7.20 version, the buttons are grayed out.
    Hope this is what you are looking for.
    Regards,
    Zecher

  • How to disable 'Enable JavaScript' and 'Display PDF in browser' in Adobe Reader 9.1 msi?

    I'd like to how to disable 'Enable JavaScript' and 'Display PDF in browser' in Adobe Reader 9.1 msi.
    Any help would be appreciated.

    NeoChang:
    You can modify the installation package using the Adobe Customization Wizard to toggle the "Display PDF in Browser" but I have not found a setting to disable JavaScript from the Wizard. I have created a script which makes the changes, but it has to be run for every user since that info is stored in the User hive of the Windows registry.
    Disable JavaScript:
    REG ADD "HKCU\SOFTWARE\Adobe\Acrobat Reader\9.0\JSPrefs" /v bEnableJS /d 0 /t REG_DWORD /f
    Disable Browser Integration:
    REG ADD "HKCU\Software\Adobe\Acrobat Reader\9.0\Originals" /v bBrowserIntegration /d 0 /t REG_DWORD /f
    Michael
    ~Simplicity of Character is a Natural Result of Profound Thought~

  • How to disable edit link in interactive report

    Hi,
    How to disable edit(e3.gif image) link interactive report.
    Thanks,
    nr

    Hi Jari,
    Apex Version:3.2
    I created on Interactive report on emp table I have created edit link on empno using Icon5 image.
    Report Attributes>Column Attributes>Column Link.
    I can Hide the Icon5 using following script but I need to disable only. I did not get any disable() method in Jquery.
    Region Id:R812581842900385833
    $(document).ready(function() {
    var viewOnly=document.getElementById('P1_ITEM1').value;
    if(viewOnly == "0")
    $("#R812581842900385833 img").hide();
    thanks,
    Nr
    Edited by: pnr on Mar 13, 2012 6:09 AM

  • How to disable iMac screen and not to put it into sleep?!!!

    I would like to play a movie on my iMac but to watch it on my LCD TV. How to disable iMac screen and not to put it into sleep. PLS have in mind that ctrl+shift+ eject does not work, it makes my iMac screen go  black as well as the  tv screen.So far, i have red many articles concerning this subject, but no one seems to have the right answer. I simply can´t believe that apple did not think of it, as it is nothing new ....
    Thanks

    My brother has eight cats, so your not along. Fortunetly his go outside.
    I have been talking to the people over at macforums and they had some good thoughts. One guy suggested going analog and soldering in a rocker switch on the cable connecting a hub to the computer, turn off switch turns off keyboard and mouse.
    I was prepared to try that but a great idea came along. Arch, you might be interested in this too. Buy a cheap (found one locally for $20) usb kvm switch that takes one usb keyboard and mouse and connects it to two pcs/macs and only connect one of the outs to my system. There is a button to switch between the two, so when I want to disable the keyboard and mouse, I just switch it to pc2, which is not connected to anything.
    Cheap and easy solution. I wish I could of figured out how to do this with software, since there would be no money if it was freeware, but I guess you cant win them all.
    Thanks everyone for chiming in!

  • How to disable the maximize and minimize button of JDialog

    How to disable the maximize and minimize button of JDialog. I have an application which has JDialog box, but in that i should not have maximize and minimize button.If any one come across this problem and got a solution please helpout me.

    Btw, isn't it a little strange to ask thisquestion...
    Actually, I thought it was meant to be sardonic...
    Dialogs don't have those buttons, so the question
    n should be to the OP how did he/she get them in the
    first place? Cuz they aren't using JDialog to do it,
    unless it's something to do with a specific look &
    feel.I somehow missed that, good point :-)

  • How to disable the dashboard and spotlight for the latest Iion OS

    How to disable the dashboard and sportlight function in the latest Mac OS?

    to disable spotlight, open the terminal and type "sudo mdutil -a -i off" without the quotes. ( You will be prompted to enter your admin password.)
    to disable dashboard:
    Open Terminal, and then type this command, followed by the Return key:
    defaults write com.apple.dashboard mcx-disabled -boolean YES
    This tells the system that you no longer wish to have Dashboard available. However, the Dashboard task is actually “owned” by the Dock, so to make your changes take effect, you need to restart the Dock. The easiest way to do that is to type this command into the Terminal (and press Return when done):
    killall Dock
    After the Dock restarts, hit F12 and you’ll see…nothing at all. If you run Activity Monitor, you also won’t find any Dashboard widgets in the list of tasks, even if you had several open when you ran the above command.

  • How to disable external VGA and also enable onboard VGA

    hello,
     my spec is
    cpu corei5 ivybridge
    mis zh77A GA43
    vga hd7770 msi
    i want to know, how to disable external VGA and also enable onboard VGA ??
    and
    i want to ask too, if i disable external VGA In MB, it is my external VGA still consumption power? or i must unplug my external VGA ?
    how much different power consumption between external VGA and onboard VGA on idle time?
    because my computer each night be used for download, i want to save power as i can...
    also there is a eco mode? i want to know about eco mode, how much power can be save under eco mode? on idle time computer
    sorry my bad english

    Well remove the HD7770 and is disabled and doesn't consume any power. You can't enable or disable it the discrete vga when pc is in use. That board does also not support Virtu.
    The possible power saving beacuse of eco mode depends on the individual systems. There is no general value. Just try it. 

  • How do I edit photos on my pdf? it only lets me edit the text

    how do I edit photos on my pdf? it only lets me edit the text

    Hi Caryn,
    Actually Creative Cloud is not my speciality - but I would recommend posting your specific questions to that forum:
    http://forums.adobe.com/community/creative_cloud
    I'm sure our community members would have a better idea if it is right for your project!
    Kind regards, Stacy

  • How to insert page breaks, I would like certain rows to print on a new page  I am making a childrens dictionary and would like to to automactically print each letter on a new page.  is this possible?

    How do I insert a page break on certain rows in a Numbers spreadsheet.
    I am making and always updating a childrens dictonary and would like to be able to hit print and have each letter start on a new page.
    Is this possible?
    Thanks

    AM,
    Set your view to "Print View" and you will see the individual pages. More pages will be added as you drag content away from the existing pages.
    Arrange your content as you would like to see it printed. That's it. What you see is what will print.
    Jerry

  • How do I text back and forth between iPads with only wifi capabilities

    How do I text back and forth between iPads with only wifi capabilities

    Using FaceTime http://support.apple.com/kb/ht4319http://support.apple.com/kb/ht4319
    Troubleshooting FaceTime http://support.apple.com/kb/TS3367http://support.apple.com/kb/TS3367
    The Complete Guide to FaceTime + iMessage: Setup, Use, and Troubleshooting
    http://tinyurl.com/a7odey8http://tinyurl.com/a7odey8
    Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/TS4268http://support.apple.com/kb/TS4268
    iOS: FaceTime is 'Unable to verify email because it is in use'
    http://support.apple.com/kb/TS3510http://support.apple.com/kb/TS3510
    Using FaceTime and iMessage behind a firewall
    http://support.apple.com/kb/HT4245http://support.apple.com/kb/HT4245
    iOS: About Messages
    http://support.apple.com/kb/HT3529http://support.apple.com/kb/HT3529
    Set up iMessage
    http://www.apple.com/ca/ios/messages/http://www.apple.com/ca/ios/messages/
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage
    http://support.apple.com/kb/HT5538http://support.apple.com/kb/HT5538
    How to Set Up & Use iMessage on iPhone, iPad, & iPod touch with iOS
    http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/http://osxdaily.com/2011/10/18/set-up-imessage-on-iphone-ipad-ipod-touch-with-io s-5/
    Set Up Alert Sounds
    http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3http://www.quepublishing.com/articles/article.aspx?p=1873027&seqNum=3
    Extra FaceTime IDs
    http://tinyurl.com/k683gr4http://tinyurl.com/k683gr4
    Troubleshooting Messages
    http://support.apple.com/kb/TS2755http://support.apple.com/kb/TS2755
    Troubleshooting iMessage Issues: Some Useful Tips You Should Try
    http://www.igeeksblog.com/troubleshooting-imessage-issues/http://www.igeeksblog.com/troubleshooting-imessage-issues/
    Setting Up Multiple iOS Devices for iMessage and Facetime
    http://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htmhttp://macmost.com/setting-up-multiple-ios-devices-for-messages-and-facetime.htm l
    FaceTime and iMessage not accepting Apple ID password
    http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/http://www.ilounge.com/index.php/articles/comments/facetime-and-imessage-not-acc epting-apple-id-password/
    Fix Can’t Sign Into FaceTime or iMessage iOS 7
    http://ipadtutr.com/fix-login-facetime-imessage-ios-7/http://ipadtutr.com/fix-login-facetime-imessage-ios-7/
    FaceTime, Game Center, Messages: Troubleshooting sign in issues
    http://support.apple.com/kb/TS3970http://support.apple.com/kb/TS3970
    Unable to use FaceTime and iMessage with my apple ID
    https://discussions.apple.com/thread/4649373?tstart=90https://discussions.apple.com/thread/4649373?tstart=90
    How to Block Someone on FaceTime
    http://www.ehow.com/how_10033185_block-someone-facetime.htmlhttp://www.ehow.com/how_10033185_block-someone-facetime.html
    My Facetime Doesn't Ring
    https://discussions.apple.com/message/19087457#19087457https://discussions.apple.com/message/19087457#19087457
    How to watch FaceTime calls on the big screen with Apple TV
    http://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetimehttp://www.imore.com/daily-tip-ios-5-airplay-mirroring-facetime
    Send an iMessage as a Text Message Instead with a Quick Tap & Hold
    http://osxdaily.com/2012/11/18/send-imessage-as-text-message/http://osxdaily.com/2012/11/18/send-imessage-as-text-message/
    To send messages to non-Apple devices, check out the TextFree app https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8https://itunes.apple.com/us/app/text-free-textfree-sms-real/id399355755?mt=8
    How to Send SMS from iPad
    http://www.iskysoft.com/apple-ipad/send-sms-from-ipad.htmlhttp://www.iskysoft.com/apple-ipad/send-sms-from-ipad.html
    How to Receive SMS Messages on an iPad
    http://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.htmlhttp://yourbusiness.azcentral.com/receive-sms-messages-ipad-16776.html
    Apps for Texting http://appadvice.com/appguides/show/apps-for-textinghttp://appadvice.com/appguides/show/apps-for-texting
    You can check the status of the FaceTime/iMessage servers at this link.
    http://www.apple.com/support/systemstatus/http://www.apple.com/support/systemstatus/
     Cheers, Tom

  • How do you change the background color of certain rows in a Datagrid?

    How do you change the background color of certain rows in a
    Datagrid?

    Hee is a great example:
    http://www.cflex.net/showfiledetails.cfm?ChannelID=1&Object=File&objectID=487
    Tracy

  • How to disable the cell from being edited

    how to make a column in a jtable ineditable .i.e when i click on a column in a table the cell is highlighted and the caret is show .
    due to this i am unable to use the double click on the left button coz as soon as i click once the left button the cell becomes editable and the caret appears.
    i wanna make it in editable / disable the editable option of the cell can anyone tell me how

    That's no problem if you're using DefaultTreeModel, you just rewrite the isCellEditable(col,row) function.
    For example here, you can only edit cells of the first column (but you can test each cell separately if you really want ;-) ):
    public boolean isCellEditable(int paramRow, int paramCol)
    if (paramCol == 0)
    return true;     
    return false;

  • How to make editable cell in ALV TREE?

    Hi all,
    I have a problem to make the cell in item row (I mean not  the cell in hierarchy columns and not in the node row) in ALV tree editable.
    I know to make it in "normal" ALV, but my ALV is type class: cl_gui_alv_tree and the nodes are calculated in a sum.Can anyone help me to set the cell editable in ALV tree?
    Thank you a lot!
    Best regards,
    Danijela Zivanovic
    Message was edited by: Danijela Zivanovic

    HI,
    To make a column editable, it will be sufficient to set the field “<b>EDIT</b>” in the field catalog. The ALV Grid perceives if there are some editable fields and adds buttons for editing purposes. If you do not need these new buttons
    <u><i>if you want it in the Classes</i></u>
    For this procedure; add the name of the field to the field “FIELDNAME”, and pass “cl_gui_alv_grid=>mc_style_enabled” to make a field editable and “cl_gui_alv_grid=>mc_style_disabled” to make a field non-editable,
    <b>Example:</b>
    FORM adjust_editables USING pt_list LIKE gt_list[] .
    DATA ls_listrow LIKE LINE OF pt_list .
    DATA ls_stylerow TYPE lvc_s_styl .
    DATA lt_styletab TYPE lvc_t_styl .
    LOOP AT pt_list INTO ls_listrow .
    IF ls_listrow-carrid = 'XY' .
    ls_stylerow-fieldname = 'SEATSMAX' .
    ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled . APPEND ls_stylerow TO lt_styletab .
    ENDIF .
    IF ls_listrow-connid = '02' .
    ls_stylerow-fieldname = 'PLANETYPE' .
    ls_stylerow-style = cl_gui_alv_grid=>mc_style_enabled . APPEND ls_stylerow TO lt_styletab .
    ENDIF .
    INSERT LINES OF lt_styletab INTO ls_listrow-cellstyles . MODIFY pt_list FROM ls_listrow .
    ENDLOOP .
    ENDFORM
    Thanks
    Sudheer

Maybe you are looking for

  • How to delete pictures from ipod touch

    just want to know how can i delete photos from my itouch? and also how i can select what photos to be saved from my computer to ipod touch when it started to synchronize all the files.

  • Error when exporting to Excel for SharePoint 2010 List

    We have few users who are getting the following error message when they try to export to Excel from the SharePoint list: "An operation that uses the database driver could not be completed. If the driver is a Microsoft driver, make sure the driver fil

  • Tool to export and import high volume data from/to Oracle and MS Excel

    We are using certain reports (developed in XLS and CSV) to extract more than 500K to 1M records in single report. There around 1000 reports generated daily. The business users review those reports and apply certain rules to identify exceptions then t

  • In Dreamweaver CS5 How do I insert a PDF?

    I am designing a site using Dreamweaver CS5 & trying to insert a PDF.  I use a MacIntosh computer, OS 10.6.8, my boss uses a PC.  We thought turning some of his files into PDF's would help since I can't find converters to convert his files into compa

  • Goldengate replicat slow to process sequence.nextval

    GGS replicat takes 45 minutes to process this statement. Tracing the replicat session shows that replicat is continuously altering the sequence on the target. The statement completes on the source in less than 1 minute. Any ideas on how I can speed t