on 12-24-2012 11:34 AM
Dear All,
In one company there are two different SAP landscape. Each landscape is having its own SAP R/3 server. Now we need to transfer a set of data from SAP R/3 server of one landscape to SAP R/3 server of other landscape through SAP PI server in one of the landscape. We have decided to have RFC-to-RFC type of scenario via PI server to transfer data from one R/3 system to other R/3 system. We have pushed the technical system of the R/3 in other landscape to our SLD on PI server. Subsequently I have also created the Business system of that technical system. Now I need to design and configure this RFC of one R/3 to RFC of R/3 system in PI system. The RFC defined on other landscape R/3 will be a sender RFC and the RFC on R/3 where PI server is the receiver RFC. Can some one guide me on this?
Thanking you
Regards
suk4023
Hey I Have A demo Program for RFC . refer it
A function module has to be created of type RFC on source side (Old server in our case) and on destination side (New server in our case, where we’ll call the FM) RFC connection (SM59) have to be created. The FM when called on destination side (New server in our case) will give its effects on source side (Old server in our case).
Below is the program which is created on destination side (New server in our case) creating a PO using “BAPI_PO_CREATE1”, the bapi will create PO on source side (Old server in our case). For that we have to create a RFC connection on destination side (New server in our case).
*&---------------------------------------------------------------------*
*& Report ZDIGANT_BAPI2
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*
REPORT ZDIGANT_BAPI2.
CONSTANTS : C_X VALUE 'X'.
DATA HEADER LIKE BAPIMEPOHEADER.
DATA HEADERX LIKE BAPIMEPOHEADERX.
DATA IT_POITEM TYPE STANDARD TABLE OF BAPIMEPOITEM.
DATA WA_POITEM LIKE LINE OF IT_POITEM.
DATA IT_POITEMX TYPE STANDARD TABLE OF BAPIMEPOITEMX.
DATA WA_POITEMX LIKE LINE OF IT_POITEMX.
DATA IT_RETURN TYPE STANDARD TABLE OF BAPIRET2.
DATA WA_RETURN LIKE LINE OF IT_RETURN.
DATA PO_NUM TYPE BAPIMEPOHEADER-PO_NUMBER.
SELECTION-SCREEN BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
PARAMETERS : PA_CC LIKE HEADER-COMP_CODE,
PA_DT LIKE HEADER-DOC_TYPE,
PA_CD LIKE HEADER-CREAT_DATE,
PA_VEN LIKE HEADER-VENDOR,
PA_PORG LIKE HEADER-PURCH_ORG,
PA_PGRP LIKE HEADER-PUR_GROUP.
SELECTION-SCREEN END OF BLOCK B1.
SELECTION-SCREEN BEGIN OF BLOCK B2 WITH FRAME TITLE TEXT-002.
PARAMETERS : PA_ITEM LIKE WA_POITEM-PO_ITEM,
PA_MAT LIKE WA_POITEM-MATERIAL,
PA_PLNT LIKE WA_POITEM-PLANT,
PA_QUN LIKE WA_POITEM-QUANTITY,
PA_NET LIKE WA_POITEM-NET_PRICE.
SELECTION-SCREEN END OF BLOCK B2.
SELECTION-SCREEN BEGIN OF BLOCK B3 WITH FRAME TITLE TEXT-003.
PARAMETERS : PA_ITEM2 LIKE WA_POITEM-PO_ITEM,
PA_MAT2 LIKE WA_POITEM-MATERIAL,
PA_PLNT2 LIKE WA_POITEM-PLANT,
PA_QUN2 LIKE WA_POITEM-QUANTITY,
PA_NET2 LIKE WA_POITEM-NET_PRICE.
SELECTION-SCREEN END OF BLOCK B3.
START-OF-SELECTION.
*----------------------
*POPULATE HAEDER DATA
*----------------------
HEADER-COMP_CODE = PA_CC.
HEADER-DOC_TYPE = PA_DT.
HEADER-CREAT_DATE = PA_CD.
HEADER-VENDOR = PA_VEN.
HEADER-PURCH_ORG = PA_PORG.
HEADER-PUR_GROUP = PA_PGRP.
**-----------------------
**POPULATE HEADRER FLAG
**-----------------------
HEADERX-COMP_CODE = C_X.
HEADERX-DOC_TYPE = C_X.
HEADERX-CREAT_DATE = C_X.
HEADERX-VENDOR = C_X.
HEADERX-PURCH_ORG = C_X.
HEADERX-PUR_GROUP = C_X.
*---------------------------
*POPULATE ITEM DATA
*---------------------------
WA_POITEM-PO_ITEM = PA_ITEM.
WA_POITEM-MATERIAL = PA_MAT.
WA_POITEM-PLANT = PA_PLNT.
WA_POITEM-QUANTITY = PA_QUN.
WA_POITEM-NET_PRICE = PA_NET.
APPEND WA_POITEM TO IT_POITEM.
**-------------------------
**POPULATE ITEM FLAG
**-------------------------
WA_POITEMX-PO_ITEM = PA_ITEM.
WA_POITEMX-MATERIAL = C_X.
WA_POITEMX-PLANT = C_X.
WA_POITEMX-QUANTITY = C_X.
WA_POITEMX-NET_PRICE = C_X.
APPEND WA_POITEMX TO IT_POITEMX.
*-----------------------------------------------------------------------------------------------
*---------------------------
*POPULATE ITEM DATA2
*---------------------------
WA_POITEM-PO_ITEM = PA_ITEM2.
WA_POITEM-MATERIAL = PA_MAT2 .
WA_POITEM-PLANT = PA_PLNT2.
WA_POITEM-QUANTITY = PA_QUN2 .
WA_POITEM-NET_PRICE = PA_NET2.
APPEND WA_POITEM TO IT_POITEM.
CLEAR WA_POITEM.
**-------------------------
**POPULATE ITEM FLAG2
**-------------------------
WA_POITEMX-PO_ITEM = PA_ITEM2.
WA_POITEMX-MATERIAL = C_X.
WA_POITEMX-PLANT = C_X.
WA_POITEMX-QUANTITY = C_X.
WA_POITEMX-NET_PRICE = C_X.
APPEND WA_POITEMX TO IT_POITEMX.
CLEAR WA_POITEM.
CALL FUNCTION 'BAPI_PO_CREATE1' DESTINATION 'kuchbhi'
EXPORTING
POHEADER = HEADER
POHEADERX = HEADERX
* POADDRVENDOR =
* TESTRUN =
* MEMORY_UNCOMPLETE =
* MEMORY_COMPLETE =
* POEXPIMPHEADER =
* POEXPIMPHEADERX =
* VERSIONS =
* NO_MESSAGING =
* NO_MESSAGE_REQ =
* NO_AUTHORITY =
* NO_PRICE_FROM_PO =
IMPORTING
EXPPURCHASEORDER = PO_NUM
* EXPHEADER =
* EXPPOEXPIMPHEADER =
TABLES
RETURN = IT_RETURN
POITEM = IT_POITEM
POITEMX = IT_POITEMX
* POADDRDELIVERY =
* POSCHEDULE =
* POSCHEDULEX =
* POACCOUNT =
* POACCOUNTPROFITSEGMENT =
* POACCOUNTX =
* POCONDHEADER =
* POCONDHEADERX =
* POCOND =
* POCONDX =
* POLIMITS =
* POCONTRACTLIMITS =
* POSERVICES =
* POSRVACCESSVALUES =
* POSERVICESTEXT =
* EXTENSIONIN =
* EXTENSIONOUT =
* POEXPIMPITEM =
* POEXPIMPITEMX =
* POTEXTHEADER =
* POTEXTITEM =
* ALLVERSIONS =
* POPARTNER =
* POCOMPONENTS =
* POCOMPONENTSX =
* POSHIPPING =
* POSHIPPINGX =
* POSHIPPINGEXP =
.
END-OF-SELECTION.
CALL FUNCTION 'BAPI_TRANSACTION_COMMIT' DESTINATION 'kuchbhi'.
LOOP AT IT_RETURN INTO WA_RETURN.
WRITE / WA_RETURN-MESSAGE.
ENDLOOP.
Creating RFC Connection on destination side (New server in our case).
SM59
Select ABAP Connection node and then click on create button.
Now give RFC destination name eg: kuchbhi
Give three short descriptions
Give target host name and system number (take it from login pad of source side) and press enter
Now in Logon & Security tab give client number, user name and password through which our FM called on destination side will access the source side and press enter and save it.
Now our destination RFC connection has been made.
Parameter inputs to the program
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Create the Basic Settings in ECC system pointing to PI system.
1. Create RFC destination of type T in both Ecc system and provide PI server host and gateway details.
2. Import RFC into PI system both ECC systems and do the necessary mappings
3. Create RFC sender and Receiver channels.
4. Do the required configurations.
Thanks,
Satish.
It depends if you want to make a push or a pull scenario. Say you have system A with RFC X. The target system is system B. If you want to push data as soon as it changes from system A to system B you'll need to configure a sender RFC scenario.
However, you might want to consider to directly call RFC X from system B via CALL FUNCTION 'X' DESTINATION 'A'. In this case you'll not need to have any PI involved. This also would propably give you some performance boost.
Hope that helps
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.