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

Messages got stuck in DispatchDisp Queue of PI while talking with Ariba Network

$
0
0

Symptom

You use Ariba Network Adapter in PI to connect to Ariba Portal as the receiver. You noticed large amount of XML messages got stuck in Queue DispatchDisp, and the used threads by Ariba adapter do not go down all the time (by checking Component Monitoring -> Adapter Engine -> Engine Status, tab ‘Additional Data’ & ‘Messaging Overview’).

You collect a series of thread dumps while the messages are on hold, you will find these Ariba threads are waiting to read from a network socket like:

"MS Queue Worker

[AribaNetworkAdapterSAPNetweaver_http://ariba.com/xi/ASCAdapterRecv]"

cpu=614708.93 ms allocated memory=6.394772596E10 B tid=0x105758330

nid=0x45 prio=3 runnable

,,at java.net.SocketInputStream.socketRead0(Ljava.io.FileDescriptor;[BIII)I(Native Method)

,,at java.net.SocketInputStream.read([BII)I(SocketInputStream.java:129)

Because there is no more free Ariba thread, the DispatchDisp Queue can’t dispatch any incoming messages.

You may increase the parallelism for this adapter according to note 1084161. For instance, add an entry

(name=AribaNetworkAdapterSAPNetweaver_http://ariba.com/xi/ASCAdapter,

Send.maxConsumers=5, Recv.maxConsumers=10, Call.maxConsumers=5, Rqst.maxConsumers=5)

in the value for property “messaging.connectionDefinition”.

You might also limit the maximum receivers for a specific queue as described in note 1136790, so that it will not block the other receiver queues.

The backlog may start processing after you restart the server, but you notice the backlog starts building up again after some time.

 

 

Environment

SAP Netweaver Process Integration; Ariba Network Adapter for SAP NW

 

 

Cause

The network communication between PI and Ariba has broken. Ariba Network Adapter doesn't recognize this, so the communication session is stuck.

 

 

Resolution

Ariba support added a timeout setting for the Ariba adapter:

"Timeout = 5mins"

If there is no response from the sever within this time, the adapter exits, and the connection thread is released.

This is enclosed in the latest installation package (AribaNetworkAdapterSAPNetweaver_v12s2.zip) which is available at http://connect.ariba.com.

Please be aware that any new update, like a new release, will only be updated by Ariba support.

 

 

See Also

1084161 - Performance decrease after applying XI 3.0 SP20 /7.0 SPS12

1136790 - Blocking receiver channel may affect the whole adapter type

 

 


Deploying Oracle JDBC Driver in PI 7.3 System through SUM

$
0
0

This document describes the procedure to deploy/update  Oracle Driver on PI 7.3 systems using SUM.

 

 

Normally, if we have a PI 7.3 system is because we have updraded from PI 7.1. 

This document talk about upgrade jdbc-jms adapters from PI 7.1 and provide a path from SAP NetWeaver 7.1 PI Java Installation DVD.  But, ¿what happens if our installation it’s over 7.3?

 

The first thing that comes to mind is download installer of “SAP Netweaver PI 7.3” but this does not exist, the correct way it’s download SAP Netweaver 7.3 Java components because the Netweaver 7.3  it’s the base for upgrade to PI 7.3.

 

image1.bmp.jpg

 

So, oh surprise!!! The .sda archive described on This document it does not appear.  Bad way again!!.

If you try to upgrade with the archive from Netweaver 7.1 you could find with this error.

 

 

image2.jpg

So guys, if you have an SAP Netweaver PI 7.3 upgraded from 7.1 this is you have to do.

 

 

  1. Like it’s described on This document   the .sda archive we have to modify is: com.sap.aii.adapter.lib, so we must download the .sca archive that contain it,  so first identify which Software Component is associated to the Development component.  The software component is SAP-XI3RDPARTY

 

image3.png

 

 

 

2. This software component can be downloaded Support Package and Patches -> SAP NETWEAVER -> SAP EHP1 FOR SAP NETWEAVER 7.3 ->Entry by Component-> PI Adapter Engine (Java EE). ->XI 3RD PARTY 7.31    and download the SP level you want.

 


image4.jpg

 

3. Once downloaded, open a the .sda archive with a zip program, e.g winrar, and extract  the provider.xml descriptor, located in server folder, in a folder of your pc.

 

image5.jpg

 

4. Afterwards, get into .sda, the  ojdbc6.jar  over the lib folder

 

image6.jpg

 

5. Modify the provider.xml adding the reference to the new jar

 

image7.jpg

6. Deposit again the xml archive into the .sda

 

 

7. Use the Software Update Manager (SUM) to deploy the modified com.sap.aii.adapter.lib.sda.   Here only on thing, ensure that you new .sda be over /usr/sap/trans/EPS/in, NOT other folder.

 


 


SAP NetWeaver Process Integration 7.3 Performance Check – Analyzing Performance Issues and Possible Solution Strategies

$
0
0

This guide provides in-depth review of the performance-critical aspects of any SAP NetWeaver Process Integration installation. It is explained in detail how to identify the performance-bottlenecks for each component of SAP NetWeaver PI and possible solution strategies are discussed.

View Document

Create a Webservices on ABAP FROM a Function module

$
0
0

In this document, i will describe the creation and the configuration of web service. I suppose tht icm is configured for http and https.

So, i have copy a standard function module GET_TABSIZE_ORA (i work on oracle database ) into ZGET_TABSIZE_ORA. I modify it in order to be launch in remote.

And i use it to create a web service by using se37 : Utilies->Mores Utilities->Create Web Service-> from function module:

image011.png

It opens a wizard, enter name and description, continue:

image013.png

continue:

image015.png

continue, important point about security:

 

image017.png

Enter Package and transport request:

image019.png

 

image021.png

When complete you arrive on these screen, you can modify if you want :

image023.png

image025.png

image027.png

image029.png

image031.png

image033.png

You can leave transaction.

If you want to come back on webservice definition, you can do it through se80:

image035.png

image037.png

 

Now after creating webservices you need to expose itL. transaction SOAMANGER:

Simplified Web Service Configuration:

 

image039.png

You search your webservices, and you can define Authentification method you want to use to expose it:

image041.png

Warning: it must be compatible with Security profile you have defined on web service. Either you will have error message.

 

 

After you can download WSDL (SOAMANAGER -> Web Service Configuration-> Enter your webservice name Apply and Open WSDL document for selected binding or service) and import it on SoapUI for instance to test it :

WSDL.png

image043.png

 

You can make test with SE80 also :

test_se80.png

test_se802.png

test_se803.png

After changing value, you will have to click on "Change parameter" (icon red and white), you will go on previous popup with falg on Keep Request Template.

test_se804.png

Featured Content in Process Integration (PI) & SOA Middleware

$
0
0

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. 9 Dec 2013

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. 6 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. 5 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. 5 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! 8 Nov 2013

*PI Moderators' Picks*

Process Integration - Previously Featured

$
0
0

Welcome to SAP NetWeaver Process Orchestration 7.31 and to the Process Orchestration space!

Polls: Take a moment to answer a few questions and help us understand the plans and needs of your organization. Thank you for your feedback.
Previously featured

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.

PI Moderators' Picks

$
0
0

Here are PI Moderators' picks for good content in the Process Integration (PI) and SOA Middleware space:

 

* NEW! Reuse PI Operation Mapping as a Service in SAP NetWeaver BPM

This blog by Vikas Rohatgi highlights how to enable the reuse of Operation Mappings in the Process Orchestration stack, specifically in the BPM component, as a step for safeguarding your investments in such process-related mappings and reducing the re-implementation efforts when transferring ccBPM processes to the Java-only stack.

* NEW!Released: SAP NetWeaver Process Orchestration B2B Add-On SP2

* NEW! Roadmap for SAP HANA Cloud Integration

* NEW! What's new in Process Orchestration 7.31 SP09 | 7.4 SP04

* NEW! cbs PI MeMo App – New Monitoring Features and Improved Error Handling by Denny Schreber

A few weeks ago CBS launched the new version of the PI MeMo app that fits with Apple’s iOS 7 look and feel. This blog describes the new features of that version in more detail.  

* NEW! Java Mapping - Sign XML in mapping in XI 7.0 by Vladimir Balko

Recently Vladimir Balko received a task to digitally sign outgoing XML Invoice. That is not a problem at all - you can do this easily in SOAP adapter as adapter module. But his assignment had a restriction - because that XML was processed by ccBPM (in XI 7.0) - the signing had to be done in mapping, not in adapter. Take a look at the solution.

 

* TechEd 2013: SAP NetWeaver Process Orchestration @ SAP TechEd Bangalore 2013

* New Category for SAP NetWeaver Architecture and 1st SCN spotlight for SAP Architects

* 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.

* Do not miss the SAP HANA Cloud Integration –  Early Customer and Partner Project where Udo Paltzer shares details about the opportunity to get hands-on experience with SAP HCI. Check it out, it’s easy!

* Results: Global SAP NetWeaver PI Survey 2013 (Part 2 of 2)

* Results: Global SAP NetWeaver PI Survey 2013 (Part 1 of 2)

* Sep 30 and Oct 1 Join us for a Webcast: SP1 of B2B Add-on with SAP NetWeaver Process Orchestration - overview and roadmap

* Migration Woes? - if you are planning for a migration from your XI 3.0, PI 7.0, PI 7.1, PI 7.3 dual stack installations to SAP Process Orchestration.

* What's new in Process Orchestration 7.31 SP08/7.4 SP03

* Q&A: Process Orchestration Webcast Series

* Step by Step guide to update Advanced Adapter Engine System to Process Orchestration System

* Moderator Spotlight with Grzegorz Głowacki

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

* Global Survey for SAP NetWeaver Process Integration 2013

* Support for abstract interfaces in Process Orchestration coming soon

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

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

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

* Create your own SAP NetWeaver Process Orchestration test environment on Amazon Web Services (AWS)!

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

* cbs PI MeMo App for MobiIe Message Monitoring

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

* Improving the Quality of Content in PI Space

* Process Integration (PI 7.31) Handbook

* Michal's tips: Application Interface Framework (AIF) - IDOC processing with AIF actions

* Upgrade options to the latest Process Integration or Process Orchestration

* Installation Options for Process Integration and Orchestration Use Cases

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

Configuring Java IDoc Adapter (IDoc_AAE) in Process Integration

$
0
0

This guide helps to understand the configurations required for IDoc scenarios with IDoc_AAE adapter type in PI 7.3/ 7.31 involving advanced adapter engine.  The new IDoc Adapter IDoc_AAE is part of the advanced adapter engine.

View Document


File acknowledgement in NW BPM scenario

$
0
0

Objective


In NW BPM we don't have acknowledgement handling option that we had in ccBPM. The goal of this document is to show a workaround for the problem.

There is already a good solution in that topic (http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/10/01/file-record-confirmation-in-a-nw-po-scenario) but it is writing in a temporary folder and uses an extra file sender channel to implement the acknowledgement functionality.

The solution described in this document uses a single file receiver channel.

 

The idea behind

 

After a successful writing the receiver file adapter can send back an empty message. In case of failure the message goes to error status (after the configured number of retries) and there is no response sent back. In our case we have 3 retries with 5 minutes interval which means either we get an acknowledgement from the file adapter in 15 minutes or we can be sure that the file writing has failed.

It is modeled by an NW BPM which is sending the asynchronous message to the file adapter and which has a timeout of 16 minutes.

What we need to make this work is:

- to make the file adapter to send back an acknowledgement message - it is done by a ResponseOneWay bean on the module tab

- to make an xml from the empty message - it is done by a Transformation bean (plain2XML)

- to transfer correlation data from the inbound message to the new asynchronous acknowledgement message created by the ResponseOneWay bean - it is done by a DynamicConfiguration bean using read/write commands.

 

Message flow

 

message_flow.png

 

Implementation

 

ESR

 

Interfaces and message types

 

We need inbound and outbound interfaces for the main message, the acknowledgement and the error/success message with the following types:

msg_types.png

The two fields filename and path of MT_MESSAGE will be used in the file adapter and will also form the content of the file.

The obj_id of MT_Acknowledgement is used for message correlation in the BPM and will contain in our example the file name.

The description field of MT_STATUS will be written in an error/success file in order to model some feedback logic to see the outcome of the main message transfer (it could have been also email sending, alerting etc. but for demo purpose file transfer seemed to be the easiest). In our case it will hold again the file name.

 

The following asynchronous interfaces are used in the scenario:

interfaces.png

The inbound interfaces MIIA_MESSAGE and MIIA_Acknowledgement belong also to the BPM business component thus they have to be XI30 compatible.

 

Mapping objects

 

Before calling the receiver file adapter we insert the file name from the payload into the ASMA (Adapter specific message attributes). After calling the receiver file adapter when sending back the acknowledgement message we put the file name from the dynamic configuration into the acknowledgement payload.

These two operations are performed in the following mappings:

mapping.png

mm_setfile.png

mm_ack.png

 

Directory

 

The business components

 

The following business components and channels are defined for the scenario:

bc.png

The BPM is communicating via a sender and receiver soap channel the same way as in any other NW BPM scenario so they won't be detailed here.

The soap sender channel of the sender system and the error/success file receivers of the receiver systems are also the usual ones, no explanation needed.

It is however important to explain the file receiver channel of the main message which is the heart of the solution. The fault soap sender channel of the receiver system is also an ordinary soap channel but it is worth mentioning that it is used for the acknowledgement sending from the receiver file adapter of the main message.

 

The file receiver channel

 

As mentioned earlier this file receiver channel will send back an asynchronous acknowledgement message. To achieve this we need some module configuration.

file_rcv.png

The modules:

modules.png

GetFileName: we read the file name from the dynamic configuration and store it in a variable to reuse it in the ack. sending.

modules_getfile.png

Plain2XML: we need to convert the empty response of the file channel to an xml message.

modules_xml.png

SetFileName: we take the file name from the above variable and put it in the new acknowledgement message's dynamic configuration.

modules_setfile.png

RequestResponse and ResponseOneway: we send back a new asynchronous acknowledgement message.

modules_rob.png

The integrated configurations

 

First we send MESSAGE from the sender system to the BPM:

ico_11.png

ico_12.png

ico13.png

ico14.png

Then the BPM sends MESSAGE to the receiver system:

ico_21.png

ico_22.png

ico_23.png

ico_24.png

The acknowledgement is sent back from the receiver system to the BPM:

It is important to setup this ICO with virtual receiver as the file adapter sets the receiver in the message header.

ico_31.png

ico_32.png

ico_33.png

ico_34.png

Finally the BPM sends an error or success status to the receiver system (they look the same so only one is detailed here):

ico_41.png

ico_42.png

ico_43.png

ico_44.png

 

NWDS

 

nwds.png

 

Start event: we map the incoming message (via MIIA_MESSAGE) to the local variable MESSAGE.

Parallel split: we start the file sending branch and the timeout branch.

Send_MESSAGE: in the input mapping we map the local MESSAGE to MT_MESSAGE and send it out via MIOA_MESSAGE.

Acknowledgement: in that intermediate message event we wait for MIIA_Acknowledgement with correlation on the file name

                              string-equal(MT_Acknowledgement/obj_id,MESSAGE/filename)

Send_SUCCESS: we map the file name in the MT_STATUS-description field and send the message via MIOA_SUCCESS

Wait_Ack: internal timer for 16 minutes (in case of error the adapter tries to resend 3 times with 5 min. interval). After 16 minutes the message is already in error status, we can send out the error status.

Send_ERR: we map the file name in the MT_STATUS-description field and send the message via MIOA_ERR

End, Termination 0: termination events

IDOCs with red error flag in OUTBOUND STATUS

$
0
0

There is one rare case in SAP PI when the message is successful in SAP PI but it actually failed in PI with its OUTBOUND STATUS in error.

 

As a SAP PI consultant I luckily faced this issue. Our ABAP team asked us for few IDOCs that were not reached to their system on one particular date. When we checked the IDOCs in PI for mentioned date, we found that those were successful but actually not.When we scrolled to right of the message entry we noticed the red flags which means not processed to target system.

 

We usually check the messages with the main STATUS which we see at very first column in SXMB_MONI window but it may not tell you the real story so OUTBOUND STATUS also play role.

 

Now I will discuss the issue with screenshot references.

At first we find the message entries with red error flags in OUTBOUND status

 

000.png

As we know the RFC calls of IDOCs happen through tRFC queue i.e. SM58. So we need to give a look for the erroneous entries in SM58 for the same failure date. Here in our case we found that calls for the same ABAP system were in error so we need to test the connection and if connection is OK we need to execute all entries.

 

111.png

 

These RFC calls (LUWs) need to be executed from SM58 but if they are many then do the Execute LUWs

So to execute all failed LUWs with below steps:

 

Step 1:

Goto Edit and Choose Execute LUWs


222.png

Step 2:

Enter the target system details in Destination and select the date as per date of failed entries. Select the check boxes as per error entries.

333.png

 

Step 3:

  Once done the failed entries in SM58 and the OUTBOUND STATUS turned successful.444.jpg

Cache Issues with IR and ID

$
0
0

We recently noticed an issue in PI that if we were creating\updating some design objects in IR and ID the same were working on older version or doesn't even reflected at runtime if it is newly created.


Case is that we created a channel in ID but when we were checking it in 'Communication Channel Monitoring' it was not visible under the all channels list and the mappings we were updating that were not even executing as per the current version.

 

It clearly seems to be a cache issue which we can fix in IR and ID itself. PFB the steps that will help us in resolving these kind of cache issues.

 

Step 1:

 

Go to Environment Tab and look for Cache Notifications… You will see recent entries with relevant details. If the entries are in green then it’s OK but if not then that is the problem to us.


00.png


Step 2:


When you select one entry or more then the Icons on the left side get enabled for you and you can execute them as per requirement. The highlighted one is for Cache Update.

11.png

 

Step 3:


Below one is one example where you can see the entry is in Red status that means it is in error and you need to update that or delete that.


22.png


Step 4:


Select the erroneous entry and Click on ‘Repeat Cache Notification’ Icon, which will change the status from red to green. And after that you are done.


44.png

Cache issues should get resolve by following these steps

Manual transports in PI using File System..Its simple

$
0
0

If your CTS, CMS are not working and if we have some urgent pending transport we can choose one option of transport which is manual. Our ID and IR objects can easily be transported by using this method but we may have dependency on our basis team if we go for this option and if we have access to server directories then it become simple to us .

 

So here are the steps that we need to follow to complete this task.

 

Step 1:

Go to your namespace whose objects you want to export.

XIExport1.PNG

Step 2;

Select the Mode as ‘Transport Using File System’

 

XIExport2.PNG

Step 3:

Click Continue

XIExport3.PNG

Step 4:

Select ‘Object Set’ as per your requirement.

XIexport4.PNG

Step 5:

Take an example of Individual Objects and go to middle icon of ? to select the required object.XIexport5.PNG

Step 6:

All kind of repository objects are shown for manual selection, select the required one.XIexport6.PNG

Step 7:

For one or e.g. we have selected one mapping.

XIexport7.PNG

Step 8:

One selected it will be shown like this, just click ‘Finish’

XIexport8.PNG

Step 9:

After Clicking on finish you will get details of the file.  Note down the Export Path and Filename from the window.

XIexport9.PNG

Step 10:

Go to the Export path location of you PI server from where you want to Transport the Objects like Dev. E:\usr\sap\,Dev PI server name>\SYS\global\xi\repository_server\export

XIexport10.PNG


Step 11:

Locate you file and place to target PI server IMPORT directory. E:\usr\sap\<Quality Server name>\SYS\global\xi\repository_server\importXIimport.PNG

XIimport1.PNG

Step 12:

Now go to your QA PI server and Go to ‘Tools’ -> Import design objects

XIimport2.PNG

Step 13:

The file will be visible if you have placed it right, you just need to click OK to get it imported.

XIimport3.PNG

Once imported the placed file will move to importedFiles

Xiimported.PNG

Step By Step Guide for Configuring User-Defined Search In PI

$
0
0

Introduction:

 

If we consider any PI System, across an interface there will be thousands of messages flowing. So it becomes very difficult to search for a message which is required to us. To make the message search in an easy way User-Defined Search can be configured. User-Defined search is nothing but searching for a required message in an interface based on the content of the payload or the dynamic header. In this document step by step procedures for configuring User-defined search in Integration engine (Abap stack) and Adapter engine (Java stack) has been explained.

 

Basic Concepts and Overview:

 

1. If you consider the payload which is given below We can define user-defined search for any of its content.

UDS_1.png

2. Let us take a Name here as an example.

3. Once we define the Name as search criteria in the UDS, Based on the value which we give the particular message that satisfies our search value will be filtered and that message will be displayed.

 

For configuring User-defined Search the following three things need to be configured.

           

  • Filters-They contain the details about the interface .i.e. the sender and receiver components, Interfaces and their namespaces.
  • Extractors-Extractors for filters contain extraction details for the filters i.e. based on which criteria we want to filter the messages. It can be content of the payload or dynamic header. So here we need to define the required the X-path expression or dynamic header.
  • Namespace Prefixes-Here we define the namespace prefix and the corresponding value for the namespace prefix.

 

Indexing:

 

In Adapter engine User-defined search we have an Indexing option. Indexing is nothing but searching for the message which has been already sent to PI and processed. Currently this option is available in adapter engine. We don’t have this option for Integration Engine.

 

System Requirements:


PI 7.3 system and Access to Transactions SXMS_LMS_CONF, SXMB_MONI, and SXMB_IFR are required for PI System.

 

User-Defined search in Integration Engine (Abap Stack):

 

With PI 7.3 We can open Abap stack by two ways.

 

  • Using normal SAP Logon.
  • Using Browser.
  • The step by step procedure to open Abap stack using browser is explained in this guide.
  • In the Abap stack use the transaction “SXMS_LMS_CONF” to define filters, extractors and namespace prefixes.

 

 

Opening Abap stack using web browser:

 

Opening ABAP stack using web browser is a new feature available with PI 7.3.Now let us  

see how to open Abap stack using web browser and then we will how to configure User-

defined Search using the transaction “SXMS_LMS_CONF”.

 

1. Open PI browser.

2. Then select “configuration and Monitoring Home" Which is encircled in black in the screenshot below.

UDS_1.png

 

3.Then select monitoring tab and under that Integration Engine tab and select “message monitor (Database)” option which is encircled in black in the screenshot below.

UDS_1.png

 

4. Once we click that we will be redirected to Abap stack as shown below.

UDS_1.png

5. Then we need to go to transaction”SXMS_LMS_CONF” to define User-Defined Search.

 

 

Filters:


1.Once we open the transaction “SXMS_LMS_CONF” we will find the option to add, delete and edit filters as shown below.


UDS_1.png

2. Define filters by giving sender and receiver parties, components, Interface name and namespace.

 

UDS_1.png

 

Extractors:


1. The next step is configuring Extractors for the filters.

2. Select the filter for which Extractor need to be defined.

3. At the bottom of the screen you will find the option to create Extractor which is encircled in Black in the screenshot below.

4. Once we select new option a new tab will open as shown in next slide where we will define our Extractors.

UDS_1.png

 

5. Define extractors for the filters by giving X-path or dynamic header.

6. Also you can invoke these extractors during message processing or by external job.Select them according to the requirement.

UDS_1.png

7. One Filter can have many Extractors.

 

 

Namespace Prefixes:


1.in the same screen at the right side bottom you will find an option to add Namespace Prefix which is encircled in black in the screenshot.

UDS_1.png

2.  The screenshot below is for Namespace prefix definition.

UDS_1.png

3. Define namespace prefix and namespace value and corresponding prefix.

 

 

Searching for the message using User-Defined Search Criteria:

 

1. After configuring filters and extractors, namespaces go to transaction “SXI_MONITOR”.

2. Select the “User-Defined selection Criteria” tab.

 

UDS_1.png

 

3. There you can find two columns Name and value.

4. Name is where the extractor defined will be selected and give the value based on which You want to search for the message.

5. Values are given as shown below.

UDS_1.png

6. You can search for all values or for any of the value.

7. Its like “or” and “And”

8. Now the messages will be filtered based on the" user-defined” search criteria and you can see the user defined attributes by selecting attributes tab or by pressing F7.

UDS_1.png

9. This is how UDS works in Integration engine.

 

 

User-Defined Search in Adapter Engine (Java Stack):


1. Hope you all now got the idea what is User-Defined Search. Now we will see how to do various configurations for UDS in Adapter Engine message search.

2. Open java stack of PI.Go to configuration and monitoring home.

3. There you will find “User-Defined Search Configuration”. Select that option.

UDS_1.png

4. Once you select the “User-Defined Search” option you will be directed to the page as shown below.

UDS_1.png

 

5. Here you find the filters, extractors and prefixes tab.

6. You can create new filter by using the “New” button which is highlighted by the black circle.

7. You can edit the existing filter by using the" Edit” button which is highlighted by red circle.

8. You can also the delete the existing filter by using “Delete” button which is highlighted by green circle.

9. You can also activate or deactivate the filter.

 

Filters:


1. Now we will see how to create filters for a interface.

2. Select the “New" button for creating filter. You will be redirected to the page as shown below.

UDS_1.png

3. New filter can be created by giving Name of the filter, Sender & receiver parties, components, and interface name and namespace.

4. Here also you can activate or deactivate the filter with the help of status option.

 

Extractors:


1. Now its time to create extractors for the filters.

2. Select the “search Criteria" option which is encircled in black in the screenshot below to define extractors.

UDS_1.png

 

3. Select the Filter for which you want to create extractor. Now select the new Button and define the extractor.

UDS_1.png

4. For extractor you need to give the Name, Type .i.e. whether it is xpath expression or dynamic header.

5. Then give the required Xpath or Dynamic header based on which you want to search for the message.

UDS_1.png

 

Namespace Prefixes:


1. After creating Filters and extractors now namespace prefixes should be defined.

2. Select the prefixes tab.

UDS_1.png

UDS_1.png

    

 

3.Select the prefix tab and give the namespace prefix and the corresponding value.


UDS_1.png



Searching for the message using User-Defined Search Criteria:


1. Now its time to check our UDS which we have configured.

2. Select monitoring option and below which you will see under" Adapter engine” tab.

3. After selecting that select" message monitor option "which is encircled with black in the figure below.

UDS_1.png

1. You will be redirected to Monitoring messages page. Select Database view and also select 

    “Advanced” option which is encircled with Red in the figure below.

UDS_1.png

 

 

2. Once you select the Advance option you can see the “User-defined Search” criteria.

UDS_1.png

3. Select the ADD predefined tab.

4. Now you can see the filters and extractors which we have defined earlier.

5. Now select the required filter and extractor for your interface.

UDS_1.png

6. Then give the value based on which you want to filter.

7. for example if EmpId is the filter criteria and your giving”1” as the value. Messages that contain “1”in the payload will be displayed.

8. The screenshot below here shows the messages filtered based on the value or content.

UDS_1.png

9. In User-Defined Attributes tab you can see the values which we have defined.

 

Indexing:


1. As discussed earlier, Indexing option is available for adapter engine User-Defined search.

2. Select the Indexing options button which has been encircled with black in the screenshot below.

UDS_1.png

 

3. By indexing we mean we can search for the message which has been already processed.

UDS_1.png

 

 

4. We can give the required dates and select “start Indexing" button to start indexing.

And the status can be checked by selecting" Indexing status" button.

Dynamic Configuration with Seeburger receiver SFTP Adapter.

$
0
0

Introduction:-

 

In this document we will discuss about dynamic configuration with Seeburger receiver SFTP adapter.

 

Scenario:- (Idoc_To_File)

 

The idoc data is to be transferred to SFTP server with desired file name.

The requirement was to create receiver file with following naming convention.

Eg: <date& time>_<idoc number>_<dataobjectName>.xml.

 

ESR Steps:-

 

  1. Create Data Type, Message Type & Service Interface for receiver service.
  2. Create mapping program.

 

 

  3. Write a UDF which will take 3 input values, date&time, idoc number & dataobject name.

 

     Import following classes into the mapping program

  • com.sap.aii.mapping.api.DynamicConfigurationKey
  • com.sap.aii.mapping.api.DynamicConfiguration

 

 

     Note:  In mapping program assign this function to the top level node of the receiver message type.

                 Here we have assigned this function to top node "OpenWorkOrder"

 

 

Integration Directory Steps:-

 

  1. Import business systems for sender & receiver system.
  2. Create communication channel under receive business system.
  • Select Seeburger SFTP adapter.
  • Provide connection details ie. Host, Port & Host Store.
  • Mark the check box for “Use Dynamic Attributes”.
  • Provide details about User & authentication.
  • Provide base directory.
  • Please write filename as  ' * '.

 

 

·   Under “Module” tab, add AttribMapper as a module.

·   Give any key name for the module. Eg. “Dynamic ”.

 

 

  • Adding Model Configuration details for module key as mentioned below.

          Parameter Name:- http://seeburger.com/xi/common/dtSubject

          Parameter Value:- @http://sap.com/xi/XI/System/File/FileName

 

 

3. Create Receiver Agreement, Interface Determination, Receiver Determination as usual.


Testing:

 

  1. Post the idoc.
  2. Go to SXMB_MONI & click on Response --> DynamicConfiguration.

          As you can see here that filename according to our requirement is created.

 

 

  3. Go to SFTP server & check for output file.

 


Thanks,

Rahul S. More

(Technical Lead)

iGATE Global Solutions Ltd.


Message Monitoring in NWDS. A Smart option

$
0
0

I would say its a smart option in NWDS.

Most of the PI consultants use either sxi_monitor or message monitoring in the browser.

But I found a smart option in NWDS, i.e iflow monitoring.

 

I just wanted to share to all of you that, in NWDS also we can do all monitoring work.

 

Connect NWDS to PI server.

[Check the link, for NWDS set-up for PI - http://scn.sap.com/docs/DOC-48397].

Open the iflow which you would like to monitor like below.

1.jpg

1.1.JPG

Enter login credentials and you could see the browser embedded in NWDS.

Next is, all the options available, just use it.

See below pic for few examples.

Channel monitoring :

2.jpg

Message monitoring:

3.jpg

 

Its smart, isn't it?

Just enjoy the monitoring in NWDS.

 

Avi


Easy way to learn - Java Mapping using DOM - SAP PI 7.1+

$
0
0

Hi all,


     I will explain in this blog a easy way to do a javamapping using DOM for any mapping that you need, today I use javamapping for the most of mappings, because Graphic Mappings it´s limited in somecase hard to input a logic inside box, also I will explain the project case that I did.


Check this out and enjoy it.


What is a Parser?


     A parser breaks data into smaller elements, according to a set of rules that describe its structure. If the syntax of a data source has been described by grammar rules, a parser can use the grammar to parse the data source; that is, to break data elements such as address into smaller elements, such as house number,street number,city, pincode etc. The output of the parser is a parse tree. The parse tree expresses the hierarchical structure of the input data.

 

What is a DOM Parser?

 

     DOM(Document Object Model) is a platform- and language-neutral interface, that provides a standard model of how the objects in an XML object are put together, and a standard interface for accessing and manipulating these objects and their inter-relationships.

 

Why DOM parser?

 

  1. Converts XML into a tree of objects
  2. It's possible to access any node within tree randomly
  3. Can insert/delete nodes within XML document
  4. Implements W3C standards for accessing XML

 

Whats the main difference between DOM and SAX ?

 

     DOM loads a whole XML file inside memory and SAX you can just check what node you want.

 

     I will not explain SAX in this blog.


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

 

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


public void execute(InputStream in, OutputStream out) throws StreamTransformationException {


public void transform(TransformationInput tInp, TransformationOutput tOut) throws StreamTransformationException {

 

Java Libs and SAP PI Versions:

 

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:

 

     The project case was evolving 5 systems basically, one was a .NET Webservice, SAP PI (Middleware Layer), SAP BO NF-e 10.0 (Application Server - SAP Solution for Eletronic invoices to Brazil), SAP ECC 6.0 and and Governament Webservice System - SEFAZ.

 

aew.png

 

    Asyn to Sync brigde using ccBPM - I will not explain this steps into this document.

 

     The requirement from .NET Webservice team was - " I need send to you an interface with 3 process inside"

 

     The request mensagem:

 

    1. MM - Material moviments -  0..1
    2. FI - Financial bills - -  0..1
    3. NF-e - J1B1N Writer NF-e -  0..1

 

     I created a data type separate in BLOCK´s of process:

 

     Request Message:

 

      req.JPG

    The occurrences was defined 0..1, because sometime the web service could send only BlockMM or BlockFI or both, or only Block NF-e or three blocks.

 

     Response message:

 

     Now this is the point of parsing with DOM starts.

 

     So if the request message has only Block MM and Block FI  the Message Mapping could handly easy the mapping, but if the request has the BlockNF-e I needed use java mapping.

resp.JPG

     So I use DOM because, I must read all XML and check if the response message structure contains the Block NFe and tag <StringXMLNFe> with string of NF-e XML.

 

     From this tag <StringXMLNF-e>, I will extract the values from specifics tags andcreate the <RespuestaSefaz> structure into target response message.

 

Java code

 

  Check the attachment file, but below I will explore the main part and important part of the java code:

 

public void transform(TransformationInput tInp, TransformationOutput tOut)throws StreamTransformationException {
/*-----------------------------------------------------------
* Create a tracelog variable
*-----------------------------------------------------------*/
AbstractTrace absTraceLog = this.getTrace();
absTraceLog.addDebugMessage("\n Start Java Mapping-");
/*-------------------------------------------------------------------------
* Create a variabloe inpxml to recebive the stream converted into String
*-------------------------------------------------------------------------*/
String inptxml = convertStreamToString(tInp.getInputPayload().getInputStream());
try {
/*-------------------------------------------------------------------------
* Creating a dom document "doc"
*-------------------------------------------------------------------------*/
DocumentBuilder domFactory = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Transformer tf = TransformerFactory.newInstance().newTransformer();
Document doc = domFactory.parse(tInp.getInputPayload().getInputStream());
doc.getDocumentElement().normalize();
StringWriter sw = new StringWriter();
StreamResult result = new StreamResult(sw);
DOMSource source = new DOMSource(doc);
if (inptxml.contains("XMLNFe")) {
/*-------------------------------------------------------------------
* Creating a Nodelist x to receive a whole xml tag files
*------------------------------------------------------------------*/
NodeList x = doc.getDocumentElement().getElementsByTagName("*");
/*-----------------*
* Loop  *
*-----------------*/
for (int i = 0; i < x.getLength(); i++) {
Node xml1 = x.item(i);
if (xml1.toString() != ("#text") && xml1 != null&& xml1.getNodeType() == Node.ELEMENT_NODE) {
absTraceLog.addDebugMessage(" Os respectivos elementos são <"+ xml1.getNodeName()+ "> e está no index: " + i);

 

With this part above, until line " DOMSource source = new DOMSource(doc); " you can use for do any java mapping into SAP PI 7.1+

 

The main part of the java code to read the whole xml document in one shot.

 

NodeList x = doc.getDocumentElement().getElementsByTagName("*");

So if this code above you dont need to do a loop inside loop to read nodes.

 

Basically * means into XSLT language, read a whole xml file.

 

 

Checking node <XMLNFe> element without "<open and close tags>"


if(((Element)xml1).getParentNode().getNodeName().equals("ns1:NotaFiscalResponse") &&                          ((Element)xml1).getTagName().equals("ns1:XMLNFe")){                            tagXmlNFe = xml1;                            rootNFResponse = tagXmlNFe.getParentNode();

 

If found the tag XMLNFe it´s means that I need create the structure <RespustasSefaz>, if not the menssage contains only BlockMM and BlockFI so it´s a pass thought into java code.

 

 

Extracting values from xml string inside tag <StringXMLNFe>

 

chNFe = inptxml.substring(inptxml.indexOf("<chNFe>") + 7,inptxml.indexOf("</chNFe>"));
tpAmb = inptxml.substring(inptxml.indexOf("<tpAmb>") + 7,inptxml.indexOf("</tpAmb>"));
dhRecbto = inptxml.substring(inptxml.indexOf("<dhRecbto>") + 10,inptxml.indexOf("</dhRecbto>"));
nProt = inptxml.substring(inptxml.indexOf("<nProt>") + 7,inptxml.indexOf("</nProt>"));
cStat = inptxml.substring(inptxml.indexOf("<cStat>") + 7,inptxml.indexOf("</cStat>"));
xMotivo = inptxml.substring(inptxml.indexOf("<xMotivo>") + 9,inptxml.indexOf("</xMotivo>"));
digestVal = inptxml.substring(inptxml.indexOf("<digVal>") + 8,inptxml.indexOf("</digVal>"));
serie = inptxml.substring(inptxml.indexOf("<serie>") + 7,inptxml.indexOf("</serie>"));
nNF = inptxml.substring(inptxml.indexOf("<nNF>") + 5,inptxml.indexOf("</nNF>"));
cDV = inptxml.substring(inptxml.indexOf("<cDV>") + 5,inptxml.indexOf("</cDV>"));
cNF = inptxml.substring(inptxml.indexOf("<cNF>")+ 5,inptxml.indexOf("</cNF>"));


Creating the structure <RespustaSefaz> and internal children values into target response message:

 

 

/*----------------------------------------------------------------

* <ns1:RespuestaSefaz>

*----------------------------------------------------------------

*<ns1:RespuestaSefaz>

*      <ns1:AutorizadaPorSefaz> = #100 = true/false

*      <ns1:ClaveAcceso> =  <chNFe>

*      <ns1:Codigo> = <cNF>

*      <ns1:CodigoAmbiente> = <tpAmb>

*      <ns1:CodigoEstado> = <cStat>

*      <ns1:DigestValue> = <digVal>

*      <ns1:DigitoVerificador> = <cDV>

*      <ns1:FechaRecibido> = <dhRecbto>

*      <ns1:Motivo> =  <xMotivo>

*      <ns1:NroNotaFiscal> = <nNF>

*      <ns1:NroSerieNotaFiscal> = <serie>

*      <ns1:NumeroProtocolo> = <nProt>

*</ns1:RespuestaSefaz>

*------------------------------------------------------------------*/

 

Creating the structures nodes:

 

respostaSefaz = doc.createElement("ns1:RespuestaSefaz");
autorizadaPorSefaz = doc.createElement("ns1:AutorizadaPorSefaz");
claveAcceso = doc.createElement("ns1:ClaveAcceso");
codigo = doc.createElement("ns1:Codigo");
codigoAmbiente = doc.createElement("ns1:CodigoAmbiente");
codigoEstado = doc.createElement("ns1:CodigoEstado");
digestValue = doc.createElement("ns1:DigestValue");
digitoVerificador=doc.createElement("ns1:DigitoVerificador");
fechaRecibido = doc.createElement("ns1:FechaRecibido");
motivo = doc.createElement("ns1:Motivo");
nroNotaFiscal = doc.createElement("ns1:NroNotaFiscal");
nroSerieNotaFiscal = doc.createElement("ns1:NroSerieNotaFiscal");
nroProtocolo = doc.createElement("ns1:NumeroProtocolo");


Inserting values into the new nodes created above:


 

/*------------------------------------------------------------------------------
* Inserting the values into new tags from values extracts
*------------------------------------------------------------------------------*/
autorizadaPorSefaz.appendChild(doc.createTextNode(cStat.replace(cStat, "true")));
claveAcceso.appendChild(doc.createTextNode(chNFe));
codigo.appendChild(doc.createTextNode(cNF));
codigoAmbiente.appendChild(doc.createTextNode(tpAmb));
codigoEstado.appendChild(doc.createTextNode(cStat));
digestValue.appendChild(doc.createTextNode(digestVal));
fechaRecibido.appendChild(doc.createTextNode(dhRecbto));
motivo.appendChild(doc.createTextNode(xMotivo));
nroNotaFiscal.appendChild(doc.createTextNode(nNF));
nroSerieNotaFiscal.appendChild(doc.createTextNode(serie));
nroProtocolo.appendChild(doc.createTextNode(nProt));


Creating the structures with values inside respective nodes:

 

 

/*---------------------------------------------------------------------
* Criando a estrutura <ns1:RespuestaSefaz> e inserindo as tags filhas
*---------------------------------------------------------------------*/
respostaSefaz.appendChild(autorizadaPorSefaz);
respostaSefaz.appendChild(nroNotaFiscal);
respostaSefaz.appendChild(nroSerieNotaFiscal);
respostaSefaz.appendChild(claveAcceso);
respostaSefaz.appendChild(codigoAmbiente);
respostaSefaz.appendChild(codigoEstado);
respostaSefaz.appendChild(digestValue);
respostaSefaz.appendChild(fechaRecibido);
respostaSefaz.appendChild(motivo);
respostaSefaz.appendChild(nroNotaFiscal);
respostaSefaz.appendChild(nroSerieNotaFiscal);

 

As you can see at target msg response, the node <RespustaSefaz> it was at specific possition, so I needed to find the position and insert structure and elements:

 

 

rootNFResponse.insertBefore(respostaSefaz, tagXmlNFe);
absTraceLog.addDebugMessage(" O elemento <"+respostaSefaz.getNodeName()+"> foi inserido acima da tag <"+ tagXmlNFe.getNodeName() + ">"
+ "que fica na estrutura <"+ rootNFResponse.getNodeName() + ">");
source = new DOMSource(doc);
result = new StreamResult(tOut.getOutputPayload().getOutputStream());
tf.transform(source, result);
}

 

After developed a java code into NWDS, you just need save it as .jar file and upload into SAP PI, as image below:

 

Capture.JPG

 

 

Check the test into Operation Mapping

 

Capture2.JPG

 

 

I hope that with this document helps you to understand the concept, when and how to develop java mapping without misterious.

 

Just one thing the code attached all coments is portuguese language !!

 

Kind regards,

 

BR.

 

Ricardo Viana.

Create a Webservices on ABAP FROM a Function module

$
0
0

In this document, i will describe the creation and the configuration of web service. I suppose tht icm is configured for http and https.

So, i have copy a standard function module GET_TABSIZE_ORA (i work on oracle database ) into ZGET_TABSIZE_ORA. I modify it in order to be launch in remote.

And i use it to create a web service by using se37 : Utilies->Mores Utilities->Create Web Service-> from function module:

image011.png

It opens a wizard, enter name and description, continue:

image013.png

continue:

image015.png

continue, important point about security:

 

image017.png

Enter Package and transport request:

image019.png

 

image021.png

When complete you arrive on these screen, you can modify if you want :

image023.png

image025.png

image027.png

image029.png

image031.png

image033.png

You can leave transaction.

If you want to come back on webservice definition, you can do it through se80:

image035.png

image037.png

 

Now after creating webservices you need to expose itL. transaction SOAMANGER:

Simplified Web Service Configuration:

 

image039.png

You search your webservices, and you can define Authentification method you want to use to expose it:

image041.png

Warning: it must be compatible with Security profile you have defined on web service. Either you will have error message.

 

 

After you can download WSDL (SOAMANAGER -> Web Service Configuration-> Enter your webservice name Apply and Open WSDL document for selected binding or service) and import it on SoapUI for instance to test it :

WSDL.png

image043.png

 

You can make test with SE80 also :

test_se80.png

test_se802.png

test_se803.png

After changing value, you will have to click on "Change parameter" (icon red and white), you will go on previous popup with falg on Keep Request Template.

test_se804.png

SAP PI / XI: Java XML Filter Utility

$
0
0

SAP PI / XI: Java XML Filter Utility

 

Applies To:

SAP XI 3.0, PI 7.0 and 7.1, 7.3 and SAP PO

Summary:  

This paper discusses how to identify & filter out the flawed records from the source file based on certain conditions.

Author:

Anupam Chakraborty

Sudip Kumar Paul

Prasanna Vittal

Created: January 6th 2014.

 

Introduction

More often than not, while dealing with business interfaces, we have situations where we encounter issues with data, leading to the failure of the complete interface even though only a small percentage of the data has issues. Hijacking business for such reasons is uncalled for and can be avoided in certain cases. If could identify & filter out the flawed records from the source message based on certain conditions(business rule), and only pass the correct records to the target system, then we can get our job done. The flawed records(data) can be written to a separate file/error logs which business can review and correct at a later point of time.

This approach can be generalized and can be achieved by a utility a.k.a. Filtering utility which could be made plug-and-play and configuration only.

 

 

IT Requirement

  • The input message coming into SAP PI might contain flawed records(data issues).
  • While the mapping gets executed, it fails entirely since there is error in one/few of the records.
  • The idea is to filter the message before the mapping gets called so that the maps get executed only with the correct records, whereas the bad records are sent back to some file server as-is.


This Utility (Java class) can be used by just plugging it into any message mapping. No development time is required. Only some additional configuration needs to be done, which will be explained in the next section.

 

Solution

The salient features of the solution are as follows:

  • Generic solution which could be re-used across multiple interfaces
  • Configuration only solution; no development time required for each interface once the solution is completed.
  • This solution is parameterized so that it is flexible enough to cater to different kind of requirements.

The solution works as follows:

  • Java Mapping is used for filtering the erroneous records from the good ones.
  • The good records are then mapped to the required target message and pushed forward.
  • The erroneous records are written to a file and sent to a specific location
  • An alert is raised with the location where the error file is written.

The Filtering Utility(Java class) written for filtering the records is capable of doing the below functionality:

  • Fields to be checked and conditions for the fields are read from Value Mapping. The value mapping is based on the Sender Component, Sender Service Interface and the Receiver Component. This way we can uniquely identify the value mapping set for each interface.

 

  • Parsing the xml message and breaking down into good and bad records.

 

  • The filtering of good and bad records is done based on certain condition checks on specific fields.

 

  • For any message, if the header is wrong, then the entire message is considered as erroneous.

 

Implementation Guide

Let us consider an example of a File Server sending an XML file to SAP. Below is the structure of the source message:

The requirement is that, we need to filter out all the records that contain a blank for the field MaterialNumber


 

1.1       Design Steps

  1. Import the Java Map CheckXPath.jar as an imported archive

 

 

  2.  Create a one to one graphical mapping by using the above structure on both the sides.

 

  3.  Create operation mapping with source and target interfaces. Under Mapping Program, first add the Java class and then add the graphical mapping

4.   In Value mapping, create the below parameters:

Sender Agency:

<Sender Business Component>

Sender Scheme:

<Sender Service Interface>

Receiver Agency:

< Receiver Business Component >

Receiver Scheme:

JavaFltrClass

 

Value Mappings

 

ErrorFilePath

This parameter is used to pass the name of the file in which flawed records will be stored.

IsTraceOn

Optional Parameter if you want to set detailed Trace to On or Off

NumberOfValidation

Number of field to be validated <n>

XMLFormat

Specify the recordset structure here. For our case, it is

row,*

XMLValidation<1>

Provide the xpath and the validation

row:/row/SAPMaterialNumber,notBlank

XMLValidation<..>

 

XMLValidation<n>

 

 

1.2   Allowed Validation

  • DateFormat-<Java Date Format> 

                            Checks for the field with date format given in the format specifier

  • notBlank          Check if the field is not blank
  • Exist               Check if the field exist in the payload
  • NumberOnly     Check if the field is numeric
  • FieldLength<n> Check if the length of the field is equal to n

1.3 Creating Alert Category

  1. Go to the transaction ALRTCATDEF in the ABAP stack of the PI system.
  2. Create an alert category XPATHALERT

  3.Create the below container objects. These will be used in the body of the alert message, to provide the PI message details in the alert.


4 .Provide details under long and short text.

 

1.4 Alert Configuration in RWB

  1. Go to ‘Alert Configuration’ under Runtime Workbench.
  2. Click on ‘Add Rule’, and provide our sender interface name and save the rule.

 

 

3. Attachment Guide Content

 

Java Mapping Source

SAP PI Scalability and Load Balancing using a Third Party Load Balancer( F5 )

$
0
0

Introduction

     Interfaces, both A2A ( Inter-organization) and B2B ( Intra-Organization ) are the heart of any enterprise system and businesses depend heavily on the interfaces for its critical success. Its not very uncommon when interface failures bring business to standstill. Critical business processes such as Inventory, Payments, Sales, Purchasing, Order fulfillment etc are the core of any business and business rely heavily on interfaces to carry out these cross business processes. This makes the make role of Integration Middleware's ( or ESB's in the new avatar ) so critical for business. Given the volume of critical transaction's flowing through these applications it make sense for business to invest in mitigating risks by scaling, load balancing and ensuring high availability of these applications.The same is true with enterprises having a SAP footprint and using SAP PI/PO.


The Requirement

Lets look at how to achieve the above mentioned business goals using SAP PI. SAP web dispatcher is a SAP solution for "software switching". However, more often than not IT organizations already have similar investments even before SAP comes in the picture. The goal of this paper is to demonstrate how we can achieve the same goals, using one such popular 3rd party softwareF5(http://www.f5.com/it-management/solutions/load-balancing/overview/), leveraging existing software investments.


Below is details on how to achieve  scalability and load balancing of SAP PI using F5.

 

The Solution

Pre-requisite:

 

  • Full Off-line Back-up of PI DB
  • Full Back-up of File System of PI central Instance
  • Back-up ofinstance.propertiesfile of PI central Instance
  • Full Export of Existing Exchange Profile

Design for Scaled PI (Dual Stack):


Configuration Steps:

1. Pipeline URL in SLD

The Adapter Engine uses the pipeline URL as defined for the Integration Server’s business system for sending messages to the Integration Server (sender adapter). Access the SLD and navigate to Business Landscape. Select the Integration Server’s business system and change the Pipeline URL so that it points to the load balancer.
1 0 (2).JPG
2. Full Cache Refresh in ABAP & JAVA Stack


Please run a full Cache Refresh both in PI ABAP & Java stack.

  • For full cache refresh in ABAP à Please go to SXI_CACHE à Run a Full cache refresh from menu
  • For full cache refresh in JAVA à Please access following URL(load balanced URL)  and login with cache refresh access

http://<Load_Balanced_URL>:50900/CPACache/refresh

  • Please wait till cache refresh completes.

2 0 (2).JPG

3. Adapter Engine Configuration in Configtool


The Adapter Engine’s messaging system registers its communication parameters, host name, and HTTP port with the SLD. These parameters are then read by the Integration Server and compiled into the target URL. The Integration Server sends the messages to this target URL if they are to be processed by the Adapter Engine (receiver adapter).To ensure that the Adapter Engines of all dialog instances are called, each JEE server node must register the same parameters pointing to the load balancer with the SLD. To do this, you can change the global configuration, or change each cluster configuration consistently.

  1. Start configtool à navigate to template  à services  à com.sap.aii.af.cpa.svc.

Enter the following for the load balancer:

  • Host name for SLD.selfregistration.hostName
  • HTTP port for SLD.selfregistration.httpPort
  • HTTPS port for SLD.selfregistration.httpsPort

3 0 (2).JPGSave the changes and restart the J2EE cluster.


4. Change in Exchange Profile Parameter

  • Login to Exchange Profile Administration Console
  • Check that the self-registration was successful and that the new host name is available.
  • Click on Connection Button à Change Hostname to NLB details as showed in following screen

Before Change

  • Save your change à Click on Save Configuration

Section 2 – Exchange Profile Parameter Change

  • In Exchange Profile Administration Console click on
  • And then change following parameter value from existing physical server FQDN to NLB FQDN as done following


Under Connections

  1. com.sap.aii.connect.cr.name
  2. com.sap.aii.connect.directory.name
  3. com.sap.aii.connect.integrationserver.name
  4. com.sap.aii.connect.integrationserver.sld.name
  5. com.sap.aii.connect.landscape.name
  6. com.sap.aii.connect.repository.name
  7. com.sap.aii.connect.rwb.name

Under Integration Builder

  1. com.sap.aii.ib.server.connect.webas.r3.ashost

Under RuntimeWorkbench

  1. com.sap.aii.rwb.server.centralmonitoring.name
  2. com.sap.aii.rwb.server.centralmonitoring.r3.ashost
  • Restart PI system and after PI system is up, please take export of latest Exchange Profile.

5. Change in PI ABAP Stack


Section 1 – Definition change for destination INTEGRATION_DIRECTORY_HMI

  1. Login to PI ABAP stack à Transaction Code SM59 àHTTP Connections to ABAP system à INTEGRATION_DIRECTORY_HMI
  2. Open the RFC definition and change Target Host Details under Technical System Settings

Section 2 – Definition change for SLDAPICUST

  • Please go to transaction code SLDAPICUST and change hostname details
  • Save your change and click on test button

Section 3 – Integration Server Definition change in SXMB_ADMIN

  • In transaction code SXMB_ADMIN, please click on following
  • Make the change in as in following screen to reflect F5 details instead of physical server details


6. Full Cache Refresh in ABAP & JAVA Stack


Please run a full Cache Refresh both in PI ABAP & Java stack.

  • For full cache refresh in ABAP à Please go to SXI_CACHE à Run a Full cache refresh from menu
  • For full cache refresh in JAVA à Please access following URL and login with cache refresh access

http://<Load_Balnced_URL>:50900/CPACache/refresh

Message Monitoring in NWDS. A Smart option

$
0
0

I would say its a smart option in NWDS.

Most of the PI consultants use either sxi_monitor or message monitoring in the browser.

But I found a smart option in NWDS, i.e iflow monitoring.

 

I just wanted to share to all of you that, in NWDS also we can do all monitoring work.

 

Connect NWDS to PI server.

[Check the link, for NWDS set-up for PI - http://scn.sap.com/docs/DOC-48397].

Open the iflow which you would like to monitor like below.

1.jpg

1.1.JPG

Enter login credentials and you could see the browser embedded in NWDS.

Next is, all the options available, just use it.

See below pic for few examples.

Channel monitoring :

2.jpg

Message monitoring:

3.jpg

 

Its smart, isn't it?

Just enjoy the monitoring in NWDS.

 

Avi

Viewing all 571 articles
Browse latest View live


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