cancel
Showing results for 
Search instead for 
Did you mean: 

Want to import Class Attributes from ERP to PI

Former Member
0 Kudos

Hi all,

I'm publishing Asset Information from SAP to PI to an external system.

The information includes EQUNR,SERNR, TIDNR and Partner information.

In PI I manually defined a DataType in PI of Asset and then created a service definition.

I then generated a proxy in ERP to publish the Asset.

I have generated a class in SE24 ZCL_EQUI and created a publish method which calls the client Proxy and it works fine.

Here is my question

Can you import the data definitions(attributes) of the class into PI (similar to how you can import RFC and idocs)?

The reason I ask is rather than manually definining the message Type in PI it would be much more convenient to import it from the class ZCL_EQUI.

This way the data would have the same types and I could update PI from SAP.

I know this may seem a little backwards but it would be useful in this case(think of it as similar to importing an idoc definition).

One approach I could take is to create a Service Definition for the constructor method (which takes in the Equipment Number and returns all the information). I could then publish that to ESR and import the WSDL into PI and then use the data definitions for the publishing of the equipment. ( a little longwinded but it should work).

However it looks like for creating the service defintion I'd have to create a function module (RFC enabled) which calls the class.

I can't see an easy way to create the service definition straight from the class.

So in summary I suppose I have a couple of questions

1) Is there a way in PI to import data structures from ERP?

2) Is there a way in PI to import attributes from classes?

3) Is there a way to create a service defintion straight from a class (or do you always have to wrap it in a function module)?

4) Is there a way to generate a WSDL from a class?

If you have any links or documentation I should read, please let me know.

Thanks in advance for any help.

Regards,

John

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Hi John,

the answer to all your questions is: No.

The idea of PI ESR is having a development point for all interfaces. So if you need a data type in ERP, you should rather define the data type in ESR and generate a structure type in ERP with SPROXY.

Answers (0)