Calling Services During Creating or Changing 

Use

Create

The key is not yet known when creating an object. However, many services need the key, so you must subsequently hand it in.

Change

When changing an object, you must ensure that an implicit database commit is set after every screen change.

Procedure when Creating

  1. When generating an instance of cl_gos_manager set the constructor parameter ip_no_instance and leave the object key empty:
  2. data: go_myobject type ref to cl_gos_manager,

    ls_object type borident

    ls_object-objtype = ‚BUS0815‘

    create object go_myobject

    exporting

    is_object = ls_object

    ip_no_instance = ‚X‘

    exceptions others = 1

  3. Since your object is persistent, you must subsequently hand in the key:

ls_object-objkey = my_key.

call method go_myobject->set_id_for_published_object

exporting is_object = ls_object.