Quantcast
Channel: SCN : Document List - Process Integration (PI) & SOA Middleware
Viewing all 571 articles
Browse latest View live

Sending CSV file using JMS Adpater integrating with IBM MQ and Dynamic configuration for ReplyToQueue attribute

$
0
0

Hi All,

 

We had a requirement of replacing the File Adapter with the JMS adapter due to performance issues with large data.

 

There are many blogs which gives the information on how the JMS Adapter can be used, but here is a document which shows how you can configure it for sending CSV format file. Also the document contains sections where dynamic properties are used for sending Queue name to the MQHRF2 parameter of the IBM MQ Series.

 

Hope the document helps for providing more knowledge in using JMS adapter.

 

Requirement

To send file data using JMS to IBM MQ series Queue with CSV format.

 

Reason for the requirement

 

The scenario deals with IDoc (IDoc AAE) to File using ICO. Files were sent from PI to third Party File Server and stored in theserver. These were picked by MFT (Managed File Transfer). From MFT jobs picks the file to Datastage and send to end system. It was reported that huge files send to the target system is causing performance issues. In order to solve this issue there was a change proposed to use JMS adapter and sending the message through MQ Queue.

 

Existing Design


The existing design consisted of using a File Adapter been used to send a .txt file in CSV format.  The CSV format was taken care by the File Content conversion in the File adapter. The File Name was send dynamically using ASMA (Adapter Specific Messaging Attributes) with Timestamp and a custom
FileName using an Advanced UDF.

 

Introducing JMS adapter:

 

The JMS adapter (Java Message Service) enables you to connect messaging systems to the Integration Engine or the PCK.

The adapter supports the JMS specification 1.02b and 1.1.

Before you can use the JMS adapter you must first install the relevant JMS driver. The required Java libraries are product-specific and can be obtained from either the product vendor or other providers. Following installation, you must deploy the Java libraries on the J2EE server so that the JMS adapter can access the required Java classes at runtime.

If you use MQSeries 53x.xxx, you must enter the following JAR files in aii_af_jmsproviderlib.sda.

com.ibm.mq.jar

com.ibm.mqbind.jar

com.ibm.mqjms.jar

connector.jar
(use the JAR file from the J2EE client directory)

JMS adapter can be used to send xml, txt files and can also receive such formats.

 

Requirement Build

 

We had a challenge here to convert the message into a file and send in a CSV format. JMS adapter do not have standard function for File Content Conversion unlike in the File adapter.  For this we had applied modules in the Module section of the adapter. Figure 1 shows the module used to achieve this:

Figure1.png

 


Module Name


Module Key


Purpose


localejbs/AF_Modules/MessageTransformBean


XML2Plain


To convert XML to Plain flat file


The Module Key is then used with parameters to structure the Flat File and write a CSV formatted file as shown in Figure 2 and Figure 3:

figure2.png

figure3.png

There is no other configuration required in JMS adapter to convert the xml to a flat file and sending in a CSV format.

 

Introducing Dynamic sending of Queue Name using JMS Adapter


The Queue name which is present in the Parameters Tab of the JMS adapter can be set in the ReplyToQueue Header of the MQHRF2 filed in the IBM MQ Series. We had achieve the same with the following solution. Figure 1 shows the Module Key RFHHEADER which we have used in the below Figure 4 to send a Queue name to the header. The hided portion is the Queue Name.

figure4.png

Below is the Queue Name in the JMS Queue field which we will be sending dynamically to the MQ Header. Figure 5.

figure5.png

 

We need to check the ASMA properties in theChannel to have the ReplyTOQueue attribute to be send dynamically. Figure 6.

figure6.png


We need to mention the below parameter in the Additional Parameters section to make possible sending of attributes in a Dynamic manner. Figure 7.

figure7.png

 

 

File Name Creation and getting Queue Name Dynamically

The file name was to be created based on a value from the payload appended with a constant value and timestamp. As there was no feasibility of the Timestamp to be added while sending using the JMS adapter we had to use the Java functions to get the timestamp. Below figure 8 shows the
code.
Figure 8:

figure8.png

The next figure will explain how the ReplyToQueue attribute and the Filename were send dynamically using the UDF. DCJMSReplyTo is the name of the dynamic attribute we will be using to give the Queue Name.

 

In the figure there are other two attributes DCJMSMessageProperty1 and DCJMSMessageProperty0 which are also Dynamic attributes which are used as additional parameter inside the ASMA property.

 


Name


Technical
  Name


JMS Message Correlation ID


DCJMSCorreleationID


JMS Message Expiration


DCJMSExpiration


JMS Message Priority


DCJMSPriority


JMS Message ReplyTo Destination


DCJMSReplyTo


JMS Message Timestamp


DCJMSTimestamp


The technical names of the additional attributes are DCJMSMessageProperty0, DCJMSMessageProperty1, ..., DCJMSMessageProperty9.

Figure 9:

 

figure9.png


In the below figure the Dynamic values are displayed in the Audir log of the Adapter Engine.Figure 10:

figure10.png

 

 

The Dynamic parameters and the values can also be seen in the SOAP definition in the Adapter Engine:Figure 11:

figure11.png

 

 

The below figure shows the IBM MQ series which shows the ReplyToQueue attribute having the Queue Name Figure 12:

figure12.png

All the Figures have been attached with this post. Please refer to attachment section.

 

Please Note:

 

We have covered the names of the Queue and specific other names due to compliance issues.

 

Also the Queue Name which is send in the ReplyToQueue Attribute is the name used in the JMS Receiver Channel and this is a Static Value. We cannot send and other Queue name in this attribute. The section hence covers possibilities where you can send a value to the MQHRF2 header of the IBM MQ series.

 

For Future References:

 

Below are the links which can be referred for any future knowledge:

 

http://www.stechno.net/sap-notes.html?view=sapnote&id=856346

 

http://help.sap.com/saphelp_nw04/helpdata/en/10/b1b4c8575a6e47954ad63438d303e4/content.htm


IDOC AAE non-SAP communication

$
0
0

This blog shows how to establish IDOC AAE communication to and from non-SAP systems using the Java single stack. There are a few notes around and some pitfalls when starting to integrate with non-SAP systems using IDOCs.

 

First of all, these are the relevant notes about IDOC AAE non-SAP communication:

1752276 - Idoc support for non-sap systems

1729203 - Support for communication with external RFC server

1717833 - RFC destinations to support external rfc servers

1877907 - Support of extern-to-extern RFC communication with JCo 3.0

 

To be able to use the IDOC AAE for non-SAP communication, you have to be aware of these prerequisites:

 

What is Supported (enabled with this Note)
-Communication with non-SAP back-end systems connected via the RFC SDK (SAP note 825494)
-Communication with non-SAP back-end systems connected via JCo standalone 3.0.10 (SAP note 1077727)
-Communication with non-SAP back-end systems connected via JCo standalone 2.1 (SAP note 549268 - as per the note the maintenance and support period for SAP JCo 2.1 ended on 03/31/2013)

 

 

What is Not supported (no change)
-Communication with non-SAP back-end systems connected via SAP NetWeaver RFC Library (SAP note 1025361)
-Communication with non-SAP back-end systems connected via SAP .NET Connector 3.0 (SAP note 856863)

 

Now, let’s go into detail. First of all, you have to set the system VM parameter “jco.allow_non_abap_partner” to “1”, otherwise the non-SAP communication is not allowed. This is also important for JCO server applications, because otherwise you are not able to handle requests coming from a java stack. Therefore also set “-Djco.allow_non_abap_partner=1” as VM argument, when starting the server.

 

Scenario 1: IDOC AAE adapter is sending an IDOC to a non-SAP system

 

We need to create 3 objects to complete this scenario.

  1. NWA RFC Destination
  2. JCA Connection Factory
  3. IDOC AAE receiver adapter

 

My personal recommendation is to start with the IDOC AAE receiver adapter within NWDS or IB. Create a new receiver adapter using the RFC Client Parameters “From NWA”.

 

IDOC AAE receiver channel.PNG

 

There seems to be a naming scheme, but it is not documented anywhere. I think it is used as shown in the screenshot. First the static part “xi/idoc/CF_” then the party name, followed by the business system or business component and the last part is the channel name.

You can choose a name here, but I would recommend to start with a dummy value, pinging the channel in NWA afterwards, to get the right JCA connection factory name suggested. Otherwise the channel ping will always show an error for that.

Channel Ping.PNG

Now create the needed JCA Connection Factory within the NWA. Filter for the outboundRA JCA Resource and switch to the “Related JCA Connection Factories” tab. Select the outboundRA_CF entry, and press the button “Copy and add…”.

NWA AS.PNG

Now use the JCA Connection Factory name, which you got from the channel ping, for the JNDI name, and switch to the “Configuration Properties” tab, and add the property autoCommit with the value false. Also set the DestinationName, which you want to use for the RFC destination, which we will create next.

JCA connection factory.PNG

Now we have to create the RFC destination within the NWA. You could do this as first step also, this is not imported. Create a new RFC destination, tick Load Balancing “No” and fill in the gateway host and service which is used for the communication and press the next button. Choose a destination for the repository connection and press next. This destination is used to read the IDOC metadata. Now just add the parameter “jco.client.tpname” to the Generic Options table, and fill in the Program-ID, which is used for the communication with the external system. The Program-ID should be registered in the gateway you configured before. That’s it, press finish.

 

Now you can ping the destination, to check if it is working fine. If you forgot to set the “jco.allow_non_abap_partner” parameter mentioned before, this will show up as an error. Also it checks, if the Program-ID is present in the gateway you provided. Just give it a shot…

 

There is also a variant to configure this without using a destination, providing all the details in the JCA Connection Factory. I do not recommend this, as afaik it is not possible to perform a ping on the factory.

 

Scenario 2: IDOC AAE adapter is receiving an IDOC from a non-SAP system

 

The way back is much easier to configure. Just use the Program-ID set in the inboundRA Resource Adapter to communicate with the Java stack. You then can configure an IDOC AAE sender adapter, which uses the default RFC Server Parameters.

 

Just watch out to set the Logical System name for the Business Component according to the sender port (SNDPOR) in the IDOC Control Record. This is used to identify the right Business Component during runtime.

 

Hopefully this helps some of you out there!

Simplify Java Mapping with Reusable Abstract Classes

$
0
0

Update

19 May 2014 - JAR file also available for download at GitHub repository


Background

Whenever we need to develop Java mappings in PI, often it involves a lot of copy-paste of codes and doing the same tasks again and again. Most of this effort is to comply with the Java Mapping API provided in PI. In this article, I will introduce an approach that can simplify developments of Java Mapping in PI. A similar approach was previously introduced in the following article XI Java Mapping Helper (DOM) by Alessandro Guarneri. In this article, the design is based on the new API utilizing AbstractTransformation class from PI7.1 onwards. Hopefully this might also lower the entry barrier for those who are contemplating developing Java mappings but are new to it.

 

 

Concept & Design

The idea is to "package" commonly reused codes together, which then enables the developer to focus on the specific logic for a particular requirement. This approach is based on the Strategy Pattern using Abstract Classes.

 

In general, following are the sequence of steps required for a Java Mapping.

  1. Parsing of Input
  2. Generating the output content
  3. Convert output content to output stream

As mentioned above, steps 1 and 3 are always the same most of the time. The difference between mappings are often for step 2 to generate the output content. As such we can encapsulate the logic in steps 1 and 3 into an abstract base class.

 

Also, there is possibility of different type of input/output content (plain, XML, binary, etc), and each of these require specific logic for parsing and stream generation. Therefore there will be a second tier of abstract classes which controls the correct sequence of logic for each conversion type.

 

The following table lists the classes in this design.

ClassDescription
AbstractMappingBaseBase super class
AbstractDOM2DOMExtends AbstractMappingBase - Controls logic for DOM to DOM processing
AbstractDOM2PlainExtends AbstractMappingBase - Controls logic for DOM to Plain processing
AbstractPlain2PlainExtends AbstractMappingBase - Controls logic for Plain to Plain processing
AbstractPlain2DOMExtends AbstractMappingBase - Controls logic for Plain to DOM processing

 

Below is an example of the logic in AbstractPlain2DOM class. Firstly, the input data is parsed and stored in the array of String (representing each line of input payload). Then the output contents are generated in DOM format. Lastly, the DOM output is transformed to the output stream.

 

ArrayList<String> inputContents = parsePlainInput(input.getInputPayload().getInputStream());
Document outputDoc = getDocumentBuilder().newDocument();
generateOutput(inputContents, outputDoc);
transformDocumentToStream(outputDoc, output.getOutputPayload().getOutputStream(), indentOutputXML);

 

Each of the subclasses has an abstract generateOutput method. It is this method that needs to be implemented in a custom mapping class that extends the corresponding abstract class. Below is a table listing the input/output parameters of the abstract method for each of the classes.

ClassModifier & TypeMethod & Description
AbstractDOM2DOMabstract void

generateOutput (Document inDoc, Document outDoc)

Construct DOM output based on DOM input

AbstractDOM2Plainabstract StringBuilder

generateOutput (Document inDoc)

Generate String output based on DOM input

AbstractPlain2Plainabstract StringBuilder

generateOutput (ArrayList<String> inContents)

Generate String output based on input of String array

AbstractPlain2DOMabstract void

generateOutput (ArrayList<String> inContents, Document outDoc)

Generate DOM output based on input of String array

 

 

Example of Mapping Implementation

