Recently I worked on one requirement where my customer wants file naming convention should start with 1 and increment by 1 every time(SECnet1.xml,SECnet2.xml………..).I have seen many people posted similar kind of requirement in SCN.

 

I want to share my approach with fellow SCN memebers ,it could help to achieve similar kind of requirement easily.

 

 

To handle this kind of requirements we have different approches

 

 

1) If target file system is NFS then File Receiver adapter have prebuilt feature to add counter value.

   

image

 

Add Counter

 A new file is created for each document. A counter, which is inserted before the file name    extension, is added to the file name (for example, default002.file).

 

Specify the following for Counter Definition:

  •  Prefix

Specify one or more characters that you want to add before the counter in the file name.

  •  Format

Specify the first counter to be used. It must be a valid integer number. Leading zeros are permitted.

  •  Step

Specify the counter increment.

  • Mode

Specify when the counter is to be added.

If you select After First File, the counter is added when the file name is first used unchanged.

If you select Immediately, the counter is added with the first inbound document

 

Limitations:

1) This feature is not available for transport protocol FTP.

2) After restring JAVA stack or PI system counter value will reset to initial.

By considering above limitations I decided to achieve this requirement with different design

 

Design Approach:

1)Created one function module in ECC  and written logic like below ,BAPI has one request and response parameters and request parameter value to BAPI is ‘PI’ and it returns value as 1 in first call ,next execution it increments by  1 to previous value like someway next execution.. .

 

This logic written in Function module

 image

 

2) Perform RFC Lookup to get counter increment value.

 

Refer below blog which explains how to perform RFC look up in PI 7.1

 

SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups

 

 

image

 

3) Write Dynamic configuration UDF to assign file name with counter value.

 

RFC lookup response value is input parameter to udf.

 

image

 

Select ASMA paramter in File receive channel for File name.

PS:

1)      Instead of RFC lookup we can use JDBC lookup also but you required one table and logic to be implemented in data base end.

2)      The only limitation with this design is if RFC lookup fails with some reason then sequence would miss.

3)     We can achieve this requirement using FileLook up  also.

“Nothing is permanent except change” is one of my favorite quotation, now this is really applicable Process Integration architecture from PI 7.3.There is a big change in PI 7.3 architecture compare to earlier versions and most of the PI consultants knew that PI 7.3 coming with two installation options now PI 7.31(ehp1) available in market with more new features compare to 7.3.

 

What is new in PI 7.3?

 

Refer below blog

Live expert sessions on everything that you want to know about SAP NetWeaver Process Integration 7.3

 

What is new in SAP NetWeaver PI 7.3 EHP1 (single stack)?

 

Refer below my blog

What is new in SAP NetWeaver  PI 7.3 EHP1

 

 

PI 7.3 EHP1 is latest version available in market and PI 3 EHP1 coming with below installation options

 

      a) Dual Stack (ABAP+Java like older version) .

 


      b) Single Java Only stack or Standalone Engines.

 

            1) De-central Adapter Engine (AAE-Advance Adapter Engine).


            2) PI Java Only Stack (AEX-Advance Adapter Engine Extended).


            3) Process Orchestration (PI (Java Only) +BPM +BRM).

 

Now the confusion here is which installation option to choose?

 

Recently I worked on one customer proposal where my customer wants to upgrade to PI 7.3 from 7.0.When I started preparing a proposal document confused which version to recommend (single stack or dual stack) and my client has SAP technical team so they took a decision but sometimes we have to recommended to the customer which installation option to chose by considering all factors.

 

 This blog document will give some answers to the confusion (my thoughts).

 

  • Customer wants to implement Process Integration as a middleware then best choice is opt for PI 7.31 single stack  because hardware requirement reduced by 50%* compare to dual stack  and SAP  not going invest that much anymore in new features on top of the ABAP stack, all new development / innovation goes into the Java stack.

  

  •  Customer had implemented SAP BPM/BPM landscape and wants to implement PI then PI 7.31 single stack is right option because PI 7.3 single stack comes with integrated stack-SAP BPM/BRM part of one system ID.

 

  • Customer wants to implement SAP PI and SAP BPM/BRM then PI 7.3 single stack is right option.

  

  • Customer already implemented PI and wants to upgrade to PI 7.3 –if existing implementation has big number of ccBPM scenarios and Customer not ready to invest on redevelopment  then PI 7.3 dual stack is option* because ccBPM scenarios will not work in single stack PI installation option and need to redevelop all ccBPM scenarios using SAP BPMN , it involves cost.

 

  • Customer already implemented PI and existing implementation has very few/no ccBPM scenarios then choosing single stack is right option.

  

PS: These points are purely my thoughts and there are other factors influence while taking a decision.

This document describes some of the new features available in PI 7.3 EHP1.

 

 Single Stack ESB:

 

 Hardware requirement reduced by 50% compare to dual stack installation.

  • Up to 60% less in energy conceptions and easy maintenance.
  • Higher volume scenarios can be handled effectively.

 

Integration Flows:

 

 Enterprise Integration Patterns is heart for any middleware implementations, Patterns can help in easily realizing common integration challenges. Each pattern-based integration flow lists all the steps required in SAP Net Weaver PI to realize the scenario.

 

One Central ES Repository for Multiple PI Domains:

 

Optionally a single ES Repository can be leveraged for multiple PI domains.

  • Central governance incl. re-use of design objects across multiple PI domains.
  • Largely improved flexibility for landscape setup.
  • The ES Repository from any PI domain, i. e. double stack or Java Only PI with / without non-central adapter engines, can be leveraged for other PI domains.
  • But: One domain can only use one ES Repository: Either its own or another domain‘s one.Local ES Repository is disabled; Central ES Repository will belong to all PI domains of SLD model
  • Central SLD required.
  • Configuration via CTC template and optionally also manual.

 

