Show TOC

Procedure documentationCreating and Publishing Objects Locate this document in the navigation structure

 

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.

Procedure

  1. When generating an instance of cl_gos_manager set the constructor parameter ip_no_instance and leave the object key empty:

    Syntax Syntax

    1. 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
      
    End of the code.
  2. Since your object is persistent, you must subsequently hand in the key:

    Syntax Syntax

    1. ls_object-objkey = my_key.
      call method go_myobject->set_id_for_published_object
      	exporting	is_object = ls_object.
      
    End of the code.