CL_GOS_SERVICE - Publication for Generic Object Services
SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up Fill RESBD Structure from EBP Component StructureThis documentation is copyright by SAP AG.
Functionality
CL_GOS_SERVICE is an abstract class from which all services are derived that are part of generic object services.
In order to add a separate service to the generic object services, you must encapsulate these as the method EXECUTE in a subclass of the class CL_GOS_SERVICE.
Redefinition of the method EXECUTE
You must redefine the instance method EXECUTE for your service. You can access the attribute GS_OBJECT,that contains the BOR reference of the published object, in the method. The method EXECUTE and all themethods or function modules called by it are not allowed to set a COMMIT WORK. Instead, the event COMMIT_REQUIREDmust be triggered. If this is not possible, a function module must be called by RFC in the method so that so that a new roll area is opened.
Status query
The method CHECK_STATUS is called when the service is instantiated. The method checks whether the servicefor the published BOR object can be executed. The parameter EP_STATUS receives the value MP_STATUS_ACTIVE,MP_STATUS_INACTIVE or MP_STATUS_INVISIBLE. A status change at a later time can be made to the framework of the generic object services using the event SERVICE_CHANGED.
Event handler methods
If a response is required for the successful closing of a different service, the event handler methodON_SERVICE_SUCCEEDED must be redefined and the event handler for the event SERVICE_SUCCEDED of the other service must be registered.
If a service is canceled, the event handler method ON_SERVICE_CANCELED is called. References can be deleted and controls released in this method.
Relationships
Add class to Generic Object Services
You must also enter your class in the table SGOSATTR. Use the table view maintenance for this purpose(SM30). Here you must enter the class name in the field Name of service, and enter the attribute for the service (for example description and icon).
Support additional requirements
The services can implement one or more of the following interfaces:
- IF_GOS_SERVICE_MULTIPLE
- IF_GOS_SERVICE_TOOLS
- IF_GOS_SERVICE_ON_CREATE
Example
Notes
Further information
An overview of Generic Object Services can be found in the SAP Library under BasisComponents -→ Basis Services -→ Business Workplace and Services -→ Generic Business Tools for Application Developers -→ Generic Object Services (BC-SRV-GBT).
General Material Data Addresses (Business Address Services)
This documentation is copyright by SAP AG.
Length: 2660 Date: 20120526 Time: 130703 triton ( 187 ms )