Logging of Synchronous Messages:

 

  • Synchronous messages can be logged optionally on Java Only PI.
  • Logging can be configured via global parameter (default) and scenario specific (also for asynchronous scenarios).
  • Support also in user defined message search to search for payload values.

 

Integration with FTP Proxy Server via File / FTP Adapter:

 

  • File / FTP adapter supports direct integration with FTP proxy server without any work around.
  • Host name and port of FTP proxy server can be configured in FTP connection parameter settings of File / FTP communication channel with transport protocol FTP.

 

Completion of Java IDoc Adapter:

 

  • Functionality of ABAP IDoc adapter fully included in Java IDoc adapter.
  • IDoc packaging on receiver side to simplify IDoc processing, increase performance , simplify monitoring & error handling
  • IDoc flat file module support for IDoc packages (multiple IDocs in a single IDoc flat file of same message / IDoc types).

 

JMS Adapter Enhancements:

 

  • Support of further security standards (SSL Support), simplified configuration for integration with IBM Web sphere AS, optimized connection pooling for integration with MQ version 6.
  • Support for Web sphere AS 7
  • JMS connection pool optimization-Connection pooling with MQ version 6;not required anymore for MQ version 7(default configuration setting)
  • JMS topic support –MQ set ClientId, Include Client Id and further connection settings for MQ in channel configuration (previously these were required as additional parameters).

 

 Principal Propagation for SOAP Adapter (XI Protocol):

 

  • Principle propagation between ABAP and Java proxies based on SAP logon / assertion ticket.
  • Supported now additionally via XI message protocol of SOAP adapter, similar to SOAP & RFC protocol as well XI message protocol in Integration Server.
  • Message execution under propagated user
  • Based on trusted relationship configured between SAP Net Weaver PI and sender as well receiver system.

 

Completion of Integration between Java Proxies and SOAP Adapter:

 

  • All scenarios for communication between SOAP adapter and Java Proxy Runtime via XI 3.0 message protocol are supported.
  • For acknowledgements provider Java proxies and SOAP adapter can run on any Adapter Engine
  • Consumer Java proxies and SOAP adapter can run on any Adapter Engine
  • With this the limitations in SAP Net Weaver PI 7.3 for integration between Java proxies and SOAP adapter (XI protocol) are removed in EHP1 for SAP NetWeaverPI 7.3.

 

Integrated Stack:

 

  • Common deployment of AEX and BPM/BRM on one single System ID.
  • Reliable connectivity between messaging and process layer via proven Java Proxy Runtime.
  • Preserve your investments by calling PI mappings (Java, XSLT) from within a BPM process.
  • Model-driven development environment based on BPMN standard
  • Leverage SAP NetWeaver BRM for business rules.
  • Reduce TCO with single System ID installation.
  • Reliable connectivity between BPM and PI/AEX at lower costs (as an alternative to WS-RM).
  • Enhance mapping capabilities within a BPM process by calling PI mappings (e.g., calling XSLT).

This blog is going to discuss about how to integrate .NET Microsoft applications and SAP ECC using SAP PI, how they will implement code in .NET environment to send request to SAP PI.

We have diffeent options to integrate .NET applications and SAP Systems.

Using SAP .NET connector without using middleware’s .

The SAP .NET Connector is a development environment that enables communication between the Microsoft. NET platform and SAP systems. This connector supports RFCs and Web services, and allows you to write different applications such as Web form, Windows form, or console applications in the Microsoft Visual Studio.Net. With the SAP .NET Connector, you can use all common programming languages, such as Visual Basic. NET, C#, or Managed C++.

Refer below SAP help document to know more about the SAP .NET connector.

http://help.sap.com/saphelp_NW04/helpdata/en/e9/23c80d66d08c4c8c044a3ea11ca90f/content.htm

Using SAP NetWeaver Gateway,

Refer Below link to know more about SAP NetWeaver GateWay

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/30bd4b8d-9f7a-2e10-7bba-e407b21a21e4?QuickLink=downloads&overridelayout=true

Recently I had done integration of the .NET Microsoft application and SAP ECC 6.0 using SAP Net weaver Process Integration 7.1 EHP1.

Refer below blog to choose the Right Adapter to integrate with SAP systems; it gives clear picture how to integrate SAP Systems using SAP PI with different approaches.

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/2162

 

How to send the request from .net Application to SAP PI.

 

PI development process is same as any normal interface, get wsdl/xsd for both request and response structures or define data types manually if the interface is synchronous, asynchronous case you don’t required response structures., then complete ESR part(message type,service interfaces ,message and Operation mappings).

 

Create SOAP sender communication channel and receiver side (RFC/Proxy/IDoc) then complete configuration in ID and test your development in PI point of view. After that publish your sender agreement in Service registry and provide WSDL URL to .NET application team.

Refer below my blog how to publish service in service registry and how to test interface using WS Navigator.

http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/23725

 

.Net Application team expects WSDL and Service URL from PI Team.

After publishing the sender agreement in service registry (SR)  automatically WSDL URL will be generated share WSDL or you can share the WSDL file by selecting an option display WSDL in Sender agreement.

But the best approach is providing WSDL URL to .NET team because if any structural changes in request/response strcutures then  just publishing the sender agreement in Service registry will automatically update with new structure and WSDL URL remains same ,.NET team have to refresh their environment once to view the new structure.

if you provide WSDL file manually then you have take WSDL file for new structure and have to send one more time (Via Mail),AFAIK it’s not a right approach.

 

.NET have WCF programming platform to send request to PI,WCF is the place where exactly coding will be done.

Windows Communication Foundation (WCF):