Now we go to the actual work to be done. In this example, I will develop the Java Mapping directly in ESR based on the technique shared by Sunil Chandra. Alternatively, this can be done in the normal way in Eclipse/NWDS - just need to remember to include the JAR file below in the build path.

 

Step 1

Import the JAR file into ESR as an Imported Archive (this can be skipped for further developments.)

archive.png

 

Step 2

Create Message Mapping with dummy source and target.

mm.png

 

Step 3

In the Functions tab, include the archive, and add the import for com.equalize.xpi.esr.mapping. If you are using DOM related functions, import org.w3c.dom as well.

arc.png  import.png


Step 4

Write code in "Attributes and Methods" section.

code.png

 

Essentially, there are only 2 things to do here. First of all, implement transform method of AbstractTransformation. The following code can be copied as-is.

 

@Override
public void transform(TransformationInput input, TransformationOutput output)  throws StreamTransformationException {  AbstractMappingBase map = new CustomMap();  map.process(input, output, this.getTrace());
}

 

Secondly, and more importantly is to code the logic for the output content. To do this, create a local CustomMap class that extends from one of the above abstract classes (AbstractPlain2Plain in this example). Then implement the generateOutput method. The following code just adds a prefix for each of the input lines - HD for first line, FT for last line and IT for everything in between.

 

// Local class with logic for output generation
class CustomMap extends AbstractPlain2Plain {  @Override  protected StringBuilder generateOutput(ArrayList<String> inContents) {    StringBuilder sb = new StringBuilder();    int count = 0;    for (String line : inContents) {      if (count == 0) {        sb.append("HD");      } else if (count == inContents.size()-1) {        sb.append("FT");      } else {        sb.append("IT");      }      sb.append(line);      sb.append("\n");      count++;    }    setPlainOutputEncoding("UTF-8");    return new StringBuilder(sb.toString());  }
}

 

Step 5

Test the mapping.

result.png

 

 

Conclusion

As you can see, the development of the Java mapping for any requirement has been significantly simplified. The developer no longer needs to handle the parsing and the stream conversion, and therefore can fully focus on the specific content generation.

 

Also, currently there are only 4 different mapping subclasses, handling DOM and plain text processing. This can be easily extensible in the future to include other types, i.e. SAX.

 

Source code and JAR

The Java source codes are available in the following GitHub repository. Also included are sample implementation source codes for each of the abstract class above.

PI_JavaMappingLib at engswee's GitHub

 

The JAR file (with source codes) are attached below. However, due to SCN file import limitations, it has been renamed as .TXT. To obtain the JAR file, please follow the steps below:

  1. Download the ZIP file.
  2. Extract contents of ZIP file.
  3. Remove .TXT extension of file (so that the extension becomes .JAR)

Update: JAR file is also available for direct download at GitHub

 

 

Reference

The following article Easy way to learn - Java Mapping using DOM - SAP PI 7.1+ by Ricardo Viana is a useful resource to learn DOM based processing.

How to send Alerts using UDF or JAVA Mapping

$
0
0

For Alert management in PI we have one easy way out to send alert from PI system using UDF or JAVA mapping. We won’t need the ALRTCATDEF and SMTP configuration in PI application for alert management by following this approach. It just depends on few external jars (imported as IMPORTED ARCHIVES in 7.0 and as libraries in 7.1 or above versions) and a JAVA Code with your logic.

You can design you own code as per your requirement can send attachments, can share important data from payload, can provide message IDs and many. Here I am just sharing the basic code of both UDF and Java Mapping.

 

Note - A java mapping code can be used in INTERFACE DETERMINATION step with a condition for sending alert in PI or in INTERFACE\OPERATION MAPPING with actual mapping.

A java code can be used with some triggering logic in PI mapping.


I'm considering that you have understanding of creating UDFs and JAVA mapping.


Condition in Interface Determination to select the Alert mapping based on payload data:

3.PNG

Condition in Message mapping to execute the UDF based on payload data:

4.PNG 



PFB steps for getting the idea how it’s done:


External jars needed are (attached separately):

1) java-mail-1.4.jar

2)javax.activation.jar

3) aii_map_api.jar or com.sap.xpi.ib.mapping.lib.jar

 

External jars in PI (needs to be done if you are using version 7.0):

1.png

Screenshot of Alert mail:


Alerts thrown from Mapping:

2.png

Alerts thrown from UDF:

5.PNG


Create a NWDS Java project with this below code:

 

JAVA MAPPING CODE:

/*

* Created on May 9, 2014

*

* To change the template for this generated file go to

* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments

*/

 

/**

* @author ashutosh.a.upadhyay

*

* To change the template for this generated type comment go to

* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments

*/

 

import java.io.FileInputStream;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

import java.util.Map;

import java.util.Properties;

 

import com.sap.aii.mapping.api.StreamTransformation;

import com.sap.aii.mapping.api.AbstractTrace;

import com.sap.aii.mapping.api.StreamTransformationException;

 

import java.util.HashMap;

import javax.mail.Message;

import javax.mail.MessagingException;

import javax.mail.Session;

import javax.mail.Transport;

import javax.mail.internet.InternetAddress;

import javax.mail.internet.MimeMessage;

import javax.xml.parsers.DocumentBuilder;

import javax.xml.parsers.DocumentBuilderFactory;

import javax.xml.parsers.ParserConfigurationException;

import javax.xml.transform.Result;

import javax.xml.transform.Source;

import javax.xml.transform.Transformer;

import javax.xml.transform.TransformerConfigurationException;

import javax.xml.transform.TransformerException;

import javax.xml.transform.TransformerFactory;

import javax.xml.transform.dom.DOMSource;

import javax.xml.transform.stream.StreamResult;

 

import org.w3c.dom.Document;

import org.xml.sax.SAXException;

 

 

public class Alert_Java implements StreamTransformation{

       private Map map = null;

       private AbstractTrace trace = null;

       public void setParameter(Map arg0) {

            map = arg0;   // Store reference to the mapping parameters

            if (map == null) {

                  this.map = new HashMap();

            }

       }

/*public static void main(String args[]) {//FOR EXTERNAL STANDALONE TESTING

            try{

                  FileInputStream fin = new FileInputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML1.xml"); //INPUT FILE (PAYLOAD)

                  FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)

                  Alert_Java mapping = new Alert_Java ();

                  mapping.execute(fin, fout);

            }

            catch (Exception e1){

                  e1.printStackTrace();

            }

      }*/

 

      public void execute(InputStream inputstream, OutputStream outputstream) throws StreamTransformationException  {

            try{

 

//Code for sending the input XML as it is for further processing...

// receive XML

                  DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

                  DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();

                  Document xml = documentBuilder.parse(inputstream);

    

                  // write XML

                  TransformerFactory transformerFactory = TransformerFactory.newInstance();

                  Transformer transformer = transformerFactory.newTransformer();

                  Result result = new StreamResult(outputstream);

                  Source domSource = new DOMSource(xml);

                  transformer.transform(domSource, result);

          

                  String to = "<Recipient mail ID>";

 

                  // Sender's email ID needs to be mentioned

                  String from = "<Sender mail ID>";

 

                  // Assuming you are sending email from localhost

                  String host = "<Hostname of the SMTP server>";

 

                  // Get system properties

                  Properties properties = System.getProperties();

 

                  // Setup mail server

                  properties.setProperty("mail.smtp.host", host);

 

                  // Get the default Session object.

                  Session session = Session.getDefaultInstance(properties);

                   //or use Session session = Session.getInstance(properties); //if you get Unknown Host exception in JAVA

                  // Create a default MimeMessage object.

                  MimeMessage message = new MimeMessage(session);

 

                  // Set From: header field of the header.

                  message.setFrom(new InternetAddress(from));

 

                  // Set To: header field of the header.

                  message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));

 

                  // Set Subject: header field

                  message.setSubject("Check the problem dude...");

 

                  // Now set the actual message. Experiment here pass values from payload or desired template

                  message.setText("You did blunder correct that...");

 

                  // Send message

                  Transport.send(message);

 

                  // for standalone test in NWDS

                  System.out.println("\n"+"File processed");

                  System.out.println("Sent message successfully....");

            }

 

            //Code to transform the Input stream to Output

 

            catch (ParserConfigurationException e) {

                  e.printStackTrace();

                  throw new StreamTransformationException("Can not create DocumentBuilder."+ e.getMessage(), e);

            }

            catch (SAXException e) {

                  e.printStackTrace();

                  throw new StreamTransformationException("Can not read XML. "+ e.getMessage(), e);

            }

            catch (IOException e) {

                  e.printStackTrace();

                  throw new StreamTransformationException("Can not read XML. "+ e.getMessage(), e);

            }

            catch (TransformerConfigurationException e) {

                  e.printStackTrace();

                  throw new StreamTransformationException("Can not create Transformer. "+ e.getMessage(), e);

            }

            catch (TransformerException e) {

                  e.printStackTrace();

                  throw new StreamTransformationException("Can not write XML. "+ e.getMessage(), e);

            }

            catch (MessagingException e) {

                  //trace.addWarning(e.getMessage());

                  e.printStackTrace();

                  throw new StreamTransformationException("Can not send alert. " + e.getMessage(), e);

            }   

       }

}

 

 

 

JAVA UDF CODE;

public String Mail_Test(String input,Container container){

      // Recipient's email ID needs to be mentioned.

      String to = "<Recipient mail ID>";

 

        // Sender's email ID needs to be mentioned

      String from = "<Sender mail ID>";

 

       // Assuming you are sending email from localhost

       String host = "<Hostname of the SMTP server>";

 

       // Get system properties

       Properties properties = System.getProperties();

 

      // Setup mail server

      properties.setProperty("mail.smtp.host", host);

 

      // Get the default Session object.

      Session session = Session.getDefaultInstance(properties);

    //or use Session session = Session.getInstance(properties); //if you get Unknown Host exception in JAVA

 

       try{

             // Create a default MimeMessage object.

            MimeMessage message = new MimeMessage(session);

 

             // Set From: header field of the header.

             message.setFrom(new InternetAddress(from));

 

             // Set To: header field of the header.

             message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));

 

             // Set Subject: header field

             message.setSubject("Check the problem dude...");

 

             // Now set the actual message

             message.setText("You did blunder correct that...");

 

             // Send message

             Transport.send(message);

             System.out.println("Sent message successfully....");

      }

      catch (MessagingException mex) {

            mex.printStackTrace();

            throw new RuntimeException(mex.getMessage());

      }

      return input;

  }

Java Mapping in 7.0 for FTP file download and upload.....

$
0
0

A test Java Mapping code for FTP connection and file upload and download (Input payload is sent as it is as output in this code).

 

This Code is just kind of POC for those who wants to involve File upload and download feature in their project.

 

Add\modify the input file stream code for sending your input payload to the FTP location. In my code I just sent local file to FTP.

 

/*

* Created on May 30, 2014

*

* To change the template for this generated file go to

* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments

*/

 

 

/**

* @author ashutosh.a.upadhyay

*

* To change the template for this generated type comment go to

* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments

*/

 

 

 

 

import java.io.File;

import java.io.FileInputStream;

import java.io.FileOutputStream;

import java.io.IOException;

import java.io.InputStream;

import java.io.OutputStream;

 

 

import java.util.Map;

 

 

 

 

import com.sap.aii.mapping.api.StreamTransformation;

import com.sap.aii.mapping.api.AbstractTrace;

import com.sap.aii.mapping.api.StreamTransformationException;

 

 

import java.util.HashMap;

 

 

import javax.xml.parsers.DocumentBuilder;

import javax.xml.parsers.DocumentBuilderFactory;

import javax.xml.parsers.ParserConfigurationException;

import javax.xml.transform.Result;

import javax.xml.transform.Source;

import javax.xml.transform.Transformer;

import javax.xml.transform.TransformerConfigurationException;

import javax.xml.transform.TransformerException;

import javax.xml.transform.TransformerFactory;

import javax.xml.transform.dom.DOMSource;

import javax.xml.transform.stream.StreamResult;

 

 

import org.apache.commons.net.ftp.FTPClient;

import org.apache.commons.net.ftp.FTPReply;

import org.w3c.dom.Document;

import org.xml.sax.SAXException;

 

 

public class FTPTest implements StreamTransformation {

  private Map map = null;

  private AbstractTrace trace = null;

  public void setParameter(Map arg0) {

  map = arg0;  // Store reference to the mapping parameters

  if (map == null) {

  this.map = new HashMap();

  }

  }

  /*

  public static void main(String args[]) {  //FOR EXTERNAL STANDALONE TESTING

  try{

  FileInputStream fin = new FileInputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML1.xml"); //INPUT FILE (PAYLOAD)

  FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/ashuXML2.xml"); //OUTPUT FILE (PAYLOAD)

  FTPTest mapping = new FTPTest ();

  mapping.execute(fin, fout);

  }

  catch (Exception e1){

  e1.printStackTrace();

  }

  }

        */

