Skip to Content
Author's profile photo Former Member

Control Communication Channels Externally without using RWB

With NW2004 SPS19, a new capability was introduced that can allow us to easily control the status of one or more J2EE adapter’s communication channels.

Even though we also have scheduler capability to turn on/off a communication channel, this feature adds an option for us to control the communication channel externally, without using the scheduler or any XI tools (e.g. RWB), based on requirements that cannot be satisfied with a scheduler.

This capability also allow us to control a group of communication channels in one command.

To control the communication channels the HTTP GET or POST is used.

Prerequisites: the userid must have the proper role(s). The userid’s roles cannot be assigned using ABAP via SU01. The roles must be assigned in the J2EE, using the Visual Administrator.

  1. Start and logon to the J2EE Visual Administrator.
  2. Navigate to: Server 0 -> Services -> Security Provider
  3. In the screen on the right, select sap.com/com.sap.aii.af.app*AdapterFramework
  4. Select the tab: Security Roles
  5. Assign the userid to the roles:
    • Query Status – xi_af_channel_admin_display
    • Change Status – xi_af_channel_admin_modify

Below is a sample screenshot:

image

Procedure

The following URL can be used to control the communication channel(s) externally:

http(s)://host:port/AdapterFramework/ChannelAdminServlet?party=party&service=service&channel=channel&action=action

The parameters in italics are described below:

  • party – Identifies the party of the channel to be administered. You can use an asterisk (*) as a placeholder to administer several channels simultaneously.
  • service – Identifies the service of the channel to be administered. You can use an asterisk (*) as a placeholder to administer several channels simultaneously.
  • channel – Identifies the name of the channel to be administered. You can use an asterisk (*) as a placeholder to administer several channels simultaneously.
  • action – Identifies the action to be executed (start, stop, or status).

    You can use the start and stop actions to start and stop the channels. You can use the status action to query the status of one or more channels.

For example, to find the status of all the communication channels belonging to service=BLService, the following URL is used:

http(s)://nspad271.pal.sap.corp:50000/AdapterFramework/ChannelAdminServlet?party=&service=BLService&channel=*&action=status

With the result:

image

By looking at a specific communication channel, File1_sender, in the RWB’s Communication Channel Monitoring, we will now stop it:

Please note, in order to use this feature, the External Control must be selected for the communication channel.

image

I will now stop it, or turn it off, by using the URL:

http(s)://nspad271.pal.sap.corp:50000/AdapterFramework/ChannelAdminServlet?party=&service=BLService&channel=File1_sender&action=stop

The result is as follow:

image

The communication channel is now stopped.

image

Please also note, once the External Control is turned on for the Communication Channel, we can no longer manually start or stop the communication channel using the RWB. We will have to turn the External Control off to do so.

Reference:

http://help.sap.com/saphelp_nw04/helpdata/en/45/0c86aab4d14dece10000000a11466f/frameset.htm

