cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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,

Amit

Accepted Solutions (0)

Answers (1)

Answers (1)

Varun_Agarwal
Advisor
Advisor
0 Kudos

Hi,

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'.
ELSE.
rv_disabled = 'FALSE'.
ENDIF.
ELSE.
rv_disabled = 'FALSE'.
ENDIF.

You can also refer to

https://archive.sap.com/discussions/thread/1766740

Former Member
0 Kudos

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.