Skip to Content

Refresh used component display by ABAP code in another used component


I have a contract (WEB UI component 'IUCONH') which contains used components, among others: actions ('GSACTIONS') and attachments ('GS_CM'). I enhanced the GSACTIONS so that it changes the content of contract attachments programatically (changing documents by use of BOL: status of documents, deleting...). However, although the backend content changes, the GS_CM UI component doesn't know that and doesn't change the list of the displayed documents till user refreshes the browser. If attachments' view is expanded for the first time after the action has been taken, then it displays correct content (obviously, due to 'lazy' initialization).

I need to initiate frontend refresh of one used component from another (that is, the program within GSACTIONS should initiate refresh in GS_CM).

How can I do this?

Thanks in advance!



Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Best Answer
    Posted on Apr 27, 2011 at 11:24 AM

    Hi Igor,

    You can call publish_current( ) method on your context node at the place where you programmatically change the content to make them reflect directly. The syntax will be as follows:

    me->typed_context-><node_name>->collection_wrapper->publish_current( ). 

    Replace <node_name> with the node where you change the data.

    Try this and check if it works.



    Add comment
    10|10000 characters needed characters exceeded

    • Hi, Shiromani,

      Thank you for your hint! In order to use it, I need to bind nodes. So I tried:

      The node SELDOC in Document (GS_CM WEB UI component) is actually CMDocument BOL entity. The contract (IUCONH WEB UI component) has the same entity so I created the node with the same name (SELDOC) and bound it in method WD_USAGE_INITIALIZE with the corresponding node in Documents (CM). It seemed to work.

      However, Actions (GSACTIONS) do NOT have the CMDocument dependent object in it's BOL model so I can't create the node.

      So possibly this is a question for another post, but anyway:

      How can I extend the GSACTIONS BOL Model with CMDocuments node? Or am I at the wrong path?