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

Reg: Idoc Adapter basic information

$
0
0

IDOC Adapter

What is IDOC Adapter

            When SAP system wants to communicate with PI system in an IDOC format, it should use IDOC adapter.

  • The IDoc adapter enables you to process IDocs (Intermediate Documents) using the Integration Engine.
  • IDOC adapter converts the incoming IDoc from SAP to XML and also XML messages to outgoing IDoc in case if SAP is the receiver.
  • There is no sender agreement required  in order to setup the sender adapter because IDOC adapter resides on the ABAP stack of the integration server.
  • IDOC adapters can be used only for asynchronous(tRFC) communication.
  • IDOC messages can be monitored using IDX5 in PI system and WE02 in the SAP system.

 

When do we use an IDOC Adapter

            You require the IDoc adapter to connect SAP systems (or external systems) to the Integration Server using IDoc communication.

  • You need the IDoc adapter if you want to use the Integration Server to process IDocs.
  • You need the IDoc adapter when you want to convert the IDocs to IDoc XML format so that they can be processed by the Integration Server pipeline.

There are 2 steps involved in IDOC adapter communication

  1. 1. IDOC adapter at the Integration Server inbound channel
  2. 2. IDOC adapter at the Integration Server outbound channel

1.gif

 

As we see in the above diagram in the first step

  • The adapter at the inbound channel is located before the Integration Server
  • IDOCS will be converted to IDOC xml and will be sent to pipeline to undergo pipeline steps
  • And in the second step, IDOC xml will in turn converted to IDOCS and they will be sent to SAP system.

 

Configuring IDOC Adapter

Pre-Configuration on SAP and PI servers for IDOC communication

SAP side

  • Here we need to setup the communication channel to send IDOCs from SAP system to PI server.
  • So, first we need to create an RFC destination in SAP server of R/3 connection using SM59.

2.png

 

  • Now, we need to create tRFC port on SAP system for partner system using WE21.

       3.png    

PI Side

  • We need to create an RFC destination for the SAP system using SM59

           4.png

Create an IDOC port in PI system to receive the IDOC from SAP system using IDX2. In this port we need to mention the above RFC destination.

5.png

  • So, PI uses the above configuration to read the IDOC metadata from SAP system.

NOTE: No sender agreement needed since IDOC adapter resides in integration engine itself.

 

IDOC receiver Adapter

  • Configuring IDOC receiver is quite easy compared to above configuration.
  • See the below screenshot for the adapter configuration

6.png

  • Here we just give RFC destination and port which we have created in PI system.

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=3583&size=72SAP NetWeaver Process Orchestration @ SAP TechEd Bangalore 2013

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

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

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

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

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

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

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

SAP HANA Cloud Integration (HCI): Getting Started

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

How AmerisourceBergen uses SAP’s Process Orchestration technologies

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

SAP NetWeaver Process Orchestration Webcast Series 2013

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

Global Survey for SAP NetWeaver Process Integration 2013

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

Try SAP NetWeaver Process Orchestration in Public Cloud!

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

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

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

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

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

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

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

* cbs PI MeMo App for MobiIe Message Monitoring

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

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

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

* Upgrade options to the latest Process Integration or Process Orchestration

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

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

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

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

* Try SAP NetWeaver Process Orchestration in Public Cloud!

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

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

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

* Dynamic filename in mail receiver adapter made easier

* TechEd 2012: Process Orchestration session replays!

* SAP NetWeaver Process Orchestration technology in Healthcare

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

* Consolidated view on release notes for Process Integration and Orchestration

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

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

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

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

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

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

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

* SAP’s B2B Integration Strategy

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

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

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

* Getting Started with SAP NetWeaver Process Orchestration

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

* IWAY adapters bundled within Process Integration / Orchestration

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

2012 Global SAP NetWeaver PI Survey

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

Featured Content in Process Integration (PI) & SOA Middleware

$
0
0

SAP Orchestration and Integration Solutions: TechEd 2013 Replays

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

Released: SAP NetWeaver Process Orchestration B2B Add-On SP2

In this blog Piyush Gakhar highlights the main enhancements with the latest SP like Trading Partner Management, new Messages Support for Tradacoms and EANCOM. Read this blog for a full overview of all new EDI and B2B features and enhancements. 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

*PI Moderators' Picks*

PI Moderators' Picks

$
0
0

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

 