Assigned Tags

      22 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      Willam,

      good one . cool thing to know .

      Thanks
      Sreeram.G.Reddy

      Author's profile photo Former Member
      Former Member
      Hi,

      It is a nice log. I have one question here.
      Suppose I wanted to stop my channel on Saturday and sunday. Can I achieve this using writing a abap program which will call this HTTP link and which will stop the channel.
      Nut again if it is stoped on sunday then I need to schedule my program to start it on monday.

      Can I achieve this by call the URL from ABAP.

      Can I use this option with avability link option.

      Chirag

      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi Chirag,
      I don't know much about calling an URL from ABAP program.  But, if you can do that, then you should be able to schedule this program in ABAP to do what you want.

      The URL has no dependency on where it is called.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      Hi Bill,

      I am writing a java code to call the http URL to start/stop the communication channel. I am getting 401 (Unauthorized) HTTP response. However, I am able start and stop the channel via browser with the HTTP URL.

      How do invoke the URL and pass the username/password in Java??

      Author's profile photo Bhavesh Kantilal
      Bhavesh Kantilal
      Bill,
      I remember a question on the XI forum a few days back to which I had mentioned that external control of Comm Channels is not possible.

      Thanks for proving me wrong and for letting us know how to use this really useful feature. Looking forward to more such stuff,

      Regards
      Bhavesh

      Author's profile photo Henrique Pinto
      Henrique Pinto
      Hey Li,

      really great info, I had missed that.

      It'd work greatly improving user interface in some iview in Portal. 🙂

      Regards,

      Henrique.

      Author's profile photo Former Member
      Former Member
      When you type following URL in the browser it asks you username and password.

      http(s)://host:port/AdapterFramework/ChannelAdminServlet?party=party&service=service&channel=channel&action=action

      My question is if you want to by pass typing username and password, can we make username and password as part of URL? If this is possible How URL looks like? Please comment. I appreciate your help.

      Thank you,
      Balaji

      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      You can try, in your URL, sap-username and sap-password.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      Hi william,
      personaly in my HTML tool that I developed, I used the port 80nn (abap) and I see that you use port 50nn0 (J2EE). It seems that both works fine, but have you some feedbacks to know if one is better the other?
      Regards
      Mickael
      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      Using 5xxxx port might be better.  In PI 7.1, the 8xxx port will no longer be available.  Both ABAP and Java will use the same.  By using 5xxxx port, you will not need to change your application after upgrade.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      Very good blog Bill,i was looking for ways to control adapters via external scripts and finally got the solution.
      Thanx
      Aamir
      Author's profile photo Former Member
      Former Member
      Hi Li,
      when I tried accessing the URL, it always gives the following info. But I am tyring to get the last error description or something like that. I did download the xsd from the link. The xsd has 3 messages... It just tells the state as ERROR. Could you please help me.
      http(s)://host:port/AdapterFramework/channelAdmin/ChannelAdmin.xsd.

        BS_PRG_AGED_INVENTORY_RECEIVER
      CC_STAGE_TABLE_JDBC_RECEIVER   6f9aba4e76ef3a11854636712d9688e4
        ERROR
       

       
      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      What URL did you execute?  Did you execute the URL as exampled in the blog?  There is no need to access the XSD.

      This is a HTTP application via the URL request.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      Hi Bil,

      Very useful blog. 

      Question I have:  Is it possible to get MORE information from this Servlet, specifically regarding Channels in ERROR.  I would like to have the error text, ie the reason the channel is in error.

      Thanks
      mike 

      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      I'm sorry I do not have any more information on the service.  The only information I have access to are from SAP Help.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      How can i turn on these stopped communication channel? It only can be done by calling the URL again, right?

      However, my communication channel restarts itself, how come?

      selina

      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      The comm chans can be turned on/off using the URL or via the RWB.

      They won't be turned on by itself.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      Hi William,
      It's really a helpful blog.I need to raise HTTP request from Abap program and schdule that program on particular day. I tried using existing RFC for url call. But it's giving me error as The requested resource does not exist.Kindly suggest is there any paricular settings to be done.

      Regards,
      Nutan

      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      Sorry, I do not know how to issue an URL call from RFC.

      If the URL works from the web browser, then its not a problem with the URL, but the RFC.

      Regards,
      Bill

      Author's profile photo Former Member
      Former Member
      Hi,

      good article. Thank you!

      I am searching for a way to grant permissions to start/stop specific channels to specific users. Unfortunately the role(s) do not differentiate between the channels. If you are allowd to start/stop you can start/stop all communication channels. Is there a workaround for this?

      Thanks!

      regards,
      André.

      Author's profile photo Former Member
      Former Member
      Blog Post Author
      Hi,
      Unfortunately, there is no authorization per comm chan.  It would be a nice feature to have.

      Regards,
      Bill

      Author's profile photo Sandhya Tai
      Sandhya Tai

      Hi William,

      Thanks for the information provided in this blog.

      How can we keep channel in automatic mode without RWB.

       

      Regards,

      Sandhya.