Quantcast
Channel: SCN : All Content - SAP Process Orchestration
Viewing all 1235 articles
Browse latest View live

PI REST Adapter - Blog Overview

$
0
0

Do you look for a way of integrating your SAP PI landscape with other REST services or to publish a REST service yourself using an SAP PI Endpoint?

If yes, then this blog could be of interest for you.

 

Do you have already had a look at the SAP PI REST Adapter and its configuration and now you feel “a bit overwhelmed” by the amount of settings?

If yes, then this blog is also the right one for you.

 

We have prepared a collection of blog entries for the REST Adapter that shows architectural concepts and configuration of the SAP PI REST Adapter and explain the internal processing steps. We also added some sample scenarios to make it easier for you to understand how your scenario can be implemented using the PI REST Adapter.

 

Let's get started.

 

The first Blog in this series is about the REST Adapter concept and its configuration capabilities. It is a good ramp-up start for working with the REST adapter. It is called

PI Rest Adapter - Don't be afraid

 

The next blog in the series deals with a simple scenario that shows how to consume a synchronous RESTful service. In the example, the target URL is set dynamically by using variables.

REST Adapter - Consuming synchronous RESTful service

 

A useful scenario is the next one that shows how to call a SAP function module via PI’s RFC adapter, and expose the same as a RESTful service.

PI REST Adapter – Exposing a function module as RESTful service

 

If you like to know more about JSON conversion within the REST adapter, take a look here:

PI REST Adapter – JSON to XML conversion

 

In case of the provisioning of RESTful services using a REST sender adapter, you have full flexibility for defining the endpoint of the service. An example of a dynamic endpoint can be seen here:
PI REST Adapter – Defining a dynamic endpoint

 

Within the REST adapter we have shipped a set of pre-defined adapter specific atributes that can be used to control the message flow. Furthermore, you have the possibility to define own custom attributes. An example is shown here:

PI REST Adapter – Using dynamic attributes

 

A new concept in PI which is unique to the REST adapter is that you are able to expose one and the same endpoint for addressing multiple Integration Flows. Besides the dynamic endpoint definition explained above, this gives you one more option in the definition of endpoints and your routing rules.

PI REST Adapter – Same endpoint for multiple Integration Flows

 

How the full set of CRUD operations can be mapped to the operations of a Service Interface in SAP PI is shown in the following examples.

In previous releases, we were limited to one Quality of Service per channel. So, in PI REST Adapter - Map CRUD operations to Service Interface Operations we stick to the POST, PUT, and DELETE operations which are all of asynchronous mode, and omitting the GET operation which is of synchronous mode.

With 7.31 SP16 / 7.4 SP11, we have introduced a new feature that allows you to dynamically set the Quality of Service either by HTTP operation or interface operation. This way, we are able to expose all operations as a single end point. An enhancement of the scenario is described in PI REST Adapter - Map CRUD operations to Service Interface Operations with dynamic setting of Quality of Service

 

If you like to learn more about the various options that the REST adapter supports for handling error situations, check out the following blog.

PI REST Adapter - Custom error handling

 

Some RESTful services require specific http headers. The following blog shows you along a use case how you can add custom http header elements to the receiver REST adapter.

PI REST Adapter - Define custom http header elements

 

If you like to poll REST APIs, check out this example: PI REST Adapter - Polling a REST API.

 

Learn how to access Concur travel and expense management solutions via its REST API, particularly focusing on the OAuth authorization at PI REST Adapter - Connect to Concur.

 

Still not found what you were looking for?

No problem! Just let us know what kind of information is missing and how we can help.


HCI Custom functions using Groovy Script

$
0
0

Hi,

 

As of now we don't have PI/PO in our landscape .So for writing custom Functions in mapping I need to go for Groovy script.

 

I have a simple requirement of string array concatenation .

 

Below is my code snippet for the same:

 

import com.sap.it.api.mapping.*;
def String StringArrayConcatFunc(String Text[]){  def a ;     a = Text.join(",");    return a ;
}

