Skip to Content

Make a field read-only when you click on SAVE button in WEBUI

Hi,

I have an attribute ZZINV_25 in context node BTAdminH of component BTCATEGORIES.

I have to make this field read-only when I click on Save Button . The method EHONSAVE is present in a different Component SRQM_INCIDENT_H .

Initially I changed the field to read-only in GET_I method but the requirement is that this field should be made read-only when the user clicks on SAVE button.

I want to use an object of interface if_genil_obj_attr_properties in order to change the attribute property to read-only , but I am unable to use it .

Is there any alternate solution available?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Mar 02 at 12:22 PM

    Hi Tejas,

    Please check my understanding of your question is correct as below : -

    When you create a transaction your custom field should be in editable and after you save your transaction from that moment onwards this custom field should be a non-editable field. Even if user edit that transaction further that custom field should be in edit mode.

    If this understanding is correct , please try reading transaction id in Get_I Method, this will only be available when transaction is created. If you see a transaction id make that filed as disabled. You can read transaction id by using get_parent method.

    Please let me know if this works or else we will try to see alternate approach.

    Regards

    Rituraj



    Add comment
    10|10000 characters needed characters exceeded

  • Mar 05 at 05:23 PM

    Hi Tejas,

    In such case I can suggest two approach :-

    1. On EH_ONSAVE of srqm_incident_h , check value of custom field is 3. if it is 3 use abap_memory concept and register some value.Now your get_I is a roundtrip method which will be called on each action.In Get_I read value set in eh_onsave using ABAP_memory and thus you can disable the field.

    2. Else read about do_finish_input, it might help.

    Do let me know if you happen to solve the issue.

    Regards

    Rituraj

    Add comment
    10|10000 characters needed characters exceeded