Top Banner
6$3 $*Ø 1HXURWWVWUØ ’:DOOGRUI ;0/&RPPXQLFDWLRQ 6$3%XVLQHVV&RQQHFWRU &RQILJXUDWLRQ*XLGH +RZWRHQDEOHWKHVWDQGDUG6$3 FRPPXQLFDWLRQWHFKQLTXHVIRUWKHLQWHUQHW 6$3%XVLQHVV&RQQHFWRU 5HOHDVH
22

Sap Business Connector Configuration Guide

Oct 17, 2014

Download

Documents

mbaral
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Sap Business Connector Configuration Guide

6$3�

�$*����é 1HXURWWVWU��������é '�������:DOOGRUI

;0/�&RPPXQLFDWLRQ��6$3�%XVLQHVV�&RQQHFWRU

&RQILJXUDWLRQ�*XLGH

+RZ�WR�HQDEOH�WKH�VWDQGDUG�6$3

FRPPXQLFDWLRQ�WHFKQLTXHV�IRU�WKH�LQWHUQHW

6 $3 � % X V L Q H V V � & R Q Q H F W R U5 H O H D V H �� � �

Page 2: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

LL

&RS\ULJKW

Copyright 2001 SAP AG. All rights reserved.No part of this documentation may be reproduced or transmitted in any form or for anypurpose without the express permission of SAP AG.SAP AG further does not warrant the accuracy or completeness of the information, text,graphics, links or other items contained within these materials. SAP AG shall not beliable for any special, indirect, incidental, or consequential damages, including withoutlimitation, lost revenues or lost profits, which may result from the use of these materials.The information in this documentation is subject to change without notice and does notrepresent a commitment on the part of SAP AG in the future.Some software products marketed by SAP AG and its distributors contain proprietarysoftware components of other software vendors.Microsoft®, WINDOWS, NT®, EXCEL and SQL-Server® are registered trademarksof Microsoft Corporation.IBM®, OS/2, DB2/6000®, AIX®, OS/400®, AS/400® are a registered trademark ofIBM Corporation.OSF/Motif is a registered trademark of Open Software Foundation.ORACLE is a registered trademark of ORACLE Corporation, California, USA.INFORMIX-OnLine for SAP is a registered trademark of Informix SoftwareIncorporated.UNIX® and X/Open® are registered trademarks of SCO Santa Cruz Operation.ADABAS is a registered trademark of Software AGSAP, R/2®, R/3®, RIVA®, ABAP/4, SAPoffice, SAPmail, SAPaccess®, SAP-EDI, SAP ArchiveLink, SAP EarlyWatch®, SAP Business Workflow, R/3 Retail®are registered trademarks of SAP AGAll rights reserved.

Page 3: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

LLL

&RQWHQWV

� ,1752'8&7,21 ���������������������������������������������������������������������������������������������������������������������������������������� �

