18
 RFC Mapping Loo k ups in Messag e Mappings Applies to: This scenario is implemented in PI 7.1 server. For more information, visit the SOA Management homepage. Summary In SAP NetWeaver Process Integration (PI) 7.1, there is now graphical support for JDBC and RFC mapping lookups in message mappings, instead of having to create a user-defined function with the relevant lookup code as in previous releases (e.g. XI 3.0/PI 7.0). This new feature significantly facili tates the creation of such mapping lookups and allows the PI developer to allocate his/her time to other mapping requirements. Author: Leela Ratnam Morampudi Company: Satyam Computers Services Ltd Created on: 07 February, 2009 Author Bio Leela Ratnam Morampudi is a SAP Netweaver Consultant in Satyam Computer Services Ltd. SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com  © 2009 SAP AG

RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

Embed Size (px)

Citation preview

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 1/18

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 2/18

RFC Mapping Lookups in Message Mappings

Table of Contents

1. Overview.........................................................................................................................................................3 2. Prerequisites...................................................................................................................................................3 3. Data Types .....................................................................................................................................................4 4. Message Types ..............................................................................................................................................5

5. Service Interfaces ...........................................................................................................................................6 6. Message Mapping ..........................................................................................................................................7 7. Operation Mapping .......................................................................................................................................10 8. Business Component....................................................................................................................................11 9. Communication channel ...............................................................................................................................12 10. Receiver Determination ..............................................................................................................................13 11. Interface Determination ..............................................................................................................................13 12. Receiver Agreement ...................................................................................................................................14 13. Testing ........................................................................................................................................................ 14

Test1 .............................................................................................................................................................14 Output file:..................................................................................................................................................................15

Test2 .............................................................................................................................................................15 Output File .................................................................................................................................................................16

Related Content................................................................................................................................................17 Disclaimer and Liability Notice..........................................................................................................................18

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 3/18

RFC Mapping Lookups in Message Mappings

1. OverviewThis Document will explain you RFC mapping lookups in message mappings, instead of having to create auser-defined function This new feature significantly facilitates the creation of such mapping lookups andallows the PI developer to allocate his/her time.

The Request is sent to the RFC through HTTP. Using RFC LOOK UP, the RFC is called and the responsegets generated and the response from the RFC is sent to XI and from XI, it is given to file. Here both senderand receiver are asynchronous and the RFC is synchronous.

2. Prerequisites

• The RFC channel to be used for the lookup must be configured and activated in the IntegrationDirectory.

• The definition of the RFC structure used for the lookup must already be imported into the ESRepository as an imported archive.

Here we are going to use BAPI_MATERIAL_EXISTENCECHECK. The BAPI will take the inputas the material name, and the response from the Bapi is, if it is success, it will display “S”, or else it willdisplay “E”, and error message.

Create the communication channel for the RFC Receiver. Select the adapter type as RFC. Give the R/3System details like, Application server name, system number, logon user, password, client, language.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 4/18

RFC Mapping Lookups in Message Mappings

3. Data TypesCreate two data types for the sender and the receiver.

Create the data type for the sender.

Create data type for the receiver.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 5/18

RFC Mapping Lookups in Message Mappings

4. Message TypesCreate 2 message types for the above data types

Create message type for the sender

Create message type for the receiver

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 6/18

RFC Mapping Lookups in Message Mappings

5. Service InterfacesCreate service interface for the sender and receiver

Create sender service interface

Create receiver service interface

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 7/18

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 8/18

RFC Mapping Lookups in Message Mappings

Select the RFC which you have imported. You can the request and response message elements. Select andDouble click on the request fields and response fields. Then you can get the fields which you have selectedbelow the RFC structure.

Then you can map like as shown below

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 9/18

RFC Mapping Lookups in Message Mappings

While testing the mapping, click on the ‘parameters’ tab. You will find the below screen. Select the RFCcommunication channel which you have defined in the Integration Directory. Then click on ‘Add TestParameter Set’ tab and define some name for it. I have used the name as ‘Lookup’. Now save it.

Now you can test the mapping

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 10/18

RFC Mapping Lookups in Message Mappings

7. Operation MappingSelect the source and receiver service interfaces. Click on read operations, and then select the interfacemapping.

Click on the ‘Parameters’ Tab

After clicking on the ‘parameters’ tab, you will find the below screen. Give the RFC receiver channel namewhich you have created in ID, select the type as ‘Adapter’, adapter as ‘RFC’, parameter as ‘Import’.

Then now click on ‘Binding’ tab. You will get the below window. Select the RFC Channel.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 11/18

RFC Mapping Lookups in Message Mappings

Now activate all the objects which you have created in Integration Repository. IR part completed.

8. Business ComponentCreate business component and select the sender and receiver service interface.

As we are using HTTP as sender side, there is no need of sender communication channel and senderagreement.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 12/18

RFC Mapping Lookups in Message Mappings

9. Communication channelCreate the receiver communication for file

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 13/18

RFC Mapping Lookups in Message Mappings

10. Receiver DeterminationCreate the receiver determination

11. Interface DeterminationCreate interface determination. In interface determination, select the corresponding mapping which you havedefined in Integration repository. And also select the receiver channel of RFC as shown below.

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 14/18

RFC Mapping Lookups in Message Mappings

12. Receiver AgreementCreate receiver agreement for the receiver

Now activate all the objects which you have created

13. TestingGive the details in the HTTP request as shown below and click on send. You will get the message as‘message accepted’

Test1

Message in SXMB_MONI

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 15/18

RFC Mapping Lookups in Message Mappings

Output file:

Test2

Message in SXMB_MONI

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 16/18

RFC Mapping Lookups in Message Mappings

Output File

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 17/18

RFC Mapping Lookups in Message Mappings

Related Contenthttps://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/8661

For more information, visit the SOA Management homepage .

SAP COMMUNITY NETWORK SDN - sdn.sap.com | BPX - bpx.sap.com | BOC - boc.sap.com © 2009 SAP AG

8/3/2019 RFC Mapping Lookups in Message Mappings in SAP NetWeaver Process Integration 7.1

http://slidepdf.com/reader/full/rfc-mapping-lookups-in-message-mappings-in-sap-netweaver-process-integration 18/18

RFC Mapping Lookups in Message Mappings

Disclaimer and Liability NoticeThis document may discuss sample coding or other information that does not include SAP official interfaces and therefore is notsupported by SAP. Changes made based on this information are not supported and can be overwritten during an upgrade.

SAP will not be held liable for any damages caused by using or misusing the information, code or methods suggested in this document,and anyone using these methods does so at his/her own risk.

SAP offers no guarantees and assumes no responsibility or liability of any type with respect to the content of this technical article orcode sample, including any liability resulting from incompatibility between the content within this document and the materials andservices offered by SAP. You agree that you will not hold, or seek to hold, SAP responsible or liable with respect to the content of thisdocument.