How to set the read only property for dynamic ALV column

Hi All,
I have built one dynamiv ALV and I have one name column inside that ALV for which I have to set read only property based on two column fields that exist in the same ALV,say IS_SP and IS_CORP of type boolean.
If any one of the flag is 'X',i have to make that name column as display only and
If both flag are not set,it should be displayed as ediatable column.
I have written one method as INIT_ALV which gets called when ALV is loaded.
Code is as  follows:
  lr_column_settings ?= wd_this->alv_all_roles.
  lt_columns = lr_column_settings->get_columns( ).
LOOP AT lt_columns INTO ls_column.
CASE ls_column-id.
   WHEN <NAMECOLUMN>. "name column which should be editable/display
Create Input Field
        CREATE OBJECT lr_uie_input_field_ro
          EXPORTING
            value_fieldname = ls_column-id.
     ls_column-r_column->set_cell_editor( lr_uie_input_field_ro ).
    After this,I have to set the read only property based on IS_SP and IS_CORP values,
          CALL METHOD lr_uie_input_field_ro->set_read_only_fieldname
          EXPORTING
            *value = 'IS_SP' or 'IS_CORP'
ENDLOOP.
I dont want to use cell variants also.
Help me to achieve this.
Thanks and Regards,
Divya

Divya - I have done it in the past following these documents. Please read it and try it it will work.
Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
thanks!
Jason PV