  public void execute(InputStream inputstream, OutputStream outputstream) throws StreamTransformationException  {

  try{

  //sending the input XML as it is for further processing...

  DocumentBuilderFactory documentBuilderFactory = DocumentBuilderFactory.newInstance();

  DocumentBuilder documentBuilder = documentBuilderFactory.newDocumentBuilder();

  Document xml = documentBuilder.parse(inputstream);

      

  // write XML

  TransformerFactory transformerFactory = TransformerFactory.newInstance();

  Transformer transformer = transformerFactory.newTransformer();

  Result result = new StreamResult(outputstream);

  Source domSource = new DOMSource(xml);

  transformer.transform(domSource, result);

 

  //FTP locate

  FTPClient client = new FTPClient();

  client.connect("<FTP ServerHostName>");

  int reply = client.getReplyCode();

  if (!FTPReply.isPositiveCompletion(reply)) {

  System.out.println("FTP server refused connection");

  client.disconnect();

  }

  else

  System.out.println("FTP Connection Establised");

  client.login("anonymous", "");

  reply = client.getReplyCode();

  if (!FTPReply.isPositiveCompletion(reply)) {

  System.out.println("User NOT Authenticated ");

  client.disconnect();

  }

  else{

  System.out.println("User Authenticated ");

  }

  client.changeWorkingDirectory("<FTPDirectory>");

  System.out.println("Directory searched");

  FileOutputStream fStream = new FileOutputStream("C:/Users/ashutosh.a.upadhyay/My Documents/FTPDemo2.txt");

  client.retrieveFile("abcd.xml",fStream);

  fStream.close();

  File file = new File("C:/Users/ashutosh.a.upadhyay/My Documents/FTPDemo2.txt");

  String remoteFile = "test.xml";      

  InputStream inputStream = new FileInputStream(file);      

  System.out.println("Start uploading file...");    

  boolean done = client.storeFile(remoteFile, inputStream);      

  inputStream.close();      

  if (done) {          

  System.out.println("The file is uploaded successfully.");      

  }

  else{

  System.out.println("The file is not uploaded.");

  }

  client.disconnect();

  System.out.println("FTP connection disconnected");

  }

 

 

  //Code to Transform the Input stream to Output

 

 

  catch (ParserConfigurationException e) {

  e.printStackTrace();

  throw new StreamTransformationException("Can not create DocumentBuilder."+ e.getMessage(), e);

  }

  catch (SAXException e) {

  e.printStackTrace();

  throw new StreamTransformationException("Can not read XML. "+ e.getMessage(), e);

  }

  catch (IOException e) {

  e.printStackTrace();

  throw new StreamTransformationException("Can not read XML. "+ e.getMessage(), e);

  }

  catch (TransformerConfigurationException e) {

  e.printStackTrace();

  throw new StreamTransformationException("Can not create Transformer. "+ e.getMessage(), e);

  }

  catch (TransformerException e) {

  e.printStackTrace();

  throw new StreamTransformationException("Unhandled Exception. "+ e.getMessage(), e);

  }

  catch(Exception e){

  e.printStackTrace();

  throw new StreamTransformationException("Download Failed :: General Exception :: "+ e.getMessage(), e);

  }

  }

  }

Designing ESR objects in NWDS

$
0
0

1. Introduction


PI supports 3 types of perspectives in NWDS, These perspective try to provide one single place to handle PI development, configuration, monitoring and administration.


1. SAP Process Integration Administration perspective - Perspective is customized for administrative activities

2. SAP Process Integration Designer perspective  - Perspective will be used for designing PI objects

3. SAP Process Integration Runtime perspective  - This perspective has PI runtime explorer, Value mapping and Alert rules views.

PI runtime explorer enables us to do message monitoring and channel monitoring right from NWDS.

 

2. Connection to ESR from NWDS:

Launch NWDS

1.JPG

Select the work space where your all developed objects will store windows - preferences

2.JPG

After Launching NWDS, Open the ESR perspective -> webservices-> Enterprise service browser

4.JPG

6.JPG

We need to give the connection parameters as mentioned in the above screen.

 

Note : Un check the secure connection (HTTPs), we we check we get improper connection issue .


After giving the connection parameters connect to ESR by clicking the connectivity option as mentioned in the below screen snap.




8.JPG


Namespace & SWCV Limitation


After connecting to ESR, we can view all objects which we developed in ESR. Limitation 1: Unable to create SWCV ,Limitation 2: Unable to create Namespace, So namespace is created in a normal way using classic swing tool (ESR)


9.JPG


4. Data Type Creation :



Create a data type by opening the SWCV and namespace then right click on the Data   Type and click on “New Data Type" 2.Create the element by assigning types and occurrences too and by saving it goes to change list (As mentioned below)

10.JPG

5.Service Interfaces Creation ;

12.JPG

14.JPG


6. Message Mapping


18.JPG

18.JPG

20.JPG

21.JPG

 

7.Testing Mapping :

22.JPG


 

 

23.JPG

24.JPG

25.JPG

26.JPG

27.JPG

28.JPG


8 .Operational Mapping


29.JPG

 

31.JPG

 

Regards,

Anusha Penneru



Generating Incremental Sequence Number in PI per message ID

$
0
0

Introduction: In this document, I would discuss the generation of a sequence number  which should be unique per message id and should increment by 1 per message. So, when the first time the message is processed, 1 should be populated in a certain field, second time 2, third time 3 & so on. However, if a failed message is reprocessed & mapping is executed again, then the sequence must not increase as the sequence number is already generated for that message ID.  In order to achieve this, a Java mapping has been written, which has two methods for writing two properties file in PI application server. One of the files would have properties of message ID & the other would have properties of a unique identifier for that Interface.

 

 

As shown below, the Java mapping for sequence generation has been added as an imported archive. The code of this Java mapping can be found in the attachments section.

 

 

 

The below UDF's are written for generating PI message ID, for message ID's unique occurrence & for sequence number generation according to the PI message ID. Obviously the logic of generating PI Message ID occurrence, PI Message ID & the Sequence number generation could have been combined into a single code, but I kept them separate for the sake of simplicity.

 

I. For generating the PI Message ID:

 

 

II. For generating the occurrence of a particular message ID:

 

 

III. For generating the sequence for the message ID

 

 

 

 

 

The three UDF's are used in mapping as shown below:

 

 

The constant value 6 denotes the range of the sequence i.e a range 3 would denote 1-999, after which the sequence restarts from the initial value i.e 1.

 

Testing:


1. With message ID 54cbbe36-fd16-11e3-cd1f-00000656bfa2:

 

 

2. With message ID f11f1d56-fd15-11e3-ab1b-00000656bfa2:

 

 

3. With message ID 240c36dd-fd14-11e3-b28a-00000656bfa2:

 

 

 

4. With message ID as(Duplicate Message ID to test reprocessed message) f11f1d56-fd15-11e3-ab1b-00000656bfa2

 

 

Thus, when a duplicate message ID is tested, the sequence number is not increased. It happens because for each message ID, the below properties file is written in PI along with the properties file for the unique identifer. Notice the value of the message ID property which was processed twice has become 2, while the other message ID's have value as 1. The method getMsgIDSequence checks the occurrence of the PI message ID & increments it only if the occurrence is equal to 1. The unique identifer could be any hardcoded value. In my case, I have provided it as UniqueFileIdentifier as the second input to the UDF SequenceNumberRetrieve.

 

 

 

 

Also the value of the unique identifier has become 3 as shown below:

 

 

 

 

References:

 

1. http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/503e9bea-ea09-2e10-ec8a-cdf369de99d3&overridelayout=true.

2. Java.util.Properties Class

SAP NetWeaver BPM 7.31 Tutorial for Adding and Displaying Employee Details using Human Activity Steps

$
0
0

Introduction/ Overview

 

This tutorial will give an idea regarding how to use features like:

 Swim lanes

 Human activities

 Process repository

 Generating Web Dynpro UI's out of the BPM context

 Modeling a BPM process flow

 How to use the process composer

 How to do mapping between activities and the context

 How to create users and assign them to a swim lane

 How you build, deploy and execute a process

 

Description


This document is a beginner’s guide for Building & Deploying NWBPM with Human activity steps along with Webdynpro UI. There are no ESR and ID objects created for this scenario.

 

Prerequisites


  • SAP NWDS 7.31
  • Administration user on PO 7.31 server to create new users and to deploy a new dc

 

 

 

Procedure


Step1. Create a Development Component

 

(1)  Click on Window -> Open Perspective-> Other -> Composite Designer and click on OK.


1.jpg2.jpg


(2) Click on File -> New-> Product.

     Enter Name as: BPM_EmpInfo_HumanActivity

      Click on Next


3.jpg

  

(3)Click on New Software Component

4.jpg

(4) Enter Software Component name as SC_EMPINFO and click on Finish

5.jpg

(5) Uncheck all the other Software Components and check only SC_EMPINFO and then click on Next , the following screen will appear


     Click On Next


6.jpg

(6) Click on Next


7.jpg

Click on Finish


7.jpg

The BPM component will be created as shown


8.jpg


Step 2. Create a New Process


(7)Drag and Drop Process from Right Palette into the Business Component


7.jpg

(8) Type “EmpInfo_Process” as name for the new process and click “Next”.

     Select “Create a pool with the following names lanes”

     Enter “EmpInfo”

     Enter “Use1,User2”

     Click Next

     Leave defaults as is and click Finish

8.jpg


(9) Double Click on Empoloyee_Process , following screen will appear


9.jpg

(10) Select the line between Start and End and delete the link/line

      Create the first Human activity for the “User1” Lane using the speed buttons of the Start event.


10.1.jpg10.2.jpg


(11) Type the name of the Human activity “Enter Emp Details”.


11.jpg

(12) Create one more Human activity using again the speed buttons.

12.jpg

(13)  Move the new Human Activity to the Lane “User2” and type “Display Emp Details” as a name for this activity.

13.jpg

(14)  Connect the Human activity “Display Emp Details” with the End event.

      Save (Ctrl+S).


14.jpg


Step 3. Create Web Dynpro UIs by UI template


In this step you create and assign new User Interfaces, based on Web Dynpro Java, for the human activities.


(15)  Remove default task from Human activity “Enter Emp Details”

 

        Repeat the step for “Display Emp Details”

 

         Save ALL

15.1.jpg  15.2.jpg


(16)  Import the  WSDL by clicking on Service Interface -> Import WSDL


16.1.jpg


         Check Remote Location/File System and import the WSDL from your desktop and then click on finish


16.2.jpg   16.3.jpg

          You can see the following Date types and Service Interface created


16.4.jpg

 


(17) Drag and Drop the Data type EmpOnboard_Dt from Project Explorer to Swim Lane User2


17.jpg


(18)Select process in Project Explorer and right mouse click

 

     Select Apply Template


18.jpg

(19) Select UI Task Generation

 

      Click Next


20.jpg

 

(20) Fill Display Emp Details and check the checkboxes


20.jpg


(21) Fill Enter Emp Details and check the checkboxes

      Click Next

21.jpg



(22) Click Finish and Wait for the wizard to generate the UIs


22.jpg

(23) After the successful generation the NWDS will look as follows


23.jpg


Step 4. Create Users and Grant Access


In this step you create new users in the Java Web Application Server Identity Management. Later on you will assign these users to the swimlanes in BPM. These users will participate in the process and will receive the tasks.


(24)  Open SAP NetWeaver Application Server Administration > User Management

         ex: http://<ip>:<port>/startPage


24.jpg


(25) Create User


25.jpg



(26) For the First UserID type “User1” for Logon ID, type password 123pass, confirm it and type “User1” for the Last Name of this UserID (see the example).               Click “Save” at the end.

 

      Complete the same for the UserID type “User2”.


26.jpg

(27) Following Users will be created

 

27.jpg

(28)  Assign Users to Roles. Change the Search Criteria to Role


28.jpg


(29) Search for a Role containing “BPEM” – type for the search criteria *BPEM*. Click “Go”.

      Click on the displayed Portal Role with description “BPEM End User”.

 

29.jpg


(30) Go to tab “Assigned Users” and click button “Modify”.

30.jpg


(31) Search for the “User*” and click on “Go”.


31.jpg


(32)When found, select all rows .Add UserIDs to the role


32.jpg

(33) After the assignment both UserIDs will be displayed on the right side with Assigned Users. Click on Save


33.1.jpg  33.2.jpg


(34) Search also for the Portal Role “Every User Core Role”. Click on the role.


34.jpg


(35)Go to tab “Assigned Users” and click button “Modify”. And repeat steps (31),(32) and (33)

35.jpg


Step 5.Assign Users to Swim-Lanes


(36) Click on Swim Lane User1 and  and select “Potential Users” in Properties tab

        Click on Choose...


36.1.jpg

     Search for “User1" , Select User1 added in the last step , Click OK


36.2.jpg


     Similarly, Select the Task swimlanes User2 and select “Potential Users” in Properties tab

     Click on Choose...

     Select User2 added in the last step

     SAVE ALL



Step 5. Create Mappings


(37) Select the Task “Enter Emp Details”> Go to Properties > Output Mapping >Map the fields as shown

37.jpg


(38) Select the Task “Display Emp Details”> Go to Properties > Input Mapping > Map the fields as shown . Save (Ctrl+S).

38.jpg



Step 6.Build & Deploy the process


(39) In Process Composer perspective: Build the DC


39.jpg


(40) Select also the development component of the Web Dynpro Development Component if you want to re-build it and click “OK”.


40.jpg


(41) In Process Composer perspective: Deploy the DC


41.jpg


(42) Deployment starts.Log shows the BPM is deployed successfully


42.1.jpg


42.2.jpg



Step 7 .Run the process


(43) Click on SAP Netweaver Administrator . Search for Process Repository -> Go

43.1.jpg

       Click on Overview

43.2.jpg

       Select the Process “bpm_empinfo_humanactivity ~pr~pm(example.org)” from the list with Components.

 

43.3.jpg

 

 

(44) Go to Resources of the Component > Processes and Tasks - select the Process Definition “EmpInfo_Process”. Click Start Process.

