cancel
Showing results for 
Search instead for 
Did you mean: 

Sending message stream from Legacy to PCO15 using TCP IP

Former Member
0 Kudos

Hi Experts.

We have a requirement to connect to legacy system (which is on Oracle V11.1.0.6.0) and uses TCP/IP communication on Unix to send messages out.

On receiver end we have PCO 15 and SAP MII 14 on windows, which should accept and process messages send by legacy.

Could you please help us on how to achieve communication ?

Thanks,

Swanand

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Steve,

Thanks for all your inputs. We are tying to work on first option. Also exploring on data base connectivity to legacy data base which is oracle from MII.

Thanks,

Swanand

Former Member
0 Kudos

Hi Steve,

We achieved communication by making legacy system server while sending data to PCO. We are getting around 4-5 seconds delay while data sending form MII-PCO. Can we improve performance using any PCO configuration?

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

Are you stating that it takes 4-5 seconds from time the PCoQuery is executed in the MII transaction until the message is received in the legacy application? There are no particular timing constraints on the message transfer. Normally sending a message to PCo from MII is in the mSec time range, depending on the network. PCo sending the message to the source should also be in that time range.   How are you timing the events?

Regards, Steve

Former Member
0 Kudos

Hi Experts,

We created socket agent to receive data from legacy, by providing MII server IP & port (11016). Legacy is now sending data stream to PCO. But in PCO we are getting error as,

Manufacturing Exception : severity - fatal - Invalid protocol type, at SAP.Manufacturing.Connectivity.protocol.Custom.PCOQueryRequestHandler.receiveRequest(Object Handler)

Please advice.

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

You cannot query a Socket Agent from MII. You can set up a PCo Notification in the socket Agent Instance to call an MII transaction and pass the contents of the received data stream to the transaction.  YOU do not need to query the Socket agent now, as it will send the data as it is received.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

Thanks for the reply.

To receive data from Legacy to PCO via TCP/IP we created below configuration,

  1. Created source system as Socket Agent with address as MII server IP and Port 11016
  2. Created Agent instance - Not configured Query ports & tag query tabs
  3. Created notification for Agent. In Destination tab of notification, we configured MII BLS and provided transaction input to accept message stream

Please let me know if above steps are correct.

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

Steps are correct. Make sure that you have an Agent Instance Subscription item for the Socket Agent message; and that the Notification trigger logic is set accordingly, and that item is assigned to the Notification Output. You will also need to test the Notification to get a copy of the message XML and use that as content of the transaction Input property of type XML, and select that input property for the BLS transaction you are calling.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

We have taken care of all points suggested by you. But still not able to receive message stream from legacy. Legacy Application team able to connect & send messages to the IP (MII Server IP) and Port provided to them, but not able to see those messages in PCO log, nor in MII BLS write file.

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

Is the legacy application a server (listens for a connection from a client) or a client (connects to a server by IP and port)?

PCo can only connect to a server as a client, so the Socket Agent must contain a connection to the IP and Port that the server listens on, along with the message terminator or lengh settings.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

Legacy application is a server. While sending message from MII to legacy, we configured socket agent (SEND) with IP of legacy system (10.20.0.73) and port which legacy is listening (11011). With this configuration we able to send message to legacy.

Issue we are facing while message coming back from legacy to PCO. Legacy is sending data to IP (MII server IP) & Port (11016) which is opened on MII server. In PCO socket agent (RCEV) we configured MII server IP & port (11016). In notification we have provided MII BLS and input parameter of type XML to receive data in MII.

Please advice if this is correct.

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

Your configuration needs to be as follows:

  • Configure PCo Socket Agent to connect to the legacy app IP address and port (10.20.0.73/11011).
  • Configure legacy app to reply over the same port that it receives the SEND message.
  • Configure the PCo Socket Agent Instance with a Subscription item to the message tag, and configure the Notification to output the Message tag to MII.

Please provide screen shots of:

  • Socket Agent Configuration
  • Socket Agent Instance Host tab, Subscription items tab
  • Socket Agent Instance Notification trigger tab, Output tab, destination tab.

This will make it easier to determine if your configuration is correct.

Also, can you please provide the process flow of the messages from MII to legacy, and legacy to MII, and what actions need to be executed on receipt of the legacy response.

Regards, Steve

Former Member
0 Kudos

Hi Steve,

I had a call with legacy team to understand scenario in detailed, and they said

Legacy acts as both server & client. Sending process (to MII) tries to connect to port 11016 which is opened on MII server and receiving process (to Legacy) listen on port 11011 on legacy IP (10.20.0.73)

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

You cannot open a socket connection directly to MII as you have described unless you have developed some customization in MII to allow this.  Also, PCo cannot be a Socket server, only a client. The simplest way to make this work is to have the legacy application write the response on the same port that it receives the message on.

