Documentos de Académico
Documentos de Profesional
Documentos de Cultura
SAPPIforBeginners|SCN
Hi,Guest
LogOn
JoinUs
SearchtheCommunity
Products
Services&Support
AboutSCN
Downloads
Industries
Training&Education
Partnership
DeveloperCenter
Activity
LinesofBusiness
UniversityAlliances
Events&Webinars
Innovation
Browse
SAPPIforBeginners
Communications
Actions
Version6
createdbyRanaBrataDeonMay21,20136:07AM,lastmodifiedbyluvaimotiwallaonDec3,201510:24PM
Share
45
21
Tweet
Like
72
Objective
TheobjectiveofthistutorialistomakeyouunderstandwhatisSAPProcessIntegration?Wewillnotgo
intothenittygrittyofthesubjectbutwewilldiscussaboutthearchitectureanddifferentfeaturesofSAPPI.
Wewillcoverthebasicfeaturesonlyandwillavoiddiscussingallfeaturesinthistutorial.
NextthereareasetofcasestudieswhichwillgiveyouanideaabouttheindustrylevelutilizationofSAP
PI. Once you get more acquainted with the subject, you should try to solve them. The test cases are
prepared in a manner so that it will take you down into the subject from simple to more complexes with
eachlessonandwillgiveyouanoverallideaofthesubject.
WhatisSAPERP?
For any business large or small, these are the standard business functionalities it must carry out i.e.
MaterialManagement,SalesandDistribution,Finance,HumanResourcesetc.Thereismuchsoftwareinthe
market which is utilized by the industry. You will notice the simplest one the teller machine generating
salesinvoiceifyouvisitasmallshoptoanetworkofcomputersinalargeretailstore,hoteletcoperating
onanERP.
EnterpriseResourcePlanningi.e.ERPisaneffectiveapproachthatmostbusinessesimplementtoenhance
their productivity and performance. SAP ERP is SAP AG's Enterprise Resource Planning, an integrated
softwaresolutionthatincorporatesthekeybusinessfunctionsoftheorganization.Thebasicfunctionalities
i.e.HR,MM,SD,FICOetcarecalledbusinessmodulesinSAP.SAPbuildsthemasproductsandsellsthem
inthemarket.Therearetwomoremoduleswhichdonotsupportbusinessfunctionsdirectlybutareutilized
for presentation and integration. The former is called EP (Enterprise Portal) and the latter is called PI
(Process Integration). All the business modules are developed in ABAP while EP and PI are developed
mostlyinJava.ThesemodulesarenotexecutablesbuttheyneedtobedeployedinanApplicationServer
i.e.ABAPWebApplicationServerforABAPmodulesandJavaWebApplicationServersforJavamodules.
Therearefewpointsweshouldknowbeforewejumpintothesubject.
SAPstandsforSystems,Applications,andProductsinDataProcessing.
SAPAGisaGermanmultinationalsoftwarecorporationthatmakesenterprisesoftwaretomanage
businessoperationsandcustomerrelations.SAPERPisthecorporation'sEnterpriseResourcePlanning,
anintegratedsoftwaresolutionthatincorporatesthekeybusinessfunctionsoftheorganization.
SAPNetWeaverProcessIntegration(SAPPI)isSAPenterpriseapplicationintegration(EAI)software,a
componentoftheNetWeaverproductgroupusedtofacilitatetheexchangeofinformationamonga
company'sinternalsoftwareandsystemsandthoseofexternalparties.
LegacySystem
WhileimplementingtheSAPERPinalargebusinessestablishment,itisfoundthatnotallsectionscanbe
broughtundertheSAPERP.Manyofthebusinesssectionsmayhavetheirownproprietarytoolswhichare
highly complex and may not be possible to be replaced. They run parallel to the SAP System. They are
calledtheLegacySystems.ThenitbecomesnecessarytointegratebetweentheSAPSystemsandsuchpre
existingnonSAPSystem.ThisiswheretheSAPPIcomesintoplay.
WhydoweneedSAPPI
ApartfromLegacySystems,inalargebusinessestablishment,SAPERPdoesnotconsistofasinglesystem
but several integrated systems i.e. CRM, SRM and FICO etc. To handle with such complexities SAP
http://scn.sap.com/docs/DOC41766
1/13
9/5/2016
SAPPIforBeginners|SCN
introduced Process Integration a platform to provide a single point of integration for all systems without
touching existing complex network of legacy systems. This is a powerful middleware by SAP to provide
seamless end to end integration between SAP and nonSAP applications inside and outside the corporate
boundary. SAP PI supports B2B as well as A2A exchanges, supports synchronous and asynchronous
messageexchangeandincludesbuiltinenginefordesigningandexecutingIntegrationProcesses.
ArchitectureofSAPPI
TheSAPPIconsistsofahubandspokestructurethespokesconnectwithexternalsystemswhilethehub
exchange messages between them. The source system is known as the sender system and the target
system is known as the receiver system. The PI is not a single component, but rather a collection of
components that work together flexibly to implement integration scenarios. The architecture includes
componentstobeusedatdesigntime,atconfigurationtimeandatruntime.
WecandividetheSAPPIintoseveralareas
1.IntegrationServer
2.IntegrationBuilder
3.SystemLandscape
4.ConfigurationandMonitoring
Integration Server is the central processing engine of the SAP PI. All messages are processed here in a
consistentway.Itconsistsofthreeseparateengines
1.IntegrationEngine
2.AdapterEngine
3.BusinessProcessEngine
IntegrationenginecanbeconsideredtobethehubandtheAdapterenginethespoke.Regardingthe
BusinessProcessEngine,Iwillexplainitlater.
IntegrationBuilderisaclientserverframeworkforaccessingandeditingintegrationobjectsanditconsists
oftworelatedtools:
1.EnterpriseServiceRepositorytodesignanddevelopobjectstobeusedinscenarios
2.IntegrationDirectorytoconfiguretheESRobjectstodevelopscenarios
Twotogether,webuiltintegrationprocesseswhicharecommonlycalledscenarios.
TheSystemLandscapeisacentralrepositoryofinformationaboutsoftwareandsystemsindatacenterand
simplifiestheadministrationofyoursystemlandscape.
InConfigurationandMonitoringwecanmonitorthemessagesandadapters.
SinglestackandDualstack
When PI was first released, not all components were built on the same platform. Integration Engine and
BusinessProcessEnginewasbuiltinABAPwhileAdapterEngine,IntegrationBuilder,SL,CMandMapping
RuntimewerebuiltinJava.SoPIneedsboththeJavaandtheABAPenvironmenttorunandisknownas
thedualstack.
ABAPStack
1. IntegrationEngine
2. BusinessProcessEngine
3. IntegrationBuilder
JavaStack
EnterpriseServiceRepository
IntegrationDirectory
1. RuntimeWorkbench
2. SystemLandscapeDirectory
http://scn.sap.com/docs/DOC41766
2/13
9/5/2016
SAPPIforBeginners|SCN
3. AdapterEngine
4. MappingRuntime
ButinthelaterversionallthecomponentsarebuiltinJava.Someofthedualstackcomponentsareeither
dispensedofformodifiedtoworkontheJavastack.SoPIneedsonlytheJavaenvironmenttorunandis
knownasthesinglestack.
Thereareprosandconsbetweenthetwostacksbuttheyarenotcoveredinthistutorial.
IntegrationEngine
TheIntegrationEngineisresponsibleforcentralIntegrationServerservicesi.e.thepipelinestepsrouting
and mapping. If the source message structure is different from the target message structure, then
integrationenginecallstheMappingRuntime,wheresourcestructureisconvertedtothetargetstructure.
TheMappingRuntimeisbasedontheJavastack.TheintegrationenginecanalsoutilizeanABAPprogram
fortheconversion,whichisbasedontheABAPstack.
Amessagecanbeoftwotypes
1.Synchronoushasboththerequestresponsepart
2.Asynchronoushaseithertherequestortheresponsepartonly
InPI,messageisrepresentedbyaninterface.
Interface>structureofthemessageinXMLformat+direction
Basedontheabovecriteria,therearethreetypesofinterfaces
1.Outboundinterfaceconnecttothesendersystem
2.Inboundinterfaceconnecttothereceiversystem
3.AbstractinterfaceconnecttotheBPE
When we configure integration logic (scenario) in the SAP PI as per our business requirements, it is the
integration engine which executes that configuration in a stepwise manner. Pipeline is the term used to
refertoallstepsthatareperformedduringtheprocessingofanXMLmessage.Thepipelinestepsconsist
ofthefollowing:
1.ReceiverIdentificationdeterminesthesystemthatparticipatesintheexchangeofthemessage.
2.InterfaceDeterminationdeterminewhichinterfacewillshouldreceivethemessage.
3.MessageSplitifmorethanonereceiverarefound,PIwillinstantiatenewmessageforeachreceiver.
4.MessageMappingmappingtotransformthesourcemessagetodestinationmessageformat.
5.TechnicalRoutingbindaspecificdestinationandprotocoltothemessage.
6.CallAdaptersendthetransformedmessagetotheadapteroraproxy.
AdapterEngine
YoumusthavenoticedearlierthattheintegrationenginehandlesmessagesinXMLSOAPprotocolonly.But
whatifwehaveasenderandareceiverbusinesssystemwherethedataisnotinthesameformat.Weuse
the various adapters in the Adapter Engine to convert XML and HTTPbased messages to the specific
protocolandformatrequiredbythesesystems,andviceversa.
As we have discussed earlier, SAP PI is a hub and spoke structure where the Adapter Engine can be
consideredasspoke.WeusetheAdapterEnginetoconnecttheIntegrationEngine(Hub)totheexternal
systems.TheAdapterFrameworkisthebasisoftheAdapterEngine.TheAdapterFrameworkisbasedon
the SAP J2EE Engine (as part of the SAP Web Application Server) and the J2EE Connector Architecture
(JCA). The Adapter Framework provides interfaces for configuration, management, and monitoring of
adapters.
Inadualstacksystem,mostoftheadapterswherebasedontheJavastackbarringtwoadapterswhichare
basedontheABAPstack.
JavaStack
RFCadapter,SAPBusinessConnectoradapter,file/FTPadapter,JDBCadapter,JMS
adapter, SOAP adapter, Marketplace Adapter, Mail adapter, RNIF adapter, CIDX
adapter
ABAPstack
IDOCadapterandHTTPadapter
WhenSAPPImovedfromdualstacktosinglestackthenthesetwoadaptersbecamepartoftheJavastack.
http://scn.sap.com/docs/DOC41766
3/13
9/5/2016
SAPPIforBeginners|SCN
ThemodifiedadapterengineisknownastheAdvanceAdapterEngineandthetwoadaptersarecalledthe
IDOC_AAEadapterandHTTP_AAEadapterrespectively.
BusinessProcessEngine
TheBusinessProcessEngineisresponsibleforexecutingandpersistingintegrationprocesses.
BPM stands for crosscomponent Business Process Management or ccBPM and is also called Integration
process. An integration process is an executable, crosssystem process for processing messages. In an
integrationprocessyoudefinealltheprocessstepsthataretobeexecutedandtheparametersrelevantfor
controlling the process. Business Process Management provides SAP Exchange Infrastructure with the
followingfunctions:
1.Statefullmessageprocessing:ThestatusofanintegrationprocessispersistedontheIntegration
Server.
2.Youcanalsousecorrelationstoestablishsemanticrelationshipsbetweenmessages.
3.Youimplementintegrationprocesseswhenyouwanttodefine,control,andmonitorcomplex
integrationprocessesthatextendacrossenterpriseandapplicationboundariesi.e.collect/Merge,Split,
Multicast
Atruntime,theBusinessProcessEngineexecutestheintegrationprocesses.Theintegrationprocesscan
sendandreceivemessagesusingabstractinterfacesonly.
BuildascenarioinSAPPI
WestartfromtheHomepageifwehavetobuildascenarioinPI.
Thehomepagewilllooksimilartoasgivenbelow:
Figure6HomePageforSAPPIJavaStack
TheHomepagehashyperlinkstothefollowing4workingareas
1.EnterpriseServicesRepository(ESR)
2.IntegrationDirectory(ID)
3.SystemLandscape(SL)
4.ConfigurationandMonitoring(CM)
Each hyperlink will open one application. All these four are Java application. ESR and ID are swing
applications.TheyarelaunchedfromthebrowserbasedonJNLP.Soforthefirsttimeittakesmoretimeas
itdownloadstheentirelibraryfile.Butfromsecondtimeonwards,ittakeslesstimetolaunch.SLandCM
arepurewebapplicationsandrunonthebrowser.
EnterpriseServicesRepository
Herewedesignandcreateobjectstobeusedinthemakingofanintegrationscenario.ThedataflowinPI
willlooksimilartoasshownbelow:
http://scn.sap.com/docs/DOC41766
4/13
9/5/2016
SAPPIforBeginners|SCN
Wefindtheoptiontodesignthefollowing
1.InterfaceobjectsServiceInterface,MessageType,DataType
2.MappingobjectsOperationMappingandMessageMapping
3.IntegrationProcesses
PI uses integration repository to design message structure for both sender and receiver systems and
developaninterfacemessageusingcorrespondingmessagestructureswhichactasapointofinteractionto
theoutsideworld.DatatypeandMessagetypeareusedtosimplifyandmodularizethedesignofacomplex
interface.
OperationMappingallowstransformationofsourcestructuretotargetstructurewhenthetwostructuresare
different.Butifthesourceandthetargetstructurearesamethentheoperationmappingmaybedispensed
off. Similar to service interface, message mapping is used to simplify and modularize the design of a
complexoperationmapping.Messagemappingcanbeimplementedin4ways
1.GraphicalMapping
2.JavaMapping
3.XSLTMapping
4.ABAPMapping
Graphicalmappingisthemostusedasitallowsdevelopertomapattributesofbothstructuresgraphicallyto
passdatausingserviceinterfaces.Fortheotherthree,wehavetodevelopthemappingbywritingcode.If
itisasinglestackserver,thentheABAPmappingwillnotbeavailable.
Thereareotherareasalso,buttheyarenotcoveredinthistutorial.
IntegrationDirectory
HerewemakethepipelinestepsbyconfiguringtheESRobjectscreatedearlier.Thesestepsareexecuted
bytheintegrationengineduringruntime.
Beforewestarttheconfigurationweneedtocreate/importthefollowingobjectsintheDIR.
1.ServiceBusinessSystem/BusinessService/IntegrationProcess
2.CommunicationChannel
Aserviceenablesyoutoaddressasenderorreceiverofmessages.Dependingonhowyouwanttousethe
service,youcanselectfromthefollowingservicetypes.
1.BusinessSystemIfyouwanttoaddressaparticularbusinesssystemasthesenderorreceiverof
messages,choosethisservicetype.Abusinesssystemisanactualapplicationsysteminasystem
landscape.
2.BusinessServiceIfyouwanttoaddressanabstractbusinessentityasthesenderorreceiverof
messages,choosethisservicetype.Abusinessserviceisnotdefinedinthesystemlandscape.
3.IntegrationProcessServiceIfyouwanttoaddressanintegrationprocessasthesenderorreceiverof
messages,choosethisservicetype.Atruntime,theseintegrationprocessesarecontrolledby
messagesandcanthemselvessendmessages.
Communicationchanneldeterminestheinboundandoutboundprocessingofmessages.Themessagesare
converted from native format to soapxml specific message format and viceversa through the adapter.
Generallytherearetwotypesofcommunicationchannelinascenario
1.SenderCommunicationchannel
2.ReceiverCommunicationchannel
http://scn.sap.com/docs/DOC41766
5/13
9/5/2016
SAPPIforBeginners|SCN
Youmustassignacommunicationchanneltoaservice.Dependingonwhethertheserviceisaddressedasa
senderorreceiverofmessages,theassignedcommunicationchannelhastheroleofeitherasenderora
receiver channel, and must be configured accordingly. You cannot assign a communication channel to an
integrationprocessservice.
Thepipelinestepsarecreatedbycreatingthefollowing4configurationintheDIR
Wefindthefollowingoptions:
1.SenderAgreement
2.ReceiverDetermination
3.InterfaceDetermination
4.ReceiverAgreement
Senderagreementdefineshowthemessageofasenderistobetransformedsothatitcanbeprocessedby
theIntegrationServer.Itconsistsofthefollowing
1.SenderComponent
2.SenderInterface
3.SenderCommunicationChannel
SenderAgreementissimilartoprimarykeyintable.Therecannotbethetwosimilarsenderagreementsin
onelandscape.
Receiver Agreement defines how the message is to be transformed so that it can be processed by a
receiver.Itconsistsof
1.SenderComponent
2.ReceiverComponent
3.ReceiverInterface
4.ReceiverCommunicationchannel
Youuseareceiverdeterminationtospecifywhichreceiversamessageistobesentto.Youhavetheoption
ofdefiningconditionsforforwardingthemessagetothereceivers.Itconsistsof
1.SenderComponent
2.SenderInterface
3.ReceiverComponent
ReceiverDeterminationisoftwotypesStandardorExtended,dependinguponwhetheryouwantto
specifytheReceivermanuallyordynamicallybyamappingatruntime.
Youuseaninterfacedeterminationtospecifywhichinboundinterfaceofareceiverthemessageistobe
forwardedto.YoucanalsospecifywhichinterfacemappingfromtheIntegrationRepositoryistobeused
for processing the message i.e. if the sender and the receiver interface are not of the same format then
thereisanoperationalmappingtochangetheformat.Youdefineaninterfacedeterminationforasender,
anoutboundinterface,andareceiver.Itconsistsof
1.SenderComponent
2.SenderInterface
3.ReceiverComponent
4.ReceiverInterface
InterfaceDeterminationisoftwotypesStandardorEnhanced,dependinguponwhetheryouwantto
specifythereceiverinterfacemanuallyorthroughmappingbasedmessagesplit.
ReceiverDeterminationandInterfaceDeterminationthetwotogetherarecommonlyknownasthelogical
routing. Sender Agreement and Receiver Agreement the two together are commonly known as the
CollaborationAgreement.
SystemLandscape
TheSAPSystemLandscapeDirectory(SLD)isthecentralinformationproviderinasystemlandscape.Inthe
webpageyouwillfindthefollowinglinks:
1.TechnicalSystemTechnicalsystemsareapplicationsystemsthatareinstalledinyoursystem
landscape.
2.BusinessSystemBusinesssystemsarelogicalsystems,whichfunctionassendersorreceiverswithin
PI.BusinessSystemshasonetoonedependencywiththeassociatedtechnicalsystem.
3.ProductsandComponentsThisisinformationaboutallavailableSAPproductsandcomponents,
includingtheirversions.Ifthereareanythirdpartyproductsinthesystemlandscape,theyarealso
registeredhere.
http://scn.sap.com/docs/DOC41766
6/13
9/5/2016
SAPPIforBeginners|SCN
TheSLDwilllooksimilartoasgivenbelow:
Figure11SystemLandscape
ProductsandComponentsarecommonlycalledtheComponentInformation
TechnicalSystemandBusinessSystemarecommonlycalledtheLandscapeDescription.
AbusinesssystemcanbeconfiguredasanIntegrationserverorApplicationsystem.
1.IntegrationServerTheIntegrationserverexecutesonlyintegrationlogicconfiguredintheIntegration
Builder.TheycanalsobeidentifiedasPipeLineSteps.ItreceivesXMLmessage,determinesthe
receiver,executesthemappings,androutestheXMLmessagetothecorrespondingreceiversystems.
ThusconfiguredIntegrationEngineisidentifiedtobeCentralConfiguredIntegrationengine.
2.ApplicationsystemTheApplicationsystemwillnotexecutetheintegrationlogic.Itinturncallsthe
integrationservertoexecutetheintegrationlogicifrequired.ItactsassenderorreceiverofXML
messages.So,theApplicationsystemwithalocalIntegrationEnginerequirestheIntegrationserverto
executetheintegrationlogic.
OnlyoneclientofSAPsystemcanbeconfiguredasIntegrationServer.
ThefollowinginformationareextractedfromtheSLDintotheESRandDIR
1.ComponentInformationareusedintheESRtodefinetheProductandtheSWCV
2.BusinessSystemareusedintheDirectoryfordefiningthesenderandreceiverofmessages
ConfigurationandMonitoring
It is the central entry point for monitoring purposes. This gives you the option of navigating to the
monitoring functions of the Integration Engine, as well as integration with the Computing Center
ManagementSystem(CCMS),andtheProcessMonitoringInfrastructure(PMI)ofSAP.
TheConfigurationandMonitoringwilllooksimilartoasgivenbelow:
http://scn.sap.com/docs/DOC41766
7/13
9/5/2016
SAPPIforBeginners|SCN
Figure13ConfigurationandMonitoring
WiththeConfigurationandMonitoringthefollowingmonitoringfunctionsaresupported:
1.ComponentmonitoringmonitoringthedifferentSAPPIcomponents(JavaandABAPparts).
2.MessagemonitoringtrackingthemessageprocessingstatuswithinanSAPPIcomponentandon
errordetectionandanalysis.
3.EndtoendmonitoringmonitoringofamessagelifecyclefromtheSAPPIpointofview.
4.PerformancemonitoringstatisticsaboutdifferentperformanceaspectsofSAPPIcanbeaccessed
throughtheRWB.Here,youcanselectandaggregateperformancedata,forexample,bycomponent,
timerange,ormessageattributes.
5.IndexadministrationbyadministeringandmonitoringtheindexingofmessagesperSAPPI
component,youenableanindexbasedmessagesearchthatyoucanuseinmessagemonitoring.This
kindofmessagesearchoffersyouenhancedselectioncriteriaincludingadapterspecificmessage
attributesandtermsorphrasesfromthemessagepayload.
6.AlertconfigurationbyusingtheAlertFramework,centralmonitoringinPIcanbeprovidedwithall
errorsreportedduringmessageprocessinginABAPandJava.Thisenablesanimprovedreactionto
sucherrorsinboththeABAPruntimeandtheJavabasedAdapterEngine.Forthispurpose,theAlert
Frameworkisprovidedwithrulesbasedoncertaineventsandoninformationfromtheheaderofthe
PImessageprotocol.Theserulesdeterminewhetheralertsaresendornot.Ifanalertissent,itcanbe
usedforerroranalysis.
7.Alertinboxthealertinboxisuserspecificanddisplaysallthealertsforeachalertserverthathas
beengeneratedbasedonthealertconfiguration.
8.Cachemonitoringcachemonitoringdisplaysobjectsthatarecurrentlyintheruntimecache.Different
cacheobjectsaremonitoreddependingonthecacheinstanceconcerned.
Synchronousvs.Asynchronouscommunication
Aprocesscanbedefinedaseithersynchronousorasynchronous.
Asynchronousprocessisinvokedbyarequest/responseoperation,andtheresultoftheprocessis
returnedtothecallerimmediatelyviathisoperation.
Anasynchronousprocessisinvokedbyaonewayoperationandtheresultandanyfaultsarereturned
byinvokingotheronewayoperations.Theresultisreturnedtothecallerviaacallbackoperation.
Inthecomputerworld,thereisnoasynchronouscommunication.Allcommunicationbetweentwosystems
isalwaysviamethodcall(request/responseoperation).Sohowdowemakeitasynchronous?Theanswer
lieswiththeintroductionofathirdsysteminbetweenthecalledandthecallerfunction.
SupposetherearetwosystemsAandB.AllcommunicationbetweenAandBisviaamethodcallandthus
theyaresynchronous.WeintroduceathirdsystembetweenAandBandcalledittheIntermediatesystem
I.ThecommunicationbetweenAandIisviamethodcallandsimilarlybetweenIandBisalsoviamethod
call.ButthecommunicationbetweenAandBcanbecalledasynchronousasAdoesnothavetowaitforthe
responsefromB.
Thisisthebasisofasynchronouscommunicationandwhatisthisintermediatesystem?ThatistheQueue.
AiscalledthesenderandBiscalledthereceiver.MessagefromAisfirstaddedtotheQueueandthenitis
againpulledfromtheQueueandsendtoB.TheresponsefromBreachesAinasimilarfashion.Incertain
situation,thebusinessrequirementneedsthemessagestobedeliveredtoBinthesameorderastheyare
triggered from A. In such case we follow a firstin and firstout policy. If there are no such requirements
thenmessagesaresendingfromthequeuetoBinanyorder.
With asynchronous communication, we achieve guaranteed delivery i.e. System B is not available when
SystemAsendsthemessage.ThemessageisaddedtothequeueandremainsthereaslongasBisnot
available.OnceBisavailable,themessageispulledfromthequeueandsendstoB.
Sowecanclassifyourmessagecommunicationinthreeways:
1.Synchronous
2.Asynchronouswithordernotmaintained
3.Asynchronouswithordermaintained
InPI,weidentifythemas:SynchronousBE(BestEffort),AsynchronouswithordernotmaintainedEO
(ExactlyOnce),AsynchronouswithordermaintainedEOIO(ExactlyOnceinOrder).
Acknowledgment
Acknowledgmentistherootofasynchronouscommunication.Why?
For synchronous communication, System A calls system B and if B fails to send the response the process
failed. But in an asynchronous communication, System A calls System I and System I calls System B. So
suppose the communication between A and I is successful but between I and B, it fails. How should A
realizethatthedeliverytoBhasfailed?ThisisrealizedbyanacknowledgmentwhichissendbacktoAbyB
viathesamerouteasthemessagefromAtooktoB.IftheacknowledgmentfromBfailstoarrivetoAthen
Aconsiderthattheprocesshasfailedandwillsendthemessageagain.
http://scn.sap.com/docs/DOC41766
8/13
9/5/2016
SAPPIforBeginners|SCN
WhilewediscussedaboutasynchronouscommunicationinPI,wehaveusedthetermExactlyOncefor
bothEOandEOIO.ExactlyOncemeansamessagedeliveredoncecannotbedeliveredagain.Toachieve
this,thereisanacknowledgmentforeverymessagesendfromAtoB.Itistheadapterswhichlieatthe
endofthecommunication.Sotheadaptersmustsupportacknowledgment.
Alladaptersprovidesystemacknowledgmenti.e.deliveryacknowledgment.Thoseadapterswhichsupport
synchronous communication support applicationacknowledgment in addition to the system
acknowledgment.
SoinPI,followingarethetypeofacknowledgment
1.SystemAcknowledgmentSystemacknowledgmentsusedbytheruntimeenvironmenttoconfirmthat
anasynchronousmessagehasreachedthereceiver.
2.ApplicationAcknowledgmentApplicationacknowledgmentsusedtoconfirmthattheasynchronous
messagehasbeensuccessfullyprocessedatthereceiver.
RemoteFunctionCall
While working in PI, you will come across the term RFC. What are they? To establish communication
between two SAP systems i.e. an R/3 and PI, we create the RFC Destination. It is configured by the
following
1.ConnectionType
2.IPAddressandPortofthereceiver
ConnectionTypetellsthetypeofSystemConnectioni.e.R/3,TCP/IP,Internaletc.
TheRFCDestinationwecreateisclassifiedaccordingtothemodeofcommunicationrequiredi.e.whetherit
shouldsupportsynchronousorasynchronouscommunication.
1.forsynchronouscommunicationSynchronousRFC
2.forasynchronouscommunicationwithordernotmaintainedTransactionalRFC
3.forasynchronouscommunicationwithordermaintainedQueuedRFC
TheyareidentifiedbysRFC,tRFCandqRFC.
CaseStudies1
Assumethatyouareinaclassroomandthereare10studentsinit.Theinstructorthenaskseachstudent
topreparehis/herthefollowingpersonaldetailsandsavetheminanXMLfile.Thedetailsareasfollows:
1.StudentID
2.Name
3.Mobile
4.Email
5.Gender
Therewillbe10filesandthefilesarenamedascv_1,2,3.10.Thefilesaresavedintothesourcedirectory.
Fortestpurposesfollowingdirectoriesarecreated:
Sourcedirectory:c:\ibm\sap\training\input
Archivedirectory:c:\ibm\sap\training\archive
Errordirectory:c:\ibm\sap\training\error
Targetdirectory:c:\ibm\sap\training\target
YouareaskedtodevelopscenariosinSAPPIwhichwillreadthesourcefilesfromthesourcedirectoryand
writethemtothetargetdirectory.Onceafileissuccessfullyreadfromthesourcedirectory,itshouldbe
movedtothearchivedirectoryandifthefilecannotbereadforsomeerrori.e.xmlformatnotmaintained,
itshouldbemovedtotheerrordirectory.Thefilesmovedtoarchive,errorortargetdirectoryshouldhavea
timestampappendtothefilename.
i.i.e.filename+<timestamp>.
Lesson1
Prepareascenariotoreadonesinglefilei.e.filecv_1.xmlfromthesourcedirectoryandwriteitto
thetargetdirectory.Thetargetfilenameshouldalsobecv_1.xmlwiththetimestampappendto
thename.
Lesson2
Prepare a scenario to read all the files from the source directory and write them to the target
directory. Similarly the target files should also be named as cv_1, 2 ..xml with the timestamp
appendtoeachofthem.
Lesson3
Theinstructorthenasksyoualltoaddthefollowingvalidationtothedata.
1.Themobilenumbershouldhave10numericdigitsifthemobilenumberisnotof10digit
thenreplaceitwitherror
http://scn.sap.com/docs/DOC41766
9/13
9/5/2016
SAPPIforBeginners|SCN
2.Theemailshouldhaveone@characterandone.characteriftheemailisnothavingthe
@or.character,thenreplaceitwitherror
Beforeyourunthescenario,insomeofthesourcefiles,modifythemobileandtheemailsothat
theyareinerrorasperthelogicgivenabove.
Lesson4
Prepareascenariotoreadallthesourcefilesandclassifythemaccordingtotheirgender.Thefiles
forthemenwillbewritteninonedirectoryandfortheladiestoanotherdirectory.Twodirectories
arecreatedfortheabovepurpose:
Targetdirectoryformen:c:\ibm\sap\training\target\men
Targetdirectoryforwomen:c:\ibm\sap\training\target\women
Supposethereare6menand4womenintheclass,thenifallthesourcefilesarereadsuccessfully
then the target directory for men should have 6 files and the target directory for women should
have4files.
CaseStudies2
The instructor then asks you all to prepare one single file with the personal details of each student in
separatesegments.
Lesson5
Write a scenario which will read this file and produces 10 target files where each file should
correspond to the personal data of each employee. The target files should be named as
cv_<emp_ID>_<timestamp>
Lesson6
Modifytheabovescenariosothatitproduces2targetfilesinsteadof10whereonetargetfilefor
menandanothertargetfilefortheladies.Thetargetfileformenshouldhave6segmentsfor6
menandthetargetfileforladiesshouldhave4segmentsfor4women.
Thetargetfilesshouldbenamedas
Formenmen_<timestamp>
ForLadieswomen_<time_stamp>
CaseStudy3
Sameascasestudy1,theinstructoraskeachstudenttopreparehis/herthepersonaldetailsandsave
theminanXMLfile.Therewillbe10files.Thefilesaresavedinthesourcedirectory.
Lesson7
Prepareascenariotoreadallthesourcefilesfromthesourcedirectoryandtocreateonesinglefile
inthetargetdirectory.Thenameofthetargetfilewillbeoutput.xmlwiththetimestampappendto
thefilename.Thetargetfilewillhaveallthedetailsofeachsourcefileassubsegment.
Lesson8
Prepareascenariotoreadtheentiresourcefilesfromthesourcedirectoryandcreatetwofilesin
thetargetdirectoryoneforthemenandtheotherfortheladies.For6men,themenfileshould
have six segments having each mans details and for 4 women, similarly there should be 4
segmentswitheachladysdetails.
CaseStudy4
Theinstructornowaskseachofthestudentstoprepareanothersetofdetailswhichwillconsistofhis/her
thefollowingacademicdetails:
1.StudentID
2.SchoolName
3.CollegeName
4.DepartmentName
5.AdmissionYear
There will be 10 files and the files are named as ad_1, 2, 3.10. The files are saved into the source
directory.Soeachstudentwillnowhaveapairoffilesoneforthepersonaldetailsandtheotherforthe
academic details. Two files are corelated with the Student ID. The input directory now consists of 10
personalfilesand10academicfiles.
Lesson9
Youareaskedtodevelopascenariowhichwillpickthesourcefilesandwillprocesstheminpair.
Thescenariowillgenerate10targetfiles.Eachtargetfilewillconsistofthepersonalandacademic
detailsofastudentinseparatesegments.Thetargetfileswillbenamedasres_1,2,10.
Thetargetfileswilllooklike:
Lesson10
You are then asked to change the student ID in some of the files so that they do not have a
matchingacademicorpersonalfilesandviceversa.Thescenarioshouldrunandifitfoundanyfiles
whodoesnothaveamatchingcorrespondingfilethentheprocessshouldendaftersomeperiodof
time i.e. 2 min and those files will be moved to the error directory and there will be no
correspondingtargetfilesforthem.
http://scn.sap.com/docs/DOC41766
10/13
9/5/2016
SAPPIforBeginners|SCN
* To know more about Process Integration (PI 7.31), go thru the below document
http://scn.sap.com/docs/DOC38669
261285Views
Topics:sap_integration_&_certification_centerTasks:integrationTags:integration_architecture
AverageUserRating
(122ratings)
Share
45
21
Tweet
Like
72
134Comments
1 2 3 6
MuraliKrishnaVJun17,20136:34AM
NiceexplanationRana.helpsalotfornewone'sonPI.
niceblogwherewecanfindallbasicsatoneplace
Thanks..
Like(2)
IakiVilaJun17,20138:02AM
AgreatblogforthepeoplewhostartwithPI.Maybe,youcouldaddsomelinkstosteptostepguides.
Regards.
Like(3)
BhargavakrishnaTalasilaJun17,201312:30PM
Niceblog,icanseeyourhardworktopreparethisblog..
thanksforsharing..
Regards
Bhargavakrishna
Like(3)
MuraliKrishnaVJun17,20131:13PM
goodone...helpsalotfornewPIlearners:)
Like(1)
MohammedMoqeethJun17,20137:05PM
AverygoodblogonPI.ThisisverymuchhelpfulforPIbeginners.
Regards,
Moqeeth.
Like(4)
HassenSuleimanJun17,201311:36PM
Greatblog.Thanks.
Like(1)
TulasiramDonkenaJun18,20135:59AM
Goodwork...Andappreciateforsharing.
Like(1)
StefanHilppJun24,20133:48PM
Looksverygood...Itotallyappreciatetheefforttopreparesuchablog/scenario.
AreyouplanningtopreparesomethingsimilarforthenewPO?
Like(1)
AmanGuptaJun25,201310:50AM
ThanksfortheeffortRana..veryinformativeblog.
http://scn.sap.com/docs/DOC41766
11/13
9/5/2016
SAPPIforBeginners|SCN
Thanks,
Aman
Like(1)
AmitoshSrivastavaJun28,20136:32PM
ThanksRana,
Reallyagreatblogforbeginners...!!
Like(1)
RanaBrataDeJul3,20134:52PM(inresponsetoStefanHilpp)
Sorry,tobelateinreplyingthemail.Iwasawayinavacation.Iamindeedplanningtowriteasimilar
oneforPOalso
Like(6)
AbhinavvermaJul5,20138:05AM
VeryGoodblogRana..reallyverynicewaytoexplain
Like(1)
AmareshSugoorJul14,20138:38AM
HiRana,
ThanksforthewonderfulblogithelpalotinunderstandingtheflowofPI...
PleaseletmeknowifyoupreparingsomethingregardingPO
Regards,
Amaresh
Like(1)
RanaBrataDeJul14,20132:20PM(inresponsetoAmareshSugoor)
HiAmaresh,IamplanningtowriteasimilaroneforPOinthecomingdays.
Like(1)
DivyanshuSrivastavaJul14,201311:42PM
HiRana,
Averygoodone.It'sallwellsaidinsimplemanner.
Welldone..!!
Regards,
Divyanshu
Like(1)
DivyanshuSrivastavaJul14,201311:52PM
Keepitupbuddy..
Like(1)
PraveenTirumareddyJul17,201310:58AM
Excellentoneforbeginners
Like(1)
DipakPatilJul22,201312:46PM
Hi
VeryGoodBlog.BeginnercaneasilyunderstandPI.
Thanks.
Like(1)
AdarshDhingraJul23,201310:30AM
ExcellentBlog...Congrats
Like(1)
aakashbhatterJul23,201311:17AM
Veryniceblog,trulyappreciablethatyoumadePIsoeasytounderstandforbeginners.
Like(1)
SriramRamaniJul24,20132:20AM(inresponsetoRanaBrataDe)
http://scn.sap.com/docs/DOC41766
12/13
9/5/2016
SAPPIforBeginners|SCN
AwaitingthePOblog.Doletusknow.ThiswasgoodforallPIbeginners.
Like(1)
arunkumarJul24,20138:38PM
HIRana!!
Iamverythankfultoyourwork..itisveryusefultofresherslikeme.waitingfornextpost
Like(1)
arunkumarJul25,20136:44AM
Rana
plzletmeknowsappipobotharesameordifferent!!Iamnotgettinginfoplzclearmydoubt!!!
Like(1)
PhanivaraAdirajuJul30,20134:01PM
VeryThankfulforniceblog,forbeginnersveryusfuldocument.
Like(1)
RodrigoAlejandroPertierraJul31,20132:59PM
VeryNicedocument.
Like(1)
1 2 3 6
SiteIndex
Privacy
ContactUs
TermsofUse
http://scn.sap.com/docs/DOC41766
SAPHelpPortal
LegalDisclosure
Copyright
FollowSCN
13/13