Windows Communication Foundation is a programming platform and runtime system for building, configuring and deploying network-distributed services, Interoperability is the fundamental characteristics of WCF. It is unified programming model provided in .Net Framework 3.0. WCF is a combined feature of Web Service, Remoting, MSMQ and COM+. WCF provides a common platform for all .NET communication.

 

Stpe1:

After providing the WSDL and Service URL to .net team, first they will add WSDL in their WCF environment;

 

PS: Make sure that WSDL URL should be accessible in .NET environment.

1NET.png

 

2NET.png

 

Step2:

 

Enter the PI credentials and click on the ok. If SAP WSDL find then it will display the following data, now WSDL structure will be available in WCF environment.

3NET.png

Step3:

 

They will Name the service in “Namesapce” section. The Service will add under App_WebReferences section with given name in Namesapce.Then Go to Web.config page in ASP.Net Application and add end point address is nothing but service url.

<endpoint address="http://xxxxxxxxxx.com:59000/XISOAPAdapter/MessageServlet?channel=:BC_SOAP_MyAccounts:CC_MyAccounts_SOORDERS_SOAP_Sender

4NET.png

 

Step4:

Final step is writing code in coding section in the application, they will add code to access the SAP methods.

 

SAPServiceName.IXXXXX_OutClient objClient = new SAPServiceName.IXXXXX_OutClient();

objClient.ClientCredentials.UserName.UserName = "***UserName***";

objClient.ClientCredentials.UserName.Password = "***Password***";

5NET.png

PS:

1)  In Sync scenarios if response message structure payload huge means sometimes .Net team may face time out expcetions, they have to change theIR configuration details in their environment to accept huge payload as a response.

2)  PI point view make sure that SAP System returns response within expected time.

This document will help PI developers to know about JAVA Regular expressions usage in PI Mappings.

 

Regex completely JAVA concept, so whoever knows java they can understand it very easily.

What is Regex:

  

Java provides the java.util.regex package for pattern matching with regular expressions. 

A regular expression is a special sequence of characters that helps you match or find other strings or sets of strings, using a specialized syntax held in a pattern. They can be used to search, edit, or manipulate text and data.

The java.util.regex package primarily consists of the following three classes:

 

  • Pattern Class: A Pattern object is a compiled representation of a regular expression. The Pattern class provides no public constructors. To create a pattern, you must first invoke one of its public static compile methods, which will then return a Pattern object. These methods accept a regular expression as the first argument.

 

  • Matcher Class: A Matcher object is the engine that interprets the pattern and performs match operations against an input string. Like the Pattern class, Matcher defines no public constructors. You obtain a Matcher object by invoking the matcher method on a Pattern object.

 

  • PatternSyntaxException: A PatternSyntaxException object is an unchecked exception that indicates a syntax error in a regular expression pattern.

More information refer below link

http://download.oracle.com/javase/tutorial/essential/regex/

Where we use Regex in PI:

 

Regex help us to achieve complex mapping logisc by writing few lines of code in UDF’s and JAVA Mapping.

It is very common requirement in PI to manipulation of strings, remove special characters, white spaces and name spaces in XML document.

The main advantage of regex was it avoids using number standard functions, every standard function associated with JAVA code, so if you use much standard function to achieve your requirement ultimately it created burden on server.

So best practice is writing JAVA code with good standards and minimum number of lines always right idea.

Use Case1:

 

Does a  string contain a series of 10 digits?, if you want write this logic in PI required few standard function or few lines of  JAVA code in UDF,but using regex it  is very simple

 

public boolean hasTenDigits(String s) {

  return s.matches(".*[0-9]{10}.*");

}

 

Use Case2:

 

If you just want to replace all instances of a given expression within a string with another fixed string, then things are fairly straightforward. For example, the following replaces all instances of digits with a letter Z:

str = str.replaceAll("[0-9]", "X");

 

Use Case3:

It is possible to use a regular expression to split or tokenise a string, with similar but more flexible functionality to that of StringTokenizer. To split a string, we can write a line such as the following.

 

String[] words = str.split("\\s+");

 

Use Case4:

Using below lines of code we can remove training white spaces in string.

 

public  String removeTrailingWhiteSpaces(String str) {

            str = str.replaceAll("(?s)([ \t]*)$", "");

            str = str.replaceAll("\r\n", "\n");

            str = str.replaceAll("\r", "\n");

            str = str.replaceAll("(?s)([ \t]*)\n", "\n");

            str = str.replaceAll("(?s)([\n]*\n)", "\n");

            return str;

      }

 

Use Case5:

Removing new lines, name spaces in XML document below piece of code will work.

 

