Control Communication Channels Externally without using RWB
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.
- Start and logon to the J2EE Visual Administrator.
- Navigate to: Server 0 -> Services -> Security Provider
- In the screen on the right, select sap.com/com.sap.aii.af.app*AdapterFramework
- Select the tab: Security Roles
- 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:
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:
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.
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:
The communication channel is now stopped.
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
good one . cool thing to know .
Thanks
Sreeram.G.Reddy
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
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
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??
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
really great info, I had missed that.
It'd work greatly improving user interface in some iview in Portal. 🙂
Regards,
Henrique.
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
You can try, in your URL, sap-username and sap-password.
Regards,
Bill
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
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
Thanx
Aamir
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.
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
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
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
However, my communication channel restarts itself, how come?
selina
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
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
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
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é.
Unfortunately, there is no authorization per comm chan. It would be a nice feature to have.
Regards,
Bill
Hi William,
Thanks for the information provided in this blog.
How can we keep channel in automatic mode without RWB.
Regards,
Sandhya.