44.jpg


(45) A new pop up appears Click Start Process

45.jpg



(46) A message for successful process start will appear at the top of the screen.

46.jpg



Step 8 .Test the Process Behavior with “User1” and “User2”


(47)  Log-in to the Portal -> http://<ip>:<port>/irj using User1 and the initial password 123pass.Change the initial password to pass123


47.jpg



(48)A task is already assigned to User1 and is visible in the Task list of his Universal Worklist.

      Click on the Task/ Open the task

48.jpg


(49) A new pop up appears .Go to the link of the Process to see where you are on the process flow.


1.jpg



(50) You are on the first Human activity “Enter Emp Details”.

49.jpg



(51) Enter the Details and click on Approve button

50.jpg

 

(52) Refresh the Universal Worklist , task will disappear


52.jpg

(53) Log-in to the Portal using User2 and the initial password 123pass. Change the initial password to pass123


53.jpg


(54) The next process task is already assigned to User2 and is visible in the Task list of his Universal Worklist.

54.jpg


(55)Go to the link of the Process to see where you are on the process flow. You are on the second Human activity “Display Name Age

55.jpg

 

(56) BPM UI is now displaying the Emp details values entered by User1 earlier. Click on Approve button

56.jpg

 

(57) Refresh the list with Tasks in the Universal Worklist of User2 . Task will disappear


57.jpg


This completes our hands-on scenario 

 




 

Regards

Vinay P.

 

 

 

 

 

 





Approaches and sample implementation of MD5 Checksum within SAP PI 7.10

$
0
0

Objective: To calculate MD5 checksum value of a flat file and send this value in a checksum file to FTP/SFTP server.


Approaches Tried:

We use following approaches in general to achieve certain functionality which is not readily achieved in SAP PI.

  • Modules from SAP.
  • Java mapping through customized .jar files.
  • OS command lines.
  • User Defined Functions (UDFs).

 

Details on various approaches:

  • Modules from SAP:

We do not have any inbuilt module in SAP PI which can generate checksum of a file especially a non-xml file. Writing a customized module requires larger efforts and expertise to develop and deploy.

 

 

  • Java mapping through customized .jar files:
    • This is most popular approach of attaining some functionality which is not readily available with in SAP PI.
    • Java mapping uses .jar files which are used in Integration Engine with in SAP PI.
    • It operates on XML form of data and suitable for the nominal file size which PI can process without altering its performance.
    • With respect to our requirement it has two shortcomings:
      1. It receives data from source side in the form of xml into an input stream. It performs operation on this xml and xml tags. But we need to calculate checksum on a flat file not on its xml version.
      2. It uses ESR objects to identify source data. As it is a quarterly activity and files will come in chunks of 5 MB – 10 MB, the final file will have a size of >= 40 MB. It is huge file and will get stuck in PI and will not get processed.
      3. We need to calculate checksum on whole file; not on its individual chunks.

 

    • Owing to above shortcomings we cannot employ this approach to generate MD5 checksum.

 

 

 

  • OS command lines:
    • We do not have any inbuilt command line to generate checksum for SAP PI on windows server.
    • OS command can be used with MD5 checksum utilities available on internet but that may expose system to malware.
    • Using a java program through OS command line efforts at par with developing a UDF or java mapping which are easier to implement.
    • Most importantly it is difficult to track any failure in OS command line as the communication channel never displays any error if OS command line does not run properly.

 

 

  • User Defined Functions:
    • UDFs are easier to develop, compile and deploy.
    • Though UDFs too use ESR objects but it may operate independent of the data being processed.
    • UDFs have advantage that PI server (AL11 Path) is directly accessible to it.
    • UDFs can be written to operate on a flat file (in AL11 path) of any size without converting it to XML.

 


  • Why do we choose UDF over other approaches?

 

    • UDFs have advantage that it can operate on flat files as a whole though it operates in integration Engine.
    • The flat files (for which we need to calculate checksum) on PI server (AL11 path) are always at its disposal.
    • The interface using this UDF can be run whole day, thus constantly searching for the files on the path for which checksum is needed to be calculated.
    • It performs MD5 Checksum logic on flat file not on its xml version.
    • It does not use ESR objects of the file for which checksum is needed to be calculated thus not converting the file to xml  adding to that whatever be the size of the file it can calculate checksum value without putting any load on PI once the file is available on AL11 path.
    • We can use same UDF to calculate checksum of any number of interfaces with any file size.

 

  • Conclusion:
    • UDFs can operate on flat file without changing it XML
    • UDFs can operate on flat file of any size thus be ridding PI of any stress due to file size.

 

  • Process of implementation:

 

    • We are implementing the UDF in message mapping itself as shown below:

 


UDF.jpg


    • The Complete Code is:


------------------------------------------------------------------------------------------------------------------------------------------------------------------

try

{

  String Path = "<File path on AL11>"+"Filename";

  String datafile = Path;

 

         MessageDigest md = MessageDigest.getInstance("MD5");

         FileInputStream fis = new FileInputStream(datafile);

         byte[] dataBytes = new byte[1024];

 

         int nread = 0;

  

         while ((nread = fis.read(dataBytes)) != -1) {

           md.update(dataBytes, 0, nread);

         };

 

         byte[] mdbytes = md.digest();

 

         //convert the byte to hex format

         StringBuffer sb = new StringBuffer("");

         for (int j = 0; j < mdbytes.length; j++) {

                    sb.append(Integer.toString((mdbytes[j] & 0xff) + 0x100, 16).substring(1));

         }

         return sb.toString();

}

catch (Exception e)

{

return "Error";

}

 

---------------------------------------------------------------------------------------------------------------------------------------------------------

 

You will be needed to place the file in any AL11 path which is accessible to SAP PI service User.

 

AL11.jpg


    • This UDF can be used in message mapping:


Mapping.jpg



    • Which in turn generated MD5 checksum of the file abc.csv (test file) which is place on some AL11 path as shown below, accessible to UDF and will pass the MD5 checksum value to target field which can be redirected to generate a checksum file on FTP/SFTP server.

 

Mapping Test.jpg


    • The final checksum file will look like as shown below. (The text with in file can be customized in UDF)


Checksum.jpg


* Please note that the above process is very Basic approach to calculate MD5 checksum. It can be implemented directly on FTP server instead of first moving file to AL11 path. For which you will need to use the library org.apache.commons to use FTP upload download. You will need to get this library placed on PI server to be able to import it while developing UDF.

Integrating NWBPM,NWBRM and PI

$
0
0

Dear Scn Users.

 

This document gives the approach of integrating PI with NWBPM and NWBRM.

 

Below is the scenario going to be implemented

 

Untitled.png

 

Communicating PI With BPM:

 

To trigger a message from PI to BPM, a receiver soap channel with XI 3.0 Message protocol should be configured with target URL as mentioned below

 

http://XXXYYYZZZ/MessagingSystem/receive/JPR/XIWhere XXXYYYZZZ will be replaced by the respective PI hosts.

 

Untitled.png

 

And for sending the message back from BPM to PI, a Soap sender channel should be configured with soap as message protocol should be configured, however

 

communication happens through JPR (Java proxy runtime).

 

Untitled.png

 

And as like normal PI scenarios ICOs should be created for sending messages from PI to BPM and from BPM to PI.

 

Untitled.png

 

So an Inbound interface should be configured with “stateless (XI 3.0 compatible) pattern to be used in ICO for communicating with Interface.And same applies for sending message from BPM to PI .And outbound interface should be configured to trigger message from BPM to PI which will be used in SAP PI.

 

Untitled.png

 

So in NWBPM in addition to the service interfaces that we used in SAP PI for communicating with external systems, we need to create addition interfaces for

 

communication to SAP PI.And also operation mappings can be imported from ESR in to NWDS and can be used in NWBPM scenarios.

 

 

BRM Overview:

 

BRM is Business rule management which is used to define our business rules. Take an example of a retail store, where the dealer wants to give some discount based on the product, the quantity. In this case BRM comes in to picture where the dealer can define his own rules and define tables based on the individual customer and product, quantity to calculate the discount. From PI 7.31 it is called as process orchestration (SAP PO),combination of PI, BPM and BRM. Below table can be taken as an example for BRM.

 

Untitled.png

This is an example of a BRM table. This rule can be published as webservice and can be called from PI to get the discount rates.

 

BRM will be published as webservice. To communicate with BRM

 

1.A Soap receiver channel with Soap as message protocol should be configured, 

2.An UDF should be written in PI mapping to call the webservice using the above

 

The target URL can be obtained from Webservice navigator once the BRM is published as an URL.

 

Steps in PI:

 

1.A Data type needs to be created for defining BRM.

 

2.Four service interfaces to be created to send and receieve message from BPM.

 

3.A message mapping with UDF to call BRM(Soap channel will be called in this UDF).

 

4.Sender and receiver channels as per the requriement.In addition to this Soap channels for BPM and BRM communication as discussed.

 

 

Steps involved in BRM:

 

Open NWDS->Open Perspective->Rules composer.

 

Then open a new project and name your project.

 

 

In BRM for defining tables a message type is created export the data type XSD ,save it as localfile and import it in the BRM.

 

Untitled.png

 

Then select the project resources and in the aliases tab select the required fields for output and Input.

 

Untitled.png

 

Now required fields are selected for BRM table. Create the BRM table by selecting Tables ->New BRM table and the required fields.

 

Untitled.png

 

And define the ruleset. Here default rule is used; it can be modified as per the requirement.(IF Boolean true the Hike table will be evaluated)

 

Untitled.png

 

 

And Rule should be published as a webservice

 

Untitled.png

 

Then BRM is deployed. This BRM will be called by UDF(with soap channel in it) and hike percentage will be calculated.

 

More information can be found in the below link

 

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b07ce666-fdf1-2c10-96b0-be959a344ede?QuickLink=index&overridelayout=true&47047071901612

 

Steps in BPM:

 

A Bpm Pattern need to be created as shown below.

 

Untitled.png