NEW!TechEd 2013 Replays on SAP Orchestration and Integration Solutions

 

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.

 

Released: SAP NetWeaver Process Orchestration B2B Add-On SP2

Roadmap for SAP HANA Cloud Integration

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

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

* 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

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.

 

Sem título.png

 

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


    I will not discuss about the integraction between SAP PI and ECC also layout of message, only about Webservice x SAP PI and layout interface.

 

     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.

Java Mapping - Sign XML in mapping in XI 7.0

$
0
0

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

 

I have spent few days to crack this problem, but finally - with extensive help of scn.sap.com - I was successful.

 

I developed java mapping and for signing itself I used Apache Santuario -- Index library - but because I was on SAP XI 7.0 - I had to use old version for java 1.4.2. Actual version in java 1.4 branch is Apache Download Mirrors.

 

Also - before you can start - you have to get XI jar libraries from your system. You have two options - ask some basis person to gather those files for you or you can use that  excellent ABAP report - but because you need also jar libraries from different paths - you need to modify slightly modify that report. I strongly recommend to see that wiki page to know more about getting those jars - Where to get the libraries for XI development - Process Integration - SCN Wiki

 

So what jar libraries do we need?

library namewhere to get it
aii_af_trace.jar/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ext/
aii_map_api.jar/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/apps/sap.com/com.sap.xi.services
aii_utilxi_misc.jar/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ext/
commons-logging-1.1.jarApache Santuario
keystore_api.jar/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/ interfaces/keystore_api/keystore_api.jar
keystore.jar/usr/sap/<SID>/DVEBMGS<nr>/j2ee/cluster/server0/bin/services/keystore/keystore.jar
xmlsec-1.4.8.jarApache Santuario

 

 

So if you have downloaded Apache Santuario, get SAP NWDS running and have all these libraries we can start with java mapping.

 

  1. start NWDS and create new java project.
  2. jm1.PNG
  3. Add all needed libraries into project jm2.PNG
  4. Create new java class XMLSignMapping which extends DefaultHandler and implements StreamTransformation. This class (or interface which it is implementing) contains two methods:
    1. execute - this is method which system will call in mapping process - all logic comes here
    2. setParameter - method to work with container
  5. Create new java class XIKeystoreAccessor - this will be utility class to which will contain logic to work with Keystore. You can find content of this class as attachment.
  6. Create new java class TraceUtil - utility for logging - content as attachment
  7. I had to resolve few issues with Apache Santuario library due to bugs in it - so I had to add new package into the project org.apache.xml.security.resource and add xmlsecurity_en_US.properties and xmlsecurity.properties  into it. xmlsecurity.properties is just renamed xmlsecurity_en_US.properties which you can find in xmlsecurity.jar library
  8. If you created these 3 classes and added content into them - create jar file from project jm4.PNG
  9. Upload that jar and two jars from Apache Santuario project into XI as external library and add XMLSingMapping as a java mapping class into interface mapping - you can find more on java mappings here - Java Mapping in SAP PI / XI – Step-by-step example » Techplay

 

When I worked on this problem - I have found, that there is no complete guide how to access KeyStore and digitally sign XML from mapping. So I hope that this blog post will help somebody to not spent a lot of hours on implementing signing as I did

 

Aloha !

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

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


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

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

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

Reg: Idoc Adapter basic information

$
0
0

IDOC Adapter

What is IDOC Adapter

            When SAP system wants to communicate with PI system in an IDOC format, it should use IDOC adapter.

  • The IDoc adapter enables you to process IDocs (Intermediate Documents) using the Integration Engine.
  • IDOC adapter converts the incoming IDoc from SAP to XML and also XML messages to outgoing IDoc in case if SAP is the receiver.
  • There is no sender agreement required  in order to setup the sender adapter because IDOC adapter resides on the ABAP stack of the integration server.
  • IDOC adapters can be used only for asynchronous(tRFC) communication.
  • IDOC messages can be monitored using IDX5 in PI system and WE02 in the SAP system.

 

When do we use an IDOC Adapter

            You require the IDoc adapter to connect SAP systems (or external systems) to the Integration Server using IDoc communication.

  • You need the IDoc adapter if you want to use the Integration Server to process IDocs.
  • You need the IDoc adapter when you want to convert the IDocs to IDoc XML format so that they can be processed by the Integration Server pipeline.

