Professional Documents
Culture Documents
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
GettingStarted Newsletters
Hi,Jagadish
LogOut
1points
Store
SearchtheCommunity
Products
Services&Support
AboutSCN
Downloads
Industries
Training&Education
Partnership
DeveloperCenter
Activity
LinesofBusiness
UniversityAlliances
Events&Webinars
Innovation
Browse
Communications
Actions
Create
ProcessIntegration(PI)&SOAMiddleware
ExchangingIDocswithNonSAPsystemoverTCP/IP
usingPIasMiddleware
PostedbyDeepakShahinProcessIntegration(PI)&SOAMiddlewareonSep19,201111:03:39PM
Share
Tweet
Like 3
ThisblogoutlinesstepsrequiredforexchangingIDocswithnonSAPsystemsoverTCP/IPusingPIasMiddleware.
Thisblogwillcoverfollowingscenarios.
1.AnonSAPsystemsendsdatausingSOAPprotocoltoPI,whichinturnssendittoanonSAPsysteminformof
IDocs.
2.AnonsapsystemsendsIDocstoPIsystemoverTCP/IPprotocol.PIinturnsendsittoanothernonSAPsystem
overSOAPprotocol.
ThereareseveralnonSAPsystemswhicharecapableofsending/ReceivingIDocsoverTCP/IPprotocol.
HerewehadtoexchangeIDocswithnonSAPsystemSQL*LIMSwhichiscapableofexchangingIDocsoverTCP/IP.
LIMSusesIDocInterfacetoconnecttoanyexternalsystem.
HerewehadcreatedZIdocsaspertherequirements.IwilluseSOAPtoIDoc&IDoctoSOAPscenarios.Iwill
explainsonlythenecessarystepsforexchangingIdocswithnonSAPsystemoverTCP/IPandwillskipstepslikedata
types,mappingsetc.
ThisishowIDOCslooklike:
ThecontrolrecordsectionofanIDOCcontainsroutinginformation.TheremightbemultipleSAPsystemsusingthe
sameSAPgateway.TheIDOCcontrolrecordcanbeusedtoaddressaspecificSAPsystem.Furthermore,itidentifies
thesendersystem,allowingthetargetSAPinstancetoactivatethecorrectlogicsubsystemtoprocesstheinbound
message.
Thedatarecorddefinesthestructuretoholdtheactualinformationtoexchange.Datarecordsareorganizedonaper
linebasis:eachlinecontainsashortheaderplussegmentsandfields.Theshortheaderidentifiestherecordtypefor
thecurrentline.Thenthereisthesegment,whichcontainsfields.ThesameIDOCcancontainmultipledatarecords,
eachonecontainingitsownspecificsegmentwithaspecificsegmenttype.
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
1/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
SAPiscapableofproducingatextfilewiththedescriptionofaspecificIDOCtype.ThisfileiscalledParserFile.
ExternalapplicationscanprocessparserfilesinorderadapttothestructureoftherelatingIDOCtypesandthisis
usuallydoneduringtheinitialconfigurationprocessoftheinterfaces.
Thisishowaparserfilelookslike:
ForastandardIDOC,wecangointoWE60,givethebasictypeandpressF9togettheparserfile.
ForacustomIDOCweshouldreleaseallthesegmentsoftheIDOCbeforewecancreateaparserfile.
LIMSIDocinterfaceincludesamodulethatcanparsetheSAPParserFiles.UsingtheSAPParserFiles,itwillbe
possibletodescribethecontentofaspecificIDOCtype(beitstandardorcustom,basicorextended)totheSQL*LIMS.
SpecifictableswillbecreatedinordertostorethatspecificIDOCtype,enablingthedevelopertofetchthecontentof
specificfieldsintheIDOCbymeansofclassicalselectSQLstatements.
ASendingtheIDOCtotheLIMS:
HereathirdpartynonSAPsystemwillsenddataviaSOAPtoSAPPI.PIwillconvertitintoIDocxmlandsendtheIDoc
toLIMSviaTCP/IPprotocol.
LIMSinboundIDOCswillbereceivedbymeansofabackgroundWindows32bitservice,theIdocReceiverservice.
TheIdocReceiverservice,whichispartoftheTransportLayer,performsthefollowingactions:
1.ListensforLIMSinboundIDOCs
2.CreatesnewinboundrequestsinthetransactionstablewithstatusDOWNLOADING
3.SavesthedownloadedIDOCasaplaintextclobattachmenttothetransaction
4.ChangesthestatusoftherequesttoRECEIVED,inordertopassittotheIdocAgentserviceforprocessing.
ErrormessagesgeneratedbytheIdocReceiverservicewillbesavedintheserviceslogfile.
IDocreceivedbyLIMSarestoredintotheSQL*LIMSOracledatabaseinawaythatitscontentcanbeeasilyextracted
bymeansofSQLselectstatements
ThewrapperpackageABI_IDOC_SL_WRAPPERisusedtoperformtherequestedactionsintotheSQL*LIMS
application.
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
2/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
FollowingaretheimportantconfigurationsstepsthatarenecessaryforsendingIDocstoLIMSsystem.
1.CreatetheBusinessSystemfortheNonSAPsysteminSLD(SystemLandscapeDirectory)withthelogicalsystem
namementionedintheBusinessSystem.
NoteThelogicalsystemnameshouldbeotherthanSAPXXX.Hereinourexamplethelogicalsystemnameofthe
BusinesssystemisLS_LIMSasshownbelow.
2.CreateaTCP/IPconnection(MYDEST)oftypeTintransactionSM59inthePIsystem.TheprogramIDshouldbe
registeronSAPPIsystem.TakehelpofyourbasisteamtoregistertheprogramIDonPIserver
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
3/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
3.CreatethePortinPIinthetransactionIDX1.TheportnameshouldbesameasLogicalsystemnameofthe
businesssystemdefinedinSLD(i.e.LS_LIMS).Seetroubleshootingsectionforthereasonforhaving.Wewilluse
thisPortnameintheSNDPORcontrolrecordfieldofIDOC.
4.ConfiguretheIDOCReceivercommunicationchannelinPIforsendingtheIDOCtotheLIMSsystem.
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
4/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
RestoftheobjectslikeMappings,Receiverdeterminationetc.arestraightforwardhenceIwillskipthem.
Testing:AthirdpartynonSAPsystemsendsdatatoPIviaSOAP.PIconvertsitintoIDocandsendsittoLIMS.Check
inTransactionSXMB_MONItoverifythestatusofthemessageasshownbelow.
AlsocheckintransactionIDX5tomonitorIDocmessageasshownbelow.
B.ReceivingtheIDOCfromtheLIMSsystem:
HereaLIMSsystemwillsendIDocstoSAPPIviaTCP/IPprotocol.PIwillconvertIDocxmlintoSOAPmessageand
sendittoanotherthirdpartynonSAPsystemusingSOAP.
TheSQL*LIMSwillcreatetheIDOCintotheSQL*LIMSOracledatabasewithdirectionOutboundfromSQL*LIMS,
andstatusasREQUESTED.
TheLIMSSAPIDOCInterfacewillthen:
1.BuildtheIDOCfromtheOracletables
2.SendtheIDOCtothetargetSAPsystem.
LIMSOutboundIDOCswillbecreatedbymeansofPL/SQLprocedures/functions/packagescalledasstatusactionsor
events.
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
5/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
Assoonasanewoutboundtransactioniscreated,itsstatusissettoCREATING.Duringthisstageoftheprocess,
segmentsandfieldswillbeaddedtotheIDOCintoitsinternaldatabasetables.
WhenallthesegmentsandfieldshavebeenenteredforthecurrentIDOC,thestatusofthecurrenttransactionissetto
REQUESTED.
AspecificAPI(PL/SQLpackageABI_IDOC_BUILDER)allowsbuildingtheIDOCfromitsinternaltables.Atthisstage,
thestatusofthetransactionissettoBUILDING.Attheendofthisprocess,theIDOCwillbesavedasaplaintextclob
attachmenttothetransaction,whosestatuswillbesettoREADY.
Whenthenewtransactionissubmitted,itsstatuschangestoREADY.
TheIdocSenderWindows32bitservicewillloadtheIDOCfromtherelatingclobattachmentandsendittothetarget
SAPsystem.
UponsuccessfulcompletionofsendingtheIDOCtotheSAP,thestatusofthetransactionissettoCOMPLETE.
TheConfigurationstepsaresimilartothosementionedaboveandarehighlightedasfollows:
1.CreatetheBusinessSystemfortheLIMSsysteminSLD(SystemLandscapeDirectory)withthelogicalsystem
name(OtherThanSAPXXX)mentionedintheBusinessSystem.ReferStep1above.
2.CreateaTCP/IPconnection(MYDEST)oftypeTintransactionSM59inthePIsystem.TheprogramIDshouldbe
registeronSAPPIsystem.ReferStep2above.
3.CreatethePortinPIinthetransactionIDX1.TheportnameshouldbesameasLogicalsystemnameofthe
businesssystemdefinedinSLD(i.e.LS_LIMS).Seetroubleshootingsectionforthereasonforhaving.Wewilluse
thisPortnameintheSNDPORcontrolrecordfieldofIDOC.
4.TheIDocreceivedfromNonsapsystemwillbemappedandconvertedintoSOAPxmlandwillbesenttoanother
thirdpartysystemusingSOAPprotocol.ThereceiverSOAPchannelisasshownbelow.
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
6/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
GivefollowingsystemdetailstotheLIMSsystemforconnectiontoPI.Detailsinclude:
Serverfullname
SapSystemNumber
GatewayService
Client
ProgramID
WhilesendingIDoc,thenonSAPsystemwillsendfollowingValuesintheControlrecordofIDOC.
RCVPOR=SAPXXX
RCVPRT=LS
SNDPOR=LS_LIMS
SNDPRT=LS
SNDPRN=LS_LIMS
MESTYP=messagetype
IDOCTYP=IDoctype.
RestoftheobjectslikeMappings,Receiverdeterminationetc.arestraightforwardhenceIwillskipthem.
Testing:HereLIMSwillsendIDocstoSAPPIusingTCP/IP.VerifythestatusofthemessageinTransaction
SXMB_MONI
CheckthePayloadoftheincomingmessageforthecontrolrecordinformationasshownbelow.
ChecktheIDocMessageintransactionIDX5intheSAPPIsystem.
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
7/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
Troubleshooting:WhiletriggeringdatatoSAPPI,senderLIMSapplicationwasgettingfollowingerrormessageNo
serviceforsystemSAPXXXclientinIntegrationDirectory
Solution:ThisistracedfromtheTransactionSM21wheretheerrorisloggedwiththefollowingsolution
5906Views
AverageUserRating
MyRating:Exceptional
(14ratings)
Share
Tweet
Saved.
Writeareview
Like 3
3Comments
RaviKanthTalaganaAug22,201310:37AM
HiDeepakShah,
Verynicelywrittenblog,
Iamtryingtodoasimilarscenario(X>PI>nonSAPusingIDOCs.
Butimnotabletogetthesolutionworking:
http://scn.sap.com/thread/3409634
Canyoupleasehelp?
BestRegards,
Ravi
Like(0)
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
8/9
9/29/2016
ExchangingIDocswithNonSAPsystemoverTCP/I...|SCN
JankiNarayananSep27,20169:55AM
Nicework!
Like(0)
adityadhurandharSep28,201611:05AM
HiDeepak,
Wewerefacingissuesinasimilarscenario.Withthehelpofthescreenshotsandinfoprovidedwere
abletosuccessfullydevelopthescenario.
GoodWork!!!
Like(0)
SiteIndex
Privacy
ContactUs
TermsofUse
SAPHelpPortal
LegalDisclosure
Copyright
http://scn.sap.com/community/piandsoamiddleware/blog/2011/09/19/exchangingidocswithnonsapsystemovertcpipusingpiasmiddleware
FollowSCN
9/9