SAP Cloud Platform Integration (CPI) Part 11 – Palette functions 5 – Message Mapping

In SAP Cloud Platform Integration (CPI) Part 11 – Palette Functions 5, we will explore the various palette functions available in CPI. This part of the series will dive into advanced features and functionalities that can enhance your integration processes. Understanding these palette functions is crucial for optimizing your integration scenarios and ensuring seamless connectivity.

Outline of this blog series : SAP Cloud Platform Integration (CPI) Part 11 – Palette functions 5

1. SAP CPI Introduction
2. SAP BTP tools and features overview (BTP, Global Account, Sub-Account, Entitlements, Connectivity, Security)
3. SAP CPI Web IDE overview
4. Registering a trial account and enrolling to SAP CPI service
5. Deep dive into Cloud Integration features with real world scenario example
6. Use cases of palette functions
7. Adapter configurations
8. Using Cloud connector for connecting to backend SAP systems
9. Overview on API Management & Open Connectors
10. Integration using Open Connectors with real world example

In short, below is the content we will elaborate in this tutorial:

  1. Mapping

Today we will explore the standard SAP offered range of capabilities in SAP Cloud Platform Integration (CPI) Part 11 – Palette Functions 5. In previous posts, we covered the first 5 of the highlighted range of functions. In this installment, we will delve into the planning range capabilities, which are a fundamental part of the integration process.

Mapping

SAP Cloud Stage Mix (SAP CPI) gives message planning highlight. Like PI/PO, we have the message planning highlight with graphical proofreader and a similar graphical planning capabilities. CPI gives us many mappings’ range capabilities for various usecases.

– Message Mapping
– ID Mapping
– Operation Mapping
– XSLT Mapping

We have 2 choices to make message planning. It is possible that it very well may be a curio itself or can be made inside IFlow.

Once made, place the planning capability inside the IFlow and tap on Relegate choice which will rattle off all the planning curios.

Points to know:

  1. We have to upload the XSD schema of the source and target message in IFlow -> Resources -> Add -> Schema -> XSD, before starting to work on the mapping operations.
  2. We have the simulate operation where instead of testing the mapping end to end, we can upload the test XML file and click on SIMULATE -> TEST option to view the output.

Place the message planning range in the IFlow and tap on Make to make another message planning or Appoint on the off chance that you have .mmap record transferred currently in the assets segment or on the other hand assuming you have message planning ancient rarity made.

In the left side, you will see the source message and in the right side, target message. As said previously, transfer the XSD blueprint in the assets segment of that IFlow. Graphical proofreader can be found underneath, and you will actually want to see the message planning capabilities once you click on map any field. Click on source field and drag it to the separate objective field for 1 to 1 planning.

These are the standard planning capabilities given by SAP in the graphical manager apparatus. There is likewise an arrangement to insert cool code on the off chance that the standard usefulness isn’t reasonable to the prerequisites, which can be found at the highest point of the above picture.

Arithmetic – add, subtract, equals (number), absolute, sqrt, square, sign, neg, inv, power, lesser, greater, multiply, divide, max, min, ceil, floor, round, counter, formatNumber.

Boolean – and, or, not, equals(boolean), notEquals, if, ifS, ifWithoutElse, ifSWithoutElse, isNil.

Constant – constant, copyValue, xsi:nil.

Conversions – fixValues, ValueMapping.

Date – currentDate, dateTrans, dateBefore, dateAfter, compareDates.

Node functions – createIf, removeContexts, replaceValue, exists, splitByValue, collapseContexts, useOneAsMany, sort, sortByKey, mapWithDefault, formatByExample.

Statistic – sum, average, count, index.

Text – concat, substring, equals(string), indexOf(2), indexOf(3), lastIndexOf(2), lastIndexOf(3), compare, replaceString, length, endsWith, startsWith(2), startsWith(3), toUpperCase, toUpperCase, trim.

Presently we will see an illustration of message planning of IDOC to Programming interface.

For IDOC we will utilize COND_A02 fundamental sort and Programming interface will be API_SLSPRICINGCONDITIONRECORD_SRV.

To start with, we really want to get source and target XSD structures. For IDOC COND_A02 structure, we should import it from SAP framework, T-Code – WE60.

Enter the basic type as COND_A02 or select the required one through F4. Once selected, click on Documentation -> XML Schema.

Select YES or NO for making documentation for Unicode record. It doesn’t influence the design. After tapping on the popup, you will be displayed with the XSD structure.

Right click -> View Source -> Save the file as XSD.

Presently we will perceive how to get the Programming interface XSD structure. For that, we really want to add a collector channel with OData connector. In the OData connector setup, we want to add the location, intermediary type as Web/On-Reason and certifications. In the location field, enter the URL in the underneath design:

http://<host>:<port>/sap/opu/odata/sap/<API_ServiceName>

 — API_ServiceName – API_SLSPRICINGCONDITIONRECORD_SRV

In the Handling tab, select the method of activity, I have chosen POST. Enter the substance wherein you maintain that the information should get posted. After choosing the substance, click on the SELECT.

Whichever fields you want, select that, or snap on SELECT ALL FIELDS. In the event that you really want the construction XSD, click on the Produce XML Mapping DEFINITION choice. When important fields are chosen, click on FINISH. It will save the XSD construction to the IFlow.

This XSD construction can be utilized as target structure in planning. Click on Planning range symbol – > Message Planning and tap on Make symbol.

Transfer both the XSDs by tapping on Add Source Message and Add Target Message.

Simplified for source and target field. If necessary, you can add the planning capabilities.

Once finished, to test the objective construction, get any XML payload and transfer it to the underneath featured region.

Click on Reproduce.

Click on TEST.

The output has been successfully created. You can click on “Download Result” in XML format. This illustrates how message mapping works in SAP Cloud Platform Integration (CPI) Part 11 – Palette Functions 5.

Cheerful learning !!!!!

 

YOU MAY BE INTERESTED IN

Top SAP ABAP Interview Questions (2024)

Understanding the Role of an SAP Application Support Specialist

How to find badi in sap abap ?

 

WhatsApp WhatsApp us