There are 2 steps involved in IDOC adapter communication

  1. 1. IDOC adapter at the Integration Server inbound channel
  2. 2. IDOC adapter at the Integration Server outbound channel

1.gif

 

As we see in the above diagram in the first step

  • The adapter at the inbound channel is located before the Integration Server
  • IDOCS will be converted to IDOC xml and will be sent to pipeline to undergo pipeline steps
  • And in the second step, IDOC xml will in turn converted to IDOCS and they will be sent to SAP system.

 

Configuring IDOC Adapter

Pre-Configuration on SAP and PI servers for IDOC communication

SAP side

  • Here we need to setup the communication channel to send IDOCs from SAP system to PI server.
  • So, first we need to create an RFC destination in SAP server of R/3 connection using SM59.

2.png

 

  • Now, we need to create tRFC port on SAP system for partner system using WE21.

       3.png    

PI Side

  • We need to create an RFC destination for the SAP system using SM59

           4.png

Create an IDOC port in PI system to receive the IDOC from SAP system using IDX2. In this port we need to mention the above RFC destination.

5.png

  • So, PI uses the above configuration to read the IDOC metadata from SAP system.

NOTE: No sender agreement needed since IDOC adapter resides in integration engine itself.

 

IDOC receiver Adapter

  • Configuring IDOC receiver is quite easy compared to above configuration.
  • See the below screenshot for the adapter configuration

6.png

  • Here we just give RFC destination and port which we have created in PI system.

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=3583&size=72SAP NetWeaver Process Orchestration @ SAP TechEd Bangalore 2013

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

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

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

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

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

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

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

SAP HANA Cloud Integration (HCI): Getting Started

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

How AmerisourceBergen uses SAP’s Process Orchestration technologies

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

SAP NetWeaver Process Orchestration Webcast Series 2013

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

Global Survey for SAP NetWeaver Process Integration 2013

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

Try SAP NetWeaver Process Orchestration in Public Cloud!

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

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

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

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

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

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

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

* cbs PI MeMo App for MobiIe Message Monitoring

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

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

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

* Upgrade options to the latest Process Integration or Process Orchestration

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

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

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

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

* Try SAP NetWeaver Process Orchestration in Public Cloud!

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

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

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

* Dynamic filename in mail receiver adapter made easier

* TechEd 2012: Process Orchestration session replays!

* SAP NetWeaver Process Orchestration technology in Healthcare

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

* Consolidated view on release notes for Process Integration and Orchestration

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

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

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

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

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

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

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

* SAP’s B2B Integration Strategy

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

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

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

* Getting Started with SAP NetWeaver Process Orchestration

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

* IWAY adapters bundled within Process Integration / Orchestration

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

2012 Global SAP NetWeaver PI Survey

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

Featured Content in Process Integration (PI) & SOA Middleware

$
0
0

SAP Orchestration and Integration Solutions: TechEd 2013 Replays

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

Released: SAP NetWeaver Process Orchestration B2B Add-On SP2

In this blog Piyush Gakhar highlights the main enhancements with the latest SP like Trading Partner Management, new Messages Support for Tradacoms and EANCOM. Read this blog for a full overview of all new EDI and B2B features and enhancements. 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

*PI Moderators' Picks*

PI Moderators' Picks

$
0
0

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

 

NEW!TechEd 2013 Replays on SAP Orchestration and Integration Solutions

 

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.

 

Released: SAP NetWeaver Process Orchestration B2B Add-On SP2

Roadmap for SAP HANA Cloud Integration

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

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

* 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

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.

 

Sem título.png

 

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


    I will not discuss about the integraction between SAP PI and ECC also layout of message, only about Webservice x SAP PI and layout interface.

 

     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.

SAP Process Integration (PI) Software Logistics – How to deal with PI transports via CTS+.pdf

$
0
0

This guide provides additional advice for using the Enhanced Change and Transport System (CTS+) to deal with PI Software logistics issues. The main scope is on the concept of “how to use” PI Software logistics and not on “how to configure” a transport landscape. This document relies on an existing CTS+ setup already finished successfully and does NOT cover any technical details how to configure CTS+ landscapes.

View Document

SAP Brazil GRC NFE Overview

$
0
0