public  String normalizeXML(String xml) {

               if (xml.indexOf("= 0)

      xml = xml.replaceFirst("(?s)(.*?)()(.*)", "$5");

            // remove namespaces from xml documents.

            if (xml.indexOf("xmlns") > 0)

             {

String regex = "(?s)(xmlns[a-zA-Z0-9:$,.\\-&_~*!';/()@?=+;%#]*=\"[a-zA-Z0-9:$,.\\-&_~*!';/()@?=+;%#]*?\")";

      xml = xml.replaceAll(regex,"" );

             }

       xml = xml.replaceAll("([A-Za-z0-9]*>)([ \\n\\r\\t]*?)(<[A-Za-z0-9]*)", "$1$3");

            xml = xml.replaceAll("(?s)(.*?)([ \\n\\r\\t]*$)", "$1");

            return xml;

      }

 

More Regex examples refer below link

http://www.java2s.com/Code/Java/Regular-Expressions/JavaRegularExpressionSplittext.htm

PS:

Avoid using excessive regex code in PI mappings(UDF’s and JAVA Mapping),the reason was regex leads some time performance issues and always follow good programming standards while writing UDF’s and JAVA Mappings.

Please check your regex code before testing in PI Mappings, for this use regex coach tool.

http://the-regex-coach.en.softonic.com/

Recently I worked on one required where I want to download /send files to FTPS server, standard PI File adapter will not support implicit FTPS calls, so I decided to use OS commands (shell scripts) to achieve the same.

 

This is very common requirement where you want to perform Archiving, Logging and changing the file name using Shell script. If you have a prior experience  executing scripts using PI, Logging is not possible, when ever we call script using communication channel it gives only stats message shell script is called or not in communication channel monitoring.

 

If any syntax error occurred or no files found in FTP server or any other exception occurrs it is very difficult to find the root cause, so if you perform logging then you can easily solve above issues.

 

Refer below wiki, it gives basic idea how to write and call OS commands in XI/PI.

 

http://wiki.sdn.sap.com/wiki/display/XI/SAP+XI+File+Adapter+OS+Command+Line+Feature

 

 

 image

If you see above image there was a scripting code where I am downloading files from FTPS server and putting in to local XI NFS.

 

Logging :

 

Below statement will generate log file in FTP location with end to end status.

 

exec &> /usr/sap/interfaces/xd5ftp/xxxxxbank/EBS.log

 

image>

Changing the File Name:

 

I want to add the time stamp to file before placing in to target directory, below two lines code required, time stamp format you can change whet ever format you want.

 

 

TSTAMP=`date +%Y%m%d%H%M%S`

DSTFILE=XXXXXbankEBS.$TSTAMP.txt

 

Below statement will download all files from source system and copies in to Target directory with time stamp.

 

get *,byparm $DSTFILE

 

 Archiving:

 

If you want to archive the messages in FTP directory add below code in script, this will move files in to Archive directory.

 

# Archive directory

ARCDIR=/usr/sap/interfaces/ftpus/DEV/BackOffice/Bank/Archive

# Move transferred file to archive directory $ARCDIR

 mv $File $ARCDIR

This Blog explains how MDM – PI adapters works ,in 2007 I worked on MDM(5.5 SP04) and Data base integration using SAP XI, at that time there was no MDM-PI adapter, I have used File adapter to place the files in to FTP server, then MDM Import Server imported data from FTP and updated in to MDM Tables.

 

In reverse case MDM Syndicator syndicated XML files in to FTP, from there using File adapter picked up the data and processed to target system.

 

But now if you are working on MDM 7.1 integration with any other system using SAP PI (7.0 and 7.1), you don’t require File adapter, directly you can interact with MDM using MDM –PI Adapter.

 

Prerequisites:

 

SAP Net Weaver MDM 7.1

 

PI 7.0 (SP 15 and higher)

PI 7.1 (SP 07and higher) or PI 7.11 (SP01 and higher)

 

I am not going to explain how to configure MDM-PI adapter in PI point of view, it is pretty much simple.

 

Refer below help.sap.com link, which explains everything about MDM adapter configuration and deployment process and everything.

 

http://help.sap.com/saphelp_nwmdm71/helpdata/en/48/956cd09521062de10000000a42189d/frameset.htm

 

MDM PI adapter uses MDM Java API ports functionality to receive/send messages to MDM and it supports only asynchronous communication (QOS: EO and EOIO).

 

1)     Whenever you send data to MDM system using MDM PI adapter, it will not directly update data in MDM tables, first it will send data to MDM ready folder, then it will call MDM Master data import server (MDIS), MDIS looks at this file and run the import map for it, this Import map is responsible to import the file in MDM Tables.

 

2)     In this process data will be updated in to MDM Tables, once the import process is completed successfully, MDIS sends back an acknowledgment to MDM adapter saying that the import is successful, if there is any error, it tells that to MDM Adapter and you will see it in Communication channel monitoring of PI.

3)     MDMimports the message independently using the MDM Import Server (MDIS). Once the import is completed, a processed import event is triggered.

4)     The MDM PI Adapter captures the processed import event and updates the PI monitoring system with the message import status.

5)     When the incoming message is marked with a request for an application ACK (acknowledgement), an acknowledgement message is sent back to the sender system (for example, when the incoming message is an IDoc.

6)     When you use MDM PI adapter in sender mode to send data to PI, The data is available as an XML file(s) in the corresponding port folder.

7)     The MDM PI Adapter captures the syndication processed event and retrieves the data by using the functionality of the MDM Java API ports; in this process a syndication processed event is triggered.

 

MDM Error Handling:

 

1) Suppose MDM PI adapter delivered data to Ready folder, but data not updated in to MDM tables, in this case as a PI consultant point of view our job done, but MDM point of view to there is a some problem with import sever configuration, to identify this MDM Consultant have to look in to import server configuration file MDIS.in.

 

2) There is a file in "Ready" folder and waiting to be picked by MDIS and imported in MDM. if the port stays in this status for long time (generally more than 1-2 mins), it means MDIS is not picking the file and there is some issue in MDIS server. Ask MDM basis to look into this.

 

3)If it says "Blocked", this means MDIS tried to pick the file and run the import process but the XML schema of the incoming file (which you sent from PI) does not match the XML schema of the Import map. In this case you need to either process this file manually (via Import Manager) or delete this file and send correct file from PI.

 

 

MDM-PI adapter Advantages:

 

1) Message flow between PI and MDM can be monitored end to end (messages have been received and properly updated into MDM).

2) Error handling is improved because the communication channel is PI is pointing to one specific Repository port,

3) Restarting of messages if a service in unavailable in possible.

4) MDM Adapter can be used instead of the File adapter.

5) Higher reliability of data transfer.

6) Handles huge data.

When ever we work with SOAP sender interfaces, to test interface end  to end we require SOAP UI or some other tools, if you have a tool in same network then it is fine else then quite difficult to get install it in client landscape(as per my exp).

 

This blog will cover how to publish services in Service Registry and testing using WS Navigator, next series of blogs will cover .Net,Biz Talk and SFDC integration.

  

