Make a Field editable in webdynpro

Hi experts,
    i have one webdynpro page ,which contains these 3 fields.
2 number fields and one date field....
  2 number fields up to 2 decimal. Should be editable if user click on "modify" button. otherwise read-only.
Date field. Should always be read-only. once user click on the "save" button, this field should be automatically set to the current date (user or system).
can anybody please give the logic for modify action and save action....
Thanks& regards,
Praveena.

Hi Praveena,
Every innput field has a property called ENABLED.
You can bind this property to some attribute in the context (of type wdy_boolean).
and on the SAVE action yoh can set the context attribute to TRUE/FALSE as per requirement.
and for Current Date
  DATA lo_nd_node1 TYPE REF TO if_wd_context_node.
  DATA lo_el_node1 TYPE REF TO if_wd_context_element.
  lo_nd_node1 = wd_context->get_child_node( name = wd_this->wdctx_node1 ).
  lo_el_node1 = lo_nd_node1->get_element( ).
  lo_el_node1->set_attribute(
  name =  `DATE`
  value = sy-datum ).
Where node 1 is the node in the CONTEXT.
DATE is the attribute in the node1 of type DATUM.
write the above code on SAVE action.
Hope this will help you.
Thanks & Regards,
Arvind

Similar Messages

  • After Showing ERROR message make the field editable in subscreen.

    Hello Experts,
    I have a requirment where i have added a subscreen to the standard screen of ME31K for creating the contract. In my Subcreen i have my custom screen fields that i'm updating in EKKO table through include structure.
    Now if user forget to fill the details in my custom fields in the subscreen then i'm giving the error message prompting the user to fill the value in fields.
    But the problem is the screen is locked there itself i want to make the field editable so that user can enter some value in the fields. I can not use the stuatus or information message here because doing this i will get the item overview screen which should not come as i want to restrict the user to header details only and fill all the custom fields.
    Please provide me with your helpful responses.
    Thnaks,
    Naveen

    Hi Naveen,
    Sorry for the delay.
    The code which I gave for popup, i hope its being shown in an IF . . . ENDIF.
    So in that condition u can add the following :
    IF < ur condition >
       < Call message FMs >
        SET SCREEN SY-DYNNR.   "this would set screen to current screen which is 0201
        EXIT.
    ENDIF.
    Other than this if you like you can set some parameters in the PAI of this screen which redirect to current screen based on some conditions.
    So u can manually set OK-CODE and CALFCODE as SPACE, but i dont know how much this can impact the process.
    So please follow the above code.
    This is available in
    Main Program     SAPMM06E
    Source code of   MM06EF0F_FCODE_CALL
    IF OK-CODE EQ SPACE AND
       CALFCODE EQ SPACE.
      SET SCREEN SY-DYNNR.
      EXIT.
    ENDIF.
    Hope this helps.
    Regards,
    Ateet

  • Make "Company" Field editable

    Hello Experts,
    We are using E-Sourcing 5.1 with most of the out-of-the-box functionality. When creating an Auction, header section contains field "Company". This field appears as read only, and populates automatically based on the company defined in the user profile.
    I tried making this field editable by means of page customizing (UI ID: doc.auction.multi.universal.auctionevent.ui.buyside.default), but even when I declare field COMPANY as Editable = YES, the change is not reflected in the UI.
    Any ideas on how to make this field editable so end-users can select another company code besides the one specified in their profile? Your help is appreciated. Thanks!

    Hi Gilberto
    Unfortunately it is not possible to make the company field editable. Workaround could be to hide the standard COMPANY field in page customization and create a new extension definition lets say "Company" with data type: Object Refrence and choose 'Company' as the object reference type.
    Hope this would meet your requirement.
    Regards
    Mudit Saini

  • Table Control: make a field editable or not based on another field value

    HI All,
    How to make a column field input enabled or disabled based on another field value in a Table Control.
    Here's the scenario:
    I have a table control with two columns, KTOKK and LIFNR. Now for certain KTOKK, the LIFNR field should be editable and for certain KTOKK it should not be editable.
    Eg.,  KTOKK = 0001 =>  LIFNR field is not editable.
            KTOKK = ZKTO => LIFNR field is editable.
    But these fields are in a table control.
    Please advice.
    Thanks in advance,
    RK.

    Hi RK,
    Go through the below link..
    how to make special field editable or diseditable in table control?
    the code mentioned in the link.. just add ur conditions in the module....
    Best Regards,
    Brijesh

  • Make a field editable in Billing document

    I have a billing document. If i click 'Selection list' a screen will get displayed displaying the open quantity and some other fields. I want to make the open quantity field as editable. How ?

    Hi,
    If you are using the standard billing document then we need to check with the exit.
    If your are using a report then using ALV we can make a field as editable.
    Or we can use the keyword "FORMAT INPUT ON".
    Please elaborate your query.
    Reward if helpful.
    Best Wishes,
    Chandralekha

  • How to make a field editable, this field is dependent on a checkbox.

    Hi Frens,
    On the selection-screen of a report, i have a field and a checkbox in one block only.I want to make this field non-editable if the checbox is unchecked and if the checkbox is checked than, the field shouls be editable.
    Currently, it is happening but when i press enter after checking or unchecking the checkbox.
    How can we do it without pressing enter.
    Thanks and regards.

    Hi Anshul
    first describe your parameter like :
    PARAMETERS p_chkb AS CHECKBOX USER-COMMAND chkb.
    when user clicks on this checkbox
    the event  AT SELECTION-SCREEN OUTPUT. will be triggered without touching enter button.
    Than write a code like this to make P_OTHER parameter editable or non-editable :
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF screen-name EQ 'P_OTHER'.
          IF p_chkb EQ 'X'.
            screen-input = '1''.
          ELSE.
            screen-input = '0''.
          ENDIF.
          MODIFY SCREEN.
        ENDIF.
      ENDLOOP.
    Hope it helps,
    Bulent
    Edited by: Bulent Balci on Jul 6, 2010 5:23 PM

  • Make Currency field editable in F-43

    Hi,
    My requiremnet is to make currency field in f-43 transaction code to editable. For this I made a entry in OB32 transaction. But after this , I don;t see any changes in f-43.
    Please advice if this is the right way . Or should I need to use any BTE's for this?
    Thanks

    I dont think this is a technical issue.Mostly configuration should make it editable.
    Check OBC4 and OB41 transactions with your functional conultant.

  • TO MAKE SINGLE ROW EDITABLE IN WEBDYNPRO ABAP

    HI
    I WANT TO MAKE A SINGLE ROW EDITABLE IN MY TABLE CONTROL IS IT POSSIBLE?
    IF YES THEN HOW?
    I KNOW ABOUT  READ ONLY FIELDS BUT I DO NOT KNOW HOW TO UTILIZE  IT

    Hi Rajan,
    Which particular row of the table do you want to set as editable? That would be important for formulating the way in which you should code.
    Suppose you are displaying the data of MARA using a table and want to make editable only rows in which the unit of measurement is equal to "CCM" then you can proceed as below.
    Create a context node (say MARA) with desired fields as attributes. (Cardinality 0..n, Selection 0..1, Initialize lead selection) In addition create an attribute (say READONLY) of type WDY_BOOLEAN under the same node (MARA) which you are using for binding to the table.
    First of all take all the cell editors of the table as type, "InputField" to make the entire table as editable. Then go to the each cell editor (TABLE_MATNR_EDITOR, TABLE_ERSDA_EDITOR,...) and bind the readOnly property of the cell to the attribute created earlier. (READONLY)
    Below is the coding in WDDOINIT through which you set the desired functionality
    METHOD wddoinit .
      DATA: lv_node TYPE REF TO if_wd_context_node,
            lt_mara TYPE ig_componentcontroller=>elements_mara,
            wa_mara TYPE ig_componentcontroller=>element_mara.
      SELECT matnr
             ersda
             ernam
             mtart
             matkl
             meins FROM mara INTO CORRESPONDING FIELDS OF TABLE lt_mara
                                     WHERE meins = 'GM' OR meins = 'CCM'.
      SORT lt_mara BY meins.
      lv_node = wd_context->get_child_node( name = wd_this->wdctx_mara ).
      LOOP AT lt_mara INTO wa_mara.
        IF wa_mara-meins = 'GM'.
          wa_mara-readonly = 'X'.
        ELSE.
          wa_mara-readonly = ' '.
        ENDIF.
        MODIFY lt_mara FROM wa_mara TRANSPORTING readonly.
      ENDLOOP.
      lv_node->bind_table( new_items = lt_mara ).
    ENDMETHOD.
    Regards,
    Uday

  • How to make a field editable again after displaying error msg (validation)

    Dear All,
    In dialog programming, I have written a validation on a text field that it should not be left blank by the user, but after displaying the message the field becomes gray (non-editable). How can I make it editable once again after displaying the error message.
    My code is as following:
    ***INCLUDE MZFBPS1_SAVE_DATAF01 .
    *&      Form  save_data
          text
    -->  p1        text
    <--  p2        text
    FORM save_data .
    ****************Check For Empty Fields Start
    if ZFBPS_GATE_IN-truck_code is INITIAL
    or ZFBPS_GATE_IN-truck_no is INITIAL
    or ZFBPS_GATE_IN-transporter_code is INITIAL.
    MESSAGE e020(zmatlist).
    endif.
    ****************Check For Empty Fields Start
    Regards,
    Alok.

    hi,
    u can do it in chanin end chain.
    For example if there are 10 fields in the screen and for 5 fields whenever the user enters wrong values u like to give some error message. You can declare that fields in the chain enchain so that only those fields will be input enabled and all other fields will disabled.
    CHAIN.
    FIELD chk_connobj.
    FIELD chk_inst.
    FIELD chk_devloc.
    FIELD ehaud-haus.
    FIELD eanl-anlage.
    MODULE modify_screenfields.
    ENDCHAIN.
    *& Module modify_screenfields INPUT
    * text
    MODULE modify_screenfields INPUT.
    CLEAR okcode.
    okcode = sy-ucomm.
    CASE okcode.
    WHEN 'ENTER' OR 'EXECUTE'.
    IF chk_connobj IS INITIAL AND chk_inst EQ c_x AND
    chk_devloc EQ c_x.      -----------> ur condition
    IF ehaud-haus IS INITIAL.
    SET CURSOR FIELD 'EHAUD-HAUS'.
    MESSAGE e000(zo_spa) WITH text-017. " message obj
    ELSE
    loop at screen.
    if screen-name = 'FIELD_NAME'.
    field-name-input = 1. -----------> chnges to non-edit mod
    modify screen.
    endloop.
    ENDIF.
    ENDIF.
    ENDMODULE.
    Rgds
    Anver
    if hlped pls mark points

  • How to Make standard fields editable

    Hi,
    We have are requirement to make the standard fields (cost center, GL, expense type, amount) to be editable for Approver user role. Currently only Auditor role can edit some of the fields.
    Is this something doable using SDK?
    Thanks,
    Webster

    Hi,
         You can change them statically(they will always be "ready for input" in screen painter, just double-click the field, in the dialog that appears, check the box for "Input Field".
    If you want to do this a run-time, then you will need to modify the fields in the PBO, using the LOOP AT SCREEN.
    LOOP AT SCREEN.
    IF screen-name = 'Your_field_name'.
    screen-input = '1'.
    modify screen.
    endif.
    EndLoop.
    Regards

  • How to make screen fields editable

    Hi all,
    iam writing a validation for FD32 transaction in exit, if the validation fails showing error message.
    Porblem is when ever error message comes and after that if i press enter fields are going to mode of non editable ( Display mode), how to make them editable which were already editable ( before error message comes).
    Iam not using module pool program for this, iam writing code in include exit and throwing the message.
    Thanks,

    Hi,
    You can use pop up window to display error message as below:
    -Quote-
    AT SELECTION-SCREEN ON ABCD.
      IF <condition fails>.
        CALL FUNCTION 'FC_POPUP_ERR_WARN_MESSAGE'
          EXPORTING
            popup_title        = 'Error'
          IS_ERROR           = 'X'
            message_text       = 'Error message description'
            start_column       = 25
            start_row          = 6
        STOP.
      ENDIF.
    -Unquote-
    You may also use:
    -Quote-
      IF <condition fails>.
        MESSAGE 'abcd' TYPE 'E'.
      ENDIF.
    -Unquote-
    Kindly let me know whether this is of any help or not.
    Regards,
    Shayeree.

  • How to make Date fields Editable or Non-Editable based on Call Staus

    Hi,
    We are using CRM2007 Web GUI for Service call creation. We are using date profile to populate the dates. Here my requirement is if call status is 'Call created' then some set of date fields to be appeared in display mode(Non Editable) and some set of date fields to be appeared in change mode(Editable). How to achieve this. Kindly suggest me.
    Regards,
    Steve

    Hello,
    Kindly check the following thread which is giving many solutions for your requirement:
    Re: how to make field non-editable (display mode)
    Kind regards,
    Nicolas Busson.

  • How to make a column field editable through OADP customization

    HI Every body,
    I am facing a issue during oadp customization.As part of our requirement , i have added a  column to the compensation planning in mss through OADP and the column is displaying fine,but the issue is that,the fields are not editable.So can anyone let me know ,how can i make the field editable through OADP customization.Is it really possible to do through OADP or not?
    Regards
    RRAY

    for which application you added the columns?
    let me explain takinh ECM as an example
    The backend part of the OADP provides a possibility to define data
    columns without assigning a function module for data extraction to it.
    The content of these columns as well as the column properties have to be
    defined in the application coding(WebDynpro frontend application) which
    is the reason why these columns are called #Application Columns#. The
    advantage of application columns is two-fold: Firstly, their content can
    be calculated dynamically during runtime in dependence of both, the
    content of other columns and application data. Secondly, it#s even
    possible to have data columns ready for input. These columns are build
    in the frontend webDynpro application, therefore for your custom column
    group, kindly assign the standard for these three columns.
    For OADP customizing of the compensation planning application kindly
    follow the link below.
    http://help.sap.
    com/saphelp_erp2005/helpdata/en/29/d7844205625551e10000000a1550b0/frameset.htm

  • How to make field editable in ALV tree in OOPs?

    Hi Gems,
    Again I need help from you all.
    I am writing a program using OOPs and the uotput will be in ALV tree. I need to make a field editable in a perticular row.
    I am doing it using layout but the program is giving error during
    CALL METHOD CL_GUI_CFW=>FLUSH
          EXCEPTIONS
            CNTL_SYSTEM_ERROR = 1
            CNTL_ERROR        = 2.
    This method is returning sy-subrc = 2 and I am unable to get the output.
    I am using below code to make the field editable:
    DATA: LT_LAYOUT_ITEM TYPE LVC_T_LAYI,
                LS_LAYOUT_ITEM TYPE LVC_S_LAYI.
      LS_LAYOUT_ITEM-FIELDNAME = 'ACPCKTWRT'.     "ACPCKTWRT is the field name in the Internal table
      LS_LAYOUT_ITEM-EDITABLE = 'X'.
      APPEND LS_LAYOUT_ITEM TO LT_LAYOUT_ITEM.
    CALL METHOD G_ALV_TREE->ADD_NODE
        EXPORTING
          I_RELAT_NODE_KEY     = FP_RELAT_KEY
          I_RELATIONSHIP       = CL_GUI_COLUMN_TREE=>RELAT_LAST_CHILD
          IS_OUTTAB_LINE       = LS_TMP_FINFCNO                                                "structure of the internal table
         IS_NODE_LAYOUT       =
          IT_ITEM_LAYOUT       = LT_LAYOUT_ITEM                                                "Added layout to make the field editable
          I_NODE_TEXT          = LV_NODE_TEXT                                                      "Node text
        IMPORTING
          E_NEW_NODE_KEY       = FP_NODE_KEY
        EXCEPTIONS
          RELAT_NODE_NOT_FOUND = 1
          NODE_NOT_FOUND       = 2
          OTHERS               = 3
      IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Please help me and let me know how to get the solution.

    Hello
    The ALV tree control is not intended for making values editable (e.g. see
    [How to make ALV tree columns editable|http://sap.ittoolbox.com/groups/technical-functional/sap-abap/how-to-make-alv-tree-columns-editable-2052414])
    However, if you need an editable tree control then you have to use a different class (e.g. CL_ITEM_TREE_MODEL or CL_COLUMN_TREE_MODEL) but you will not have the ALV functionality of the ALV tree control.
    Regards
      Uwe

  • How to make a particular field editable in a Form/Empty View

    Hi All,
    I want make a particular field editable in a Form View. Means i have 5 fields in the Form View and out of 5 fields i want to make one field editable or input field. Can you plz tell me how to do that?
    thanks & regards
    Madhusudan

    Hi,
    You can achieve the same by two methords.
    1) Goto configuration of the view in which you want to make fields editable/ non editable. Click on your field. Click on field properties. On the menu you can click on Display only. It will make your field non editable. If you remove the check, it will be editable.
    2) Goto Get_I_fieldname methord of your field. There write code rv_disable= 'FALSE'. Field will become editable. rv_disable= 'TRUE' will make field non editable.
    Best regards
    Pankaj Kumar

Maybe you are looking for