� 1(&(66$5<�&86720,=,1*�,1�7+(�%86,1(66�&211(&725���������������������������������������������������� �

2.1 ADDING NEW USERS ...................................................................................................................................... 52.2 SECURING THE SERVICES ............................................................................................................................... 52.3 ADDING SAP SYSTEMS.................................................................................................................................. 62.4 ADDING ROUTING RULES .............................................................................................................................. 72.5 ACCESSING BUSINESS CONNECTOR FUNCTIONALITY..................................................................................... 8

� ,'2&�&20081,&$7,21������������������������������������������������������������������������������������������������������������������������ �

3.1 IDOC OUTBOUND PROCESSING (SAP IS CLIENT) ............................................................................................ 93.2 IDOC INBOUND PROCESSING (SAP IS SERVER)............................................................................................. 11

� %$3,�&20081,&$7,21����������������������������������������������������������������������������������������������������������������������� ��

4.1 BAPI OUTBOUND PROCESSING (SAP IS CLIENT) ......................................................................................... 134.2 BAPI INBOUND PROCESSING (SAP IS SERVER)............................................................................................ 15

� 5)&�&20081,&$7,21 ������������������������������������������������������������������������������������������������������������������������ ��

5.1 RFC OUTBOUND PROCESSING (SAP IS CLIENT)........................................................................................... 175.2 RFC INBOUND PROCESSING (SAP IS SERVER) ............................................................................................. 19

� &21),*85,1*�7+(�%86,1(66�&211(&725�)25�66/��+7736� ���������������������������������������������� ��

6.1 INSTALLING THE CERTIFICATES INTO THE BUSINESS CONNECTOR ............................................................... 216.2 CREATING AN HTTPS LISTENER IN THE BUSINESS CONNECTOR ................................................................. 216.3 IMPORTING THE CLIENT CERTIFICATE INTO THE BUSINESS CONNECTOR ...................................................... 216.4 INSTALLING CERTIFICATES INTO YOUR WEB BROWSER............................................................................... 22

� $'',7,21$/�+,176������������������������������������������������������������������������������������������������������������������������������� ��

Page 4: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

�� ,QWURGXFWLRQ

3XUSRVH�RI�WKLV�GRFXPHQW

This document describes how the standard SAP communication techniques (i.e. Idocs,BAPIs and RFCs) can be easily enabled for the internet using XML and the SAPBusiness Connector release 4.0. It describes how the partners can customize their test-copy of the SAP Business Connector 4.0. To get this tool you must be SAP customer orhave a valid Developer Package or have a valid Test- and Demo-License.

The Business Connector consists of the Business Connector Server and the BusinessConnector Integrator. The Integrator can be used to add new functionality into the Server.This document is about the Business Connector Server only. The Integrator is not usedwithin the certification process. Whenever you read “Business Connector”, we mean theBusiness Connector Server.

This is not a complete documentation about the Business Connector or Internettechnologies. To find out more about these topics, please consider the related documents.

5HOHDVH�1RWHV

The Business Connector 4.0 behaves exactly like the Business Connector 3.5, regardingthe XML certification. Only the customizing is a bit different.

5HODWHG�'RFXPHQWV

• SAP Business Connector Documentation (e.g. http://service.sap.com/connectors Business Connector �'RFXPHQWDWLRQ�RU

<BC_dir>/doc/ and <BC_dir>/packages/sap/doc/)• SAP Internet Adviser (for customers/partners: http://service.sap.com/internetadviser)• SAP RFC software development kit helpfiles

(e.g. \gui\windows\win32\sapgui\rfcsdk\help on the presentation CD)• SAP Interface Repository (http://ifr.sap.com) to learn more about SAP’s XML

Schemas• Internet Request for Comments (e.g. no. 2616 and no. 2617) (http://www.cis.ohio-

state.edu/hypertext/information/rfc.html )• A lot of information about XML and HTTPS (SSL) can be found in the internet

&HUWLILFDWLRQ�5HTXLUHPHQWV

A software product must at least meet the following requirements in order to becomecertified as an XML enabled product. More details about the requirements can be foundin the test plan belonging to the integration scenario.

• Internet communication using the protocols HTTP and HTTPS with the SAPBusiness Connector

• Adding necessary customizing into the SAP Business Connector• Sending and receiving the communication objects (i.e. Idocs, BAPIs or RFCs) that

are needed in the chosen integration scenario in XML format.

Page 5: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

3UHSDUDWLRQV

The certification takes place in one of the SAP certification centers around the world. Thepartner will bring its own computer(s) with the software products to be certified. Thesoftware product may be already preinstalled; the installation of the partner’s software isnot part of the certification.

Partner’s machine will be connected to an Ethernet LAN so it can access the SAP systemsused for certification. For the communication with the SAP systems an internal BusinessConnector Server is used that is configured in the same way as described in thisdocument.

�� 1HFHVVDU\�FXVWRPL]LQJ�LQ�WKH�%XVLQHVV�&RQQHFWRU

Start the Business Connector by calling <BC_dir>/bin/server.bat. If you want tohave a debug output, enter server.bat –debug <debuglevel> –log<filename>. The highest debuglevel is 10. With -log none the debug output iswritten into the command window.

To enter the administration screen of the Business Connector, simply enter the address ofthe Business Connector into a web browser (default: http://localhost:5555 ) . Your defaultaccount is user “Administrator” and password “manage”.

1RWH� The HTTP protocol is mentioned throughout this document to communicate withthe SAP Business Connector, but after making SSL customizing the HTTPS protocol canbe used, too.

����$GGLQJ�QHZ�XVHUV

If you want to send data from an SAP system to the BC, you need the same user in bothsystems. To create a user in the BC, first press “Security �8VHUV�DQG�*URXSV´��WKHQ

“Add and Remove Users”. Enter your SAP user (all uppercase!!) and a password, thenpress “Create Users”.

Now mark your just created user in the Groups box section (the one with “RemainingUsers” as header line) and make sure that the “Select group” is “Administrators”. Thenadd the user into the Administrators group by pressing the “ ´�EXWWRQ�EHORZ�WKH�YHU\right selection box. To finish that step press “Save Changes”.

����6HFXULQJ�WKH�VHUYLFHV

In that Business Connector release all the services are secured by default. Only knownusers can access the services. So you can use the user “Administrator” or the user createdin 2.1 to access the Business Connector from your client program. You have to senduser/password BASE64 encoded to the Business Connector.

Page 6: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

����$GGLQJ�6$3�V\VWHPV

You need to specify every SAP system that should be used within the BusinessConnector. Press “Adapters �6$3´�WR�RSHQ�D�QHZ�ZLQGRZ��LQ�WKDW�ZLQGRZ�SUHVV�³6$3�6$3�6HUYHUV�´��WKHQ�³$GG�6$3�VHUYHU´��(QWHU�D�QDPH�IRU�WKH�GHVWLQDWLRQ�DQG�WKH

necessary logon information, then press “Save”. After that you can test the connection(“Test connection”).In the following screenshot an SAP system with name 6$36<67(0� is added:

Now communication between the Business Connector and the SAP system 6$36<67(0,where SAP is the server, is possible.

Page 7: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

If you want to use the other direction as well (SAP is client), you need to install one ormore listeners for this SAP system. To do this, press the “SAP �6$3�6HUYHUV´�DQG�FOLFN

into the “Listeners”-column for the desired SAP system. Then you can add a new listener(e.g. Program ID: 0</,67(1(5):

After pressing save, press the red ball-icon in the “Started?” column so that it turns greenand activates the listener. Now add in the SAP system with transaction SM59 an RFC-destination with mode “Registration” that refers to the created ProgramID 0</,67(1(5�.Then you can call the Business Connector from the SAP system using this RFC-destination.

����$GGLQJ�5RXWLQJ�5XOHV

Whenever a call arrives in the Business Connector, either from SAP with the RFCprotocol or from the external system with the HTTP(S) protocol, it has to determine therecipient of the call. To do this, the Business Connector looks into the call and extractsinformation about the 6HQGHU, 5HFHLYHU and 0VJ7\SH� Every call has to contain this kindof routing information.

Then it looks into its list of Routing Rules and tries to find a rule that matches the routinginformation. In the rule the Business Connector can find the recipient and the format thatshould be used to send the call to this recipient.

You can add Routing Rules by pressing “Adapters �5RXWLQJ´��$�QHZ�ZLQGRZ�RSHQV

where you can specify the Sender, Receiver and the MsgType. With “Add Rule” the ruleis created an other details like “Transport” and “Transport Parameters” must be provided.Which value to choose for the different SAP communication objects and directions isexplained in the next chapters. After entering all the details, press “Save”; then enable therule by clicking on the “No” in the “Enabled?”column.

Page 8: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

����$FFHVVLQJ�%XVLQHVV�&RQQHFWRU�IXQFWLRQDOLW\

To access functionality in the Business Connector, so called VHUYLFHV are called via HTTP.This is done by posting a document containing the parameters to the service. In our case,we always post documents containing the XML format of the Idoc or BAPI/RFC-call to aservice of the Business Connector that converts the document and calls the SAP system.

The following statements must be used to post a document to the /sap/InboundIdocservice of the Business Connector. The keyword invoke must not be omitted. Theempty line that follows the header is also very important!

POST /invoke/sap/InboundIdoc HTTP/1.0

<?xml version="1.0" encoding="iso-8859-1"?><ALEREQ01> <IDOC BEGIN="1">...

Which services of the Business Connector should be used for the different SAPcommunication objects are explained in the next chapters.

Page 9: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

�� ,GRF�FRPPXQLFDWLRQ

����,GRF�2XWERXQG�SURFHVVLQJ��6$3�LV�FOLHQW�

In the ALE customizing (transaction SALE) you specify the sender and the receiver foran Idoc (e.g. sender SAP and receiver EXTERNAL, Idoc message type MATMAS). Thenyou can send this Idoc to the Business Connector using an appropriate RFC destination.

&UHDWLQJ�WKH�5RXWLQJ�5XOH

You need to add the following Routing Rule, to convert the Idoc into XML and send itfrom the Business Connector with HTTP to an external webserver:

Page 10: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

5HFHLYLQJ�WKH�,GRF

Your external webserver will receive an HTTP request containing a header with HTTPparameters and an XML document containing the Idoc in XML format. You can see thatthe routing information in the control record of the Idoc matches with the Routing Rule inthe Business Connector.

Content-type: application/x-sap.idocContent-length: [length of XML doc]�������������+773�+HDGHU

X-tid: [TID]

<?xml version="1.0" encoding="iso-8859-1"?><MATMAS02> <IDOC BEGIN="1"> <EDI_DC40 SEGMENT="1"> <RCVPRN>(;7(51$/</RCVPRN> <SNDPRN>6$3</SNDPRN> <MESTYP>0$70$6</MESTYP> ...����������������������������������������;0/�'RFXPHQW </EDI_DC40> <E1MARAM SEGMENT="1"> ... </E1MARAM> </IDOC></MATMAS01>

You need to answer the HTTP request that was initiated by the Business Connector with apositive HTTP status (e.g. HTTP status 200).

7,'�KDQGOLQJ

You can extract the TID from the HTTP header (parameter X-tid). If an error duringtransmission occurred, SAP will resend the Idoc using the same TID. So you need to storethe TIDs in a database and check every TID that you receive from SAP:

1) 7,'�UHFHLYHG�IRU�WKH�ILUVW�WLPH: This transmission was never done before. The Idocmust be stored and processed. The TID must also be stored into a database.

2) 7,'�DOUHDG\�UHFHLYHG: This Idoc was transferred before, but an error occurred. So DONOT store or process this Idoc again.

The Business Connector does not confirm successful transactions. So your product mustdelete old TIDs after a significant time.

Page 11: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

����,GRF�,QERXQG�SURFHVVLQJ��6$3�LV�VHUYHU�

&UHDWLQJ�WKH�5RXWLQJ�5XOH

Before you can send Idocs to SAP, you need to create a Routing Rule in the BusinessConnector that matches the routing information in the Idoc control record:

*HWWLQJ�D�7,'

The Business Connector can ask a SAP system to create a worldwide unique TID. Wewill use this service in the certification test. In the production environment such anadditional HTTP request might cost too much time. If it is the case, you can calculate anduse your own ‘pseudo TID’.To get a TID from the Business Connector, use the /sap/createTID service andspecify the SAP system, which should calculate the TID (e.g. 6$36<67(0).

POST /invoke/sap/createTID HTTP/1.0Content-length: [length of doc]Authorization: Basic [user/passwd BASE64 encoded]

serverName=6$36<67(0

The Business Connector answers this HTTP request with an HTML document containingthe TID.

Page 12: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

6HQGLQJ�WKH�,GRF

Now you can post the Idoc in XML format to the Business Connector service /wm.PartnerMgr.gateway.transport.ALE/InboundProcess. Use the HTTPparameter X-tid to send the TID to the SAP system. Again, the routing information inthe Idoc control record has to match with a Routing Rule in the Business Connector.

POST /invoke/wm.PartnerMgr.gateway.transport.ALE/InboundProcessContent-type: application/x-sap.idocContent-length: [length of doc] +773�+HDGHU

Authorization: Basic [user/passwd BASE64 encoded]X-tid: [TID to use]

<?xml version="1.0" encoding="iso-8859-1"?><MATMAS02> <IDOC BEGIN="1"> <EDI_DC40 SEGMENT="1"> <RCVPRN>6$3</RCVPRN> <SNDPRN>(;7(51$/</SNDPRN> <MESTYP>0$70$6</MESTYP> ...����������������������������������������������;0/�'RFXPHQW

</EDI_DC40> <E1MARAM SEGMENT="1"> ... </E1MARAM> </IDOC></MATMAS01>

3URFHVVLQJ�WKH�DQVZHU�RI�WKH�%XVLQHVV�&RQQHFWRU

If the call succeeds, the Business Connector answers with an OK-status. Then you canconfirm the TID. If the call fails (e.g. timeout), you must resend the Idoc with the sameTID, so that the SAP system can detect a retransmission.

&RQILUPLQJ�WKH�7,'

You should confirm the TID to delete it from the SAP tables. You must use the sameSAP system for the confirmation that was used to create the TID:

POST /invoke/sap/confirmTID HTTP/1.0Content-length: [length of doc]Authorization: Basic [user/passwd BASE64 encoded]

serverName=6$36<67(0&$tid=[TID to use]

Page 13: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

�� %$3,�FRPPXQLFDWLRQ

����%$3,�2XWERXQG�SURFHVVLQJ��6$3�LV�FOLHQW�

BAPI calls are sent to the Business Connector using an appropriate RFC destination.

&UHDWLQJ�WKH�5RXWLQJ�5XOH

The routing information of a BAPI call consists of the SAP systemID (e.g. 6$36<67(0),the used RFC destination (e.g. (;7B'(67) and the name of the function modulerepresenting the BAPI (e.g. %$3,B&86720(5B6($5&+). The Routing Rule in theBusiness Connector must match this information. In the Routing Rule, the BusinessObject and the Method of the BAPI must be specified:

5HFHLYLQJ�WKH�%$3,�FDOO

Your external webserver will receive an HTTP request containing a header with HTTPparameters and an XML document containing the BAPI call in XML format. You can seethat the routing information contained in the XML document matches with the RoutingRule in the Business Connector

1RWH� In the XML document the Message Type of the Routing Rule (e.g.BAPI_CUSTOMER_ SEARCH) is replaced by the BAPI name (Customer.Search).

Page 14: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

Content-type: application/x-sap.busdocContent-length: [length of doc] +773�+HDGHU

<?xml version="1.0" encoding="iso-8859-1"?> <biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery> <to> <address>urn:sap-com:logical-system:(;7B'(67</address> </to> <from> <address>urn:sap-com:logical-system:6$36<67(0</address> </from> </delivery> </header> <body xmlns=""> <doc:&XVWRPHU�6HDUFK xmlns:doc="urn:sap-com:document:..."> <PiSalesorg>0001</PiSalesorg> <PiSearchFlag>2</PiSearchFlag> </doc:Customer.Search> </body> </biztalk_1>

Now you can parse and process the BAPI call and then return the result.

6HQGLQJ�WKH�%$3,�UHVSRQVH

You answer the HTTP request initiated by the Business Connector with the result of theBAPI call in XML format:

Content-type: application/x-sap.busdoc

<?xml version="1.0" encoding="iso-8859-1"?> <biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery/> </header> <body xmlns=""> <doc:Customer.Search.Response xmlns:doc="urn:sap-com:..."> <PiSalesorg>0001</PiSalesorg> <PiSearchFlag>2</PiSearchFlag> <Multiple> <item> <CUSTOMER>10001</CUSTOMER> </item> <item> <CUSTOMER>10002</CUSTOMER> </item> <PeCustomer/> <Return/> </doc:Customer.Search.Response> </body> </biztalk_1>

Page 15: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

����%$3,�,QERXQG�SURFHVVLQJ��6$3�LV�VHUYHU�

&UHDWLQJ�WKH�5RXWLQJ�5XOH

Before you can call BAPIs in the SAP system, you need to create a Routing Rule in theBusiness Connector that matches the routing information in the BAPI XML document.

1RWH� The Message Type must now match with the BAPI and not with the functionmodule.

6HQGLQJ�WKH�%$3,�FDOO

Now you can post the BAPI call in XML format to the Business Connector service /wm.PartnerMgr.gateway.transport.BAPI/InboundProcess. Again, therouting information in the XML document has to match with the Routing Rule created inthe Business Connector.

Page 16: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

POST /invoke/wm.PartnerMgr.gateway.transport.BAPI/InboundProcessContent-type: application/x-sap.busdocContent-length: [length of doc] +773�+HDGHU

Authorization: Basic [user/passwd BASE64 encoded]

<?xml version="1.0" encoding="iso-8859-1"?> <biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery> <to> <address>urn:sap-com:logical-system:6$3</address> </to> <from> <address>urn:sap-com:logical-system:(;7(51$/</address> </from> </delivery> </header> <body xmlns=""> <doc:&XVWRPHU�6HDUFK xmlns:doc="urn:sap-com:document:..."> <PiSalesorg>0001</PiSalesorg> <PiSearchFlag>2</PiSearchFlag> </doc:Customer.Search> </body> </biztalk_1>

5HFHLYLQJ�WKH�%$3,�UHVSRQVH�RI�WKH�%XVLQHVV�&RQQHFWRU

If the call succeeds, the Business Connector answers with the result of the BAPI call:

<?xml version="1.0" encoding="iso-8859-1"?> <biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery/> </header> <body xmlns=""> <doc:Customer.Search.Response xmlns:doc="urn:sap-com:..."> <Multiple> <item> <CUSTOMER>D2443</CUSTOMER> </item> <item> <CUSTOMER>D2444</CUSTOMER> </item> </Multiple> <PeCustomer/> <Return/> </doc:Customer.Search.Response> </body> </biztalk_1>

Page 17: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

�� 5)&�FRPPXQLFDWLRQ

����5)&�2XWERXQG�SURFHVVLQJ��6$3�LV�FOLHQW�

RFC calls are sent to the Business Connector using an appropriate RFC destination.

&UHDWLQJ�WKH�5RXWLQJ�5XOH

The routing information of a RFC call consists of the SAP systemID (e.g. 6$36<67(0),the used RFC destination (e.g. (;7B'(67) and the name of the RFC function module(e.g. 4,5)B6(1'B&$7$/2*B'$7$). The Routing Rule in the Business Connectormust match this information:

5HFHLYLQJ�WKH�5)&�FDOO

Your external webserver will receive an HTTP request containing a header with HTTPparameters and an XML document containing the RFC call in XML format. You can seethat the routing information contained in the XML document matches with the RoutingRule in the Business Connector.

Page 18: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

Content-type: application/x-sap.busdocContent-length: [length of doc] +773�+HDGHU

<?xml version="1.0" encoding="iso-8859-1"?><biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery> <to> <address>urn:sap-com:logical-system:(;7B'(67</address> </to> <from> <address>urn:sap-com:logical-system:6$36<67(0</address> </from> </delivery> </header> <body> <doc:4,5)B6(1'B&$7$/2*B'$7$ xmlns:doc="urn:sa..." xmlns=""> <I_CATALOG>COLOR</I_CATALOG> <T_QAICATAB/> <T_QIERRTAB/> </doc:QIRF_SEND_CATALOG_DATA> </body></biztalk_1>

Now you can parse and process the RFC call and then return the result.

6HQGLQJ�WKH�5)&�UHVSRQVH

You answer the HTTP request initiated by the Business Connector with the result of theRFC call in XML format:

Content-type: application/x-sap.busdoc

<?xml version="1.0" encoding="iso-8859-1"?><biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery/> </header> <body> <doc:QIRF_SEND_CATALOG_DATA.Response xmlns:doc="ur..." xmlns=""> <T_QAICATAB> <item> <SATZART>Q45</SATZART> <KATALGART>1</KATALGART> <CODEGRUPPE>COLOR</CODEGRUPPE> <CODE>1</CODE> <KURZTEXT>Red</KURZTEXT> <QKENNZAHL>000</QKENNZAHL> </item> </T_QAICATAB> <T_QIERRTAB/> </doc:QIRF_SEND_CATALOG_DATA.Response> </body></biztalk_1>

Page 19: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

����5)&�,QERXQG�SURFHVVLQJ��6$3�LV�VHUYHU�

&UHDWLQJ�WKH�5RXWLQJ�5XOH

Before you can call RFCs in the SAP system, you need to create a Routing Rule in theBusiness Connector that matches the routing information in the RFC XML document.

6HQGLQJ�WKH�5)&�FDOO

Now you can post the RFC call in XML format to the Business Connector service /wm.PartnerMgr.gateway.transport.RFC/InboundProcess. Again, therouting information in the XML document has to match with the Routing Rule created inthe Business Connector.

Page 20: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

POST /invoke/wm.PartnerMgr.gateway.transport.RFC/InboundProcessContent-type: application/x-sap.busdocContent-length: [length of doc] +773�+HDGHU

Authorization: Basic [user/passwd BASE64 encoded]

<?xml version="1.0" encoding="iso-8859-1"?> <biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery> <to> <address>urn:sap-com:logical-system:6$3</address> </to> <from> <address>urn:sap-com:logical-system:(;7(51$/</address> </from> </delivery> </header> <body> <doc:4,5)B6(1'B&$7$/2*B'$7$ xmlns:doc="urn:sa..." xmlns=""> <I_CATALOG>COLOR</I_CATALOG> <T_QAICATAB/> <T_QIERRTAB/> </doc:QIRF_SEND_CATALOG_DATA> </body> </biztalk_1>

5HFHLYLQJ�WKH�5)&�UHVSRQVH�RI�WKH�%XVLQHVV�&RQQHFWRU

If the call succeeds, the Business Connector answers with the result of the RFC call:

<?xml version="1.0" encoding="iso-8859-1"?> <biztalk_1 xmlns="urn:biztalk-org:biztalk:biztalk_1"> <header> <delivery/> </header> <body> <doc:QIRF_SEND_CATALOG_DATA.Response xmlns:doc="ur..." xmlns=""> <T_QAICATAB> <item> <SATZART>Q45</SATZART> <KATALGART>1</KATALGART> <CODEGRUPPE>COLOR</CODEGRUPPE> <CODE>1</CODE> <KURZTEXT>Red</KURZTEXT> <QKENNZAHL>000</QKENNZAHL> </item> </T_QAICATAB> <T_QIERRTAB/> </doc:QIRF_SEND_CATALOG_DATA.Response> </body> </biztalk_1>

Page 21: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

�� &RQILJXULQJ�WKH�%XVLQHVV�&RQQHFWRU�IRU�66/��+7736�

Before you can configure the BC for SSL, you need X.509 certificates. We can provideyou with a certificate-test-package that can be used for testing and certification. Thesecertificates issued by ICC Walldorf can not be used in a production environment! Thefollowing chapters describe the configuration using our certificate-test-package.

����,QVWDOOLQJ�WKH�FHUWLILFDWHV�LQWR�WKH�%XVLQHVV�&RQQHFWRU

Copy the certificates from the certificate-test-package into the following directories:cacert.der → <start_dir>\sapbc40\server\config\cacert.der

cacert.der → <start_dir>\sapbc40\server\config\cacert\cacert.der servercert.der → <start_dir>\sapbc40\server\config\cert.der serverkey.der → <start_dir>\sapbc40\server\config\privkey.derIn the production environments the Common Name in the servercert must match with thecomputer name, on which the BC is running. We used „localhost“ for this CommonName. If you need to use a different computer name, and if the servercert does not work,please tell us this computer name and we will send you a new server certificate.

����&UHDWLQJ�DQ�+7736�OLVWHQHU�LQ�WKH�%XVLQHVV�&RQQHFWRU

Press “Security �3RUWV´�RQ�WKH�OHIW�DQG�WKHQ�³$GG�3RUW´��&KRRVH�³7\SH´�

“webMethods/https” and press “Go to Step 2”. Enter a port number (e.g. 4444) and set“Client Authentication” = “Request client certificates”. Press “Save Changes”.

Now click on “Edit” in the “Access mode”-column and choose “Set Access Mode toAllow by Default” on the next screen. Confirm the popup window with ok and “Return toPort List”. Here enable the new HTTPS listener by pressing the “No” in the “Enabled?”column. If all the certificates were copied to the correct locations, the listener should start.

Whenever you establish an HTTPS-connection (e.g. https://localhost:4444), the BCrequests your client certificate. If the client does not present one, the BC asks forusername and password. If you choose “Client Authentication” = “Require clientcertificates”, the client PXVW log on with a valid certificate.

����,PSRUWLQJ�WKH�FOLHQW�FHUWLILFDWH�LQWR�WKH�%XVLQHVV�&RQQHFWRU

Press “Security �&HUWLILFDWHV´��WKHQ�³(GLW�&HUWLILFDWHV�6HWWLQJV´�WR�VSHFLI\�WKH�GLUHFWRU\with the CA certificates. Enter “config/cacert/” into the “CA Certificate Directory”-field.

To use your client certificate you must import it into the Business Connector and map itto a BC-user (e.g. with the user created in 2.1). Click on “Client Certificates”, enter thepath of the clientcert.der from the certificate-test-package and press “Import Certificate”to add a new certificate with Common Name = “BC_User”.

Now click on “BC_User” in the Subject CN column and then choose “Change UserMapping”. Map the certificate to the user created in 2.1 and “Save Changes”. Now youcan use your client certificate to enter the BC administrator screen and to accessfunctionality from your client.

Page 22: Sap Business Connector Configuration Guide

6$3�$* ;0/�FRPPXQLFDWLRQ�±�%XVLQHVV�&RQQHFWRU�&RQILJXUDWLRQ�*XLGH

��

����,QVWDOOLQJ�FHUWLILFDWHV�LQWR�\RXU�:HE�%URZVHU

If you want to use HTTPS for administration, you must install the clientcert and thecacert into your web browser. If you use IE5, simply doubleclick the clientcert.p12 andthe cacert.der to install them (btw: with NT4 the SP6 is needed).

�� $GGLWLRQDO�KLQWV

1) It’s not necessary, to include empty fields in the XML document that is sent to theBusiness Connector. The following two XML documents are equivalent:

<tag1>info1</tag1><tag2/><tag3></tag3><table1> <item> <ti1>info2</ti1> <ti2/> <ti3/> </item> <item> <ti1/> <ti2>info3</ti2> <ti3/> </item> <item> <ti1/> <ti2/> <ti3>info4</ti3> </item></table>

<tag1>info1</tag1><table1> <item> <ti1>info2</ti1> </item> <item> <ti2>info3</ti2> </item> <item> <ti3>info4</ti3> </item></table>

2) The occurence of the Idoc segments etc. is contained in the “minOccurs” and“maxOccurs” elements of the XML schema. If such an element misses, then its defaultvalue is “1”.Example: <element name="E1LFM1M" minOccurs="0" maxOccurs="9999"> the segment is optional, it can occur 9999 times. <element name="EDI_DC40"> the segment is mandatory and can occur exactly 1 times.