How to publish  service in SR:

 After creating /developing all objects in PI (SLD, ESR and ID), publish your sender agreement in  Service Registry, right click on sender agreement and select Publish SR.

image

 

Before publishing service Interface, make sure that Service Registry configured perfectly, and then only you can publish the service.

 

Refer below link about Service Registry configuration

 http://help.sap.com/saphelp_nwce10/helpdata/en/45/c1ea61a1194432e10000000a155369/content.htm

Endpoints will be published like below.

 

image

 

 Then Login in to Service Registry, search for you service by entering your sender agreement name.

image

 

Select your sender agreement, WSDL  URL and endpoints will be generated.

 

image

Testing interface :

 

Select Endpoints, you will see HTTP and HTTP’s URL .

 

image 

 

Select Test tab, it will open WS Navigator in new window and asks for  PI user name and password.

 

image

Select Next,enter valid test data after that select Next you will see the result, if it is synchronous interface .

 image

The main moto of this blog is which explains about to genaration of RFH2  header in MQ message,as we all know that MQ message has header and payload format,but some times client  required extra header information in  MQ message,the extra header info we called RFH2 header in MQ message format.

Recently I worked for one of big pharma client; my client has a specific requirement to generate /extract RFH2 header information in USR folder of  MQ message.

The solution as follows..

 Create JMS communication channel 

1) In Adapter Specific Message Attributes under the "Advanced" tab, use the table to enter your property names into the table (up to 10).

 

 

image

 

2. Click on the "Module" tab of the communication channel. 

3. In the processing sequence, add a new module called

 

"AF_Modules/DynamicConfigurationBean" type "Local Enterprise Bean" module key "RFHHEADER".

 

 

image

 

If you want to extract RFH2 header information from usr folder then mention read instead of insert/write. 

4. You can now enter name value pairs in the module configuration table see above for instance, if you want to assign a value of "TEST" to a property called "Source Scheme" (created in step 1, and first entry in table), then the configuration would be as follows:  Module Key Parameter Name Parameter Value

 

RFHHEADER key.0 insert http://sap.com/xi/XI/System/JMS http://sap.com/xi/XI/System/JMS> DCJMSMessageProperty0 RFHHEADER value.0 TEST.

 

image

 

 

DynamicConfiguration conf = (DynamicConfiguration) container    .getTransformationParameters ().get(StreamTransformationConstants.

DYNAMIC_CONFIGURATION); DynamicConfigurationKey key =DynamicConfigurationKey.create ("http://sap.com/xi/XI/System/JMS","DCJMSMessageProperty6 <</strong>http://sap.com/xi/XI/System/JMS%22,%22DCJMSMessageProperty6>");

 conf.put(key, a);

 return "";  

The limitation here is we can add up to only 10 attributes. if you want to add more than 10 attributes ,

Finaly  It creates a RFH2 with values wrapped in the /usr folder of a WebsphereMQ message. Check in MQ.

Recently I had worked on one requirement where I need to send different IDoc’s to ECC based on RFC lookup value, if RFC look up returns the delivery number ,then I need to send ORDERS CREATE IDoc, if no delivery number then ORDERS CHANGE IDoc to ECC.

 

 

I thought of developing this requirement using multi mapping , it avoids using BPM, but unfortunately multi mapping concept not supported by IDoc and HTTP Adapters,

Then alternative is implementing using BPM.

 

I tried different ways to achieve this requirement without BPM; finally I found the best solution as follows.

  

Use Case1:

If you want to send different IDoc’s to SAP ECC based on some condition check (source data), in this case you don’t required to develop individual mapping’s, use below approach it will work, and no need to write any conditions in Interface determination, write it in operation mapping.

 

Use Case2:

If you want to send multiple different IDoc’s to SAP ECC based on some look up value.

 

Use Case3:

If you want to send different IDoc’s to SAP ECC at same time.

 

1)Import IDocs from SAP ECC system in to PI using imported objects and export it as a XSD; Change the occurrence of IDoc segment to  1 to Unbounded.

 

image

 

2) Then create a message mapping between source and Target, add two IDocs External definitions (ED_ORDERS_Orders05, ED_ORDCHG_ORDERS05) in Target side, change occurrence of external definitions to 0 to unbounded in signature tab.

 

image

 

Perform RFC Lookup.

Refer below blog for how to perform lookups graphically in PI7.1

SAP PI 7.1 Mapping Enhancements Series: Graphical Support for JDBC and RFC Lookups

 

3)Mapping loggic for ORDER Create IDoc:

Here I am passing EVENT as a input to the RFC ,it retrieves the delivery number from SAP,if there is delivery number available for this event then I want to send Order Create IDoc to SAP.

image

 

Mapping loggic for ORDER Change  IDoc:

 

If there is no delivery number for EVENT then I want to send Order Change IDoc to SAP.

image

 

 4) Operation Mapping:

 Add outbound service interface in source and imported IDocs in Target, change occurrence of IDocs to 0 to Unbounded.

 

Integration Directory:

 

Create one Sender Agreement and two receiver agreements.

Number of receiver agrements depend on Number of Different IDoc's you want to send it to ECC.

Create one Interface determination and one Receiver determination.

 

SXMB_MONI result:

Two IDocs posted succesfully ,check in WE02 in ECC to see the status of IDoc's posting.

 

image:

