cancel
Showing results for 
Search instead for 
Did you mean: 

Change all fields of component to display mode

Former Member
0 Kudos

Dear Experts

There is business requirement of changing all fields to display mode. User should be shown fields in display mode. If we call display view, user can click on edit button and modify fields. But we need to disable edit button. For this we need to disable edit button of all the views in component.

Can there be better approach that the above approach.

Please provide some direction.

Thanks and regards

Pankaj Kumar

Accepted Solutions (1)

Accepted Solutions (1)

xavier_dehairs2
Active Participant
0 Kudos

I think your approach is the correct one. I would do it as you suggested.

Regards,

Xavier

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Pankaj,

This can be achieved without doing the code change.

In the view configuration, Select the fields that you have. Press ALT+ENTER. You will see the Properties of the field.

Mark the Checkbox Display only. Press apply & SAVE view configuration.

Now during Runtime, Even when you go into EDIT page,The fields will be appearing in Display mode.

Best Regards,

Karthik

Former Member
0 Kudos

Hi,

Thanks for your reply. In this case fields will not be visible in display mode only. Our business requirement is on particular status all fields of all views should be in display mode. And when status is changed, it should be avialable for editing.

Thanks and regards

Pankaj kumar

suchita_phulkar
Active Contributor
0 Kudos

Hi Pankaj,

Your Approch is correct.

You can Use the do_prepare_output method where edit button is atted to gt_buttons on every viewset and just exclude the code on status for which the view is required to be disabled and include the code of other statuses.

rather than disabling edit, just dont show it up only.

Also, you can conditionally use the method set_all_editable( ) to make all the views of a viewset editable/noneditable.

Just check this thread for the coding

Regards,

Suchita