cancel
Showing results for 
Search instead for 
Did you mean: 

Providing ERP metadata via PI to NON-SAP Systems

martin_pichlo
Participant
0 Kudos

Hi Guys,

one of our customers has several NON-SAP systems which are using JCO for IDoc and RFC communication with SAP PI 7.31 Java Single Stack. The point is, that all these external programs needs IDoc- oder RFC/Dictionary metadata of the SAP ERP. As result all these programs needs to create two connections to transfer data. The first one to SAP ERP to receive the metadata and the second one to SAP PI to transfer the data itself.

Here an example for JCO 3:


//connection to pi for data transfer

JCoDestination destination_pi=JCoDestinationManager.getDestination("PI");

String tid = destination_pi.createTID();

//connection to erp for metadata

JCoDestination destination=JCoDestinationManager.getDestination("ERP");

IDocRepository iDocRepository = JCoIDoc.getIDocRepository(destination);


So far so good. The point is that some of these applications should move to external partners (outside the companies firewall) and as part of the IT strategy it is planned to prohibit the direct access to SAP ERP for these partners for security reasons.

Is there any chance to provide the needed SAP ERP metadata by SAP PI to the external programs? For example the IDoc metadata are available in the metadata cache of the PI. Is there any chance to share this with the external programs? When trying to receive for example IDoc metadata from PI we got the following error by default:

Caused by: RfcException: [<extern>|mr0123]

message: Unsupported function module IDOCTYPE_READ_COMPLETE used with IDocActivationSpec registered for PROGRAMMID on system j51dpi_DPI_51 causes 'IDOCTYPE_READ_COMPLETE' could not be created.

Return code: RFC_SYS_EXCEPTION(3)

error group: 104

key: RFC_ERROR_SYSTEM_FAILURE

Cheers

Martin

Accepted Solutions (1)

Accepted Solutions (1)

MartinB2
Explorer
0 Kudos

Hi Guys,

imo, the RFC call to read the IDOC Metadata is just a call to a to a function module in the ERP Backend. Shouldn't it be possible to forward the RFC Call through the PI System via  an Integration Sceario? So you could just use one Destination for reading the metadata and send the IDOC.

Has anyone tried that already?

regards

Martin


martin_pichlo
Participant
0 Kudos

Hi Martin B.,

I have had the same idea some time ago. Unfortunately it didn't work for me at that time. May you have a chance to verify that approach again?

Regards

Martin P.

MartinB2
Explorer
0 Kudos

Hi Marin P.

i've tried the approach this morning. Unfortunately it doesn't work.

I've Set up an Integrated Configuration in PO which is forwarding the IDOCTYPE_READ_COMPLETE Module. As incomming RFC Connections on PO are handled via Gateways (gwhost/gwserv and ProgID), a call like to an ABAP System is not possible. So i modified the respository destination that it is pointing to the same Gateway wich is set up in the RFC sender channel of the ICo. Sending a testmsg from PIMON worked, but the the Jco Client doesn't like it:

Unable to get meta data for IDoc type ORDER05: Invalid configuration for destination PODest. The destination refers to a registered RFC server program and is lacking an additional repository destination property for targeting an SAP AS ABAP system.

-> Conclusion: You allways need to access an ABAP Stack for reading the Metadata Repository, forwarding via PI/PO Single Stack is not possible

regards

Martin B.

Answers (4)

Answers (4)

daniel_guentner1
Explorer
0 Kudos

Hi all

This answer is very late but maybe helpful for other participants.

This error "lacking" can easily be solved by creating a Destination in NWA

Do not fill the first tab “Connection & Transport”

Open Logon Data tab and enter the Destination to your ABAP system as Repository Connection.

The Authentication section is not needed but you have to fulfil it with dummy values.

The tab Specific-Data must be filled with the PO gateway information as generic-option values.

jco.client.gwhost

jco.client.gwserv

jco.clietn.tpname

--> Ping Destination will work fine, Jco Server Program must be registered on the PO as well.

BR Daniel Guentner bmtg.ch

Former Member
0 Kudos

Hi Martin,

We have the same scenario where a 3rd party non-sap system will be sending us an RFC call to SAP PI. Can you help me understand the config you have done in your SAP PI single stack to achieve this scenario. Looking for more reg the sender RFC comm channel

szymon_bolek
Participant
0 Kudos

Martin, BTW, have you been able to resolve the primary problem of your post, namely getting repository data via pi for external partners?

cheers

simon 🙂

szymon_bolek
Participant
0 Kudos

Thank you, but I am going to reply to this question myself So you did not reolve this problem via pi, because this was and is not possible.

cheers

s

martin_pichlo
Participant
0 Kudos

Hi Szymon,

as far as I know it's actualy not possible to read metadata via PI. So all subsystems needs at least one connection to the SAP ERP itself. May you could create another ticket to stress this topic.

Cheers

Martin

szymon_bolek
Participant
0 Kudos

Thanks, I already did:

No reply so far

My 'mysterious' source however says that there is no such functionality planned at the moment. A pity for 3rd party systems. I think the reason is to force other communication technologies as web services. Even if there are multiple consumers still using RFC, not wanting or - for important reasons - not being able to switch. So, unless we write our own adapter and fork jco, direct connections have to be created.

cheers

s

szymon_bolek
Participant
0 Kudos

Hi Martin,

I know this is an old thread, but, could you provide me your example file of PI.jcoDestination. I would like to connect 3rd party system with sap pi java single stack via JCo.

thanks and best regards

simon 🙂