Disable column when in edit mode.

Hallo,
I want the user to be able to input data in some columns of my ALV Grid, but not in all. How can I disable some columns for input, when the ALV Grid is in Input/Edit mode?
Thank you,
Manuel

Hi,
Step 1.
Add this feild in ur Internal table.
field_style TYPE lvc_t_styl, "FOR DISABLE
FORM build_layout.
Set layout field for field attributes(i.e. input/output)
gd_layout-no_input          = 'X'.
  gd_layout-cwidth_opt = 'X'.
  gd_layout-stylefname = 'FIELD_STYLE'.
  gd_layout-zebra = 'X'.
  gd_layout-info_fname = 'LINE_COL'.
ENDFORM. " BUILD_LAYOUT
*step-2 * Call this Subroutine before Fieldcatalog........
FORM set_specific_field_attributes .
  DATA ls_stylerow TYPE lvc_s_styl .
  DATA lt_styletab TYPE lvc_t_styl .
clear : ls_stylerow.
clear : wa_final-field_style.
refresh WA_FINAL-FIELD_STYLE[].
Populate style variable (FIELD_STYLE) with style properties
The following code sets it to be disabled(display only)
if child deal Ticket Number Approved or rejected.
  LOOP AT it_final INTO wa_final.
    IF wa_final-apprd = 'X' or wa_final-rejct = 'X'.
        ls_stylerow-fieldname = 'APPRD' .   
        ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
        APPEND ls_stylerow TO wa_final-field_style.
        MODIFY it_final FROM wa_final.   "my Internal table, Replace ur internal table.
        ls_stylerow-fieldname = 'REJCT' .    " ur field name
        ls_stylerow-style = cl_gui_alv_grid=>mc_style_disabled.
        APPEND ls_stylerow TO wa_final-field_style.
        MODIFY it_final FROM wa_final.
   endif.
like this u have to add for all colunms in ur report which u
want to disable.
Note the stylerow appending should be in Alphabetic order
  ENDLOOP.
ENDFORM. " set_specific_field_attributes
Thanx
bgan.

