Message Mapping as Artifact and Creating Resource Schemas
As per new feature in CPI, we can create Message Mapping as Artifact and deploy before using in any integration flow. There are already few blogs , where you can see how to create Message Mapping as Artifact and the limitations.
SAP Cloud Integration – Message Mapping as Artifact | SAP Blogs
In this blog, I will cover alternative step-by-step process to create Resource Schemas for IDoc and any other XML structure, which we use to create easily in SAP PI/PO. But if we don’t have SAP PI/PO instance and we are using only SAP Cloud Integration, then we can follow below process to Create any XML Schemas and generate IDoc Schemas.
Creating XSD using Eclipse:-
Create JAVA project using Eclipse (JAVA perspective).
Change Perspective to XML and refer any folder in your local machine to create XML Schema.
Create XML Schema File and give any name and click Finish.
You can see below Schema created. Then right click and add element.
Click on the newly created element and Set Type to “Complex Type” and “anonymous”.
Remove Prefix and Target Namespace form the element and add prefix for attributes.
This we are doing as per SAP PI/PO External definition.
Click of the element and add element and change to your required field names with occurrence.
Now you can find the newly created Schema in your local machine (path which you already provided earlier during creating XML Schema file) and you can use this directly in SAP Cloud Integration Message mapping as source or Target Resource.
Generating IDoc Schemas:-
Go to transaction WE60 and provide the IDoc Type , which you want to generate Schema.
Click of Documentation –> XML Schema
XML Schema created and you can download to local machine.
Using created Schemas in Cloud Integration Message Mapping:-
Open Cloud Integration and create Message Mapping as Artifact.
Import both the structure to message mapping.
Save and click Simulate to test the Message Mapping.
While Importing IDoc Schema, you will get below pop up to change Occurrence.
You can change Occurrence to “unbounded” from all those have like “99999” or “999999”.
Working with RFC:-
I don’t find any way to create RFC structure, but generally we can create input structure Manually while calling any RFC There is already few blogs which describe in details, we can refer below one.
- There might be different way of doing this , but I really like this.
- I hope this will help as we are all moving forward towards SAP Integration Suite.
- Any suggestion and easy why of doing , always welcome.
Hi Bijayashree Banoj Brahma,
the fact that IDoc/RFC metadata cannot be easily imported into CPI is certainly a missing feature.