I executed the above code in standalone groovy console ,its working fine .I created the custom function in mapping and used the above code -->save

 

Now when I click on "ExecuteChecks" or when I deploy the project it's showing error in mapping @custom function that I used saying "

Mapping contains incomplete expressions"

 

MapError1.jpg

 

But I can able to see the file in the folder.

 

GrooviScriptFile.jpg

 

Seems groovy script file is not loading into functional library while executing checks or while deploying into tenant.

 

Dear HCI experts could you please advice.It would be really helpful for me as well as others those who are new to using groovy script in HCI. Looping in @Sujit Hemachandran  .

 

 

 

Thanks

Venkat

CCDT in JMS Sender Channel---Error

$
0
0

Hi Experts,

 

In our organisation we are having a scenario where in which, it is required for us to use Client Channel Definition Table(CCDT) for one of the JMS Scenarios.

We followed the below blog and performed the same steps as explained. But getting an error saying "Error connecting due to missing class: java.net.URL"

 

http://scn.sap.com/people/anandan.krishnamoorthy/blog/2010/06/08/high-availability-in-jms-adapter


We are facing this error only for this JMS channel and all other JMS channels are working fine.

Do we need to install any other JAR file for CCDT configuration..??

 

PFA the error and channel config screenshots for your reference.

 

Can anyone please help me out here as how to proceed further.

 

 

Thanks,

Prajwal

No response in SOAP Lookup

$
0
0