This blog is going to explain about the concept Transport Targets and Groups in SLD, most of the times  Business System name in Dev will be different in Quality and Production as per the naming standards.

 

 Whenever we transport ID objects from one environment to other (Dev--->Qual, Qual--->Prod), we need to define transport targets correctly to be able to transport objects out of the Integration Directory. This is because transport targets ensure that the business system components from all the Integration Directories involved in the transport are correctly assigned to each other.

 

 Recently I worked on transporting my objects from Dev t Quality, Quality to Production.  business system in Dev is BS_RD5_210, but in quality BS_RQ5_500, so whenever I transport ID objects (Dev--->Qual) name of the business system should be change to quality name automatically, to happen this I have created Transport Targets in SLD.

 

  

    1)Register your Dev, Qual, Prod PI/ECC systems in SLD as a Technical Systems.

    

    2)Register your Dev, Qual, Prod PI/ECC systems in SLD as a Business system

(Mark PI-Business Systems are Integration server, ECC Systems are Application systems).

   

   3)Define 3 Business System Groups in SLD, “DEV”,”QUAL” and “PROD”.

    

   4)Set Transport Target, i.e Dev--->Qual , Qual--->Prod.

    

   5)Create Transport target for your Business System

     image  

   6)Transport your Dev SLD objects to other PI SLD’s (Qual and Prod).

     

   7)Transport your ID objects to Other PI environment’s (Dev--->Qual,Qual--->Prod), objects renamed automatically.

 

Creating Transport Groups:

     

     1) On the SLD start page, choose Business Systems.

          The browser displays the Business Systems screen.

     2) From the dropdown list box for the input field Groups, choose Edit Groups.

       image

    3) On the Business System Groups screen, choose New Group.

    Reference:

 http://help.sap.com/saphelp_nwpi711/helpdata/en/48/ced18318d3424be10000000a421937/frameset.htm

Step1: *Modifying the Java and Metadata Files*:

 

Change the file contents of all the files in sample_ra.jar,the sample_ra adapter’s java programs will be given a different adapter name and type, Package name, JNDI name, trace and log file locations, and the metadata describing the configuration parameters. So we will have to change them to our own package/path names.

 

            1.1   Change package name from com.sap.aii.af.sample.adapter.ra to com.test. JMSMQMD.adapter.ra.

            1.2   Change package path for log and trace file locations from com/sap/aii/af/sample/adapter/ra                                             to com/test/zip/adapter/ra.

 

            1.3   Change adapter guid from http://sap.com/xi/XI/sample/JCA to http://sap.com/xi/XI/zip/JCA .

 

            1.4   Change adapter namespace from http://sap.com/xi/XI/sample to http://sap.com/xi/XI/zip .

            1.5   Rename the file from SampleRA.xml to ZipRA.xml.

            1.6   Create a java project in NWDS/Eclipse “AdapterZIP”.

            1.7   Create a package in the project: com.GSK.JMSMQMD.adapter.ra, copy ZipRA.xml into root of project directory and remaining files in to project directory, into sub-directory com/test/zip/adapter/ra.

            1.8    Change JNDI Name in Ra.xml from deployedAdapters/sample_ra/shareable/sample_ra to deployedAdapters/mqmd_ra/shareable/MQMD_ra,actually Ra.xml contains the metadata for the adapter, like  configuration parameters .

 

Step2:* *Modifying the Configuration Files for RAR* </p><p> </p><p>            2.1 In NWDS, create project AdapterYOURADAPTERNAME_RAR.</p><p class="sapxdpparagraph">            2.2 Extract and copy the META-INF directories to the appropriate project  directories.</p><p class="sapxdpparagraph">+                    2.2.1  +Change the namespace from com.sap.aii.af.sample.adapter.ra to com.test.YourAdapterName.adapter.ra .<em> </em></p><p class="sapxdpparagraph">                    2.2.2 Change the adapter display file name references from sample_ra to YourAdapterName_ra. More information: Stand-Alone Deployment as RAR</p><p class="sapxdpparagraph">            2.3  Change the content of the ra.xml file. Change the adapter type from JCA to YOURADAPTERNAMEFile</p><p class="sapxdpparagraph">                     2.3.1  Change the adapter namespace from: http://sap.com/xi/XI/sample to http://sap.com/xi/XI/YourAdapterName</p><p class="sapxdpparagraph">                     2.3.2  Change the adapter display name from sample_ra to YourAdapterName_ra. More information: Stand-Alone Deployment as RAR</p><p class="sapxdpparagraph">             2.4  Rename file from com.sap.aii.af.sample.adapter.ra-dd.xml to com.test.YourAdapterName.adapter.ra-dd.xml. Verify that the reference in SAP_MANIFEST.MF has also been changed from com.sap.aii.af.sample.adapter.ra-dd.xml to com.test.YourAdapterName.adapter.ra-dd.xml. (This should have already been done with step 3.1 above.) More information: Stand-Alone Deployment as RAR</p><p class="sapxdpparagraph">             2.5    Refresh the projects in NWDS.</p><p class="sapxdpparagraph"> </p><p> </p><p>Step3: Creating and Deploying the Adapter.</p><p> </p><p class="sapxdpparagraph">                3.1 Create the RAR file and deploy it to the AS Java.</p><p class="sapxdpparagraph">                3.2 Load the adapter metadata.</p><p class="sapxdpparagraph">                       3.2.1 Load the metadata file, ra.xml, to PCK.</p><p class="sapxdpparagraph">             In a browser, enter URL http://<host>:<port>/CPACache/schemaupload.jsp.</p><p class="sapxdpparagraph">                   Enter the user ID and password when prompted.</p><p>                   Enter the following:</p><p class="sapxdpparagraph">                  The location of the YourAdapterNameRA.xml</p><p class="sapxdpparagraph">         Adapter type: YOURADAPTERNAMEFile</p><p class="sapxdpparagraph">         Adapter namespace: http://sap.com/xi/XI/YourAdapterName</p><p class="sapxdpparagraph">         Adapter version: 1.0</p><ol><li>Locate the YourAdapterNameRA.xml</li><li>Select Upload Adapter Metadata.</li></ol><p class="sapxdpparagraph">More information: Loading Adapter Metadata </p><p class="sapxdpparagraph">3.3 Verify the adapter.</p><p class="sapxdpparagraph"> </p><p class="sapxdpparagraph">After deploying and loading the adapter metadata, the adapter is available in PCK. To verify the existence of the adapter, use the URL, http://<host>:<port>/pck/start/index.jsp and select Adapter Monitor. </p><p class="sapxdpparagraph"> </p><p>Step4: Where to Add JAVA code.</p><p> </p><p>Sample_ra adapter have sample code and different JAVA classes</p><p>So If you are developing Sender Adapter then add your java code in SPIManagedConnectionFactory class file, Search and replace the method getOutFileName with the your code.</p><p> </p><p>In Case receiver adapter add java code in CCIInteraction class, Search and replace the method Send with the code.</p><p>    </p><p>Reference:</p><p> </p><p>http://help.sap.com/saphelp_nwpi711/helpdata/en/69/e1e6667710415a9c331ec2e0715561/content.htm *</p>