Introduction :

 

  • Companies selling products in Brazil must send each invoice electronically to the government for validation before shipping their goods.
  • Companies purchasing goods in Brazil must check the electronic invoice at the government before receiving the goods.
  • Bottom line: The government wants to be sure they are getting all of their tax revenue.
  • Companies need to handle these activities with an automated solution that can scale to high volumes of invoices and meet their business process requirements.

 

 

Architecture of SAP GRC NFE :

 

The SAP GRC NFE solution is usually installed on a separate SAP application server and utilizes SAP Net weaver PI to encrypt and send the data to the Brazilian SEFAZ agency.

 

Untitled.jpg

Software Components:

 

  • NFE Core application : Software Component SAPBO SLL NFE 10.0 for the core application of SAP Business Objects NFE. This includes three software units :
  • SAP_ABA 7.02
    SAP_BASIS 7.02
    PI_BASIS 7.02
  • PI ESR Content SAPBO SLL-NFE 10.0 on SAP Net Weaver PI system.
  • Adobe Document services (ADS) installation is optional for displaying preview of the forms to be printed.

 

Integration:

 

Based on the system landscape we can connect one or several logistics system to NFE such as SAP ERP.

 

Integration Steps:

 

  • Setup of system communication between SAP ERP – NFE – SAP PI:
    RFC connections need to be setup in SM59 so that the three systems can communicate with each other for data communication.
  • Business partners in SAP NFE :
    Business partners that will be taking part in the electronic exchange of NFE need to be setup in the core application. Status code information is also stored in the core application.
  • SLD Setup :
    The SLD is mandatory for using SAP Nota Fiscal Electronica content in SAP Net Weaver PI. This is required to maintain details of the business systems/technical systems which will be involved in the process.
  • ESR Import :
    SAP Standard software component SLL-NFE 10.0 import is required in SAP Net weaver PI.
    Note : The ESR content will be SAP standard so there is no need to develop integration objects in ESR.
  • Integration Directory Configuration :
    ID configuration is required to create configuration scenarios based on integration scenarios from ESR. We have to maintain the adapter configuration like SOAP/HTTP/XI which are required for end to end communication between SAP , Authorities and business partners.
  • Digital Signature Service :
    The authorities require that all request messages like authorization, cancellation, and skipping requests are digitally signed. A web service for signing the messages need to be deployed at a Net Weaver java server. This service can then be reached by SAP PI for signing the documents.

 

Process Explained(Sending NFE):

 

Untitled.jpg

The Process explains the following steps :

 

  • Creating electronic invoice billing document in SAP ECC.
  • Sending digitally signed packaged NFE to authorities for their approval. These packages must be grouped as per format and size restrictions of the authorities. The communication will be setup using a web service call from SAP PI to authorities system.
  • Sending a status request for the sent NFE’s to authorities after a certain time frame.
  • Updating the status of billing document in ECC based upon the response received from Authorities.
  • The status can be either authorized or denied. One can send only the authorized NEF’s to their business partners using agreed PI adapters such as FTP/HTTP/SOAP.
  • In the similar manner we can receive authorized NFE’s from business partners in to SAP ERP system.
  • The main processes are sending/receiving a new NFE, Cancellation of NFE, skipping of NFE and events for additional information.


Summary :


By integrating to the relevant systems, SAP Nota Fiscal Electronica is a centralized data store for the message exchange, regarding the communication with the authorities, and other companies systems in the B2B scenarios. SAP NFE is the central platform for the legally required storage of the exchanged files.

 

Monitoring and Alerting:

 

SAP NFE Monitors :
NF-e monitor
Batch Monitor
B2B Monitor
Service status monitor

 

SAP PI Monitoring:
Queue monitoring(SMQ1/SMQ2)
Adapter monitoring
Message monitoring(SXMB_MONI)
RWB monitoring

 

Alerting :
For error handling it is necessary to setup alerts in SAP PI for any communication failure alerts. Alert category NFE_ALRT_CAT has to be created using transaction ALRTCATDEF for achieving this.

 

References :

 

SAP help :

 

http://help.sap.com/saphelp_grcnfe10/helpdata/en/93/cc40a6f0434083a64e23823175a8ff/frameset.htm

Master Guide :

 

https://websmp207.sap-ag.de/~sapidb/011000358700000299122008E/NFE10_MASTER_GUIDE.pdf

 

Thanks

Gaurav Ranjan

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

Viewing all 571 articles
Browse latest View live


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