Restricting Available Services 

Use

As far as possible, you should avoid users being offered pointless services for your object. You can restrict the services in the standard menu window (the "toolbox") or also in a context menu.

Procedure

When generating an instance from cl_gos_manager enter a selection table for the constructor, with which you can enter intervals or exclude specific services. For information on possible entries see the Documentation for Selection Tables.

You want to forbid Notes for an object.

data: go_myobject type ref to cl_gos_manager,

lt_services type tgos_sels,

ls_service type sgos_sels,

ls_object type borident.

ls_service-sign = ‚E‘.

ls_service-option = ‚EQ‘.

ls_service-low = ‚NOTE_CREA‘.

append ls_service to lt_services.

ls_service-low = ‚PERS_NOTE‘.

append ls_service to lt_services.

 

create object go_myobject

exporting is_object = ls_object

it_service_selection = lt_services

exceptions others = 1.