There may be another way to accomplish this. Do you have any other PCo Agents using OPC? If so, which OPC Server is PCo connecting to? 

Regards, Steve

Former Member
0 Kudos

Hi Steve,

Thanks for the reply. PFB screen shots of what we tried to configure.

From SAP MII-PCO to Legacy Communication

  • Created Socket agent source in PCO with IP - Legacy System & Port - Listening on that system

         

  • Created Agent Instance for ASRSSEND

         

  • Subscription Items Tab

     

  • Query Port Tab

         

  • Created Notification

         

  • Output Tab

    

  • Message Delivery Tab

         

  • Destination tab

      

With these configuration we were able to connect to legacy and push some messages from MII.

From WCS to PCO-SAP MII -

We have provided MII server IP & port to legacy system team, they are able to connect to us on that port, but we are not able to receive any messages from them. Below configuration is in placed.

  • Created socket agent source in PCO with MII Server IP & Port

         

  • Created Agent Instance for ASRSRECV

    

  • Subscription Item

    

  • Not configure anything on Query Port & Tag Query Tab
  • Notification created

    

  • Output Tab

    

  • Message Delivery Tab

    

  • Destination Tab

    

As per your yesterdays comment, while receiving messages from Legacy we should use same IP & port which we used to send message to legacy. We tried this option, legacy team said, as our socket agent connected to port 11001 on legacy, they are not able to send messages to that port.

What kind of customization will required in MII to make above configuration work?

Please advice.

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

What kind of error was reported by legacy when you tried to send a message from legacy to PCo over the common port 11001? Did you see any log messages in the PCo ASRSRECV Agent Instance about the message?

Regards, Steve

Former Member
0 Kudos

Hi Steve,

They are simply saying they are not able push messages as our (MII) sending process connected to port 11001. As soon as we stop socket agent ASRSSEND, they able to push message, as we stop agent, we are not able to receive that message.

On other hand, I did not see any messages in log of ASRSRECV, when they tried to send to MII server IP & port.

Thanks,

Swanand

former_member196557
Active Contributor
0 Kudos

Hi Swanand,

  1. You cannot directly write to any MII socket from legacy, there is nothing in MII that can process this connection.
  2. Can the legacy application set up the response port as a listener so that it can write to whatever is connected to that port (a PCo Socket Agent connection)? If not, then I will propose one of the following:

    1. Develop a custom MII object that can accept a socket connection from legacy and then call an MII transaction -- I do not know what specific customization would be required to accomplish this.
    2. Develop a custom PCo Source Agent, using the PCo Agent SDK (Microsoft.Net Visual Studio 2012 C# development environment), that can act as a Socket Server to receive the message from legacy client and then through an Agent Instance, call the MII transaction to process the message.
    3. Purchase and Implement the Kepware KepServerEX OPC Server's UCON (User Configurable) device driver to provide the both the send and receive TCP Socket connections to the legacy system, PCo, and MII. KepServerEX can expose the outbound and inbound messages as OPC Tags, and PCo can connect with the OPC DA Agent and Instances to provide the outbound and inbound connections to MII.  I have implemented this approach previously and it works well.   This option does not require customization or program development, only configuration. Note that you can deploy KepServerEX and test the solution before you actually have to purchase a license to enable it, KepServerEX will run 2 hours fully functional, then requires a restart, until the license is applied.

Regards, Steve

0 Kudos

Dear Swanand,

The other question would be why you actually need PCo to query data from Oracle? Cannot you omit it by using SQLQuery directly from MII transaction to the Oracle database?

Br, Alex.

Former Member
0 Kudos

HI Alex,

Legacy system can only communicate via TCP/IP to any other system.

So while sending data to legacy, we have created socket agent in PCO and configured legacy IP & port. Using notification and PCO query in MII BLS, manage to send message stream to Legacy system. But not clear on how backward communication will happen.

Thanks,

Swanand

0 Kudos

Dear Swanand,

You will be able to setup a Query Scenario only, but not a Notification Scenario.

To do that you'll need to create an MII Data Server with the corresponding connector like PCo Connector and then use PCoQuery in MII transaction tied to this Data Server.

On PCo side you'll probably need ODBC Source System and its Agent.

And then MII Data Server will need to be connected to PCo from MII menu.

Br, Alex.

Message was edited by: Alexander Teslyuk

Former Member
0 Kudos

Hi Alex,

As per my understanding messages are being send by Unix processes using TCP/IP and not using oracle. So still can we have ODBC source in PCO ?

Thanks,

Swanand

0 Kudos

Hi Swanand,

I think it should work even if Oracle is installed on UNIX. You will need to create a DSN file, see details here:

ODBC Source System - SAP Plant Connectivity - SAP Library


Br, Alex.