WD ALV  read only property

Hi,
Is there a read only property for the cell editor in the ALV table?
(I prefer it to the enabled/disabled) visually.
Many thanks!

CL_SALV_WD_UIE_INPUT_FIELD

Similar Messages

  • 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

  • Problem when I make Read Only Property True

    Dear Members,
    I have an OAF Page on which I have the below two items:
    1/ item1
    2/ item2
    These two items are message input text items and these two items will always have some value.
    To meet one of my requirement, I am making the READ ONLY property of these two items to TRUE in processRequest method of page CO using PPR Concept. After this when I am trying to access the values of these two parameters in processFormRequest method using pageContext.getParameter method I am getting the Null Pointer Exception error.
    Kindly please help me in resolving the above error.
    Note: I have created a transient variable hdr1Trans and attached this variable to the both the items i.e., item1 & item2
    Code in my processRequest method is as follows:_
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject pvo = (OAViewObject)am.findViewObject("pprPVO1");
    pvo.setMaxFetchSize(0);
    Row newRow = pvo.createRow();
    pvo.insertRow(newRow);
    OAViewObject vo = (OAViewObject)am.findViewObject("Headers_VO1");
    String status="";
    status=vo.getCurrentRow().getAttribute("Status").toString();
    if(status!=null && !("".equalsIgnoreCase(status)))
    if(status.equalsIgnoreCase("IN PROCESS"))
    pvo.getCurrentRow().setAttribute("hdr1Trans",Boolean.TRUE);
    else if(status.equalsIgnoreCase("NEW"))
    pvo.getCurrentRow().setAttribute("hdr1Trans",Boolean.FALSE);
    Code in my processFormRequest method is as follows:_
    public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processFormRequest(pageContext, webBean);
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    String headerId ="";
    System.out.println("test-1");
    String item1=pageContext.getParameter("item1").toString();
    String item2=pageContext.getParameter("item2").toString();
    I am getting the NPE error when I am trying to access a record with status value IN PROCESS.
    Once I make the read only property to TRUE for both the above 2 items and after that if iam trying to access their value using pageContext.getParameter Iam getting this error.
    Kindly please help me in resolving this error.
    Many thanks in advance.
    Best Regards,
    Arun Reddy D.

    Arun,
    When you set item as readonly field, it will always show null when you will use pageContext.getParameter("<itemID>").
    If there is a VO attached with these items eg- item1, item2 then you can get the value using below code
    OAViewObject vo = (OAViewObject)am.findViewObject("<Some Vo>");
    String item1=(String) vo.getCurrentRow().getAttribute("<Attribute Name>");Regards,
    Gyan

  • [svn:fx-3.x] 13374: Expose a public read-only property httpService on HTTPOperation.

    Revision: 13374
    Revision: 13374
    Author:   [email protected]
    Date:     2010-01-08 07:43:33 -0800 (Fri, 08 Jan 2010)
    Log Message:
    Expose a public read-only property httpService on HTTPOperation. HTTPOperation.service will still return null as a consequence of an old design decision (HTTPService does not extend AbstractService), but a warning is now logged to inform the user that they should use HTTPOperation.httpService to access the containing service.
    Doc notes: Please explain that if a standard HTTPService is used, the event.target on the ResultEvent from this service is an instance of HTTPOperation, and users can access the originating HTTPService with event.target.httpService. (see bug for use-case)
    Bugs: SDK-24775
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24775
    Modified Paths:
        flex/sdk/branches/3.x/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as

    For a TwoWay binding to work the source property must have public setter and an anonymous object (like the one your select new LINQ query creates) has not.
    But since you are binding to the Text property of TextBlocks you could just remove Mode=TwoWay from the bindings in the ItemTemplate of the ListBox:
    <TextBox Name="txtOrderID" Text="{Binding Path=OrderID,Mode=OneWay}" Margin="5,0,10,0" Width="30"/>
    <TextBlock Text="Order Date:" TextAlignment="Right" Width="80"/>
    <TextBlock Name="txtOrderDate" Text="{Binding Path=OrderDate,StringFormat={}{0:MM/dd/yyyy}}" Margin="5,0,10,0" Width="75"/>
    <TextBlock Text="Required Date:" TextAlignment="Right" Width="80"/>
    <TextBlock Name="txtRequiredDate" Text="{Binding Path=RequiredDate,StringFormat={}{0:MM/dd/yyyy}}" Margin="5,0,10,0" Width="75"/>
    There is no reason to bind TwoWay to a TextBlock.
    Hope that helps.
    Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

  • How to Enable/Disable MessageTextInput Read Only property in PFR?

    Dear All,
    When i click on a submit button i need to enable/disable the Read only property of MessageTextInput item.
    Can any one tell me how to do this?
    I am executing the code
    if (pageContext.getParameter("EnableBT") != null) {
    OAMessageTextInputBean beanEmployeeIdCL = (OAMessageTextInputBean)webBean.findIndexedChildRecursive("EmployeeIdCL");
    beanEmployeeIdCL.setReadOnly(false);
    When i used the above code in Process Form Request method it is showing developer mode exception in run time as we can call the above code only in Process Request form.
    Request to please help regarding this.
    Thanks & Regards,
    CAK

    CAK,
    You need to make use of Partial Page Rendering (PPR) & SPELL. Modifying the bean property in PFR is not supported in OAF.
    Refer - PPR section of Devguide for more.
    Regards
    Gyan

  • Setting read-only property for a RTL inputtext.

    HI,
    I am using JDeveloper version 11.1.2.2.0. In my fusion web application, in the af:inputtext field, if the language is, RTL or LTR the value is displaying according to that. Suppose, if it is English, the value is displaying left to right. If it is, Arabic, the value is displaying from left to right. But if I set the column value is read-only, everything is displaying as left to right. Here is the code of my input text field.
    <af:column sortProperty="#{bindings.PhraseTranslationView3.hints.Description.name}"
    sortable="true"
    headerText="#{bundle['PhraseTranslation.des']}"
    id="c5">
    <af:inputText value="#{row.Description}" id="ot6"
    inlineStyle="border-style:none; overflow:hidden;border-color:rgb(255,255,255);direction:#{row.TextDirection};border-width:thin;height:16px; font-weight:bold; color:rgb(0,0,0); font-size:8.0pt;font-family:Arial Unicode MS;"
    label="Label 6">
    </af:inputText>
    </af:column>
    What is going wrong in this?

    Yeah, I have set it to 'True'. If I set it, the value is not displaying from left to right.
    Here is the code.
    <af:inputText value="#{row.Description}" id="ot6"
    inlineStyle="border-style:none; overflow:hidden;border-color:rgb(255,255,255);direction:#{row.TextDirection};border-width:thin;height:16px; font-weight:bold; color:rgb(0,0,0); font-size:8.0pt;font-family:Arial Unicode MS;"
    label="Label 6"
    styleClass="rtl" readOnly="true">
    </af:inputText>
    Regards,
    Infy

  • 11.5.10 : Modifying read only property of columns

    Hi All,
    I am having an advanced table with 4 columns and all of them are editable [value is entered through an LOV].
    My requirement is that if user enters value in one column then all other columns should become read only [in that row only].
    Can somebody suggest some way out? Should i go for EL or PPR?
    A sample code will be of great help.
    Regards
    Lokesh

    Hi,
    Please correct if im wrong...
    U have impleted 3 lov item in advance table RN lov1,lov2,lov3
    if any one selected remaing 2 should moved to read only....
    for this
    use ppr for this,cretae 3 tr attributes and chnage the read only prpty using SPEL ...
    then in CODE.:
    if("lov1".equals(pageContext.getParameter(SOURCE_PARAM)) && "lovValidate".equals(pageContext.getParameter(EVENT_PARAM)))
    write the code for making remaing 2 lov read only.
    else if("lov2".equals(pageContext.getParameter(SOURCE_PARAM)) && "lovValidate".equals(pageContext.getParameter(EVENT_PARAM)))
    write the code for making remaing 2 lov read only.
    else if("lov3".equals(pageContext.getParameter(SOURCE_PARAM)) && "lovValidate".equals(pageContext.getParameter(EVENT_PARAM)))
    write the code for making remaing 2 lov read only.
    im sure try this u can achive this issue..
    Nani
    Edited by: Nani652595 on May 31, 2010 11:15 PM

  • Dynamical change read only property of  columns based on a profile option

    Hi,
    We are attempting to change a Oracle iProcurement(ShoppingCartPG) which has certain readonly columns by default.
    However, we need to make these columns updateable based on a responsibility level profile option. The code goes something like this.
    if readonly_profile_option = "TRUE"
    {make columnA property = readonly}
    else if readonly_profile_option = "FALSE"
    {make columnA property = updateable}
    I read the guide about switchers and it seems confusing (to me). So if someone can provide an example with some pseudocode that will be helpful.
    Also, can I dynamically add an LOV to column A if readonly is false? Of course the LOV should be disabled if readonly.
    Thanks a lot

    Hi,
    Thanks for the feedback.
    Tapash,
    Switchers definitely don't make sense.
    Raffy,
    Didn't know it was that simple. I always thought that the controller fires--> then the page renders --> then the VO attributes get poulated. Basing my understanding on this flow, I though that the bean properties can only be set in controllers and not in VOs(via SPEL). I'll try it tomorrow.
    Aprreciate your comments on the following.
    Our requirement is to make an Oracle seeded field(SupplierName in iProcurement) updateable and with an LOV . Oracle has seeded it as ReadOnly.
    I have two options.
    1. If I change the readonly property in jedeveloper(I cannot access it via personalization) and add SPEL that would be upgrade 'unsafe' customizing - I think.
    2. So I thought I'll extend the controller, substitute it and use
    messageLOVInputText SupplierNameBean=webbean.findChildRecursive("SupplierName");
    if{profle=not_read_only)
    {SupplierNameBean.setReadOnly(false)};
    else
    {SupplierNameBean.setReadOnly(true)};
    This is more upgrade safe. I have talked to the iProc development team and they are fine with it.

  • WDA error in changing read only property of fields at runtime

    Hello Friends,
    I am creating a custom Web Dynpro ABAP Application for FI module in ECC 6.0
    I need to make a set of fields uneditable/grayed out based on a value in a dropdown list. If the user chooses the other value (out of the 2 values provided) in the dropdown list, the set of fields need to made editable.
    I created a context attribute of type WDY_BOOLEAN and bound this attribute to the "readOnly" property of the aforementioned fields. When defining context binding, I chose the option "Bind Directly to the Selected Attribute".
    I have written the following code in the OnSelect event handler method for the dropdown:
    I read the value in the dropdown which is stored in the variable "lv_payment_instrument". Based on this value, I am changing the value of the context attribute:
    if lv_payment_instrument = 'X'.
      DATA lo_nd_check_fields1 TYPE REF TO if_wd_context_node.
      DATA lo_el_check_fields1 TYPE REF TO if_wd_context_element.
      DATA ls_check_fields1 TYPE wd_this->Element_check_fields.
      DATA lv_editable1 TYPE wd_this->Element_check_fields-editable.
    navigate from <CONTEXT> to <CHECK_FIELDS> via lead selection
      lo_nd_check_fields1 = wd_context->get_child_node( name = wd_this->wdctx_check_fields ).
    @TODO handle non existant child
    IF lo_nd_check_fields IS INITIAL.
    ENDIF.
    get element via lead selection
      lo_el_check_fields1 = lo_nd_check_fields1->get_element( ).
    @TODO handle not set lead selection
      IF lo_el_check_fields1 IS INITIAL.
      ENDIF.
    @TODO fill attribute
    lv_editable = 1.
    set single attribute
      lo_el_check_fields1->set_attribute(
        name =  `EDITABLE`
        value = 'ABAP_FALSE' ).
    elseif lv_payment_instrument = 'Q'.
      DATA lo_nd_check_fields TYPE REF TO if_wd_context_node.
        DATA lo_el_check_fields TYPE REF TO if_wd_context_element.
        DATA ls_check_fields TYPE wd_this->Element_check_fields.
        DATA lv_editable TYPE wd_this->Element_check_fields-editable.
    *navigate from <CONTEXT> to <CHECK_FIELDS> via lead selection
        lo_nd_check_fields = wd_context->get_child_node( name = wd_this->wdctx_check_fields ).
    *@TODO handle non existant child
       IF lo_nd_check_fields IS INITIAL.
       ENDIF.
    *get element via lead selection
        lo_el_check_fields = lo_nd_check_fields->get_element( ).
    *@TODO handle not set lead selection
        IF lo_el_check_fields IS INITIAL.
        ENDIF.
    *@TODO fill attribute
       lv_editable = 1.
    *set single attribute
        lo_el_check_fields->set_attribute(
          name =  `EDITABLE`
          value =  'ABAP_TRUE' ).
    endif.
    When the user chooses either of the 2 values in the dropdown, the set of fields are made uneditable. I am unable to make them editable again.
    I would greatly appreciate your inputs/thoughts on how to rectify this error.
    Regards,
    Arun.

    Hi,
    Create one attribute of type WDY_BOOLEAN , i think u already done.
    First get selected dropdown value into one variable.
    For example  :
    lo_el_segment1 = WDEVENT->GET_CONTEXT_ELEMENT( 'CONTEXT_ELEMENT' ).
    get all declared attributes
    lo_el_segment1->get_static_attributes(
    IMPORTING
    static_attributes = ls_segment1 ).
    now ls_segment1 has selected drop down value.
    DATA : lv_dropdown type string .
    lv_dropdown = ls_segment1-segment.
    If lv_dropdown = 'X'.
    set single attribute
    lo_el_check_fields1->set_attribute(
    name = `EDITABLE`
    value = ABAP_FALSE ). // No Quotes, ABAP_TRUE or false not works use 1 0r 2 or ' ' 'X' .
    elseif lv_dropdown = 'Q'.
    set single attribute
    lo_el_check_fields1->set_attribute(
    name = `EDITABLE`
    value = ABAP_FALSE ).
    else.
    set single attribute
    lo_el_check_fields1->set_attribute(
    name = `EDITABLE`
    value = ABAP_TRUE ).
    Hope it solves..
    cheers,
    Kris.

  • Editable WD ALV - Cell Read Only

    Hi,
    Is there any way for making an individual cell read only for a column-row combination.
    My scenario is :
    I have an editable WD ALV with data. Now , in row(e.g Index 4) entry of the table, I want to make column2 and Column3 read only for that particular entry(row no.- Index) !! Please guide me through if there is any way to do the same.
    Best Regards
    Sid

    You will have to create an extra attribute for each of your column, of type boolean under the same node. Now bind  these attributes to the read only property of your column's cell editors.
    Then pass abap_true/abap_false to make the field editable/reaonly.
    Check this wiki for your reference,
    check this Wiki [https://wiki.sdn.sap.com/wiki/display/WDABAP/How%20to%20edit%20conditionally%20row%20of%20a%20ALV%20table%20in%20Web%20Dynpro%20for%20ABAP]
    Regards,
    Radhika.

  • JS CS3: Is a property read only? How to find out...

    Hello all,
    I found out about the x.reflect.properties object and find it very helpful in my current project.
    Now I know how to find out about the properties of a dynamically given object :)
    But here's the rub: is there any better way to find out if I can actually change one of those properties (i.e. whether it is not "read-only") other than just to try {} catch(){} it?
    Thank you
    Gerald

    [email protected] wrote:
    > Hello all,
    >
    > I found out about the x.reflect.properties object and find it very helpful in my current project.
    >
    > Now I know how to find out about the properties of a dynamically given object :)
    >
    > But here's the rub: is there any better way to find out if I can actually change one of those properties (i.e. whether it is not "read-only") other than just to try {} catch(){} it?
    From the JS Tools Guide
    ReflectionInfo.type (String)
    The type of the reflected element. One of:
    readonly: A Read only property.
    readwrite: A read-write property.
    createonly: A property that is valid only during creation of an
    object.
    method: A method.
    for photoshop scripting solutions of all sorts
    contact: [email protected]

  • Property Read Only

    Hello, I would like to change "contenttype" property for document in my programm, but when I doing this Exception raise:
    ResourceException---com.sapportals.wcm.repository.PropertyReadOnlyException:
    Read-only property: {http://sapportals.com/xmlns/cm}contenttype
    I look over over all folder above this file, and everywear Read Only checkbox is unmarked and everyone group have full rights.
    What is this?
    (EP6.0 SP9)

    Not sure how to define "extended information about the CR Object Model", but there is the following:
    [CR 2008 developer library|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_dg_12_en.chm]
    [API reference|http://help.sap.com/businessobject/product_guides/boexir31/en/crsdk_net_apiRef_12_en.chm]
    [Crystal Reports for Visual Studio 2005 Walkthroughs|https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/2081b4d9-6864-2b10-f49d-918baefc7a23]
    Samples:
    https://wiki.sdn.sap.com/wiki/display/BOBJ/CrystalReportsfor.NETSDK+Samples
    https://wiki.sdn.sap.com/wiki/display/BOBJ/NETRASSDK+Samples
    Re. margins, see the KB [1313082 - Printer Margin Settings set in the Crystal Reports Designer not respected in VS .NET application|http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes_boj/sdn_oss_boj_bi/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333333313333333033383332%7D.do].
    A while back I did a fair bit od playing with this and the code as bellow worked fine:
    ReportDocument myReport = new ReportDocument();
    myReport.Load(....rpt");
    PageMargins myMargin = new PageMargins();
    myMargin = myReport.PrintOptions.PageMargins;
    myMargin.topMargin = 240;
    myMargin.bottomMargin = 240;
    myMargin.rightMargin = 240;
    myMargin.leftMargin = 240;
    myReport.PrintOptions.ApplyPageMargins(myMargin);
    - Ludek

  • Headquarter Error : Property 'DocEntry' of 'Document' is read only

    Hi All,
    I had followed "How to Build & Run a B12B1 Scenario" Documentation and until I created a biz package and activated successfully. But when I try to create a PO in the subsidiary system, It sends ok, but I get the following error in admin console > monitoring > error inbox under the headquarter :
    com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.bizprocessor.BizProcException: BPE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: com.sap.b1i.xcellerator.XcelleratorException: XCE001 Nested exception: java.lang.RuntimeException: Invoke of: GetBusinessObjectFromXML Source: Description: CServiceData::VerifyPropertyWrite failed; Property 'DocEntry' of 'Document' is read only
    Your help is appreciated.
    Hany

    Hi Hany,
    the error message tells you that the field DocEntry is a read-only property. That means this field must not occur in the receiver payload. The fields DocEntry, DocNum etc. will be created automatically by the receiving system.
    Please have a look at the SDK Help (DI Reference) according to your current version. There you will see which fields are read-only.
    Kind regards,
    Marcus

  • Set ALV Cell visibility property

    Hi,
    I would have 2 tables for ALV. One table consists of the data to be bound to the ALV. The other table would have the read only property(boolean) filled for each of the ALV cells.
    I would want to set the property of each ALV cell using the second table. How do i do that?
    Currently i am just testing it for few attributes statically using the below code.
    DATA lo_nd_date_table TYPE REF TO if_wd_context_node.
    DATA lo_el_date_table TYPE REF TO if_wd_context_element.
    DATA: lt_ele_set TYPE wdr_context_element_set.
    navigate from <CONTEXT> to <DATE_TABLE> via lead selection
      lo_nd_date_table = wd_context->get_child_node( name = wd_this->wdctx_date_table ).
    lt_ele_set = lo_nd_date_table->get_elements( ).
      LOOP AT lt_ele_set INTO lo_el_date_table.
          lo_el_date_table->set_attribute_property(
               attribute_name = 'WK02'                                 -
    > Attribute Name (Column Name)
               property       = if_wd_context_element=>e_property-read_only
               value          =  'X' ).
    << Similarly for other attributes>>
    ENDLOOP.
    I have inserted this code at the end. Initially few other properties were set to the cells.
    This seems to be not working.
    Regards,
    Rekha
    Edited by: Rekha Gopinath on Sep 8, 2009 10:40 AM

    Hi Lekha,
    In my case, the columns represents dates. The rows represent projects. So, only those row cells are editable where the project is valid.
    1. I have created READ_ONLY attribute for the date node (table).
    2. I am filling the READ_ONLY to abap_true or abap_false based on the following condition.
       Even if one of the projects is not valid for a date, then READ_ONLY = ABAP_TRUE. This means, even if one cell is set to abap_true, then READ_ONLY is set to abap_true.
    3. I modify the date node and bind it with the READ_ONLY set row wise.
    Loop at the data and set read only
      navigate from <CONTEXT> to <DATE_TABLE> via lead selection
      lo_nd_date_table = wd_context->get_child_node( name = wd_this->wdctx_date_table ).
      CALL METHOD lo_nd_date_table->get_static_attributes_table
        IMPORTING
          table  = lt_date_table    .
      LOOP AT lt_date_table INTO ls_date_table.
        lv_tabix = sy-tabix.
          READ TABLE wd_this->gt_prop INTO ls_prop INDEX lv_tabix.
          IF sy-subrc EQ 0.
            IF ls_prop-wk01 = abap_true OR         
              ls_prop-wk02 = abap_true OR
              ls_prop-wk03 = abap_true OR
              ls_prop-wk04 = abap_true OR
              ls_prop-wk05 = abap_true OR
              ls_prop-wk06 = abap_true OR
              ls_prop-wk07 = abap_true OR
              ls_prop-wk08 = abap_true OR
              ls_prop-wk09 = abap_true OR
              ls_prop-wk10 = abap_true OR
              ls_prop-wk11 = abap_true OR
              ls_prop-wk12 = abap_true OR
              ls_prop-wk13 = abap_true OR
              ls_prop-wk14 = abap_true OR
              ls_prop-wk15 = abap_true.
              ls_date_table-read_only = abap_true.
            ELSE.
              ls_date_table-read_only = abap_false.
            ENDIF.
          ENDIF.
        MODIFY lt_date_table FROM ls_date_table INDEX lv_tabix TRANSPORTING read_only.
      ENDLOOP.
      CALL METHOD lo_nd_date_table->bind_table
        EXPORTING
          new_items            = lt_date_table
          set_initial_elements = abap_true.
    4. I loop through the column reference and use the code mentioned earlier.
              CREATE OBJECT lr_input
                EXPORTING
                  value_fieldname = lv_id.
              lo_column->set_cell_editor( value  = lr_input ).
              lr_input->set_read_only_fieldname( value = 'READ_ONLY' ).
    The expected output is different from the input i had mentioned earlier for Row 1, row 2, Row 3 and row 4. Here, i would get all the rows as non editable except for Row 3.
    I would want to set all columns based on condition.
    Regards,
    Rekha

  • To make table cell as read-only based on some condition

    Hello ABAPers,
    I have a requirement to make the cell in the table of a Web Dynpro component read-only. There are 4 fields in the Table of a view which is mapped to the Context attribute, i.e. function, Number, Description etc. When the value of the Field 'Function' is
    '0000016', I have to make the Number field as READ-ONLY(non-editable).
    As suggested in SDN forums, I have created the sub-node to the main node in Context and added an attribute 'READ_ONLY'. I have made the cardinality as 1:1. I have also created the Supply Function Method(ZREADONLY) for sub-node that I have created and also set the context binding to the Read only property of the field 'Number' in the View Layout.
    PFB the coding I have done in supply function method for setting the read-only attribute for the number field, but it is not working. Could anyone let me know what is the change I have to make this work?
    DATA ls_parent_attributes TYPE wd_this->element_partner_h.
    DATA l_partner LIKE ls_parent_attributes-partner _fct
    Constants c_parent LIKE ls_parent_attributes-partner_fct VALUE '000016'.
    DATA ls_zread_only TYPE wd_this->element_zreadonly
    parent_element->get_static_attributes(
       IMPORTING
              static_attributes = ls_parent_attributes).
    CLEAR l_partner.
    l_partner = ls_parent_attributes-partner_fct.
    IF l_partner = c_partner.
        ls_zread_only-readonly = abap_true.
         node->bind_structure(
         new_item = ls_zread_only
         set_initial_elements = abap_true ).
    ELSE.
        CLEAR ls_zread_only-readonly.
        ls_zread_only-readonly = abap_false.
        node->bind_structure(
         new_item = ls_zread_only
         set_initial_elements = abap_false ).
    ENDIF.
    Thanks for your time!
    Regards,
    M M Jaffer

    Hi,
    the solution is quite simple.
    Bind the property reaonly in the layout editor to the property readonly of the context-attribute.
    Therfore you have to click at the binding button of the celleditor of the property read-only.
    Then you select the  radiobutton in front of Bind to the property of the selected Attribute and choose Property R.
    In you coding you have to fo the following in case you do that after binding the itab to the context:
    node->bind_table( .... ).
    data lt_elements type wdr_context_element_set.
    lt_elements = node->get_elements( ).
    LOOP at lt_elements into element.
    element->get_attribute(
          exporting
            name = 'PARTNERFCT'
          importing
            value = lv_partnerfct
      if lv_partnerfct eq c_partner.
        call method lo_el_position->set_attribute_property
          exporting
            attribute_name = 'PARTNERFCT'
            property       = element->e_property-required
            value            = 'X'.
      else.
        call method lo_el_position->set_attribute_property
          exporting
            attribute_name = 'PARTNERFCT'
            property       = element->e_property-read_only
            value            = ''.
      endif.
    endloop.
    Of corse you have to modify the coding and i didn´t checked the syntax, baut this should help.
    Best regards, Matthias

Maybe you are looking for

  • Indesign, Illustrator and Photoshop Freezing. Arrgggggghhhh!

    Hi All, I've recently installed Fusion 3 and now I'm having a diabolical problem with my Creative Suite. Indesign, Illustrator and Photoshop (though less often the latter) freeze - not just after a sleep etc, but up to every 5 or 10 minutes. I am goi

  • How to Install Solaris for Intel so that it boots off from a boot floppy?

    Hi all, Sorry to bother you with this one (I went through all documentations/manuals and could not find straight answers to following specific questions): I have one hard drive with 1st partition used by Windows XP and a second partition that's a bla

  • Migration of Documents from 3rd party software to SAP DMS

    Dear Experts, We have implemented SAP DMS . Prior to DMS we were using Third party software for creating and storing the documents. There are abot 3000 documents in the third party software, now the challege is how we  must have to migrate the DATA f

  • Attached images send properly, but are received as characters

    Please help with this problem (and many thanks for any suggestions): I've been running 10.5.5 and Mail 3.2 with no problems, and sending images on a daily basis. Today, however, Mail has begun to send images properly (the e-mail in the "Sent" folder

  • IPCC 4.0(5) with Sql 2005 Enterprise DB

    Hello, I currently have IPCC 4.0(5) (no SR) doing with an ODBC connection to a SQL 2000 server.  I am preparing to upgrade the SQL 2000 server to SQL 2005 (only upgrading a SQL server, not touching SQL 2000 running on IPCC). According to the document