Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Generic Object Services

Former Member
0 Kudos

Hi,

I've created a Generic Object Service.

I want it to be available only for transaction ME22N,

Is there a way of disabling just my icon for all other transactions?

Thanks

3 REPLIES 3

Former Member
0 Kudos

Take a look at this:

http://help.sap.com/saphelp_46c/helpdata/en/ee/f36a47a33111d389c80000e8216438/content.htm

Award points if this is helpful!

Cheers,

Sam

0 Kudos

not really sure how to use it, I've got the service up and running, but want it available for ME22N, excute and check_status are the only methods I can override,

and from what I can see I don't call the contructor of the class?

0 Kudos

Hi Sims,

Here is the SAP Help on Object Services implementation for 47C.

http://help.sap.com//saphelp_47x200/helpdata/EN/94/aa532cddd511d289860000e8216438/frameset.htm

Also, there is a BAdI GOS_SRV_SELECT available for your case of restricting Object Services. Here is the documentation:

Use

This Add-in is used for selecting or restricting the Generic Object Services available. It can be used to deactivate all specific services or depending on user authorizations. It is also possible to modify the selection of available services with the system parameters (transaction, program).

The applications that include the Generic Object Services can make a preselection of the available services. These can be further restricted by using the add-in.

Activities

In the SELECT_SERVICES method, you receive the persistent object reference of the business object for which the service was requested as the IS_LPOR input parameter.

By using the CATID field, you can identify the repository in which the object has been stored (BO = Business Object Repository, BC = Business Class).

The TYPEID field contains the names of the business object type or the class names of the business class.

The INSTID field contains the object key of the business object or the business class.

You fill the ET_OPTIONS return parameter like a range table with the required services, which you can withdraw from value help of the SGS_SRVNAM data element or of the SGOSATTR table.

Example

METHOD if_ex_gos_srv_select~select_services.

  • Exclude the Service for creation of attachments from the available services.

DATA: ls_option TYPE sgos_sels.

ls_option-sign = 'E'.

ls_option-option = 'EQ'.

ls_option-low = 'PCATTA_CREA'.

APPEND ls_option TO et_options.

ENDMETHOD.

If this helps you, please remember to award the points.

Good luck,

Bhanu