Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Publishing Objects in Container and offering toolbox directly


I have a container for showing list of published object for a material.

I have two cases:

Case 1. when the material has publihed objects, I list all attachments in my container. This case works OK. I am using this code:

 call method go_myobject->start_service_direct
      ip_service       = 'VIEW_ATTA'
      is_object        = my_object
      io_container     = my_container
      NO_OBJECT        = 1
      OBJECT_INVALID   = 2

( For reference see: )

Case 2.- When object has no attachments, The previous method return exception 3, So, then I wish show the toolbox inside the container for allowing insert new attachments, notes, etc.

In this case I am using the code:

 call method go_myobject->display_toolbox
        io_container = my_container
        is_object    = my_object.

( For reference see: )

This works ok, the toolbar appears in container and works OK,

The problem is that after appeareance of Toolbar, next time I am trying show attachments for another object, like in case 1, the container keeps filled with last toolbox and I cant remove it.

I need to remove that toolbox, and fill the container again with data like in case 1. Or another solution for empty the container always before show any object inside.

The container is referenced TYPE REF TO cl_gui_custom_container. I cant see any method for refresh, clear, empty it.

Any idea how to do this?

best regards and thank you for help.

Ibrahim Andres

Former Member

Calling the FREE method for that object should do the trick.

call method container_object->free.
        clear: container_object.
        free : container_object.


Rich Heilman

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question