Creating and Publishing Objects 
The key is not yet known when creating an object. However, many services need the key, so you must subsequently hand it in. This procedure allows you to publish the object that is not yet created and transfer the object key according to which the object was created on the database.
When generating an instance of cl_gos_manager set the constructor parameter ip_no_instance and leave the object key empty:
Syntax
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
Since your object is persistent, you must subsequently hand in the key:
Syntax
ls_object-objkey = my_key. call method go_myobject->set_id_for_published_object exporting is_object = ls_object.