Skip to Content
avatar image
Former Member

How to disable/enable Field in a view in Web UI?

Hello Experts,

I am new to BSP programming and this is in regards to SAP CRM Web UI. When i click on a line item of a contract to check details. The DO_PREPARE_OUTPUT runs and sets the views. Now, on the conditions view (attached here snap1.png) we get all the mapped condition types along with details like price. This is the STRUCT.KBETR_PRT Attribute of Context Node CONDLINE.

I have to disable this field for all the users. Then there is a button 'Manuellt_Avbokad' on top of this view. On click of this button, the field 'Price' should be enabled.

Please help me understand this.

What I have done: I have disabled the field in GET_I*. Then on press of the button 'Manuellt_Avbokad' I authorise and then I am not able to enable the field since the View is already there and there is no way I know which can help me refresh this view by passing a flag or something that denotes that the button was pressed.

Please help.

Thanks in advance,


snap1.png (111.7 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 06, 2017 at 01:56 PM


    Please set the gv_flag on the click of the button and have GV_FLAG defined in the controller class

    Below is the sample code to do it

    IF gv_flag EQ abap_true.
    rv_disabled = 'TRUE'.
    rv_disabled = 'FALSE'.
    rv_disabled = 'FALSE'.

    You can also refer to

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hey Varun,

      Thanks for your reply. I have used authorisation to enable/disable field instead. But had to use global parameters to maintain the flags, since the process leaves the class to go to save and when I save, it comes back to that method on the Parent class. Took some time to understand the dynamics but worked well.

      Thanks Again for reply.

      // Amit.