This blog will explain about some of the  points to remember while working on migration projects, now a day’s many SAP customers who have implemented other middleware’s were migrating in to SAP Middleware Process Integration.

 

 

 

When we start working with migration projects, client expects us to complete the implementation in less time compare to other normal implementation projects. (My experience),

 

 

 

 

Web Methods to SAP XI /PI:

 

 

 

We have to know some knowledge about Web Method middleware, so that we can easily understand the requirements, interface logic and complexity involved in interface development, so it saves lot of time.

 

 

 

Web Methods Integration Server:

Web Methods environment runs on using this server, this is one of the core application servers in the Web Methods platform. It is a java based, multiplatform enterprise integration server. It supports the integration of diverse services, such as mapping data between formats and communication between systems.

Web methods Developer:

Web Methods Developer is the Java-based integrated development environment (IDE) for developing code on the Web Methods Integration Server. This allows us to develop writing graphical flow and java services (the programming logic), defining and modifying documents and mapping logic testing, debugging and executing services and many more.

There are 3 types of mapping in Web Methods Graphical (Web methods Flows), XSLT and JAVA/C/C++ Services.

 

 

Flow Services in Web Methods:

Flow services are executable units that are written in the proprietary graphical-based Flow language of Web Methods, No other platform supports reuse of flow services, even PI not support it, so we have to implement this logic in SAP PI graphical mapping or JAVA or XSLT.

Web methods flow contain functions like Map, Invoke, Branch, Loop, Repeat, Exit and Sequence, every function has own property.

Java Services:

Java development in Web Methods is structured in services. A service is an executable piece of code with predefined import and export parametersis, the code in what is written in Java services is like a Java code, but it is not possible to reuse the same in PI environment.

 

Remember below points

 

 

 

1)        1)Try to get access for Web Methods interface Technical design documents, which explain about the interface requirements, so based on that we can understand the requirement need to implement in PI.Sometimes we never get a chance to speak with functional team to understand the functional requirements, this document definitely fill this gap.

2)         2) Prepare Mapping logic in EXCEL document by analyzing web methods flows (Graphical Mappings), XSLT mappings and JAVA /C/C++Services in Web Methods developer tool (IDE). For that you should have some understanding about XSLT, JAVA and C++.

 

3)         3) Don’t try to replicate the Web Methods design in SAP PI, it is not recommended at all. Think in PI perspective and prepare good design for interfaces. The way webethods server execute the interface is different compare to PI.

 

4)         4) In Web methods we can execute all mappings in one Flow service; we can call any java service, xslt mappings in Flow service. So when you found different mappings involved in web methods interface, divide it into different PI mappings (if it is complex) then execute it in PI.

 

5)        5) In Web Methods we can perform state full operations using JAVA services, like performing mass data base operations, but in PI point of view it is strictly not allowed in JAVA Mapping.

6)

 

6)         6)Some of the clients expect reusing of XSLT mapping programs in PI, off course these mapping programs works perfectly without major changes in PI environment but performance point of view it is not a best practice to use XSLT mappings. If there is no  restriction from client to reuse of XSLT mapping then replace XSLT mappings with Graphical mappings it will take some more time, share this information with client. (Consider this point while budgeting).

 

7)     7)Try to avoid using XML Tool Kit option in PI7.1 Operation Mapping for XSLT mappings, some of the XSLT mapping programs will not work in PI7.1, so you have to adjust those mappings.

 

 

8)    8) Re-using of Web methods JAVA/C/C++ services is not possible in PI, so you have to develop JAVA mappings or other mapping techniques in PI to implement the same logic.

 

9)     9) Adapter configurations and reaming things need to be done accordingly as per PI.

 

 

SAP BC to SAP XI/PI:

 

 

 

 

SAP Business Connector (also known as "SAP BC") is a re-branded version/restricted licence version of webMethods Integration Server provided by SAP as a middleware solution for their R/3 product. It was developed jointly by web Methods and SAP.

 

 

 

 

Web Methods and SAP Business Connector more or less equal, so refer above points and one how to guide doc available on the same refer below link

 

 

 

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a8424011-0d01-0010-e19d-e5bd8ca52244

The main Moto of this blog was which explains FTP Secure configuration.

FTPS (also known as FTP Secure and FTP-SSL) is an extension to the commonly used File Transport Protocol(FTP) that's adds support for the Transport Layer Security(TLS) and the Secure Sockets Layer(SSL) cryptographic protocols.

FTPS should not be confused with the SSH File Transfer Protocol (SFTP), an incompatible secure File transfer sub system for the Secure Shell (SSH) protocol. It is also different from the Secure FTP, the practice of tunneling FTP through an SSH Connection.

I am not going to compare FTPS with SFTP, and not going to discuss about SFTP, already blogs available on the same. (SFTP with PI the openSSH way).