Hi Experts, I have been trying to create a soap lookup.The goal is to send a SOAP request and to get SOAP response back in the target message through a UDF SOAP Lookup. The structure of the HTTP Post request that we have received is this :       operation=list                      MX_PERSON                    10000001                    But the URL accepts only HTTP POST request and send the request using spml protocol. I have created the following UDF for this : AbstractTrace trace = container.getTrace(); String suma = ""; try { //instance the channel to invoke the service. Channel channel = LookupService.getChannel("BSVC_Test_ValueMapping","CC_SOAPReceiver"); SystemAccessor accessor = LookupService.getSystemAccessor(channel); // The Request message in XML. THIS IS THE LOOKUP SERVICE String SOAPxml="

" +                                                                 ""                                 + ""                                 + var1                                 + ""                                 + var2                                 + ""; InputStream inputStream =new ByteArrayInputStream(SOAPxml.getBytes()); XmlPayload payload = LookupService.getXmlPayload(inputStream); Payload SOAPOutPayload = null; //The response will be a Payload. Parse this to get the response field out. SOAPOutPayload = accessor.call(payload); /* Parse the SOAPPayload to get the SOAP Response back */ InputStream inp = SOAPOutPayload.getContent();  DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();  /* Create DOM structure from input XML */  DocumentBuilder builder = factory.newDocumentBuilder();  Document document = builder.parse(inp);   /* ConversionRate is available in the TAG ConversionRateResult in the Response XML */ NodeList list = document.getElementsByTagName("Response"); Node node = list.item(0);  if (node != null) { node = node.getFirstChild();        if (node != null) {  suma = node.getNodeValue();        }  } } catch (Exception e) { trace.addWarning("Error" + e);  } trace.addInfo("Service XXX success executed"); return suma; I have also created one SOAP receiver channel with WS_AAE with HTTP Protocol and SOAP 1.2. I am not getting any error message while testing but I get no response in the target field. Could you please tell me any solution?

HTTP PI ECC scenario

$
0
0

Hi all

 

I need a help regarding putting a scenario where in sender is third pary and sending an HTTP message to PI, which will pass to ECC Proxy for processing

 

I have done the ESB development, please could you guide me with step by step configuration of ID please

 

cheers

chet

JMS Receiver adapter like file variable substition method.

$
0
0

Hi Experts,

 

I am working on file to JMS scenario, they want to pass the file names to the target by placing the order number(which is coming from the source payload) in the file.

 

Can some one please help me to over come from this situation.

 

regards,

Uday.

Special character issue at SAP PO 7.4 single stack

$
0
0

Hello Experts, We are in the process of migrating interfaces from PI 7.1 to PO 7.4. For one of the inbound interfaces (File to Idoc) the special characters (ø ö ä å) are not populating correctly in the Idoc. We have tried the following steps till now – Source file is of the format .txt and encoding of the source file is ANSI. We have assigned the value ISO-8859-1 as the encoding format in sender channel and executed the scenario end to end. Note: Target Idoc XML payload carries the special character values as expected but the content in Idoc is having the special character values messed up as seen below - 1.png(Image) We have changed it to UTF-8 as the encoding format in sender channel and executed the scenario end to end. But now, target Idoc XML and the Idoc are not carrying the special character values correctly. 2.png(Image) Could you please help me out on how to proceed with this further? Regards, Uday.

XMLDAS for PI 7.31

$
0
0

Hi Experts,

 

We have successfully configured archiving for PI 7.31 Single stack using XMLDAS. However, the file storage is now reaching its limit, do you have any idea on how to delete archived messages? I assume that deleting directly from the file system is would cause an issue therefore there must be a standard way of doing it.

 

Thanks,

Christian


XMLDAS for PI 7.31

$
0
0

Hi Experts,

 

 

We have successfully configured archiving for PI 7.31 Single stack using XMLDAS. However, the file storage is now reaching its limit, do you have any idea on how to delete archived messages? I assume that deleting directly from the file system is would cause an issue therefore there must be a standard way of doing it.

 

 

Thanks,

 

Christian

Error in Migration tool

$
0
0

HI PI folks,

 

This is to seek help on an error in using Migration tool for migrating scenarios from PI7.10 to PO 7.4 EHP8.

 

We are using Scenario Migration option with Sender Agreement  option for scenario selection.

After scenario selection we are getting below error

 

Error is as follows:

Cannot migrate scenario. Details: Cannot read the Sender Agreement object because the Migration Tool uses the old 7.0 version of the Directory API to read from the source system and the object requires a higher version


Strange thing is that, this is not the case for all interfaces. We are getting this error only for few interfaces.


Please help to get rid of this error.


Kind Regards,

PO Consultant

How to implement the logic of devide with 1000 in PI?

$
0
0

HI Experts,

 

I have requirement that need to divide the value with 1000 when ever the field value has five numeric digits. The value will be like

 

1. 12.123415

2. 123.12312322

3. 1.2312

4. 12345.5678922

 

But  the logic of divide with 1000 has to applicable at case: 4 only.

 

Please help me here.

 

Regards,

uday

SAP PO 7.5 - any issues?

$
0
0

Hi Team,

 

Has anyone upgraded to the latest SAP PO version 7.5?

 

We are planning to upgrade/migrate from SAP PO 7.4 to 7.5. Have you encountered any minor or major issues during migration?

 

Appreciate your feedback

 

Thanks,

 

Carlo

File LookUP using UDF and Graphical Variable

$
0
0

Like other LookUp requirements(RFC/JDBC), we sometime get requirements where we need to LookUp a file from the PI/PO mapping and get the required data. The below wiki is a very good example that demonstrate the process to achieve this.

File Lookup in UDF - Process Integration - SCN Wiki

But in case you need to lookup the file where there can be thousands/millions of records and you need to lookup the content of the file for each record. In such cases, the mapping can run for hours if you try to connect the FTP for each record to get the corresponding data!

So what would be the workaround. The  new feature , in the Message Mapping tool of PI 7.1.,called Graphical Variable along with the WIKI mentioned earlier can make our life easy. How? Instead of checking the value for each record, we take all the contents of the File in the Graphical Variable and use them as and when required!

 

So in this case, the approach would be similar to below.

 

First we create a Graphical Variable in the target structure.

pic.jpg

Map that Variable like below.

pic.jpg

 

Then we write a code like below which is going to pick all the contents from the file(second function in above pic). Please make sure that the execution type is "All Values of Queue" if you use the below code!

pic.jpg

 

String server = "NAME OF THE FTP SERVER";

int port = "PORT OF THE FTP SERVER";

String user = "USER NAME";

String pass = "PASSWORD";

String seller = "";

 

      

FTPClient ftpClient = new FTPClient();

    try {

         ftpClient.connect(server, port);

         ftpClient.login(user, pass);

         ftpClient.enterLocalPassiveMode();

 

         String remoteFile1 = "FILE PATH/FILENAME WITH EXTENSION";

         InputStream inputStream = ftpClient.retrieveFileStream(remoteFile1);

         InputStreamReader reader = new InputStreamReader(inputStream);

    BufferedReader buffer = new BufferedReader(reader);

          

    String read;

 

 

 

 

        for(String line=buffer.readLine();line!=null;line=buffer.readLine())

        {

         result.addValue(line);

        }

     

        buffer.close();

 

 

        } catch (IOException ex) {

            System.out.println("Error: " + ex.getMessage());

            ex.printStackTrace();

        } finally {

            try {

                if (ftpClient.isConnected()) {

                    ftpClient.logout();

                    ftpClient.disconnect();

                }

            } catch (IOException ex) {

                ex.printStackTrace();

            }

        }

 

 

Now once the mapping runs, the Variable has got all the content from the FTP.

pic.jpg

Now you can use them as and when required without doing another polling to the FTP server! Below is an example.

In case you need further information on Graphical Variable, please seeSAP PI 7.1 Mapping Enhancements Series: Using Graphical Variable

REST Adapter: Problem converting XML containing arrays to JSON

$
0
0

Hi all,

 

we are using REST as a Sender Adapter. Works (almost ) like a charm

 

The problem we are facing is that we have an Array-like Element in the Repsonse XML DataType. Depending on the amount of actual elements in the array, the element gets converted to a JSON Array or JSON OBject.

 

E.g. If the element contains exactly 1 item, it is converted to a JSON object. If it contains more than one item, it is comverted to an array. if it contains no elements, it is not contained in JSON at all.

 

Case 1: More than one element in XML

 

consider following response XML:

<resultlist>  <item><value>item 1</value></item>  <item><value>item 2</value></item>  <item><value>item 3</value></item></resultlist>

it gets correctly converted to

{    "result": {        "item": [            {  "vlaue": "item 1"  },            {  "vlaue": "item 2"  },            {  "vlaue": "item 3"  }        ]    }
}

 

Case 2: Single element in XML

 

consider following response XML:

<resultlist>  <item><value>item 1</value></item></resultlist>

it gets NOT correctly converted to

{    "result": {        "item":            {  "vlaue": "item 1"  }    }
}

expected result:

{    "result": {        "item": [            {  "vlaue": "item 1"  }        ]    }
}

Case 3: No elements in XML

 

consider following response XML:

<resultlist/>


it gets NOT correctly converted to

{    "result": ""
}

 

expected result:

{    "result": {        "item": []    }
}

Bottomline

 

The point is that the consumer of the result cannot rely on the structure of the content. Sometimes the element is just en element, sometimes it is an array, sometimes it isn't even there...

 

 

 

The issue has been addressed at the following locations, but I havent found a solution and/or a note yet...

 

 

 

Thanks and best regards,

Sergei

SAP PO Architecture - Custom Portal calls exposed PO web service

$
0
0

We are currently in the process of building out a custom portal to pull data from SAP ECC, and we are struggling with determining what the architecture of the services should look like - mainly because we don't have total transparency on how SAP Process Orchestration works.

 

My goal is to provide a few base services for the applications. An order service that can create, update, and retrieve orders. A bunch of master data services that can perform lookups (Customer, Vendor, Material). How does SAP PO handle this architecturally?

 

From my basic searches, I've come up with the following:

  • SAP PO can expose basic BAPI functions for the creation, update, and retrieval of objects.
    • If this is the case, am I creating three separate services for each operation?

 

Is this true as to how SAP PO works? If not, is there a means to logically creating a base set of services and having abstractions within those services to handle various scenarios like different order types? Or am I simply sending in different parameters to a service based on a BAPI in the system?

 

How exactly does SAP PO work in exposing web services for simple objects such as a Trading Contract, Sales Order, Material, etc.? Any good links or tutorials I can hit?

 

Much appreciated.


REST JSON Response

$
0
0

Hi,

 

I have a sender REST scenario, where my sender is sending the JSON request to SAP PO, I am able to take the request map it to my receiver. When I am getting the response I need to convert the payload from XML to JSON. In this conversion I see an element which I have defined as String in xml in SAP PO that gets converted to integer in JSON response.

 

{"orderNo":"",

"taxTransactionDocID":"",

"responseCode":500,

"responseMessage":"Please select the address from proposed addressess "

}

 

Here in my xml I have defined responseCode as String but the value it carries is a number. When the response goes as JSON it shows up as a number.

 

         <xsd:element name="responseCode" type="xsd:string" minOccurs="0"/>

 

Thanks in advance.

 

Ravijeet

Interface not getting passed to NW BPM.

$
0
0

Dear All,

 

Greetings of the day.

 

We have an SAP to Webservice async scenario, through the NW BPM.

We are facing an issue in sending the trigger message (interface to BPM is XI 3.0 compatible) from SAP to the NW BPM. We are getting the following error.


Message could not be processed.Reason: com.sap.aii.proxy.xiruntime.core.ESPXISystemFaultException: Error encountered during processing of XI request message in inbound ESP; Hint: com.sap.engine.interfaces.webservices.runtime.RuntimeProcessException: Technical difficulties were experienced during process execution.



 

We are getting this the error when I am testing the functionality through WSNavigator or SOAP UI. (In actual scenario ABAP proxy will send the message to NW BPM).

 

I have tried testing the BPM from the Netweaver Admin and process is going into BPM. I can see the Interface which will be triggered first in the BPM, in the message monitoring.

 

Request your expertise in overcoming the error for triggering the BPM.

 

Thank you,

Best Regards,

Ajay

Importing project from HCI eclipse to HCI WebUI

$
0
0

Hi,

 

Could you please share your ideas on how to import an HCI  project from HCI tenant into HCI WebUI.

 

NOTE:It's custom developed project in eclipse and deployed into HCI tenant.

 

I tried the option of downloading the project into local machine and then importing the same file into HCI webUI ,but it's(WebUI) not accepting the file.

 

 

Thanks

Venkat

Adapter Module NameNotFoundException- in SAP PO 7.4

$
0
0

Hi Experts,

 

I am trying to generate PDF with password using adapter module. Followed the below link -

Creating Password Protected PDF file and Zipping it Using SAP PI

 

While testing I am getting the error as -

ZZZZ.JPG

I checked the JNDI name, its correct but still I am getting this error.

 

Also, I checked the JNDI registry, and I can find some file logs related to my adapter module. PFB the snapshot for the same.

JNDI_Screenshot.JPG

 

Can you please suggest, where I am doing the mistake and where can i check it?

 

Thanks,

Nidhi Srivastava

B2B Add ons in SAP PO 7.40

$
0
0

Hi,

 

we are doing upgradation from  SAP PI 7.3 (Single Stack) to SAP PO 7.40. SP 7

 

 

1) After sandbox upgratation we are not see any new adapters in 7.40

2) same adapters iam able to see in 7.40 also, there is no B2B Add ons, SFSF, REST, OData, WS_AAE

3) we are upgared till 7.40, SP 7

4) how to get all above adapter in PO 7.40

 

is there any minimum SP level required to get all the above in PO 7.40

 

 

Pradeep

Viewing all 1235 articles
Browse latest View live