Show TOC

Publishing Object and Starting Service DirectlyLocate this document in the navigation structure

Context

This procedure allows you to publish your object and directly start a service. As soon as a user calls the object, the service is started at the same time, for example, the attachment list is displayed.

Procedure


  1. Generate an instance of class cl_gos_manager. However, do not transfer the BOR-ID or the callback class so that no object is published.

    data:      go_myobject type ref to cl_gos_manager.
    …
    create object go_myobject.
    
                   
  2. The name of the service requested (from table SGOSATTR) provides you with the method start_service_direct, for example for the service Displaying Attachments:

    data:      ...,
            lo_container type ref to cl_gui_custom_container,
            ls_object type borident.
    …
    call method go_myobject->start_service_direct
            exporting       ip_service = 'VIEW_ATTA'
                            is_object = ls_object
                            io_container = lo_container.
    
                   

    You can enter a control container for specific services in the parameter io_container. The services that allow this option can be found in table SGOSATTR.