interfacing with sap

Upload: karthik-selvaraj

Post on 02-Jun-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/10/2019 Interfacing With SAP

    1/17

    Interfacing with SAP G.V.SHIVAKKUMAR

    Interfacing with SAP R/3

    G.V.SHIVAKKUMAR

    venkatesansivakumar!ah"".c".in

    P#ease use m! #ink t" $"wn#"a$ the SAP MM %M S& PP artic#es'(

    htt)'//gvshivakkumar.*#"gs)"t.in/+view,f#i)car$

    htt)'//www.sa)functi"na#.c"m/%M/-"nfigurati"n/In$e.htm

    htt)'//www.sa)functi"na#.c"m/%M/%M0.htm

    htt)'//www.sa)functi"na#.c"m/MM/MM0.htmhtt)'//www.me$iafire.c"m/view/h$fm12rmk4h256/SAP7I89:GRA9I;875tr#g1tn1?@n/SAP7BI(MM7an$7BI(S&7Integrati"n.$"c

    htt)'//www.me$iafire.c"m/view/ca"ih36sCes/Materia#s7Management7Ste)7*!7Ste)7-"nfigurati"n.$"c

    htt)'//www.me$iafire.c"m/view/334"s#34@C"ig/%M7Im)#ementai"n7Intr"$ucti"n.$"c

    htt)'//www.me$iafire.c"m/view/*trui1#n!tc1aC/%M79raining7$"cumenti"n7f"r7:n$7users.$"c

    htt)'//www.me$iafire.c"m/view/!m334@Cnci@i!v5/%M7St"ck7U)#"a$7Pr"ce$ure.$"c

    htt)'//www.me$iafire.c"m/view/sv?444f)r1w@">e/S!stematic7A))r"ach7t"7Run7SAP7Im)#ementati"n(Su))"rt(Maintenance7Pr"ect.$"c

    htt)'//www.me$iafire.c"m/view/3c>e>et*@ut!6/S&7

  • 8/10/2019 Interfacing With SAP

    2/17

    Interfacing with SAP G.V.SHIVAKKUMARThis document will cover high level design of external interfaces with SAP. This document will be more useful to bothtechnical and functional consultants. Thanks to Margret, William, Evans !ose"h in giving in"uts and diagrams shared tomake the document meaningful. Thanks to ever#one.

    $egards,%.&.Shivakkumar venkatesansivakumar!ah"".c".in

    mailto:[email protected]:[email protected]
  • 8/10/2019 Interfacing With SAP

    3/17

    Interfacing with SAP G.V.SHIVAKKUMAR

    1. Introduction

    'ne of the "rimar# challenges of SAP im"lementation "rocess has been integrating SAP with theother a""lications. (e it the existing )egac# s#stem, on which the customer has s"ent the mone#and time building com"lex business s"ecific logics into it, or the bu**word of the new era+webenabling+ a""lications, which o"ens u" the e(usiness "athwa# to the whole world ofcustomer and "artners to interact directl# with the E$P s#stem.

    SAP "rovides basic infrastructure needed to bridge this ga" b# "roviding various tools,

    techni-ues technologies for the integration.

    This document takes a closer look at these interfacing techni-ues, effective wa#s and scenarios to

    em"lo# them, and their "ros cons.

  • 8/10/2019 Interfacing With SAP

    4/17

    Interfacing with SAP G.V.SHIVAKKUMAR

    2. SAP Interfacing Techniques

    SAP A% has been coming u" with new tools and techni-ues to su""ort emerging industr#standard EA technologies from time to time.

    The following are the techni-ues currentl# su""orted b# SAP /as in SAP &ersion 0.1c2 for bothbatch and realtime interfacing.

    (atch 3ata 4ommunication /(342

    (atch n"ut /(2 3irect n"ut /32 "rograms

    $emote 5unction 4all /$542

    Electronic 3ata nterchange /E32

    A""lication )ink Enabling /A)E2

    (usiness A""lication Programming nterface /(AP2

    SAP Automation Tools

    SAP 4onnectors

    nternet Transaction Server /TS2

    )owlevel communication techni-ues

    4P4 4ommunication

    Platform s"ecific develo"ment libraries for S6A T4P7P communication

    and a number of third "art# EA tools to integrate SAP and 6onSAP s#stems with $78.

  • 8/10/2019 Interfacing With SAP

    5/17

    Interfacing with SAP G.V.SHIVAKKUMAR

    3. How they all t together

    The following diagram ex"lains how these interfacing mechanisms work hand in hand with eachother.

    SAP $78

    B!Transaction

    A(AP

    Program"lat "ile

    #"!s

  • 8/10/2019 Interfacing With SAP

    6/17

    $. Batch ata !o%%unication &B!'

    (atch 3ata 4ommunication /(342 is the oldest batch interfacing techni-ue that SAP "rovidedsince the earl# versions of $78. (34 is not a t#"ical integration tool, in the sense that, it can beonl# be used for u"loading data into $78 and so it is not bidirectional.

    (34 works on the "rinci"le of simulating user in"ut for transactional screen, via an A(AP"rogram. T#"icall# the in"ut comes in the form of a flat file. The A(AP "rogram reads this file andformats the in"ut data screen b# screen into an internal table /(343ATA2. The transaction is thenstarted using this internal table as the in"ut and executed in the background. The followingdiagram ex"lains this "rocess.

    BDCDATA

    Flat BDCFile ABAP Prgra!

    Since the (34 techni-ue invokes the standard SAP transaction, which the normal user would

    invoke interactivel#, all the in"ut field validations, translations and flow are intact and behaves inaccordance with the ex"ected "rocess flow /Please note that this is does not hold good in a fewcases, in which the 3ialogue module checks whether the Transaction is being executedinteractivel# or in the (34 (atch mode in order to control the screen flow. 5or exam"le getting theconfirmation from the enduser2.

    This fli" side of it is "erformance hit. Since (34 has to go through all the Transactional screensand validations, most of the time is s"ent b# the s#stem in loading the 396P$' /3ialog screens2 aso""osed to doing the actual business function.

    There are two wa#s to run (34 "rograms.

    :sing 4A)) T$A6SA4T'6

    :sing (atch n"ut Sessions

    n ;4all Transaction+, the transactions are triggered at the time of "rocessing itself and so theA(AP "rogram must do the error handling. t can also be used for realtime interfaces andcustom error handling logging features.

    Whereas in (atch n"ut Sessions, the A(AP "rogram creates a session with all the transactional

    data, and this session can be viewed, scheduled and "rocessed /using Transaction S(3)2 at alater time. The latter techni-ue has a builtin error "rocessing mechanism too.

  • 8/10/2019 Interfacing With SAP

    7/17

    ). Batch In*ut &BI' + irect In*ut&I' *rogra%s

    These are SAP su""lied standard A(AP "rograms for loading master and transaction data intoSAP. (oth these t#"es of "rograms take a flat file as the in"ut and load the data into the $78s#stem.

    (atch n"ut /(2 "rograms still use the classical (34 a""roach but don+t re-uire an A(AP"rogram to be written to format the (343ATA. The user has to format the data using "redefinedstructures and store it in a flat file. The ( "rogram then reads this and invokes the transactionmentioned in the header record of the file.

    3irect n"ut /32 "rograms work exactl# similar to ( "rograms. (ut the onl# difference is, instead of"rocessing screens the# validate fields and directl# load the data into tables using standardfunction modules. 5or this reason, 3 "rograms are much faster /$M3AT63 Material Master 3

    "rogram works at least < times faster22 than the (34 counter"art and so ideall# suited forloading large volume data.

    3 "rograms are not available for all a""lication areas. 'nl# a limited number of 3 "rogramshave been su""lied b# SAP, which is listed below.

    SAP su**lied irect In*ut Progra%s

    Progra% escri*tion

    $M3AT63 MM= 4reate Material master data

    $5(()>> 5= 4reate Account documents

    $&A5SS>> S3= nvoicing external transactions

    $AA)T3?? AM= 4reate Asset Account documents

    $@E&ET> 4'PA= External data transfer to 4'

    The 3irect n"ut sessions can be created, viewed, scheduled, "rocessed and restarted using

    Transaction B(,- or using Progra% #B(,SH./.

    ) ti%es faster2= (ased on the benchmark "erformed b# the author. $esult ma# var# de"ending on factorslike number of Transactions, Material &iews, S#stem load, $elease, 3atabase, '"erating S#stem, BardwareetcC

  • 8/10/2019 Interfacing With SAP

    8/17

    0. #e%ote "unction !all "!'

    $emote 5unction 4all /$542 in SAP $78 is based on :6+s $emote Procedure 4all /$P42. $54enables the real1ti%elink between different $78 instances and can connect SAP to 6onSAPs#stems.

    With $emote 5unction 4all, both inbound /$54Server2 and outbound /$544lient2 interfaces are"ossible. SAP also "rovides a toolkit called $54 AP for nonSAP s#stems to interact with SAP+s5unction modules remotel#.

    The following diagram illustrates the $54 calls between SAP nonSAP s#stem "rograms.

    Syste% SAPA Syste% SAPB

    5unction =4all 5unction ;D$eadnventor#+ D$eadnventor#

    3estination ;SAPB+

    4all 5unction ;getStockFuote+3estination ;AS+

    Syste% AS

    main/2G .$fcAcce"t/2H$fcnstall5unction/

    ;getStockFuote+,C2H

    IgetStockFuote/2G

    I

    = $54 communication between s#stems

    SAP maintains a central re"ositor# of intero"erable s#stem definitions called J3estinationsK

    /Transaction S()42. The following t#"es of connections are "ossible with $54 3estinations.

    4onnection to $78 s#stem

    4onnection to $7L s#stem

    External "rogram connection via T4P7P

    External "rogram connection via S6A or APP4

    $54 via s"ecial A(AP70 drivers

    Most other interfacing techni-ues like A)E, E3, (AP etcC are inherentl# based on the $54 technolog#.

  • 8/10/2019 Interfacing With SAP

    9/17

  • 8/10/2019 Interfacing With SAP

    10/17

    5. 6lectronic ata Interchange &6I'

    Electronic 3ata nterchange /E32 is the industr# standard format for exchanging (usiness data.SAP uses a neutral format called ntermediate 3ocument /3oc2 for communicating E3 A)Emessages.

    The 3oc interface contains data structures and "rocessing logic for each of the businesstransaction. These are grou"ed as Message T#"es. The external E3 Server is res"onsible forreceiving the E3 messages sent b# the trading *artners. These E3 messages are then ma""edonto the 3oc structure fields and stored in the 3oc interface la#er b# SAP.

    E373oc su""orts both inbound and outbound interfaces. The 3ocs received through the E3Server can be configured to automaticall# get "rocessed, or can be stored in the 3oc interfacela#er for a future manual or scheduled "rocessing.

    The 3oc interface la#er also has a "owerful error handling, re"orting, monitoring and re"rocessing mechanism built into it /Transaction /6I2. 3oc is also tightl# integrated with theWork5low s#stem of SAP for initiating other business tasks u"on receiving7sending E3messages.

    The 3oc interface can be em"lo#ed for nonSAP a""lications to load or extract data from SAPs#stem. (ut t#"icall#, E3 7 3oc is engaged when SAP s#stem is to be integrated with an# of itsbusiness "artners /4ustomers, Su""liers and other "artners2 for carr#ing out standard businesstransactions /like 4reate Sales orders, Sending Purchase orders to Su""liers, etcC2.

  • 8/10/2019 Interfacing With SAP

    11/17

    7. A**lication 8in9 6na:ling &A86'

    A""lication )ink Enabling /A)E2 is a middleware tool, which is "art of SAP+s (usiness frameworkArchitecture /(5A2. A)E can effectivel# be used for loosel# cou"led Asynchronouscommunication between SAP s#stems and wit nonSAP s#stems. A)E is based on thedistributed "rocessing architecture and hence integrates a""lications with the local databaserather than centrali*ed one.

    A)E messages are based on the ntermediate 3ocument /3oc2 format, similar to the E3

    counter"art.

    Though A)E can be used to interface with nonSAP s#stems, usuall# it is used to distribute

    Master Transactional data between SAP $78 instances.

    The A)E distribution can be based on,

    (usiness APs

    3oc Message T#"es

    3istribution based on 3oc Message t#"es /exam"le, MATMAS 7 MAT4'$ for Material Master3ata '$3E$S 7 '$34B% for 4ustomer master etcC2 are t#"icall# used in 8.x SAP releases.The order of the da# /since release 0.>A2 and future is A)E distribution through (APs.

    The main advantage of A)E is that it can work between different releases of $78 s#stems. So,even after a release /version2 u"grade, A)E links continue to work as is. Since A)E is based onthe 3oc "rocessing model, error handling becomes eas#.

  • 8/10/2019 Interfacing With SAP

    12/17

    4. Business API &BAPI'

    (usiness AP /(AP2 is the most im"ortant com"onent of SAP (usiness 5ramework. (APenables SAP and third "art# a""lications to interact and integrate with each other at the (usiness'bect 7 Process level.

    Till some time back, SAP was dee" into its notsofriendl# interface and architecture, which itinherited from the (M Mainframe based "arent s#stem. (ut now it has come u" with trul#"latform inde"endent business obect interfaces using (APs. (usiness 'bects and (APs"rovide an obectoriented view of SAP+s business functionalit# /Transaction BAPI2.

    A**lication !o%*onent

    3istributed

    BAPI

    Business .:;ects

    A86

    #"!

    (usinessProcesses

    ntegrationServices

    4ommunicationServices

    = (AP and the SAP (usiness 5ramework

    (APs are im"lemented using $emotel# callable 5unction modules. These $54s are assignedas a calla:le %ethod of a (usiness 'bect in the (usiness 'bect $e"ositor# /('$2. All (APsare inde"endent of the screen and hence can work in the background without user intervention.

    (AP su""orts both inbound and outbound "rocessing. Since it follows obectoriented a""roach,

    SAP has "ositioned itself to su""ort interfacing through (APs in the future.

  • 8/10/2019 Interfacing With SAP

    13/17

    1-. SAP Auto%ation Tools

    SAP Automation Tools are set of tools, com"onents and class libraries for develo"ers to integratenonSAP s#stems with SAP s#stems.

    There are two tool sets available for SAP Automation.

    SAP %: interfaces

    $54 (AP interfaces

    SAP %: interface toolset can be used for develo"ing a""lications that can interact with SAPtransactions interactivel#, so that the endusers can access SAP Screens directl# from othera""lications /like showing SAP screen from a &isual (asic screen scra"er "rogram2. Thesetoolsets use the SAP%: a""lication server com"onent to connect to SAP $78.

    :sing the second set of tools, SAP lets #ou access $54s and (APs directl# from nonSAPs#stems. :sing these tools #ou can

    4onnect to $78 from outside of the SAP %: interface environment

    Access SAP business obects and (usiness APs /(APs2

    Access $78 $54 function modules

    Trigger $78 transactions in batch mode from outside of $78

    Provide an alternative %: interface to $78 a""lications and transactions/Screen scra"ers2

    Send or receive inbound or outbound 3oc documents to or from $78 The

    SAP Assistant toolset contains following com"onents.

    4, 4NN, !ava, &( APs 4lass files

    Active controls

    4'M 7 34'M connectors server

    Standalone EE files, etcC

    SAP Automation tools are ver# "owerful develo"er toolkit, which is ideal for develo"ing both

    inbound and outbound realtime interfaces to or from SAP $78 s#stem.

  • 8/10/2019 Interfacing With SAP

    14/17

    11. SAP !onnectors

    There are a number of connectors su""lied b# SAP for integrating $78 with different a""licationsand technologies.

    SAP (usiness 4onnectors

    SAP !ava 4onnectors

    SAP .6ET 4onnectors

    SAP 34'M 4onnectors

    The !ava, .6ET and 34'M connectors are took kits, which are functionall# similar, to enableintero"erabilit# between SAP and other software. These toolkits t#"icall# come with middleware

    APs to su""ort $54 /s#nchronous, transactional -ueued2, (APs, and 3ocs. These connectorsare ideal for custom interface develo"ment for the inhouse integration needs.

    SAP (usiness 4onnectors is a ste" above the technolog# connectors. (usiness 4onnectorsallow integration of local and a""lication over the net, with o"en standards /like M) etcC2. The(AP and 3oc interfaces are made available to "artners over the net using secured M) basedservices. n addition, (usiness 4onnectors enable to ex"ose additional Web Services over theinternet for the business "artners to get information dee"l# buried into #our E$P s#stem.

  • 8/10/2019 Interfacing With SAP

    15/17

    12. Internet Transaction Ser

  • 8/10/2019 Interfacing With SAP

    16/17

    13. !PI! co%%unication

    4ommon Programming nterface 4ommunication /4P42 is a direct "rogramto"rogramcommunication "rotocol. Those who want to develo" sim"le but "ro"rietar# "rotocol can use thistechni-ue. $emote 5unction 4all /$542 is a sim"lified version of 4P4, so that the "rogrammerneed not worr# about the communication "rotocols and rather can concentrate on communicatingbusiness information between "rograms.

    4P4 allows an A(AP "rogram to set u" a connection to one or more external a""lication

    "rograms in order to send data directl# to these "rograms.

    !PI1! ABAP State%ents

    !PI1! !all in ABAP 6=*lanation4'MM:64AT'6 6T nitiali*e connection

    4'MM:64AT'6 A))'4ATE Set u" connection

    4'MM:64AT'6 A44EPT Acce"t connection

    4'MM:64AT'6 SE63 Send 3ata

    4'MM:64AT'6 $E4E&E $eceive data

    4'MM:64AT'6 3EA))'4ATE 4lose the connection

    n short, 4P4 is the lowlevel stuff that hardcore "rotocol develo"ers will be interested in. t is

    not meant for (usiness'bectlevel or A""licationlevel integration.

  • 8/10/2019 Interfacing With SAP

    17/17

    1$. 6AI Products for SAP #>3

    There are a number of Enter"rise A""lication ntegration /EA2 "roducts, which can integrate SAP$78 with various other "roducts and a""lications. These "roducts claim to work at different levels ofintegration, vi*., technolog# integration, a""lication integration, business "rocess integration,s#stem integration etcC

    Most of the "roducts are generic integration tools that come with SAP s"ecific ada"ters. Man# ofthese also come with "rebuilt (usiness 'bect Tem"lates for integrating SAP+s standardbusiness obects like Sales 'rders, nvoices, Purchase 'rders etcC

    Some of the EA "roducts that are available in the market are =

    (M+s ;Webs"here+ /formerl# known as 4rossworlds2

    (EA+s ;Weblogic ntegration+

    Seebe#onds ;eQ%ate+

    T Architects ;4onnectT+

    Tibco+s ;(usiness 4onnect+

    (acksoft+s ;btalk+

    Mercator+s ;ntegration (roker+