Similar Messages

  • Disable column when in edit mode 2

    Hello experts,
    some time ago I posted the thread: Editable ALV: Check Entries in order to disable an ALV grid column for user input.
    How can I disable the column even if the user adds a new row to the editable ALV Grid control?
    and
    How can I show in the disabled column information that is read from the database during user input? For instance, if the user presses ENTER?
    Thanks for your help! Obviously, points will be rewarded.
    Manuel

    Hi 
    U need to go for styles in alv grid.  U can define a style for each cell in which u can manage editable or disable in that.
    This u can handle in PBO each time conditionally.  See the below code.
    Add one field in your output internal table as below for populating the style.
    CELLTAB    TYPE LVC_T_STYL,   " for input enabling the cell.
    This is a table type.  U need to populate this field in each row with its type to enabled or disabled as below and style for which field in your internal table.  Here it is WERKS.
    CELLTAB-FIELDNAME = 'WERKS'.
    CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_DISABLED.
    or
    CELLTAB-FIELDNAME = 'WERKS'.
    CELLTAB-STYLE = CL_GUI_ALV_GRID=>MC_STYLE_ENABLED
    insert this table in the field CELLTAB of  your internal table.
    in each row.
    And populate the layout with style field name.  Here our field is CELLTAB.
    GS_LAYOUT-STYLEFNAME  = 'CELLTAB'.
    GS_LAYOUT-EDIT        = GC_X.
    This can solve ur problem
    Venkat.

  • Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    Old address still showing in contact after I edit with new address. However, it shows correct address when in edit mode. Is this a new glitch on the iPhone iOS 7?

    1) Is it a video clip? Something you recognize?  To be clear, it's displaying at a point in your exported movie but doesn't appear at all in the sequence?
    2) What are your sequence settings?  Right-click your sequence and choose "Item Properties" to verify.

  • Strange TableView problem when entering editing mode.

    I'm having a problem when entering editing mode in a tableview. What happens is the cell data from the section below is being displayed on top of the last cell in the current section.
    The narrower cell, with the plus sign on the left side, is briefly visible before (a copy of) the cell from below covers it up.
    Has anyone else seen this behavior? I'm really stumped here.
    More info, or how my table isn't standard: Each of the three sections is populated from a list. If the user has previously deleted one of the items from the section, only then is the plus sign shown. Otherwise, only the delete sign is shown. In other words, if there isn't anything to add, then the plus sign with the associated ...add a new X is not shown. This all works correctly. The counters work. The lists of previously deleted items are populated correctly.
    What doesn't work is the last row of the second section being covered by a copy (at full width) of the first row from the third section. The first and third sections both look correct. phew, I hope this makes sense.
    Here is what it looks like:
    Sizes
    - Size 1
    - Size 2
    + ..add a new Size
    Measurements
    - Measurement 1
    - Measurement 2
    Note 1 << this is the problem row
    Notes
    - Note 1
    - Note 2
    + ...add a new Note
    Thanks for any help you can provide.
    Ty

    OK, after more digging I answered my own question.
    The problem was the section order for added and deleting rows in setEditing. I was setting the indexPathForRow in section 2, then, 1, then 0. If I do the update in order 0, 1, then 2 it works fine in 2.0, 2.1, and 2.2.

  • When in Edit mode the site preview only shows 1/3 of the site

    How can I get it to show the full page? This is what I see when I go into Edit mode, and I can't pull the edge of the page across. Being a newbie, I'm sure I've got some setting inproperly filled out, and any help would be greatly appreciated.
    Thanks

    Make sure the paragraph style applied to the chapter title (if that's the first line of each chapter) is tagged. Open the paragraph style and go to Export Tagging and check Split Document (epub only). Then when you export (assuming you are using reflowable) under General>Split Document check Based on Paragraph Style Export Tags. Try it and let us know if this helps.

  • Fonts are getting clipped when in edit mode. How can this be remedied?

    I'm using InDesign for layout. I Export... the layout as a PDF… when I edit text boxes within Acrobat, characters along the left edge are suddenly clipped.
    The text is fine until I attempt to edit the lines of copy. For instance, the leading edge of a “J” gets trimmed off as soon as the box is selected for editing.
    Has anyone else experienced this?

    See:
    *https://support.mozilla.org/kb/latest-firefox-issues#os=mac&browser=fx9

  • How to view NEF (RAW) photos when in editing mode for PSE 9

    When I want to open a NEF photo to edit, all I cannot see the actual photo.  I have to go into another program to view the photos so that I can determine which file name I want to open and edit.

    In the editor, go to Help >Updates and see if it updates camera raw for you.

  • What does the little circle with a line in it mean when in edit mode? how can I get rid of it?

    What does a little circle with a line in it mean when I am trying to edit? how do I get rid of it?

    robynlwitheridge
    What version of Premiere Elements are you using and on what computer operating system is it running?
    From your description "little circle with a line in it", that sound like a symbol when you are trying to do a cannot do operation.
    What exactly are you doing in your edit activities when you see this circle with a line in it? Is it at the end of the mouse cursor?
    Can you post a screenshot of it?
    If my first impression of what this is happens to be correct, then "How do I get rid of it?" answer comes from
    a. defining what you want to do
    and
    b. correcting any mis-steps you are taking in doing that
    We will be watching for your follow up.
    Thanks.
    ATR

  • Contribute shows blank page when in edit mode.

    I have installed Contribute for a friend so that they can update their website.
    We can connect fine - but when we try to edit the page contribute just gives a blank screen (white page)
    this happens on every page of the website that is tried.
    The guy that developed the site uses includes - i.e so there is one main page and the links use an id ref to
    go to the other parts of the site - I'm thinking this may have something to do with it?
    Any ideas on how to resolve?
    Help greatly appreciated.
    The site is - http://www.guardforcesecurity.co.uk

    All current and previous Contribute versions can't handle server side includes.  Contribute CS5 due out at the end of this month supposedly will fix this, says Adobe. I'll reserve judgement till I saw it myself.
    So if your page basically consists of included content only, it's quite possible that you wont see much of anything in Contribute CS4 when you hit Edit Page..

  • How to design ALV GRID with a column in NON-editable Mode and has F4 Help?

    Hello Friends,
      How to code for ALV GRID, which has a column that takes value only from F4 Help and does not accept any other user input?
    Can I have that column non-editable and yet has F4 Help?
    Please help ASAP.

    Hi,
      The examples in the mentioned programs do not suffice my problem.In these programs. They have made the cell non-editable but you cant even input value through F4 Help.
    I want to make a cell non-editable (which can be changed only through F4 Help), which do not accept user input.

  • Any fix for photos being out of focus when in edit mode?

    found several discussions about this but no fix. My photos can be sharp as a tack but as soon as I click on "edit" they go out of focus. Sometimes they are out of focus before I ever click on edit but if I zoom slightly they are in perfect focus. I can view them in "preview" on my macbook and they look great. This is obviously frustrating as I can trying to edit them but can't see exactly what I am working with b/c they are showing up blurry. My macbook is a late 2008 and i have the latest version of everything else.
    Not sure how long this has been going on but I just noticed it today. I thought my new camera (nikon d7000) was the problem, but as soon as I zoomed a bit I saw they were actually in focus to begin with. Thanks!

    So far it appears that the only work around is to zoom a tiny bit  --  report the problem to Apple - iPhoto menu ==> provide iPhoto feedback
    LN

  • Disabling  Edit Mode in Workspace

    In the workspace, the "Edit Mode" is available to all users by default. Is there a way to disable or hide the Edit Mode option to all users?
    thanks

    set this property to false in the workspace.properties file
    # Enables WorkSpace edition mode.
    fuego.workspace.enableEditMode=false

  • Not null and enable or disable  column in tabular form

    Hi,
    Using apex version 4.1 and working on tabular form.
    ACT_COA_SEGMENT_MAS is Master table
    and
    ACT_SEGMENT_VALUES_MAS is detail table
    I have entered 8 rows in master table and PARENT_SEGMENT_ID is column in master table which is null able. If i specified PARENT_SEGMENT_ID with value in master table then in detail table there is column PARENT_ID that should not be null and enable.
    How i can enable or disable column when in master table PARENT_SEGMENT_ID column is null then in detail table PARENT_ID column should disable and vice versa.
    I have created tabular form on Detail table. before insert into the tabular form Check in master table in first entry if PARENT_SEGMENT_ID is not null in first row of master table then in tabular form PARENT_ID should enable and not null able in corresponding to this first row id's lines in tabular form.
    Same should check for second row in master table if PARENT_SEGMENT_ID is not null then entered rows with PARENT_ID into tabular form corresponding to 2nd id in master table should not nullable and column should enable in tabular form.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Jan 9, 2013 9:12 PM

    Vedant,
    You need to create you own manual tabular form and not use the wizard.
    Using APEX_ITEM api you should be build you own form and you will be able to control how you wan to display the rows. (See Link [Apex Item Help|http://docs.oracle.com/cd/E37097_01/doc/doc.42/e35127/apex_item.htm#CACEEEJE] )
    select case when PRIMARY_TABLE_COLUMN is null then APEX_ITEM.DISPLAY_AND_SAVE(3 , DETAIL_COLUMN ) else APEX_ITEM.TEXT(2,detail_column) end "ALIAS" from detail table
    Hope that help.
    Vivek

  • ALV colors in edit mode

    Hello,
    I have an ALV grid with an editable checkbox column.
    Now I have two problems regarding the colors:
    1. as you know, when in edit mode, the colors change. I overrode them with custom colors, but the editable column's cells have still a white margin which I cannot get rid of
    2. Zebra layout does not work anymore. If I color the rows with a zebra pattern manually, I would have to re-do it everytime the table is resorted.
    Can anyone think of a better way to handle coloring in edit mode?
    Thanks a lot.

    hi,
    Chk this link.
    http://www.sapdevelopment.co.uk/reporting/alv/alvgrid_color.htm
    Regards
    Reshma

  • Background color portler header in edit mode

    Hi,
    I'm having a had time searching this forum on the subject so here's my question: when in edit mode on a page (portal 9026) the background of the portlet headers turns into a greenish color.
    How can I change this color/which style is this?
    Thanks,
    Tony

    Hi Peter,
    no, I don't. To clarify, I am referring to the top of the page when in edit mode (where links like Graphical | Layout | List and things like page path, builder, navigator etc. are shown.
    Any suggestions?
    Thanks, Tony

Maybe you are looking for

  • Digit in part number disapears on wrap - help...

    Here is what happens: I type this part number into a new text box, FRDM6881-C100. Then I make the text block smaller, positioning the right side of the text block so that it falls over the "C100" in the part number. The text wraps at FRDM- but on the

  • HELP! Lost User Folder After 10.4.7 Update

    HELP! Lost User Folder After 10.4.7 Update!! I did everything I normally do before an upgrade. Fix premissons, etc etc etc.. Ran the combo updater & rebooted.... Checking my HDD & noticed I lost my "jtmadman" folder in my User folder. Any ideas??? Th

  • Dinamic priority of human task

    hi! this is my question, i have a Human Task Activity in my BPEL process, this task is started with priority 3, i need to change the priority to 2 when passed n minutes without user response, this is posible? i add an onAlarm to the Human Task scope

  • Ratings for multiple iPods

    I have one computer (Windows XP) where I keep all my music for my iPod, and I have two iPods that I sync with this machine; one is mine, one belongs to my son. I want to be able to prevent his rating changes from overwriting my ratings for songs, bec

  • Output from an array

    forgive me for this but i need some guidance. Ive got an array of integers, how can i convert these to a string. I was sure there was a toString function but having checked the API for arrays im in trouble. I tried to set a string variable like you o