Tuesday, 4 January 2022

How to view the version/ build of SAP CPI

 How to view the version/ build of SAP CPI, 

1. Login to the tenant and right corner click on the account profile icon

2. On the dropdown click on "About"







Monday, 20 December 2021

Google Chrome SAP MDPGroup SuperEasy Extension for SAP CPI /SCPI

SAP MDPGroup SuperEasy Extension:

In Google Chrome, Go to the three dots on the right top -> More Toole -> Extension.

Search for extension "CPI Helper" -> Add to chrome




MDPGroup SuperEasy Extension adds UX improvements and features to SAP Cloud Platform Integration Web UI

Features:

-System Logs Viewer that shows last lines with a quick refresh 
-Simulation mode automatically persists input headers and body. You can also extract or fill JSON data. 
-Partner Directory User Interface 
-ProcessDirect and JMS Dependency Graph for Flows 
-Groovy Syntax Checker 
-MPL CustomHeaderProperty Search 
-Settings for enabling/disabling extension features on regular CPI UI





Google Chrome extension for SAP CPI Helper /SCPI

SAP CPI Helper: 

In Google Chrome, Go to the three dots on the right top -> More Toole -> Extension.

Search for extension "CPI Helper" -> Add to chrome




Features of it:

Extends the SAP Cloud Platform Integration with some useful features to improve usability.
CPI Helper Chrome-Extension

This Chrome Plugin extends the SAP Cloud Platform Integration with some useful features. It includes a button to activate traces and a message sidebar directly in the Integration-Flow-Designer.
As SAP is not well known for it's usability it was time to integrate some features ourselves.

Features
Integration Flow Designer Improvements:
- Sidebar with processed messages
- Activate InlineTrace to see message route in integration flow designer
- Directly see trace messages in integration flow designer
- Pretty print for trace messages in integration flow designer
- Button to switch on trace
- Directly go to traces of specific message
- Directly go to logs and attachments of specific message
- Pop-up with error-message when hovering message in sidebar
- Pop-up with deployment info
- View and delete variables in info pop-up



Useful features in iflow on SAP CPI/ SCPI

While developing the objects in the SAP CPI iflow, we might not aware of or notice some features as a beginner. I can show some features which you can utilize it.

1. View the deployment status in the iflow development screen:

      Earlier we used to view in the manage integration content on Dashboard. Now we can view directly in the iflow development screen.

Can view deployment status such as Run time status,Deployed By, Deployed On, Deployed version



2. Copy the configuration from one palatte to others

     1. To copy the palatte object with its configuration


      2. To copy the adapter configuration:

3. Simulation mode for testing the mapping



        Test the mapping by importing the input data in xml format.




4. Run the complete iflow internally.

        Note:  It won't work on the timer flow.

        1. Start the simulation from where it needs to be tested


        2. End the simulation to where it needs to be tested.


      3. Start the simulation run using the below button:


5. Import the mapping from the local machine or from other iflows.

      1. Click outside of the integration flow, then go to resource tab below.

      2. Select the mapping/scripts which you want to import from other flow/local machine




6. From the monitoring screen, we can direct to iflow and can view / edit the artifact(iflow)








Monday, 11 October 2021

Groovy script for picking the field from xml in array and select the particular value

 

Groovy script

import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
import groovy.json.*;
import groovy.util.logging.*;
import org.codehaus.*;


def Message processData(Message message) {
def body = message.getBody(java.lang.String) as String;


def XmlDataObject = new XmlSlurper().parseText(body)


def xmldata = []
def s="";
XmlDataObject.'**'.findAll { it.name()== 'UserServiceTransactionProcessingTypeCode'}.each { a ->
xmldata << a.text() }

message.setProperty("StatusCode",xmldata);
def newxmldata = xmldata as String[]
newxmldata = newxmldata.contains("ZCW1")

message.setProperty("StatusCode1",newxmldata);

return message;


}




Friday, 1 October 2021

Pick the xml field from the huge payload and remove square brackets

 Pick the xml field from the huge payload and remove square brackets.

Groovy Script:


import com.sap.gateway.ip.core.customdev.util.Message;

import java.util.HashMap;

import groovy.json.*;

import groovy.util.logging.*;

import org.codehaus.*;


def Message processData(Message message) {

def body = message.getBody(java.lang.String) as String;


map = message.getProperties();

requestid = map.get("ReqId");

taskid = map.get("TaskId");


requestid= requestid.toString().replaceAll("\\[", "");

requestid= requestid.toString().replaceAll('\\]', "");


def XmlDataObject = new XmlSlurper().parseText(body)


def xmldata = []

def s="";

XmlDataObject.'**'.findAll { it.name()== 'request_id'}.each { a ->

xmldata << a.text() }



def last = xmldata.last()

def xmldata2 = []

XmlDataObject.'**'.findAll { it.name()== 'task_id'}.each { a ->

xmldata2 << a.text() }

def last2 = xmldata2.last()

message.setProperty("requestid1",last);

taskid= taskid.toString().replaceAll("\\[", "");

taskid= taskid.toString().replaceAll('\\]', "");

message.setProperty("taskid1",last2);

message.setProperty("taskid2",taskid);

return message;

}



Wednesday, 29 September 2021

SAP CPI Helper -Chrome Plugin for SAP CPI/HCI

We have a better feature in SAP CPI to enable the trace using the chrome plugin instead of changing the log level in the manage integration content.


To enable the chrome plugin "SAP CPI Helper":

1.Chrome browser -> Settings -> Extension -> Left top corner click three lines near to Extensions.

2. Below can see Open Chrome webstore -> Serach for "SAP CPI Helper"

3. Install it and can reopen the browser

4. Logout and login to the CPI tenant -> Go to Iflow developer page.

5. Can see the new option at right top corner as "Trace, Message, Info"

6. Here you can enable trace and when you change and deploy, the trace will be automatically activated.


This is a useful feature for the developer. Hope this helps, please do comment.