Skip to Content

Using the broadcast messaging (BCM) client side API

The portal broadcast messaging feature is provided with an out-of-the-box sample UI.

Most customers would want to customize the UI to fit their framework page.

You can find more on the BCM here:

New Development: Broadcast Messages in SAP NetWeaver Portal

If you wish to use the BCM out of the box sample UI you will need to add it to your classic/afp framework page,

The application can be found under Portal Content >> >> Sample_BroadcastMessageIview

In order to allow this we have opened a client-side API that allows developers to create their own iView and interact with the BCM service.


  1. You have installed SAP NetWeaver Portal (EP) 7.31 SP11 or above.
    • You have created a delta link for the Broadcast Message Framework iView in your framework page and set it to visible. This iView is located under Portal Content >> Portal Users >> Standard Portal Users >> iViews >> Broadcast Messages
    • BroadcastMessageFramework.png
  2. You have enabled the BCM service by setting the BCM is active property to true.



The client side API is under the object window.BCM.API and contains the following methods:

isPollingActive() – this method checks if the BCM polling mechanism is active. If the mechanism is not active, the broadcast messages will be taken from the server only once.

getPollingIntervalTime() – This method returns the number of minutes between each request to the server.

getActiveMessagesForCurrentUser(success callback function, fail callback function) – This method gets all of the user’s broadcast messages (according to the user’s roles and groups) and return them to the success callback function in a JSON format (if successful) or returns a JSON with the status “fail”.

Each message in the JSON has the following attributes:

    • messageId – The message ID, which is a unique ID for the message in the server.
    • messageBody – The actual message body.
    • isRead – A boolean stating if this message has already been read by this specific user.
    • isPriority (added in SP12) – A boolean that indicates whether this message has a higher priority.

setMessageAsRead(message ID, callback function for status) – Sets the message state to “already read” for this user in the UCD.

The callback function will receive a JSON with a “success” or “fail” status.


window.BCM.API.getActiveMessagesForCurrentUser(onMessagesReceived, onNotMessagesReceived);

   function onMessagesReceived(messagesJSON){
    //check that the actual size of the messagesJSON is more than 0.
    if(messagesJSON.length > 0)
     var newMessagesArrived = false;
     for(var i = 0; i < messagesJSON.length; i++)
      createMessage(messagesJSON[i].messageId, messagesJSON[i].messageBody, messagesJSON[i].isRead, messagesJSON[i].isPriority);
      // check that this message was not already read and update the new messages flag.
       newMessagesArrived = true;


        // check if the operation has failed or succeeded.
        if(data.status !== "success"){
          window.console.log("couldn't set message: "+data.messageId+" as read");
         // if operation succeeded mark message as read in the user interface

If you would like to learn more regarding the BCM API please ask for information in the comments and I will try to add it to the article.


You must be Logged on to comment or reply to a post.
    • Hi Sandip,

      The broadcast framework will be available as of 7.31 SP11.

      The feature for indicating a higher priority message will be available as of SP12.

      The feature is not available out of the box and you will have to add some iViews that are given since we did not want to force users to have those iViews in their framework pages

      if they didn't want it.

      But to configure this feature is really an easy task and takes no more then 2 minutes.



  • Hello,

    I've added the iView Broadcast Message Framework to the AFP, but instead of the icon to the right of the welcome text , the iview is added below the greeting.


    Can you help me?

    Best regards,


    • Hi Arnold,

      The framework is just the iview that provides the API above.

      In order for you not to see that blue/grey line, open the framework iview and set "show tray" to false.

      Now in the content administration go to applications --> --> right click on sample ui --> paste it in your desired folder and create a delta link to your framework page. (don't forget to also remove the tray).

      Make sure you enabled the BCM in the NWA as shown above and it should work.



          • Hello,

            I have one more little problem.

            I can't delete a message.

            I got the following error message:

            add of choice (label: Cancel) failed! (action: null)












            88 more

            We use NW 7.31 SP11.



          • Hi Arnold,

            This issue requires some investigation, can you open a thread for this and I will try to help you?



          • Hi Arnold,

            I meant open a new discussion in the Enterprise portal.

            and please attach the traces so I can investigate them.



      • Hi Saar,

        I have followed all the above steps but still i cannot see the Broadcast icon in the portal.can you please suggest what else need to be checked.





  • Hi Saar

    We are testing this feature on one 7.3 EHp1 SP12 Portal.

    Creating a broadcast message is working but the issue is that although the message status is green (message is broacasting) the message icon is not being displayed on the right side.

    The service properties are set as follows:

    Message poling interval - 3 min

    Polling state - true

    BCM is active - true

    Restarting the services didn't help.

    Any idea what could be the cause?



    • Hi Trent,

      Thanks for the feedback.

      Broadcast messaging does support translations using the translation worklist.



  • Hi Saar,

    in wich container of the AFP-Framework do I put the Example-IView. I put it in the Masthead-Container, but it wont disapear. When I debug the bcm_ui.js, I can see that logic.init() execute this line:

    if (properties.isAjax){

         welcomeTextElement = jQuery("#welcomeText");


    but at this point in the HTML-Structure their does not exist a node with this ID. This came at some point later.

    So how I get the script running, when the Desktop is renderd.



      • It is a customizing AFP. But the only thing we customized was the logo on the top left and we add another IView into the Hidden Technical Container.

        By the Way, we use NW 7.31. Forget we need NW 7.31 for BCM 😛



        • Hi Thomas,

          Try to see if it works in the out of the box AFP as this sample UI was tailored for AFP and classic framework page and not for costumized framework pages.

          Hi Thomas,

          You are right, I have found something that was missing.

          I will create a fix for it.

          Thanks  and BR,


  • Hi Saar,

    Is there any kind of functionality where the contents/text of the Broadcast Message does not come from Portal, but comes from some other system outside of portal?



  • Hi Saar,

    We are in EP 7.4 SP6.

    I have enabled BCM service by setting the BCM is active property to true

    But I dont find the iview under Portal Content >> Portal Users >> Standard Portal Users >> iViews >> Broadcast Messages

    So I copied the Sample_BroadcastMessageIview from Portal applications --> and added to my AJAX framework.

    But now I dont find the role for broadcast manager. How to send messages.? Please Help

  • Hi Saar,

    Thanks for sharing a nice blog and able to view the broadcast messaging. Is this possible to get the broadcasting icon on the left instead of right. I mean next to Favorites menu bar.


    Best Regards,


    • Hi Deep,

      The BCM UI is a sample UI, It is tailored for a specific place and a specific options.

      So unfortunately it can't be customized in any way, not even in where it lies on the document.

      The goal for the sample UI was to show the capabilities of the BCM.

      Thanks and BR,


      • I have followed all the steps mentioned and I am able to create  messgaes as well , but even after the time is reached the status is pending only.

        Can you please suggest?

  • We hide the user name on the right hand side where it says "Welcome User", we found the name needs to show in order for the broadcast message icon to show.  Can this be separated?

    Also, any future capability to change bullhorn icon to something else?

    • Hi Navya,

      Open the iView and set the property "show tray" to false.

      This will remove the iView title, make sure that the iView sits in the masthead container.