Application Connection to Object Services
Every application that will use at least one of the object services can access this through a small number of program steps. Here, it can decide
- In your application the object is unique. Then you publish it and generate an instance of cl_gos_manager. You must put the object ID in the export parameter of the type borident:
data: go_myobject type ref to cl_gos_manager,
ls_object type borident
create object go_myobject
exporting is_object = ls_object
no_commit = ‚x‘
exceptions others = 1
If the parameter no_commit is set, you enter that your application starts the Commit Work command. That is also the default value. If you explicitly transfer the parameter empty, the object services create the Commit Work. However, your data should be consistent when called because the database changes can no longer be reversed using Rollback.
If you do not know which object type your application document has, choose Tools ® Business Workflow ® Development, Business Object Builder, Business Object Repository, Repository Browser and choose All object types. Search for your application document in the outputted list using Edit ® Search. For further information see Business Object Repository Browser in the workflow documentation
- Which object the services are to take up is not decided until the process flow of the transaction. To avoid having to program several publication calls, you should in this case publish acallback.
You can always only publish one object. If you publish many times, then it is always the case that only the last publication is valid.
For multiple publication, you can use the old function module SWU_OBJECT_PUBLISH. A window is then displayed when calling the services where the published objects can be selected. You should avoid this additional hurdle for the user if possible.
- You do not want to offer a separate window but rather the services in the context menu ("right mouse button"). In this case you do not publish anything, but rather
- You want tooffer the toolbox directly. Also in this case you do not publish.