Similar Messages

  • Forms 10g : How to set the Database Item property for an item dynamically ?

    Hello all,
    I have a requirement where I need to set the database item property of an item to TRUE/FALSE
    dynamically at runtime based on certain conditions.
    Earlier, in forms 6i I've used,
    Set_Item_Property (<item_name>, DATABASE_ITEM, PROPERTY_TRUE);
    But in Forms 10g it doesn't recognize this Database_Item property and gives a compilation error.
    Have I overlooked something or has this property become obsolete in Forms 10g ?
    If obsoleted what is the replacement property ?
    Regards,
    Sam

    Some options:
    1. Create a database-view, including the "real" column in databases where it exists and a "dummy"-column in databases where it doesn't exist.
    If that's not possible,
    2. set database="No" for your item and
    -- create a POST-QUERY-trigger which reads the data for that column from the database, if the column exists, and
    -- create a ON-UPDATE-trigger which includes an
    UPDATE_RECORD;
    UPDATE THETABLE SET
      THECOLUMN=thevalue
    WHERE  ROWID=:THEBLOCK.ROWID;3. Base your block on either a select-from-clause, a ref-cursor or a procedure to adjust he query-part,, for saving use a procedure.

  • How to set the Data Synchronisation mode for ADF BC component?

    Hi All,
    How to set the Data Synchronisation mode for ADF BC component
    Thanks
    Raghavendra

    Can you clarify what you mean by the data synchronization mode?
    If you mean the Sync Mode, then in 10.1.3 you set this property by:
    1. Selecting your DataBindings.cpx file
    2. Expanding the "Data Control Usages" section in the structure window
    3. Selecting the ADFBC-based data control
    4. Setting the "syncMode" property in the property inspector.

  • Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?

    Programming help - how to get the read-only state of PDF file is windows explorer preview is ON?
    I'm developing an application where a file is need to be saved as pdf. But, if there is already a pdf file with same name in the specified directory, I wish to overwrite it. And in the overwrite case, read-only files should not be overwritten. If the duplicate(old) file is opened in windows (Win7) explorer preview, it is write protected. So, it should not be overwritten. I tried to get the '
    FILE_ATTRIBUTE_READONLY' using MS API 'GetFileAttributes', but it didn't succeed. How Adobe marks the file as read-only for preview? Do I need to check some other attribute of the file?
    Thanks!

    Divya - I have done it in the past following these documents. Please read it and try it it will work.
    Please read it in the following order since both are a continuation documents for the same purpose (it also contains how to change colors of row dynamically but I didnt do that part I just did the read_only part as your requirement) 
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f0625002-596c-2b10-46af-91cb31b71393
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d0155eb5-b6ce-2b10-3195-d9704982d69b?quicklink=index&overridelayout=true
    thanks!
    Jason PV

  • How to set the short cut key for buttons

    Hi
    I dont know how to set the short cut keys for the button...can u pls help me out

    Do you mean a short cut key for buttons at client side (web browser)? If yes, you could do it with JavaScript~~~ ^o^

  • How to set the default settment rule for the same kind project.

    hi experts:
       the project of the same kind of the project profile have the same settment rule to one account (G/L).
    how to set the default settment rule for the project of  this kind of the project profile.
    regards

    Hi,
      You need to define the settlement profile and allocation structure.
    next you need to define the  Strategy for settlement rule.
    navigation-PS> costs> automatic and periodic allocations> settlement> Settlement rule for WBS
    --> Define strategy for settlement rule.
    Select the strategy and click on settings. in that new entries, check the Acc Assg element, enter Settlement profile and mention accass category as reposnsible cost center.
    Save this transaction.
    Now create a project assgin responsible costcenter for the WBS element in the project buider and save the transaction.
    Now run CJB2 transaction for the project, settlement rule will generated automatically.
    even you can configure the same for profitability segment.
    Rgds
    Sudhir Reddy

  • How to set the number of rings for the agent phone rings before it get the not prepared state

    hi, how to set the number of rings for the agent phone rings?  before it get the not prepared state.
    thanks

    The following assumes that you are using ICM with an IPIVR etc (not using CVP), as the answer is different for CVP
    What you are looking for is called "Ring no answer time".  It is set in the Agent Desk Setting List tool.
    Regards,
    Kevin

  • How to set the default maximum size for java's heap?

    Hi!
    Im trying to set the default max size for the java heap - but not from the command line.
    I would like to set it higher as default on my computer.. how can I do that?
    thanks!

    >
    ...You may increase the memory heap only when you're launching a new JVM.>Much like IWantToBeBig does.
    OTOH, it this is an app. with a GUI, it is easier to launch it using webstart, and request extra memory in the JNLP descriptor (the webstart launch file).

  • How to set the number of sockets for batch processing at runtime?

    Hello all,
    I need to change the execution model at runtime. I have achieved this by setting the 'ModelPath' property of the sequence file at runtime. When I set the sequence file model as batchmodel, i need to set the number of test sockets also dynamically. How can this be done? Once i set the number of sockets, i would also have to set the UUT serial number for each socket. Please help me out in solving this.
    Thanks and Regards
    Madhu Srinivasan.

    Hi Madhu,
        You can do this by inserting a sequence file callback into your main sequence and choose the ModelOptions callback. You can then use the expression step to set the "Parameters.ModelOptions.NumTestSockets" value to whatever you want. If you then use the Test UUTs execution entry point you will be prompted for serial numbers automatically. You could also use this same procedure but alter the ModelOptions callback in the process model directly, either way works just as well but I think that using a sequence file callback gives a bit more flexibility in the system.
    Hope this helps,
       Nick

  • How to set the disable,visible property in declarative components.

    We have used one declarative component. It consists of 5 buttons (add,delete,save,delete,print). In all of our pages, this declarative component is used. We could bind methods and was able to use each pages seperately (by linking the methods in the backing bean)
    But for implementing the DISABLE,VISIBLE properties, we have added the attributes for this and refered this to the corresponding disable and visible property of the button. In the page all these properties where reflected. But at the runtime these buttons are not coming.
    Can anyone advise how can we set the disable,visible property in declarative components.

    Hi vikram ,
    i hvnt initialized the properties ,
    in my declarative component i have one button say Save button and i want to config 2 properties Disable and Visible
    i added two attributes ( java.lang.Boolean ) say disablr_btn ,*visible_btn* and mapped wth the Save button Properties Disabled and Visible using expressions
    Now the button is invisible while running the page.
    if i remove the mapping from properties Disable and visible , the button is visible
    should i init the properties in faces config , i dnt knw hw to init the properties
    pls advice

  • How to set the same General settings for all users

    Hi Experts,
    How can i set the same general settings for all users e.g. marking the checkbox "Display header" to true for all users? General settings are possible under User Settings Button.
    Regards,
    Arti.

    Hi Arti!
    You can default user settings in a PFCG role, in the "personalization" tab.
    If you have a PFCG role that is common to all your users, you can set the default values here.
    However it does not prevent them to change these settings later, except if you modify the "user settings" fields properties in cProjects application.
    Matthias

  • How to disable the 'Read Only' notification on an Access document when it is opened from within a document library (SP 2010)

    Hello, 
    OK, so I am currently having issues with opening MS Access documents from SP 2010. I have taken an existing database and uploaded it into a document library. Now, when I open this document I get the prompt to open it in either 'Read Only' or 'Edit'. 
    When I select 'Read Only' I can view the document, however I get the 'Read Only - Save As' notification when the document opens up. I have configured the document both from the source (on the original file) and from within SP to disable notifications - (from
    within the Trusted Options selection) 
    Deleted the document and uploaded it again, and the 'yellow bar' notification is still appearing. 
    I want to disable the 'Save As' function, or even hide this when the document is opened. Is this at all possible?? 

    Hi Terry,
    According to your description, my understanding is that you don’t want the yollow bar notification to display when you open Access documents.
    This issue seems to be about the client application. Please compare the followings with the things that you did:
     1.Open the documents
     2.Click File->Options->Trust Center->Trust Center Settings
     3.Click Protected View, unselect ‘Enable Protected View for originating from the Internet’
     4.Click Message Bar, select ‘Never show information about blocked content’
     5.Click Macro Settings, select ‘Disable all macros without notification’
    In addition, as this issue is about Office, I commend you create a new thread in Office forum, more experts will assist you with this issue.
    Office forum:
    http://social.technet.microsoft.com/Forums/en-US/home?category=officeitpro
    I hope this helps.
    Thanks,
    Wendy
    Wendy Li
    TechNet Community Support

  • How to set the default context value for flexfield in OAFramework pages

    Hi,
    I have a page which contains a contexxt value field i.e Flexfields
    To select the context value we have to select the value from drop down
    So Here we want to display the context value immediately when the page is called
    How to set the default valu in this case
    Regards,
    Krishna

    You can set the Attribute category view attribute to the Flexfield context value and call prepareforRendering in the flex bean. Check the dev guide for details.
    Regards
    Sumit

  • Please help me :How to set the width and height for my View page "test.htm"

    Hi,
        I have controller class. When i call the view[test.htm]from this controller class ,i am getting the view with output tableview..it is fine.
    My requirement:
                 the output view window is showing full browser window. I want the view output like showModeldialog. I want to set the width and height for the output view window. How is possible?
                 or
    i want to call the test.view in the window.showModelDialog..
    Please help me .. Urgent requirement.

    Yes you can set the width & Height of the view as follows..
    <div style="width:580px; height:750px; margin-top:15px; overflow:auto;">
    <htmb:form......>
    </htmlb:form>
    </div>
    <i>*Reward each useful answer</i>
    Raja T

  • How to set the height of a textarea dynamically

    Hi,
    I have been trying to set the ui.textarea's height dynamically and I am not able to do it. This is what I am doing.
    <ui:textArea binding="#{assignment$EditResult.textArea2}" id="textArea2" style="height: 90%" text="#{currentRow.value['comments']}"/>
    The height is being ignored and it is set to the default size. How can I set the height of this component to fit to the size of its cell, which is dynamic?
    Thanks for your help.

    Thank you for your help! It worked for something like this:
    getTextArea2().setStyle("color : red");
    but this does not work still.
    getTextArea2().setStyle("height: 90%");
    I think it still does not know the size of the cell at this point yet. But this is a good tip, thanks anyway!
    ~Kazzie

Maybe you are looking for