This pattern will collect the messages for 60 secs then call BRM using the operation mapping and sends the output(after calculating salary hike using BRM.

 

Below blogs can be referred for BPM steps.In salary calculation step the message mapping having the UDF for BRM lookup will be imported.

 

http://scn.sap.com/docs/DOC-55811

 

http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/08/21/collect-pattern-in-nw-bpm

 

Once this BPM is deployed,We can send a message from PI which will call NWPM,which inturn will call BRM to decide and salary and then finaly output will be returned with salary hike percentage,as per the below sample output XML.

 

Untitled.png

 

 

Java Mapping code for SFTP connection in SAP PI 7.0

$
0
0

Hi All,

 

I wrote this basic code to solve on simple requirement in a File to File scenario where I need to put a to a SFTP location but the SFTP adapter is absent there.

 

I first tried by using a JAVA mapping code the code for the same is as below. I used the Jsch Library to use the connection.

 

Here a text file is placed to the target location to notify when a file is placed at SFTP.

 

Code:

i

import java.io.InputStream;

 

 

import java.io.OutputStream;

 

 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.HashMap;

import java.util.Map;

 

 

import com.jcraft.jsch.Channel;

import com.jcraft.jsch.ChannelSftp;

import com.jcraft.jsch.JSch;

import com.jcraft.jsch.Session;

import com.sap.aii.mapping.api.AbstractTrace;

import com.sap.aii.mapping.api.StreamTransformation;

import com.sap.aii.mapping.api.StreamTransformationException;

 

 

 

 

public class SFTP implements StreamTransformation{

  private Map map = null;

  private AbstractTrace trace = null;

  public void setParameter(Map arg0) {

    map = arg0;   // Store reference to the mapping parameters

    if (map == null) {

    this.map = new HashMap();

    }

  }

  String SFTPHOST = "<IP or HOST>";

  int SFTPPORT = <PORT>; //usually 22

  String SFTPUSER = "<USERNAME>";

  String SFTPPASS = "<PASSWORD>;

  String destinationDir = "/";

  Session session = null;

  Channel channel = null;

  ChannelSftp channelSftp = null;

  String fileName="";

 

 

 

 

  /*public static void main(String args[]){  //FOR EXTERNAL STANDALONE TESTING

  try{

  FileInputStream fin = new FileInputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/AA.XLS"); //INPUT FILE (PAYLOAD)

  FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/file.txt"); //OUTPUT FILE (PAYLOAD)

  SFTP mapping = new SFTP();

  mapping.execute(fin, fout);

  }

  catch (Exception e1){

  e1.printStackTrace();

  }

  }*/

 

  public void execute(InputStream inputstream, OutputStream outputstream) throws StreamTransformationException{

  try{

  Date date = new Date();

  SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");

  String formattedDate = sdf.format(date);

  System.out.println(formattedDate);

 

  fileName = "<Arbitrary name>" + formattedDate;

 

  //Placing file to SFTP

  JSch jsch = new JSch();

  session = jsch.getSession(SFTPUSER,SFTPHOST,SFTPPORT);

  session.setPassword(SFTPPASS);

  java.util.Properties config = new java.util.Properties();

  config.put("StrictHostKeyChecking", "no");

  System.out.println("Establishing Connection...");

  session.setConfig(config);

  session.connect();

  System.out.println("Session Established");

  channel = session.openChannel("sftp");

  System.out.println("Connecting the channel.." );

  channel.connect();

  channelSftp = (ChannelSftp) channel;

  System.out.println("Hitting the directory" );

  channelSftp.put(inputstream,fileName);

  System.out.println("File placed.." );

 

  channelSftp.disconnect();

  System.out.println("Channel Disconnected..." );

 

  session.disconnect();

  sdf = new SimpleDateFormat("MM/dd/yyyy h:mm:ss a");

  formattedDate = sdf.format(date);

  System.out.println(formattedDate);

      String file = "Output file placed to SFTP server at "+formattedDate;

                    outputstream.write(file.getBytes());

          inputstream.close();

  System.out.println("Server Disconnected..." );

  }

  catch(Exception e){

  session.disconnect();

  channelSftp.disconnect();

  e.printStackTrace();

  throw new StreamTransformationException("Exception occured, disconnecting.. "+ e.getMessage(), e);

  }

  }

}

 

 

Code to download the file:

 

import java.io.FileInputStream;

 

 

import java.io.BufferedInputStream;

import java.io.BufferedOutputStream;

import java.io.File;

import java.io.InputStream;

import java.io.FileOutputStream;

 

 

import java.io.OutputStream;

 

 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.HashMap;

import java.util.Map;

 

 

import com.jcraft.jsch.Channel;

import com.jcraft.jsch.ChannelSftp;

import com.jcraft.jsch.JSch;

import com.jcraft.jsch.Session;

import com.sap.aii.mapping.api.AbstractTrace;

import com.sap.aii.mapping.api.StreamTransformation;

import com.sap.aii.mapping.api.StreamTransformationException;

 

 

 

 

public class SFTPDownload implements StreamTransformation{

  private Map map = null;

  private AbstractTrace trace = null;

  public void setParameter(Map arg0) {

    map = arg0;   // Store reference to the mapping parameters

    if (map == null) {

    this.map = new HashMap();

    }

  }

  String SFTPHOST = "<IP or HOST>";

  int SFTPPORT = <PORT>; //usually 22

  String SFTPUSER = "<USERNAME>";

  String SFTPPASS = "<PASSWORD>;

  String destinationDir = "/";

  Session session = null;

  Channel channel = null;

  ChannelSftp channelSftp = null;

  String fileName="";

 

 

  /*public static void main(String args[]){  //FOR EXTERNAL STANDALONE TESTING 

  try{ 

  FileInputStream fin = new FileInputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/AA.XLS"); //INPUT FILE (PAYLOAD) 

  FileOutputStream fout = new FileOutputStream ("C:/Users/ashutosh.a.upadhyay/My Documents/SFTP.XLS"); //OUTPUT FILE (PAYLOAD) 

  SFTPDownload mapping = new SFTPDownload(); 

  mapping.execute(fin, fout); 

  } 

  catch (Exception e1){ 

  e1.printStackTrace(); 

  }

  }*/

 

  public void execute(InputStream inputstream, OutputStream outputstream) throws StreamTransformationException{

  try{

 

  JSch jsch = new JSch();

  session = jsch.getSession(SFTPUSER,SFTPHOST,SFTPPORT);

  session.setPassword(SFTPPASS);

  java.util.Properties config = new java.util.Properties();

  config.put("StrictHostKeyChecking", "no");

  System.out.println("Establishing Connection...");

  session.setConfig(config);

  session.connect();

  System.out.println("Session Established");

  channel = session.openChannel("sftp");

  System.out.println("Connecting the channel.." );

  channel.connect();

  channelSftp = (ChannelSftp) channel;

  System.out.println("Hitting the directory" );

 

 

  channelSftp.cd(destinationDir);

  byte[] buffer = new byte[1024];

  BufferedInputStream bis = new BufferedInputStream(channelSftp.get("SFTP.XLS"));

  //File newFile = new File(+fileName);

  //OutputStream os = new FileOutputStream(newFile);

  BufferedOutputStream bos = new BufferedOutputStream(outputstream);

  int readCount;

  while( (readCount = bis.read(buffer)) > 0) {

  System.out.println("Writing: " );

  bos.write(buffer, 0, readCount);

  }

  bis.close();

  bos.close();

  channelSftp.disconnect();

  System.out.println("Channel Disconnected..." );

 

  session.disconnect();

 

 

                    outputstream.close();

         inputstream.close();

  System.out.println("Server Disconnected..." );

  }

  catch(Exception e){

  session.disconnect();

  channelSftp.disconnect();

  e.printStackTrace();

  throw new StreamTransformationException("Exception occured, disconecting.. "+ e.getMessage(), e);

  }

  }

}

Using SAP PI’s JMS Queue to Send Alerts via SMS

$
0
0

Hi Guys,

This is my first Document so please let me know if I can improve on certain areas.

 

The reason for this document is that we had a requirement to send out an SMS when there is a problem/error with our critical interfaces. This is mainly for the support guys that monitor the system.

 

The problem was that we did not have a SMS server in our environment but we did have a service provider that we would send the data of the SMS to the service provider via HTTP_AAE and they would then send out the SMS.

 

After I built the interface I thought it would be a good idea to share the knowledge with everyone that wanted to use the same solutions.

Im only going to cover how to retrieve the messages from the JMS queue and how to convert them into XML.

 

System Details:

7.31 Single Stack Patch 11

 

These were my Steps:

 

     1. Component Based Alerts Setup:

Followed the below links to setup my Component Based Alerting.  All this does is it takes the ICO that you
created and produces errors if there were any. These Errors are stored in a JMS
queue on SAP PI.

http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/27/alerting-on-aaeaex

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/03/25/michals-pi-tips-component-based-message-alerting


     2. ESR (Enterprise Service Builder) Objects:

    1. DataTypes(This is the structure of the JMS target Structure)

                Structure_01.PNG

 

   b. MessageTypes

   c. ServiceInterfaces

   d. .JavaMapping(The data Stores in the JMS queue is stored in JSON format)

e. package simpleJSONToXML;

    

 

 

  1. import
    java.io.BufferedReader;
  2. import java.io.FileInputStream;
  3. import
    java.io.IOException;
  4. import
    java.io.InputStream;
  5. import
    java.io.OutputStream;
  6. import
    java.io.StringReader;
  7. import
    java.util.regex.Pattern;
  8. import
    com.sap.aii.mapping.api.AbstractTransformation;
  9. import
    com.sap.aii.mapping.api.StreamTransformationException;
  10. import
    com.sap.aii.mapping.api.TransformationInput;
  11. import
    com.sap.aii.mapping.api.TransformationOutput;
  12. publicclass SimpleJSONtoXMLextends
    AbstractTransformation
  13. {
  14.   privatestaticfinalintCHUNK_SIZE = 10240;
  15.   publicvoid
    transform(TransformationInput in, TransformationOutput out)
  16.    throws StreamTransformationException

  17. {
  18.    try
  19.   
    {
  20.     
    process(in.getInputPayload().getInputStream(),
    out.getOutputPayload().getOutputStream());
  21.   
    }
  22.    catch (IOException e)
  23.   
    {
  24.      thrownew StreamTransformationException("Error converting payload", e);
  25.   
    }

  26. }
  27.   privatevoid
    process(InputStream inputStream, OutputStream outputStream)
  28.    throws IOException

  29. {
  30.   
    String data = read(inputStream);
  31.   
    String xmlString = convertToXml(data);
  32.   
    outputStream.write(xmlString.getBytes());
  33.   
    outputStream.flush();
  34.   
    outputStream.close();

  35. }
  36.   private String
    convertToXml(String data)
  37.    throws IOException

  38. {
  39.   
    String newData = data.replaceAll(Pattern.quote(
    ","), "\r\n");
  40.   
    String xml =
    "<XmlRoot>\r\n";
  41.   
    BufferedReader br =
    new BufferedReader(new
    StringReader(newData));
  42.   
    String line =
    "";
  43.    while ((line = br.readLine()) != null) {
  44.     
    xml = xml + lineToTag(line);
  45.   
    }
  46.   
    br.close();
  47.   
    xml = xml +
    "</XmlRoot>";
  48.    return xml;

  49. }
  50.   private String
    lineToTag(String line)

  51. {
  52.    if (line.indexOf(':') < 0) {
  53.      return"";
  54.   
    }
  55.    if (line.indexOf(':') > 12){
  56.   
         String[] parts =
    line.split(
    ":");
  57.   
    }
  58.   
    String[] parts = line.split(
    ":");
  59.    return createTag(getInnerField(parts[0].trim()),
    getInnerField(parts[1].trim()));

  60. }
  61.   private String
    createTag(String name, String value)

  62. {
  63.    return
  64.   
  65.      "<" + name + ">" + value + "</" + name + ">\r\n";

  66. }
  67.   private String
    getInnerField(String string)

  68. {
  69.    if ((string.startsWith("\"")) &&
    (string.endsWith(
    "\""))) {
  70.      return string.substring(1, string.length() - 1);
  71.   
    }
  72.    return string;

  73. }
  74.   private String
    read(InputStream inputStream)
  75.    throws IOException

  76. {
  77.    byte[] b = newbyte[10240];
  78.   
  79.   
    String text =
    "";
  80.    int numBytesRead;
  81.    while ((numBytesRead = inputStream.read(b, 0, 10240)) > -1)
  82.   
    {
  83.     
    text = text +
    new String(b, 0, numBytesRead);
  84.   
    }
  85.    return text;

  86. }
  87.   publicstaticvoid main(String[]
    args)
  88.     throws IOException
  89.   {
  90.     String json = new
    SimpleJSONtoXML().read(
    new FileInputStream("test.txt"));
  91.     System.out.println(new
    SimpleJSONtoXML().convertToXml(json));
  92.   }
  93. }

 

e. Operational Mapping

 

  1. Configuration – Integration Builders Objects:
    1. Sender Channel (JMS)

                    Channel_01.PNG

      2. Receiver Channel (HTTP_AAE)

       3. ICO (Integrated Configuration)

 

  1. Additional Information:
    1. Source Message Payload

{               

"AdapterType":"XI_J2EE_MESSAGING_SYSTEM",

"Component":"",

"ErrCat":"XI_J2EE_ADAPTER_ENGINE",

"ErrCode":"CHANNEL_STOPPED",

"ErrLabel":"1402",

"ErrText":"Channel stopped by administrative task.",

"FromParty":"",

"FromService":" _com_ ",

"Interface":"ORDERS.ORDERS05.ORDERS05",

"MonitoringUrl":"http://webdynpro/resources/ ",

"MsgId":"4cb299e3-196f-11e4-c7fa-0000007e49e2",

"Namespace": "urn:sap-com:document:sap:idoc:messages",

"RuleId":"d42a9af9fdc53609843f5a1d9f211911",

"ScenarioId":"dir://ICO/4bbe4a73043e3a3bbc0c23b35781c7ab",

"Timestamp":"2014-08-01T11:30:56Z",

"ToParty":"",

"ToService":""

}

  1. Target Message Payload

<XmlRoot>

<AdapterType>XI_J2EE_MESSAGING_SYSTEM</AdapterType>

<Component>af.pd1.berlux21</Component>

<ErrCat>XI_J2EE_ADAPTER_ENGINE</ErrCat>

<ErrCode>CHANNEL_STOPPED</ErrCode>

<ErrLabel>1402</ErrLabel>

<ErrText>Channel
stopped by administrative task.</ErrText>

<FromParty></FromParty>

<FromService>barloworld_com_SAPECC_QAS</FromService>

<Interface>ORDERS.ORDERS05.ORDERS05</Interface>

<MonitoringUrl>"http</MonitoringUrl>

<MsgId>4cb299e3-196f-11e4-c7fa-0000007e49e2</MsgId>

<Namespace>"urn</Namespace>

<RuleId>d42a9af9fdc53609843f5a1d9f211911</RuleId>

<ScenarioId>"dir</ScenarioId>

<Timestamp>"2014-08-01T11</Timestamp>

<ToParty>DHL</ToParty>

<ToService>SQLServer</ToService>

</XmlRoot>

 

If there is anything you would like to know or advice me on then please dont hesitate to se me a message or comment. Thank you taking the time to read.

 

References :

http://scn.sap.com/community/pi-and-soa-middleware/blog/2013/03/27/alerting-on-aaeaex

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/03/25/michals-pi-tips-component-based-message-alerting

 

Regards,

 

Jannus

Editing the SAP PI channel availability planning - Trick

$
0
0

Hello All ,

 

I recently came across to a weird situation in which i had to modify the existing channel availability plan timings for PI 7.31 single java stack.

In our project we have multiple availability plans for different channels.

 

Problem :

 

1. While going to channel plan SAP PI does not give the option to edit the planning straightaway.

 

Capture.JPG

2. there is no option to modify/edit the existing plan.

Capture.JPG

3. In absence of this i had to create a new availability plan and delete the old one,which was time consuming.

 

Solution :

 

1. Go to options and click on to create a New availability plan.

 

Capture.JPG

 

2. Immediately after this delete this plan without making any changes in to it.

 

Capture.JPG

 

3. After this step all your existing available plans will show the modify section and you can go ahead modify them and save them.

 

Capture.JPG

 

This is bit strange but hope this helps .

 

Thanks

Gaurav Ranjan

SFSF.DOC - How to Model Successfactors SOAP and ODATA Entities using Eclipse Juno Tool.

$
0
0

Document Objective

 

Objective of this document is to providing information about “How to Model SFSF SOAP and ODATA Entities using Eclipse Juno Tool”.

 

Modelling consist mainly two activities:-

1. Generating automated XSDs for Entities

2. Generate Queries/Resource Path for data extractions.

 

Eclipse Version: Juno

SFSF BizX Entity Used for Demo : CompoundEmployee

 

This document provides an example of all the steps required in Juno. This is divided into following three steps :-

1. Installation of Juno.

2. Configuration of Juno.

3. Implementation of scenario in Juno.

 

Step I. Juno Installation. : - Install Juno from Below URL

 

http://www.eclipse.org/downloads/packages/release/juno/sr2

http://www.eclipse.org/downloads/packages/eclipse-classic-422/junosr2

Juno0.1.PNG

 

Step II. Juno Configuration.

 

Run Eclipse.exe.

Once Eclipse Juno is installed, Open Eclipse Juno.

Then Choose Help  and Install New Software.

Juno0.2.png

 

Choose Add.

Juno0.3.PNG

 

 

In the Add Repository window, specify the relevant details according to the description given in the table below.

URL: https://tools.hana.ondemand.com/juno

Juno0.4.PNG

 

Choose OK.

A list of plug-ins available for installation are populated in the table below.

Select SAP HANA Cloud Integration Tools and choose Next.

Juno0.5.PNG

 

Accept the license agreement and choose Finish. Eclipse SDK prompts for a restart.

Choose OK in the Software Updates window.

 

Step III. Configuration of Eclipse Juno : - Modelling:


1. Auto XSD Generation for Mapping - The SFQL when modeled using the operations modeler generates an XSD file which can be used mapping purposes.

2. Auto Query/Resource Path genaretion for Communication Channel. - It generated SFQL which can be further used in SFSF Communication Channel.

 

 

 

Creating a New Integration Flow and Project. Choose Integration Flow. Commonly known as "IFlows".

  Juno1.PNG

Juno2.PNG

 

Dummy IFlow will be created.

Juno3.png

 

 

Focus on Target Channel Arrow and Double Click.

Juno4.PNG

 

Channel Properties will be Open.

Choose AdapterType as Successfactors

Message Protocol as SOAP ( Note : For OData choose OData Message Protocol).

Juno5.PNG

 

Fill the neccessry information.

Eg. Address of SFSF DataCenter . In our case it is API5.

Company ID

User

Password

( Ask above information from SFSF Configuration Expert ).

Juno6.PNG

 

Juno7.PNG

 

From a big list of entities , Choose relevent entity to your interface.

Juno8.PNG

 

In our case It is CompoundEmployee.

Juno9.PNG

 

Select Field/tags to be partt of SFQL and XSD.

Based on your selection a XSD and query will be generated.

Juno10.PNG

 

Juno11.PNG

 

Juno12.PNG

 

Juno13.PNG

Below is the UseCase of genearted SFQL and XSD :-

 

SFQL

 

Juno15.png

 

XSD :

 

Juno16.png

 

 

Refer below SAP URLs for more information :-

 


Installation and
  Configuration Juno


http://help.sap.com/saphelp_nw-connectivity-addon100/helpdata/en/a5/940acc528043ccb90d9267e8e13f1e/frameset.htm


Creating a New Integration Flow and Project


http://help.sap.com/saphelp_nw-connectivity-addon100/helpdata/en/25/86a07e53614dbe9ac26c15f7702639/content.htm


Modelling


http://help.sap.com/saphelp_nw-connectivity-addon100/helpdata/en/89/8362021924433d8d7f2f231c436ee5/content.htm

Multiples content Email - File Attached and body text

$
0
0

Hi all,


     I will explain in this documento how to do a javamapping using DOM to create a MailPackage30 - xml of file attach with body text to e-mail.

    

     I will not explain about the difference between DOM or SAX and others stuffs.


     Check this out and enjoy it.


There are some documents below that explain, but its not clear check below:


XI Mail Adapter: An approach for sending emails with Attachement with help of Java mapping


XI Mail Adapter : Dynamically building attachment and message body content using a simple UDF


 

Whats the difference between java mapping SAP PI version 7.0 and 7.1 ?

 

Into SAP PI 7.0 you must implement the method execute and SAP PI 7.1 you must implements the transform method.

 

SAP PI 7.1 lib for java mapping: aii_map_api.jar

SAP PI 7.0 lib for java mapping : com.sap.xpi.ib.mapping.lib.jar

 

Project Case:


My project case the client must provide for customer all XML files from NF-e for Brazil, so based on that, the java mapping and code of RFC it´s for this case, you just need adapt it for your project case.

 

Sem título.png


First step: Import the XiMail3.0.xsd:

 

Basically you must create a Product/SWCV into SLD system, after that import the SWCV into Repository, depends of version of SAP PI create a namespace and import the external definition.

 

The the snote below:

 

748024 - XI Mail Adapter XML Schema


Capturar.PNG


Secund step: Check the Mail structure:

 

To create a e-mail with multiple content - (file,txt,xml,pdf,image,anything) and body text basically you must use the hilight elements:

 

My project was XML File with dinamic body text based on the XML file data.

Capturar2.PNG

 

Lets rock for java mapping (This code need be adapte for your case) code walk through:

 

My project was XML File with dinamic body text based on the XML file data.

 

Java code - Variables:


Some static variables

 

static String BSystem = "ECDCLNT130";  - Bussiness system of SAP ECC
static String CChannel = "RFC_MAIL_RCV"; - Communication Channel
static String emailFrom = "xptoXML@xml.com"; -- Field From
static String prefixoDocumento = "Attachment XML Name "; - Prefix of Document
static String prefixoSubject = "Attachment Xpto: " - Subject of email;

RFC Lookup:


// --------------------- RFC LOOKUP
Channel chn = null;
RfcAccessor rfc = null;
String email = "";
chn = LookupService.getChannel(BSystem,CChannel);
rfc = LookupService.getRfcAccessor(chn);
absTraceLog.addDebugMessage("Fazendo a chamada da RFC  ");
String req = "<ns0:NAME OF RFC xmlns:ns0='urn:sap-com:document:sap:rfc:functions'><CHAVE>" + idNFe + "</CHAVE></ns0:NAME OF RFC>";
absTraceLog.addDebugMessage("JAVAMAPPING --- Iniciando o RFC lookup  > "+ req);
InputStream inputRFC = null;
XmlPayload rfcPayload = LookupService.getXmlPayload(inputRFC);
XmlPayload result = rfc.call(rfcPayload);
InputStream resp = result.getContent();

 

As I mentioned before you must adapt this code for your project case !!!

 

Check below the RFC:

 

The field - CHAVE will be filed by -

 

XML Field below

 

<chNFe>41140281243735000148550020008165951162591679</chNFe>
//Java code to extract the value from tag chNFE using indexOf.
idNFe = inptxml.substring(inptxml.indexOf("<chNFe>") + 7, inptxml.indexOf("<chNFe>") + 51);

Basiclly the RFC receives the string from Access Key of XML File and abap code will runes tables ADR6,LFA1,KNA1 from ecc side to extract the e-mail from register.

 

Input data:

Capturar.PNG

Export data:

Capturar2.PNG

 

The return from RFC the value will be capture by:

 

//Node to capture the value from the export structure from RFC - Field SMTP_ADDR
Node node = (Node) doc.getElementsByTagName("SMTP_ADDR").item(0);
if (node.hasChildNodes() && !node.getFirstChild().getNodeValue().equals("")) {  email = node.getFirstChild().getNodeValue();
}

Using parsing via DOM to create the XIMail structure:

 

DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
 DocumentBuilder db;  try {  db = dbf.newDocumentBuilder();  TransformerFactory tf = TransformerFactory.newInstance();  Transformer transform = tf.newTransformer();  Document docout = db.newDocument();  Element root = docout.createElement("ns1:Mail");  root.setAttribute("xmlns:ns1", "http://sap.com/xi/XI/Mail/30");  docout.appendChild(root);  Element subject = docout.createElement("Subject");  root.appendChild(subject);  Text subjectText = docout.createTextNode(getPrefixoSubject()  + idNFe);  absTraceLog.addDebugMessage("Subject e-mail --- "+subjectText.toString());  subject.appendChild(subjectText);  Element from = docout.createElement("From");  root.appendChild(from);  Text fromText = docout.createTextNode(getEmailFrom());   absTraceLog.addDebugMessage("From e-mail --- "+fromText.toString());  from.appendChild(fromText);  Element to = docout.createElement("To"";  root.appendChild(to);o  Text toText = docout.createTextNode(email);
 to.appendChild(toText);  Element contentType = docout.createElement("Content_Type");  root.appendChild(contentType);  Text contentTypeText = docout.createTextNode("multipart/mixed;boundary=--A  absTraceLog.addDebugMessage("Content_Type e-mail --- "+contentTypeText.toString());  contentType.appendChild(contentTypeText);  CorpoEmail texto = new CorpoEmail(idNFe,inptxml);  Element content = docout.createElement("Content");  root.appendChild(content);  Text contentText=null;  if("XPTO ".equalsIgnoreCase(getPrefixoSubject())){  contentText = docout.createTextNode(texbodyTextText());  content.appendChild(contentText);  }  DOMSource domS = new DOMSource(docout);  transform.transform((domS), new StreamResult(out));  }

The main part to defined Mutiples content to Mail:

 

Text contentTypeText = docout.createTextNode("multipart/mixed;boundary=--AaZz");

The Mime - multipart/mixed;boundary - Allows to send multiple contents:

 

If you want learn more about mimes, check link below:

 

MIME - Wikipedia, the free encyclopedia

 

Creating the body text with XML as attachemet:

 

Body text example:

 

public String bodyText(String XML) {    Text ="Hi, "+getGap()+getGap()+    "Check attachment and do not asnwer this e-mail, it´s automatic message "+ getGap()+ getGap()+    content = "----AaZz\r\n Content-Type: text/plain; charset=UTF-8\r\n" +     "Content-Disposition: inline\r\n\r\n" + Text +      "\r\n----AaZz\r\n Content-Disposition: attachment; filename="+ "AttachmentName " +      ".xml" +"\r\n\r\n" + XML + "\r\n";
return content;
}

That´s it.

 

I hope that I helps you to understando about how to build XiMail3.0 structure and send e-mail with body text with Attachment of XML.

 

Regards,

 

Brazil.

 

R Viana.


SAP PI First Hand

$
0
0

PI stands for Process integration...

PI acts as a middleware to exchange information between various systems.It can exchange data between any A2A, B2B, SAP to NON Sap system,SAP to SAP system. PI accepts data from any sender/source and passes the data to reciever/target and then gathers response from reciver/target and finally passes to sender/source. Mind you this also depends on the mode of communication chosen i.e. Synchronous or Asynchrnous.It allows hetrogenous system to communicate with each other.

SAP_PI 2.png

  Diagram: PI as a middleware

Formal Definition:
SAP Process Integration (PI) is the integration solution provided by SAP. SAP PI is a full blown integration product consisting of an Enterprise Service Bus (ESB), adapters, monitoring and a BPEL process engine, completed with SAP’s renowned ESOA integration methodology (Enterprise SOA).

 

Synchronous: You send a request and recieve a response in return
Asynchronous: You send a request and not worried about any response

Sync Async.png

 

       Diagram: Synchronous / Asynchronous Communication

Things you must know about PI
PI is a product of SAP Net Weaver ,

PI is a middle ware,
PI only helps in exchange of any information/ data



Some Advantages of PI
1. 100% message delivery - once you set up a genuine scenario it will ensure 100% message delivery from sender to receiver

2. Peer to peer connectivity - irrespective of sender language and reciever language it will send message which is understood by both sender and reciver

3. Central monitoring facility - monitoring the entire process , helps determine where the actual issue is if any

4. Hetrogenous exchange of message /no limitation for interfacing - exchange data between any A2A, B2B, SAP to NON Sap system,SAP to SAP system

5. Simple and Easy to use

Some Disavantages of PI
1. Memory Space - PI needs additional memory space for its processing

2. Cost - Cost of setting up PI in any company is very high

3. Cost/message - SAP charges Cost per message invoked in PI

 

Various Versions of PI


SAP PI now has a solid reputation as a highly reliable system, and is well-respected as a forerunner in monitoring tools and SOA governance enforcement, suiting IT organisations of all sizes.

Diagram
1. SAP XI 1.0 - SAP Xchange Infrastructure - on NWS(NetWeaverStack)
2. SAP XI 2.0 - SAP Xchange Infrastructure - on NWS(NetWeaverStack)
3. SAP XI 3.0 - SAP Xchange Infrastructure - on NWS(NetWeaverStack) - Dual Stack
Dual Stack ???
Dual Stack( Java stack + ABAP stack is called as Dual Stack,purpose and usage will be discussed later in PI architecture)
4. SAP PI 7.0 - SAP Process Integration -  Dual Stack
5. SAP PI 7.1 - SAP Process Integration -  Dual Stack - point 1 indicates Enhancement Pack 1
6. SAP PI 7.3 - SAP Process Integration -  Optional Dual Stack(everything can be managed only on Java stack)
7. SAP PI 7.31 / PO - Process orchestration - Single stack(everything is managed only on Java stack)
8. SAP PI 7.4 / PO - Process orchestration

you can look up more about version and history of SAP PI in SCN / GooGle

 

SAP PI Architecture -

PI Architecture.png

     Diagram : PI Architecture Diagram (Reused from Google )

I will discuss in detail about Architecture in my subsequent blogs

The four main components of SAP PI are as follows
1. SLD (System Landscape Directory)
2. ESR (Enterprise Service Repository)
3. ID (Integration Directory)
4. RW CM (Runtime Workbench and Central Monitoring)

Designing ESR objects in NWDS

$
0
0

1. Introduction


PI supports 3 types of perspectives in NWDS, These perspective try to provide one single place to handle PI development, configuration, monitoring and administration.


1. SAP Process Integration Administration perspective - Perspective is customized for administrative activities

2. SAP Process Integration Designer perspective  - Perspective will be used for designing PI objects

3. SAP Process Integration Runtime perspective  - This perspective has PI runtime explorer, Value mapping and Alert rules views.

PI runtime explorer enables us to do message monitoring and channel monitoring right from NWDS.

 

2. Connection to ESR from NWDS:

Launch NWDS

1.JPG

Select the work space where your all developed objects will store windows - preferences

2.JPG

After Launching NWDS, Open the ESR perspective -> webservices-> Enterprise service browser

4.JPG

6.JPG

We need to give the connection parameters as mentioned in the above screen.

 

Note : Un check the secure connection (HTTPs), we we check we get improper connection issue .


After giving the connection parameters connect to ESR by clicking the connectivity option as mentioned in the below screen snap.




8.JPG


Namespace & SWCV Limitation


After connecting to ESR, we can view all objects which we developed in ESR. Limitation 1: Unable to create SWCV ,Limitation 2: Unable to create Namespace, So namespace is created in a normal way using classic swing tool (ESR)


9.JPG


4. Data Type Creation :



Create a data type by opening the SWCV and namespace then right click on the Data   Type and click on “New Data Type" 2.Create the element by assigning types and occurrences too and by saving it goes to change list (As mentioned below)

10.JPG

5.Service Interfaces Creation ;

12.JPG

14.JPG


6. Message Mapping


18.JPG

18.JPG

20.JPG

21.JPG

 

7.Testing Mapping :

22.JPG


 

 

23.JPG

24.JPG

25.JPG

26.JPG

27.JPG

28.JPG


8 .Operational Mapping


29.JPG

 

31.JPG

 

Regards,

Anusha Penneru



Featured Content in Process Integration (PI) & SOA Middleware

$
0
0

http://scn.sap.com/profile-image-display.jspa?imageID=51093&size=72Reduce your integration efforts with the new solution "Integration Advisor"

The Integration Advisor is a new cloud based solution running on SAP HANA Cloud Integration (HCI) starting with its beta program in January 2015. This tool will tremendously improve and simplify the entire B2B integration project by bringing the different integration phases of business domain experts and integration experts together and by using crowd sourcing based intelligence. Read Gunther Stuhec's article to understand the new solution. Sept. 2014

Meet SAP at “I love API 2014” Conference Sep 8 – 10 in San Francisco

I  Love APIs 2014 is the conference for business and technology leaders driving digital acceleration with big data and APIs hosted by Apigee. This year SAP has strong presence at the event following the recent strategic partnership announcement  made between SAP and Apigee at end of July. August 2014

http://scn.sap.com/profile-image-display.jspa?imageID=36535&size=72OData Adapter and SFSF Adapter (extensions) for SAP Process Integration

SP1 of the SAP Process Integration, connectivity add-on 1.0 has just been released. This release consists of an OData Adapter and extensions to the existing SFSF Adapter. Find out more in this blog by Finny Babu and reach out to him with any questions. July 2014

Process Integration - Previously Featured

$
0
0
Previously featured

http://scn.sap.com/profile-image-display.jspa?imageID=33801&size=72 SAP HANA Cloud Integration Info Day Tour starting in Walldorf, Germany on July 30th

SAP HANA Cloud Integration (HCI) is SAP’s strategic integration platform to integrate SAP Cloud applications with other systems, SAP and non-SAP, on premise or on the cloud. The new SAP HANA Cloud Integration editions: Standard and Professional allow organizations to leverage SAP HCI in arbitrary (i.e. any system to any system) integration scenarios. Join us in Walldorf on July 30th for a free info day to learn more and try HANA Cloud Integration hands-on! Follow Udo Paltzer to find out about other locations coming soon. July 2014

2014 Global SAP Process Integration Survey

The yearly PI survey is open until August 19th and the 2014 special topics are BPM and Process Orchestration. The survey aims to collect information about the latest state of positioning, organization and use in companies using SAP PI or SAP Process Orchestration as an integration platform. You will find all details and survey access link in Holger Himmelmann’s blog. Participate and help beat the 2013 response record! July 2014

Get your free seat for the Intelligent Business Operations #IBO Tech Academy in the UK on 25/7

With this blog Tony Read invites you to join SAP and CompriseIT for a hands-on workshop on Intelligent Business Operations covering SAP Process Orchestration and SAP Operational Process Intelligence on HANA. The workshop is free for all SAP customers and prospects. Next opportunity in the UK is on 25/7. Seats are limited so mail Tony to book your seat today. June 2014

http://scn.sap.com/profile-image-display.jspa?imageID=32385&size=72HANA Cloud Integration: Webinar Series

In this blog Meghna Shishodiya announces a new HANA Cloud Integration (HCI) webinar series starting on May 29 with an overview, architecture and security aspects. Bookmark the blog for upcoming dates and join us to learn everything you wanted to know about hci and get your questions answered. May 2014

http://scn.sap.com/profile-image-display.jspa?imageID=9293&size=72 2014 Webcast Series: Tap into business agility with SAP Middleware solutions

These informative public webcasts will showcase the advantages of SAP Middleware offerings that build on the trusted SAP NetWeaver technologies and leverage SAP HANA and the cloud. Grab your seat for the 1st webcast on April 30 for a talk on Intelligent Business Operations: Infuse Big Data insights into your processes in real-time. April 2014

SAP HANA Cloud Integration (HCI) Roadmap Webinar - 3 July

How much do you know about SAP HCI? How it is leveraged for integration of SAP Cloud solutions, such as Cloud for Customers, SuccessFactors, Ariba etc. Join us for a roadmap session to learn the latest innovations and planning for HCI and get your questions answered. June 2014

SAP Process Orchestration Roadmap webinar - recording is now available!http://scn.sap.com/profile-image-display.jspa?imageID=9293&size=72

The webinar covers the latest innovations and planning for SAP Process Orchestration. You will also learn how Process Orchestration customers can benefit by enabling intelligent business operations ibo on the SAP HANA platform and how to take advantage of other Middleware offerings such as SAP Gateway and SAP HANA Cloud Integration hci. June 2014

12/6 - global webcast on Intelligent Business Operations: Infuse bigdata insights into your business processes in realtime

This webcast will showcase real-life examples of how to work smarter by infusing #BigData insights into your processes, how to take corrective actions when or even before issues occur, anticipate what will happen using predictive analytics, gain real-time visibility into your end-to-end operations. Register for the live event on 12/6 and/ or to get the slides and replay. June 2014

Middleware Tech Academies at Saphila 2014 - 9&10 Junehttp://scn.sap.com/profile-image-display.jspa?imageID=9293&size=72

If you plan to attend the conference do not miss the Intelligent Business Operations ibo hands-on workshops. On both 9 & 10 June you have the opportunity to learn more about the SAP IBO technology bundle and try the software. June 2014

http://scn.sap.com/profile-image-display.jspa?imageID=25498&size=72SP11 of SAP Process Orchestration 7.31 is now available in Public Cloud!

If you are using the SAP Process Orchestration trial offering on AWS, check this blog by Abhinag Palvadi. You can now access an instance with the latest available version - SP11 equivalent to SP6 of SAP Process Orchestration 7.4. May 2014

2014 Global SAP Process Integration Survey

The yearly PI survey is now open and the 2014 special topics are BPM and Process Orchestration. The survey aims to collect information about the latest state of positioning, organization and use in companies using SAP PI or SAP Process Orchestration as an integration platform. You will find all details and survey access link in Holger Himmelmann’s blog. Participate and help beat the 2013 response record! May 2014

May 27th - join us for an SAP Process Orchestration Roadmap Webinar!http://scn.sap.com/profile-image-display.jspa?imageID=9293&size=72

The webinar will be delivered by SAP Product Management and will cover the latest innovations and planning for SAP Process Orchestration. You will also learn how Process Orchestration customers can benefit by enabling intelligent business operations ibo on the SAP HANA platform and how to take advantage of other Middleware offerings such as SAP Gateway and SAP HANA Cloud Integration hci. May 2014

SP3 of B2B Add-On and Secure Connectivity Add-On Released!

In this blog Piyush Gakhar introduces all new features and improvements with the SP3 release, like secure PGP key storage, multiple directory support for SFTP adapter, SLA alerts, enhanced AS2 support, EDI content manager and more. April 2014

http://scn.sap.com/profile-image-display.jspa?imageID=29670&size=72New roadmap for SAP Process Orchestration is now available

In this blog Christian Loos announces that the former individual PI and BPM product roadmaps have been combined into one single Process Orchestration roadmap. Review all planned innovations and stay tuned for the upcoming roadmap webcast. April 2014

http://scn.sap.com/profile-image-display.jspa?imageID=36535&size=72SuccessFactors (SFSF) Adapter for SAP NetWeaver Process Integration

In this blog Finny Babu introduces the new “SFSF Adapter” released by SAP in February 2014. This adapter is now available as part of the release independent SAP NetWeaver Process Integration, connectivity add-on 1.0. Mar 2014

SAP Middleware newsletter – the newest addition to the SCN newsletters family!

Free monthly insight into all innovations in ALM, Software Logistics, Software Defined Data Center solutions, Virtualization & Cloud Management, Architecture, Process Orchestration, Decision Service Management,Operational Process Intelligence, SAP HANA Cloud Integration, Big Process and Big Data and powerful technology bundles like Intelligent Business Operations powered by SAP HANA. Mar 2014

http://scn.sap.com/profile-image-display.jspa?imageID=33801&size=72Survey: usage of cloud based business scenarios and their integration

Your opinion counts! With this blog Udo Paltzer invites you to invest 5-10 mins of your time to support a scientific study carried out by Itelligence AG, SAP and the University of Paderborn. Take the short survey to help us understand your requirements, knowledge, acceptance, complexity and safety concerns around using "services from the cloud". Mar 2014

Explained: the new B2B Trading Partner Management functionality

In this blog Shilpa Nair and Sarath Sasi provide a summary and links to all recent content on the new Trading Partner Management functionality shipped with SP2 of the SAP Process Orchestration B2B Add-on. Feb 2014

http://scn.sap.com/profile-image-display.jspa?imageID=3583&size=72 Improved monitoring of B2B scenarios running on SAP NetWeaver Process Orchestration - Part 1, Part 2 and Part 3

In this blog series, Alexander Bundschuh focuses on the new improvements which help enhance monitoring and tracking of your B2B business transactions and how SAP customers using the B2B add-on with SAP NetWeaver Process Integration & Orchestration may benefit from the latest enhancements shipped with SP02 of the B2B add-on. Also read about the new central monitor with SAP Solution Manager 1.0 SP10, the so called Message Flow Monitoring, which provides you with an end-to-end insight into the correct closure of A2A and B2B conversations. Feb 2014

http://scn.sap.com/profile-image-display.jspa?imageID=31689&size=72Your SAP PI 7.31 Demo System on Amazon Web Services

In this blog Arman Eker shares his “awesome experience” with the free Process Orchestration developer trial system which he used to learn how to build PI 7.31 on a single stack and to prepare a PI video course with over 3 hours of PI 7.31 content. Here is his Post configuration steps blog. Check it out and set up your own system - it’s easy and it’s fun! Feb 2014

IFG Survey: Central PI Monitoring with SAP Solution Manager

Monitoring is a key challenge according to the global 2013 PI survey. To gain a better understanding of the situation and requirements, the IFG for PI and SAP have launched a follow-up survey with focus on central PI monitoring with SAP Solution Manager. Read all details in Holger Himmelmann’s blog and participate. Jan 2014

SAP Orchestration and Integration Solutions: TechEd 2013 Replays

Missed TechEd? In this blog Gabriela Gahse highlights the available replays from TechEd Las Vegas 2013 and invites you to check the latest and greatest on B2B with Process Orchestration and HANA Cloud Integration hci , SAP Operational Process Intelligence opint, as well as Business Rules and Decision Service Management dsm with SAP. Jan 2014

Released: SAP NetWeaver Process Orchestration B2B Add-On SP2

In this blog Piyush Gakhar highlights the main enhancements with the latest SP like Trading Partner Management, new Messages Support for Tradacoms and EANCOM. Read this blog for a full overview of all new EDI and B2B features and enhancements. Dec 2013

http://scn.sap.com/profile-image-display.jspa?imageID=33801&size=72

Roadmap for SAP HANA Cloud Integration

In this presentation Udo Paltzer provides an overview of the current capabilities and uses cases, as well as the roadmap for SAP HANA Cloud Integration (HCI). Do not miss the HCI library on SCN where you can find everything about hci in one place. Dec 2013

http://scn.sap.com/profile-image-display.jspa?imageID=9293&size=72What's new in Process Orchestration 7.31 SP09 | 7.4 SP04

Key enhancements with SP09 are SAP NetWeaver Process Orchestration on HANA, co-deployment of SAP NetWeaver Process Orchestration and SAP OPInt opint  on the same HANA system and ValueHelp API. This blog by Mariana Mihaylova highlights all enhancements for customers running Business Process Management, Process Integration and Orchestration scenarios. Dec 2013

http://scn.sap.com/profile-image-display.jspa?imageID=3583&size=72SAP NetWeaver Process Orchestration @ SAP TechEd Bangalore 2013

If you are lucky to be in Bangalore this week, this blog by Alexander Bundschuh may help you to build your Integration and Orchestration agenda. Join our experts to find the latest and greatest about BPM | PI | Process Orchestration, SAP HANA Cloud Integration, Business Rules, B2B and SAP Operational Process Intelligence powered by SAP HANA. Dec 2013

Results: Global SAP NetWeaver PI Survey 2013 - Part 1 of 2 and Part 2 of 2

These two blogs by Holger Himmelmann reveal the results of the 2013 global SAP NetWeaver PI survey. Thanks to everyone who participated and shared their feedback! Nov 2013

http://scn.sap.com/profile-image-display.jspa?imageID=3091&size=72Integration: Extracts from TechEd LV 2013

Process Orchestration, HANA Cloud Integration, OData and more. Read the summary and key takeaways of SAP Mentor Shabarish Vijayakumar from the integration arena at this year’s teched_las_vegas. Nov 2013

http://scn.sap.com/profile-image-display.jspa?imageID=33801&size=72SAP HANA Cloud Integration – Early Customer and Partner Project

In this blog Udo Paltzer shares details about the opportunity to get hands-on experience with SAP HANA Cloud Integration. Join the program and become one of the early adopters! Nov 2013
http://scn.sap.com/profile-image-display.jspa?imageID=32385&size=72

SAP HANA Cloud Integration (HCI): Getting Started

The first set of projects are underway in the HCI space, and now is a good time to get a closer look at the HCI world. Review this blog by Meghna Shishodiya and also the SAP HANA Cloud Integration: An Intro by Sujit Hemachandran. Nov 2013

http://scn.sap.com/profile-image-display.jspa?imageID=3583&size=72SAP NetWeaver Process Orchestration @ SAP TechEd 2013

teched_amsterdam is in full swing now! Find out from Alexander Bundschuh which sessions are a must see in the areas of SAP NetWeaver BPM | PI | Process Orchestration, SAP HANA Cloud Integration, Business Rules, B2B and SAP Operational Process Intelligence powered by SAP HANA. Nov 2013

http://scn.sap.com/people/agasthuri.doss/avatar/46.png?a=26747Protocol Decision Tree Between SAP ECC and SAP Process Orchestration

In this blog, Agasthuri Doss introduces a decision tree to select the appropriate integration method between ECC and SAP Process Orchestration environments and between SAP Process Integration and client business systems.

http://scn.sap.com/profile-image-display.jspa?imageID=29670&size=72What's new in SAP Process Orchestration 7.31 SP8/7.4 SP3 + Video

In this blog Christian Loos shares all new enhancements for customers running Business Process Management, Process Integration and Orchestration scenarios. He has highlighted the most important new features in a short video.

Webcast: SP1 of B2B Add-on with SAP NetWeaver Process Orchestration> Overview and Roadmap

This session is part of the ramp-up knowledge transfer program and will be presented by Piyush Gakhar from SAP Product Management. Read this blog for details and join us on Sep 30 or Oct 1!

http://scn.sap.com/profile-image-display.jspa?imageID=25498&size=72Step by Step guide to update Advanced Adapter Engine System to Process Orchestration System

Upgrade of AEX to Process Orchestration System is supported from 7.31 SP0 onwards. In this article Abhinag Palvadi explains in detail the steps of the upgrade.

SAP NetWeaver Process Orchestration – the best is yet to come!

In this blog Volker Stiehl explains why you should opt in for Process Orchestration as your single Middleware platform from SAP. Also check in detail What is new in SP7 of SAP NetWeaver Process Orchestration 7.31 and see all new and continuous investments that make SAP’s Middleware platform best in class.

Global SAPNetWeaver PI Survey 2013: new record and 4 weeks to go!

The survey will be closed on August 24th. Read more in Holger Himmelmann’s latest blog and do not miss to share your feedback. Thanks to everyone who already participated.

How AmerisourceBergen uses SAP’s Process Orchestration technologies

In this blog Eduardo Chiocconi is sharing key takeaways from SAPPHIRE NOW 2013 and highlighting a great customer story. Watch the full session replay to learn how AmerisourceBergen,one of the world's largest pharmaceutical services companies is transforming their business with SAP NetWeaver Process Orchestration technologies.

SAP NetWeaver Process Orchestration Webcast Series 2013

Join us for a 5 webcast series to hear latest news about Process Management software from SAP: SAP NetWeaver Process Orchestration including B2B, SAP Operational Process Intelligence and SAP NetWeaver Decision Service Management. Please share with anyone who may be interested. We look forward to meeting you there.

Global Survey for SAP NetWeaver Process Integration 2013

The 2013 PI survey is now on and the focus this year is, not surprisingly, B2B and EDI. More details and survey access link in Holger Himmelmann’s blog. We look forward to your participation.

Try SAP NetWeaver Process Orchestration in Public Cloud!

SAP is now giving you a free license to try SAP NetWeaver Process Orchestration in the cloud. Read this blog to see how you can get started.

Simple use-cases with SAP NetWeaver Process Orchestration B2B Add-on

Check these new articles by Vikas Singh Rajpurohit providing use-cases and configuration options of OFTP; SFTP and PGP; AS2 and EDI Separator; Modules and X400 adapter available with the SAP B2B Add-on.

* What is new in SP6 of SAP NetWeaver Process Orchestration 7.31

Find out about the multiple new features and enhancements for Business Process Management, Process Integration and Orchestration scenarios. See how integration between SAP NetWeaver PI and BPM has been tightened further.

* Generate a Migration Report to estimate the migration effort from PI dual-stack to AEX

Migration from PI dual-stack to single-stack (Java-only) can be a daunting task. In this article William Li presents a java client program (read only) to be used to browse through all the configurations in the Integration Directory and produce a report helpful for the preliminary assessment of the migration task in your landscape.

* cbs PI MeMo App for MobiIe Message Monitoring

In this article Denny Schreber introduces a PI MeMo app for iPhone – an easy to use tool for monitoring SAP NetWeaver PI messages anytime and everywhere. The app is freely available in the Apple App Store.

* Released: SP1 of B2B Add-on and SFTP PGP with SAP NetWeaver Process Orchestration

In this blog Piyush Gakhar introduces SP1 of the B2B Add-on and Secure connectivity Add-on which bring variety of new features and enhancements.

* Upgrade options to the latest Process Integration or Process Orchestration

In this blog William Li provides guidance on licensing, installation and upgrade for customers who are looking to move on to a higher release of PI or to Process Orchestration.

* IFG for PI: Subscription process for new PI Features in SAP Customer Connection Program

In this blog Holger Himmelmannexplains about the participation of IFG for PI in the SAP Customer Connection Program and how you can contribute.

* Client Certificate based authentication while using ABAP Web Service for communication between ERP and SAP NET Weaver PI and The Myth of a Load Balancer - PI/Web Service Scenario

* Try SAP NetWeaver Process Orchestration in Public Cloud!

Our customers and prospects can now try SAP NetWeaver Process Orchestration and gain confidence in the solution before buying it. Read this blog to see how you can get started.

* Near Zero Downtime Management for SAP Netweaver Process Integration (nZDM/PI) available on Service Marketplace

* How to Load keys and certificates in SAP PI 7.3, SAP PO 7.3 EHP1 NWA's Key Storage

* Dynamic filename in mail receiver adapter made easier

* TechEd 2012: Process Orchestration session replays!

* SAP NetWeaver Process Orchestration technology in Healthcare

SAP NetWeaver PI brings tremendous value to Healthcare providers with the Health Level Seven (HL7) adapter. Read Bettina Lieske’s blog to find out how Haga Hospital connected more than 300 SAP and non-SAP apps benefitting patients, doctors and management.

* Consolidated view on release notes for Process Integration and Orchestration

Do you consider moving from a dual-stack installation towards Java-only to benefit from the latest improvements with SAP NetWeaver Process Orchestration?Alexander Bundschuh’s blog is a must read guide if you are looking for feature comparison, understanding on which installation option would match your requirements and what target release you should go for.
In this blog Katrin Ahsen explains the positioning of the B2B add-on and the new RDS for EDI with SAP NetWeaver Process Orchestration. Learn what are the benefits for new Customers and options for SAP Partners.
*SAP NetWeaver Process Orchestration SAPPHIRE NOW+TechEd Madrid 2012:
quick guides on sessions with PI focus by Alexander Bundschuh and on BPM focus by Benjamin Notheis. Build your PMC track agenda from here!

*SAP NetWeaver Process Orchestration PI | B2B | BPM | BRM on SCN - October

A newsletter-blog by Mariana Mihaylova with all highlights in the Process Orchestration area in October.

*SAP TechEd 2012 Sessions covering Process Orchestration with focus on Process Integration

Here is your Process Orchestration/Process Integration quick guide by SAP’s Alexander Bundschuh. Hurry up and build your playlist with the online broadcast schedule!

* Results: 1) 2012 Global PI Survey  2) PI Requirements Prioritization

In the first blog Holger Himmelmann summarizes the results of the 2012 global SAP NetWeaver PI survey. The second one reveals the results of the last PI requirements prioritization round with IFG for PI (formerly GSIG for PI).

* SAP’s B2B Integration Strategy

SAP has a 360 degree solution approach covering all aspects of the B2B integration needs of your organization: OnPremise, OnDemand and Hybrid. In his blog Piyush Gakhar introduces SAP’s Strategy for B2B Integration. Covering all available B2B solutions from SAP, this paper helps you determine when is best to use what.

* New SAP NetWeaver Process Orchestration RDS for EDI available now!

Migrate easily and cost efficiently from your legacy B2B integration solution to SAP NetWeaver Process Orchestration using the new Electronic Data Interchange rapid deployment solution. Read more in Katrin Ahsen’s blog.

* Getting Started with SAP NetWeaver Process Orchestration

A crisp SAP NetWeaver Process Orchestration overview by Piyush Gakhar including licensing and deployment options for new/existing customers. Feel free to reach out to him if any questions.

* IWAY adapters bundled within Process Integration / Orchestration

This blog by Piyush Gakhar contains useful details on which IWAY adapters are built-in the Process Integration/Orchestration license and where to find more information.

2012 Global SAP NetWeaver PI Survey

We welcome you to participate in the global PI survey for 2012. Read Holger Himmelman’s blog and feel free to post questions or feedback.
Register and join us for a series of webinars in July covering new capabilities of SAP NetWeaver PI, BPM and BRM, the road ahead and B2B!
SAP NetWeaver Process Orchestration 7.3 EhP1 is already generally available. In this blog  Meghna Shishodiya provides a useful summary of ramp-up feedback from our certified ramp-up coaches who worked closely with our customers during ramp-up.
Our teams worked around the clock and the unrestricted shipment was approved 2 weeks before the planned date. Read William Li’s blog to find out about all the new features and benefits available as of now to all our customers.
The long awaited article! In this blog William Li shares useful insights about using SAP NetWeaver BPM to replace ccBPM with PI. You will find a link to the article in the blog. Enjoy!
A blog about SAPPHIRE Now takeaways and more by SAP Mentor Prateek Raj Srivastava
Check out the two ‘simple guides’ by SAP Mentor Shabarish Vijayakumar.
GSIG for PI invites you to take part in the prioritization survey for functional requirements and enhancements for SAP NetWeaver PI. Read all details in Holger Himmelmann’s blog.
Join the hands-on workshop in Bangalore on May 21-24, 2012! Contact Piyush Gakhar for registration.
Installation and Deployment of SAP NetWeaver B2B Add-On with SAP NetWeaver PI 7.11+ Since March 2012, the B2B Add-On for Process Orchestration is available to our customers. In this blog William Li focuses on the installation and deployment of the Add-On with SAP NetWeaver PI 7.11+.
In this guide Piyush Gakhar provides a detailed overview of the two new add-on solutions for SAP NetWeaver Process Orchestration - Secure Connectivity and Business to Business add-on.
Both SAP NetWeaver Gateway and SAP NetWeaver Process Integration can provision RESTful services to SAP backend applications. Should your organization consider one or both? How can you evaluate each product and determine which is right for your landscape? In this article William Li is addressing all these questions.
In this very informative blog, Alexander Bundschuh describes in details the various installation options for customers running Process Integration and Orchestration use cases.
Advantco’s REST adapter for SAP NetWeaver PI announced in November 2011 has been already certified by SAP. William Li had the opportunity to also review and test Advantco's REST adapter and he’s sharing his findings in this blog.
Since the availability of AEX with SAP NetWeaver PI 7.3, many questions have been raised around migration of integration scenarios from PI 7.1 to AEX and if there are any tools to assist in the process. In this blog William Li provides answers and also features and functions comparison in the associated article.
Do you require a minimized downtime for the software maintenance of your PI systems? Are maintenance downtimes critical for your business? If so, then we have good news for you. Read details in this blog and contact Udo Paltzer if you are interested to join the near Zero Downtime Maintenance program.
SAP plans to release this supplementary component of SAP NetWeaver Process Orchestration (PI/ BPM/ BRM) at the beginning of Q2 this year. In this blog Katrin Ahsen provides an overview of the functional scope, technical architecture, and supported releases.

SAP PI Graphical View For Beginners

$
0
0

we can find basic information for SAP PI beginners . I have given the PPT for below info as a  SAP Net Weaver  Architecture, Architecture of SAP PI,  Message flow in PI.

1.png

2.png

3.png

4.png

5.png

13.png

6.png

8.png

9.png

10.png

11.png

12.png

 

Thanks & Regards,

Chinnanagaseshi Reddy Yaramala.

Viewing all 571 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>