Install Custom RFCs for the Data Provider for SAP
Install the custom RFCs if you want to use the .NET Framework Data Provider for mySAP Business Suite to access the SAP system.
The Data Provider for SAP requires custom RFCs to perform some operations on the SAP system to:
Run the SELECT operation, the Data Provider for SAP requires Z_EXTRACT_DATA_OO RFC.
Run the EXECQUERY operation, the Data Provider for SAP requires Z_EXECUTE_SAP_QUERY RFC.
To perform these operations on the SAP system, you must install these custom RFCs on the SAP system. If you chose to install the Data Provider for SAP along with the SAP adapter, the Setup program copies the RFC transport for the Data Provider for SAP as a compressed file (customRFC.zip) on the system where you install the adapter. The zip file is typically installed at <installation drive>:\Program Files\Microsoft BizTalk Adapter Pack\Microsoft .NET Framework Data Provider for mySAP Business Suite.
After extracting the zip file, you will find four data files, two following the naming pattern K9*.BI1 (for example, similar to K900534.BI1), and the other two following the pattern R9*.BI1 (for example, similar to R900534.BI1).
Copy the extracted files from the computer running the adapters to the SAP application server.
Log in as the SAP R/3 system administrator to the SAP application server of your development system.
Copy the two transport files with the naming pattern K9*.BI1 from the installation directory on the computer running the adapters to the following directory on the SAP application server:
<drive>:\usr\sap\trans\cofiles
Copy the two transport files with the naming pattern R9*.BI1 from the installation directory on the computer running the adapters to the following directory on the SAP application server:
<drive>:\usr\sap\trans\data
Load the transport into the transport buffer on the SAP application server.
At the command prompt, navigate to the transport program directory on the SAP application server:
<drive>:\usr\sap\trans\bin
To load the transport into the transport buffer, execute the following command at the
\usr\sap\trans\bin
directory and replace sysid with the system ID of your development system:tp addtobuffer <TransportNumber> <sysid> pf=TP_DOMAIN_<sysid>.PFL
where, TransportNumber is the actual transport number (for example BI1K900534).
After the
tp
command finishes, you will see a report similar to the following:This is tp version 320.56.66 (release 620) Addtobuffer successful for TransportNumber tp finished with return code: 0
Return code "0" means that the operation succeeded.
A return code of 0 or 4 is acceptable. Contact Microsoft Customer Service and Support, if you receive a return code of 8 or above.
Important
Repeat steps (b) and (c) for the second set of transport files.
Note
You can easily derive the actual transport number from the cofile file name. For example, a cofile named K900534.BI1 provides a transport number of BI1K900534.
Import the transport into SAP.
Execute the following command at the command prompt:
tp import <TransportNumber> <sysid> client=<clientnumber> pf=TP_DOMAIN_<sysid>.PFL
Replace sysid with the system ID of your development system. Replace clientnumber with the client number of your development system.
You can use the U2 parameter to overwrite previously installed objects, as follows:
tp import <TransportNumber> <sysid> client=<clientnumber> U2
or
tp import <TransportNumber> <sysid> client=<clientnumber> pf=TP_DOMAIN_<sysid>.PFL U2
Note
You can easily derive the actual transport number from the cofile file name. For example, a cofile named K900534.BI1 provides a transport number of BI1K900534.
After the
tp
command finishes, you will see a report similar to the following:This is tp version 320.56.66 (release 620) This is R3trans.exe version 6.08 (release 620 - 04.02.03 - 14:54:00). R3trans.exe finished (0000). This is R3trans.exe version 6.08 (release 620 - 04.02.03 - 14:54:00). R3trans.exe finished (0000). tp finished with return code: 0
Return code "0" means that the operation succeeded.
A return code of 0 or 4 is acceptable. Contact Microsoft Customer Service and Support if you receive a return code of 8 or above.
Important
Repeat steps (a) and (b) for the second set of transport files.
Check the transport log.
Check the transport log in SAP GUI Transport Organizer using transaction SE09 to verify that there are no errors.
Setting User Authorization
The Z_EXTRACT_DATA_OO RFC requires user IDs with specific authorization objects. Use the SAP GUI authorization administration tools to set the minimum restrictions on the execution of the RFC:
Note
You do not need to set the authorization for the Z_EXECUTE_SAP_QUERY RFC.
Z_EXTRACT_DATA_OO requires both S_TABU_DIS and Z_EIP_TABL. The following values provide the minimum restrictions for S_TABU_DIS, which allow users to view metadata for any table in the system.
ACTVT: 03
DICBERCLS: *
You can use DICBERCLS to restrict authorization to tables by authorization class.
You can use the TDDAT table to view the authorization class for tables.
Note
To prevent changes to tables by table maintenance transactions, you should only grant display privileges in a production environment (ACTVT: 03 sets the permissible activity to display).
The minimum values for Z_EIP_TABL are:
ACTVT: 03
TABLE: *
You can use TABLE to explicitly define the authorized tables. Note, too, that S_TABU_DIS is also used in other transactions.
To set user authorization
Start the SAP GUI. Go to T-code, type
pfcg
, and press ENTER.In the Role text box, enter a role name you want to create, for example,
ZTEST
, and then click Role.In the Create Role page, click the Authorizations tab.
If prompted to save the role, click Yes.
In the Change Roles page, click the Change Authorization Data button.
If you are prompted to select a template from the Choose Template dialog box, click Do not select templates.
In the Change role: Authorizations page, click the Manually button.
In the Manual selection of authorizations box, enter the name of the authorization object
Z_EIP_TABL
and press ENTER.In the Change role: Authorizations page, expand the nodes until you see the text boxes for Activity and Table Name. For the Activity text box, enter the value
03
. For the Table Name text box, enter the value*
.Click the Save button to generate the profile.
Go back to the Change Roles page and click the User tab.
In the User tab, assign a user ID for the role by entering the user name in the User ID column, and click the User comparison button.
In the Compare Role User Master Record, click Complete comparison to update the master record. When prompted to save the role, click Yes.
Save and exit.
Verifying Custom RFC Installation
After you install the custom RFCs, you can verify whether the RFCs installed correctly.
For Z_EXECUTE_SAP_QUERY RFC, you can do so by executing a pre-defined query in SAP system using the Data Provider for SAP.
For Z_EXTRACT_DATA_OO RFC, you can do so by performing the following tests to confirm that the RFC operates and is ready for use in your system.
To test the installation of Z_EXTRACT_DATA_OO
In the SAP GUI authorization administration tools, execute SE37, function module Z_EXTRACT_DATA_OO, and then run the RFC in test mode by pressing
F8
. Populate the parameters as follows.Parameter Value IN_METADATA_ONLY IN_METADATA_LANGUAGE EN IN_FROM_TABLE T000 IN_OUTPUT_MODE S IN_OUTPUT_FILENAME IN_USE_FIELD_EXITS X IN_SET_ROWCOUNT 0 IN_DELIMITER IN_PACKET_SIZE 50,000 IN_MAX_WRITE_ATTEMPTS 4 IN_RETRY_DELAY 30 IN_SQL_DATES_ON Click Execute or press
F8
.In the results pane, check the following.
Parameter Value OUT_TABLEHEADER <T000 general metadata> OUT_TECHNICALSETTINGS <T000 technical database level metadata> OUT_RECORDLENGTH <depends on SAP version> OUT_RECORDCOUNT <confirm the number of clients in your system with SE16 on T000> OUT_ZDATATABLE <confirm this result with the source data using SE 16 on T000> OUT_RETURN_TAB S 001 Success
Remove the RFC for the Data Provider for SAP
In the SAP GUI Object Navigator (SE80), find all the objects with the ZMSBI development class.
Delete all objects with the ZMSBI development class from the following Dictionary Objects folders:
Structures
Function Groups
Authorized Object
Raise a transport, and migrate it through each system where you installed an RFC (development, test, and production systems, for example).
For further assistance, contact your SAP Basis Administrator.
Next
Understand BizTalk Adapter for mySAP Business Suite
SAP Adapter Tutorials