Skip to Content
0

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

Dec 26, 2016 at 12:27 PM

509

avatar image
Former Member

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

snap1.png (111.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Varun Agarwal
Jan 06, 2017 at 01:56 PM
0

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

Show 1 Share
10 |10000 characters needed characters left 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.

0