Before configuring Communication channel, we have to deploy the certificates

1) SAP Java Cryptographic Toolkit has to be deployed in J2EE Engine.

2) Public key Certificate (SSL Certificate) which is provided by FTPS Server has to be deployed in J2EE Engine.

3) The CA certificate used to sign the server certificate must be added to the Trusted As key store view in J2EE Engine. (For PI7.1/7.0 no needs to deploy these toolkit and CA certificate. Because those will be already present in the Server itself).

Take basis people help to deploy required certificates in PI J2EE server.

Refer below link for more info

http://help.sap.com/saphelp_nwpi71/helpdata/EN/e9/a1dd44d2c83c43afb5ec8a4292f3e0/frameset.htm

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/964f67ec-0701-0010-bd88-f995abf4e1fc?quicklink=events&overridelayout=true

1) Crete communication channel.

 

image

 

 

2) Select Connection security

 

FTPS (FTP Using/TLS) for control connection: The FTP control connection is protected using TLS/SSL (Transport Layer Security/Secure Sockets Layer).File transfer is unencrypted.

FTPS (FTP Using SSL/TLS) for Control and Data Connection:

All communication with the FTP server is encrypted and uses TLS/SSL.

image

 

3) In Command Order Specifies the sequence of commands used to authenticate and secure the connection. Retain the default setting. Only adjust the sequence of commands to match those expected of the FTP server if you encounter problems with the FTP connection.

 

image

 

AUTH TLS: Defines the authentication mechanism used for the current FTP session.

USER: Sends a User Logon ID to the Server

PASS: Sends a Password to the Server

PBSZ: Defines the largest buffer protection buffer size to be used for application-level encoded data sent or received on the data connection.

PROT : Defines the protection used for FTP data connections.

4) Use X.509 Certificate for Client Authentication, Set this indicator if the adapter, in contrast to the FTP server, is to use X.509 certificate and public-key cryptography to authenticate itself. The corresponding key/certificate pair must previously be saved in a keystore view of the J2EE server.

Give The Details in KeyStore and x.509 Certificate by selecting the help. If we already deployed the Certificates in J2EE Engine, help will be provided and we have to select from that as shown below.

Enter the Keystore and the X.509 Certificate and Private Key. To do this, you can use the input help.

Keystore contains certificates that are used for authentication and encryption.

 

image

5) An X.509 client certificate is a digital "identification card" for use in the Internet, also known as a public-key certificate. So public key Certificate has to be selected.

 

image 

6) Final configuration looks like below.

image 

The FTPS configuration for both sender and receiver communication channels is similar.

SAP PI 7.1 offering to create Models in the Enterprise Service Repository.

SAP Modelling uses ARIS models, modeling focuses on design and ensures reusability, naming conventions, and scalable interaction and integration scenarios. The aim of Modelling is to model business process flows. The model helps you to understand and then to implement the process flows or to enhance an implementation that already exists.

 

 

In a service-oriented architecture of business applications, you ideally initially model your application prior to implementation. This means that you can answer fundamental questions such as what components the application comprises of, which services the individual components offer, and how the various different components interact with each other before you begin implementation. A governance process ensures that by using models, all services are always identified and defined in the same way, thus avoiding redundancies.

 

 

The models are not system-landscape-specific. Later on, they provide useful information when implementing services, as well as during any configuration that may be required. Furthermore, the models document different aspects of a business process, increase understanding of applications across departments and businesses thereby reducing costs when applications need to be changed or enhanced in a later release.

 

Business Object: A business object (BO) represents a specific view of data of a well-defined and outlined business area. BOs are identified in such a way that there are no overlaps. Process Component: 

Process components group business objects (BOs). A BO belongs to exactly one process component.

 

Operation:

 

An operation is assigned to exactly one BO. Each BO can have more than one operation.

 

Deployment Unit:

Groups all process components that will later be installed together on the system. To enable these process components to run, it is sometimes necessary to configure the process components of other deployment units, even if this is not ideal.

Different type of models: 

Process component model:

 

The model contains information about what Service Interfaces are used . A Process Component Interaction model shows how different Process Components relate to each other, for instance the message flow between Process Components. The process component model (SAP ProcComp model) is used to describe the inner workings of a process component. You use one or multiple BOs to model the data, you define the operations and service interfaces that the process component uses to access the data/BOs, and you define the operations that are used to access other process components data. image 

Integration Scenario Models:

Integration scenario models describe which process components belong to which deployment units and how the process components interact with each other in an end-to-end scenario. The integration scenario models give a better understanding of the whole process. image 

Process Component Interaction Model:

 

Process component interaction models (SAP ProcComp interaction model) describe the communication between two process components in detail. The model shows all involved BOs, service interfaces, operations, and message types. A process component interaction model can only be used for an Enterprise Service Interaction and there can be none, one, or multiple process component interaction models assigned to one Enterprise Service Interaction. 

Business Object Map:

 

Business object maps (SAP entity map), or business object template maps, aggregate business objects or business object templates in a model for overview purposes. A business object map is an entity map, which is a structured directory of all entities of the main entity types. An entity map for a given application is a structured directory of all deployment units, process components, and business objects in the application. Business object maps are defined for all major applications and are shipped as ESR content. 

Integration Scenario Catalog:

 

Integration scenario catalogs (SAP Scenario Catalog) group and structure all the integration scenarios of a solution and thereby represent the business starting point for process modeling. The contained scenarios and their variants are clustered using integration scenario groups. You can navigate from a catalog to all contained elements.  reference:

http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40db4735-02f9-2a10-b198-a888a056bb67

 

http://help.sap.com/saphelp_nwpi71/helpdata/EN/b4/5179348f9a3845b2d0d17d9419e5fd/content.htm 

Filter Blog

By date:
By tag: