Uploaded by zhongbo.wang

r3-connection-to-bw compress

advertisement
R/3 – BW Connection
To answer you question regarding how the knowledge was obtained, I would
have to say 40% from OSS Notes and 30% trial & error and 30% from our BASIS
guys. I would suggest you get an overview of the basic BASIS functions as I
did. It is very helpful when explaining problems to our BASIS guys. You
might be able to attend a SAP class on this. I know they had one some time
ago. I myself am a SAP Certified BW Consultant and you do not cover this
information in class.
First I will list the pertinent Transactions, Tables etc. Then we will go
through the steps. Remember this procedure needs to be done on the ALL
systems, (BW, R/3 ,CRM, SEM etc) and for each layer (Production, QA,
Development). A suggestion would be to create a checklist for each System &
Layer. It makes it easier to keep track of things.
Transactions :
SM30 - Maintain Table Views
WE30 - Develop IDoc Types
SM59 - Display and Maintain RFC destinations
WE21 - Port Settings
WE20 -Partner Profiles
Tables :
RSBASIDOC - Assignment of Source Systems to BW
T000 - Clients
EDIMSG - Message Types and Assignment to IDoc Types
Functions :
RSAP_BIW_CONNECT_40 (new version of function from notes 93821 & 184322)
RSAP_BIW_DISCONNECT_40 (new version of function from notes 93821 & 184322)
OSS Notes (w/my personal opinions)
325525 - Good Overview, Check Scenario #2
93821 - Very Useful (older note but still applies)
184322 - Very Useful (older note but still applies)
325470 - Very Useful
301192 - Very Useful
524554 - OK
121163 - Not Very Useful
170539 - Does Not Exist (OSS refers to this note in 325525)
The procedure below should be used for all systems (BW ,R/3 etc.). Below
steps assume you are working with your Business Warehouse system. Repeat
steps for source system (R/3, CRM etc).
**** SEE NOTE BELOW REGARDING ADDITIONAL STEPS FOR SOURCE SYSTEM
****
1.) Type Transaction WE30.
a.) Enter 'RSSEND' in the Obj. Name field. You will see an entry
similar to the one below:
RSSEND Data transfer from the source
system (template)
[-] E1RSSH Data transfer IDoc: Header
information
[+] E1RSHIE Data transfer Idoc: Hierarchy
header information
E1RSTXT Data transfer IDoc: Texts
b.) Enter RSREQUST in the Obj. Name field. You will see an entry
similar to the one below:
RSREQUST Data request to the source system
[-] E1RSRH Data request IDoc: Header segment
[+] E1RSRHI Data request IDoc: Hierarchy
[+] E1RSRTX Data request IDoc: Texts
[+] E1RSRMD Data request IDoc: Master data
[+] E1RSRIS Data request IDoc: InfoSource
c.) Enter RSINFO in the Obj. Name field. You will see an entry
similar to the one below:
RSINFO Info IDoc
[-] E1RSHIN InfoIDoc: Status segment
E1RSPIN InfoIDoc: Data packet segment
E1RSEIN InfoIDoc: Error segment
d.) If any of the above do not exist, contact you BASIS Team.
2.) Type Transaction SM59.
a.) Open the RFC Destinations.
b.) Find your Source System and double click on it.
c.) Technical setting should contain information regarding your source
system
d.) Logon Information should contain source system client and name &
password for you remote logon.
**Suggestion: our remote name for our R/3 was ALEREMOTE. We use
BWREMOTE so that we can monitor without confusion.
e.) Execute your 'Test Connection' & 'Remote Logon'. You connection
should be You should NOT be prompted for a password.
f.) Repeat above to verify RFCs for other systems (CRM etc)
3.) Type Transaction WE21.
a.) Select 'Ports' and then 'Transactional RFC'.
b.) Click on the Port # for you source system.
c.) Verify description & SAP R/3 version.(BW 2.1C should be release
4.x)
d.) RFC Destination should be one created in SM59.
4.) Type Transaction SE16. Enter RSBASIDOC
a.) Print out copy of all entries in table.
The critical fields are :
Source system - Name of Source from RFC
DWH System - Name of Data Warehouse (BW Client Name)
Object Status - Should be 'INA' until you replicate then
status will change to 'ACT'
Basic type - Must match setting in EDIMSG table
Tran Structure Prefix - see below:
Source Systems Transfer Structure Prefix
Flat File AA
Business Warehouse AB
SAP R/3 BA
CRM BB
Source System - see below:
3 - SAP R/3 from version 3.0D onwards
B - External system, data and meta data trns.
with staging BAPIs
F - External system, meta data manually, data
with file interf.
M - Myself , Data Marts
b.) You should have one entry for each source system(SAP R/3, Flat
File, CRM, etc)
5.) Type Transaction SM30.
a.) Enter 'EDIMSG' in the Table/View field.
b.) Click on the 'Enter Conditions' option for Restrict Data Range.
c.) Click 'Maintain'.
d.) Select Message Type. Then enter 'RSSEND' in "From' field.
e.) Verify that the Basic Type matches what is in your RSBASIDOC table
for each of your connections.
f.) If any are missing any entries you must create them.
f1.) Create another session and type Transaction WE30.
f2.) Enter IDoc Type (ZSBAXXX) in Obj. Name field
(Suggestion: Start new type with 'ZS' + Transfer
Structure Prefix + (3)#'s)
f3.) Select Create.
f4.) Select "Create from Copy'.
f5.) Enter 'RSSEND" in 'Copy From' field
f6.) Enter Description (i.e. IDoc Type for BW Development)
f7.) Execute (Green Check). Repeat for other missing entries.
g.) Go to the SM30 main screen.
a.) Enter 'T000' in the Table/View field. Click 'Maintain'.
b.) Verify correct Client and Description. If incorrect enter.
This concludes our prep work. We have created all the necessary pieces to
create our Partner Profile. To review:
1. ) Verified existence of all message types.
2. ) We have an RFC for all of our Source Systems.
3. ) We have a Port setting for our Transactional RFC
4. ) All source systems are assigned with entries in the
RSBASIDOC table.
5. ) We have our RSSEND / Idoc Type (ZSBAXXX) entry exists in
the EDIMSG table
6. ) We have ensured our BW client is set up.
6. ) Type Transaction WE20.
a.) Click on 'Partner Profile' and then 'Partner Type LS' .
b.) Click on your Source system profile to verify settings.
c.) If Source System does not exist:
c1.) Click on 'Partner Type LS' then Create.
d.) In your Outbound Parameter should be 'RSREQUST' . Double click.
Outbound Options Tab
d1.) Receiver Port : select RFC from above step #3.
d2.) Packet Size: 1.
d2.) Output Mode: 'Transfer IDocs Immediately.
d4.) IDoc Type : RSREQUST.
d5.) Syntax Check : 'X'
Post Processing Tab
d6.) Type : 'US'
d7.) User : Remote User (BWREMOTE)
d8.) Language : EN
e.) In your Inbound Parameters should be 'RSINFO'. Double click.
Inbound Options Tab
e1.) Process Code : 'RSIN'.
e2.) Syntax Check : 'X'
e3.) Process By Function Module: 'Trigger Immediately
Post Processing Tab
e4.) Type : 'US'
e5.) User : Remote User (BWREMOTE)
e6.) Language : EN
f.) In your Inbound Parameters should be 'RSSEND'. Double click.
Inbound Options Tab
f1.) Process Code : 'RSDR'.
f2.) Syntax Check : 'X'
f3.) Process By Function Module: 'Trigger Immediately
Post Processing Tab
f4.) Type : 'US'
f5.) User : Remote User (BWREMOTE)
f6.) Language : EN
The way I remember which message type goes where... outbound or inbound :
From the BW perspective :
"BW is making a request out of BW to a source system to have information to
be sent back into BW."
Key words being (BW, Request , Out) - Outbound in BW (RSREQUST)
(Information, Sent, In) - Inbound in BW (RSINFO,
RSSEND)
From the Source System perspective :
"The Source is sending information out from a request made into the source
system."
Key words being (Source, Send, Info, Out) - Outbound in Source (RSINFO,
RSSEND)
(Request, In) - Inbound in Source (RSREQUST)
***Note: Source has Inbound/Outbound parameters opposite of BW
7.) To check that everything is now set up correctly, we start back to the
Partner Profiles main screen.
a.) Find your source system
b.) Double click on RSREQUST from Outbound Parameters.
c.) Double click on receiver port. Should bring you into Port Settings
/ RFC.
d.) Double click on Port (Right side of split screen). This should
bring you into the RFC Destination.
e.) Execute your 'Test Connection' & 'Remote Logon'. You should NOT be
prompted for a password.
This concludes your set up in Business Warehouse. Now time to check you
source system.
**** ADDITIONAL STEPS FOR SOURCE SYSTEMS ****
Before you proceed, you must run two (2) functions.
WARNING **** DO NOT RUN THESE FUNCTIONS IN BW ****
**** RUN ONLY ON SOURCE SYSTEM ****
First we need to some information. Open another session.
1.) Type Transaction SE16. Enter RSBASIDOC
a.) Print out copy of all entries in table.
The critical fields are :
Source system - Name of Source from RFC
DWH System - Name of Data Warehouse (BW Client Name)
Object Status - Should be 'INA' until you replicate then
status will change to 'ACT'
Basic type - Must match setting in EDIMSG table
TranStructure Prefix - see below:
Source Systems Transfer Structure Prefix
Flat File AA
Business Warehouse AB
SAP R/3 BA
CRM BB
Source System - see below:
3 - SAP R/3 from version 3.0D onwards
B - External system, data and meta data trns.
with staging BAPIs
F - External system, meta data manually, data
with file interf.
M - Myself , Data Marts
b.) You should have one entry for each source system(SAP R/3, Flat
File, CRM, etc)
2. ) Type Transaction SE37.
a.) Execute RSAP_BIW_DISCONNECT_40 using Single Test .
b.) Use the following parameters matching information from Step #1.
I_BIW_LOGSYS = BW system (RLOGSYS from RSBASIDOC in BW)
I_OLTP_LOGSYS = OLTP Source system (SLOGSYS from RSBASIDOC in
BW)
I_FORCE_DELETE = 'X'.
c.) Repeat this for all entries in table RSBASIDOC
3. ) Type Transaction SE37.
a.) Execute RSAP_BIW_CONNECT_40 using Single Test .
b.) Use the following parameters matching information from Step #1.
I_LANGU Language of the destination to BW
I_SLOGSYS OLTP Source system (SLOGSYS from
RSBASIDOC in BW)
I_LOGSYS BW system (RLOGSYS from RSBASIDOC in
BW)
I_STEXT 20 times second byte of TSPREFIX
from RSBASIDOC in BW
(Example TSPREFIX = 'BA',
then I_PREFIXE 'AAAAAAAAAAAAAAAAAAAA')
I_BASIC_IDOC BIDOCTYP of RSBASIDOC in BW
I_TSPREFIX TSPREFIX of RSBASIDOC in BW
I_SAPRL SAPREL of RSBASIDOC in BW
I_RESTORE
**** Reference OSS Notes 93821 & 184322 ****
4.) Execute Steps #1 - #7 above.
5.) Go into BW and Select your source systems tab.
a.) Right click on source system and select 'Replicate Datasources'
b.) Right click on source system and select 'Activate'
c.) Right click on source system and select 'Restore'.
If asked for password use Userid and Password for Admin.
It will prompt you that profiles exist, select 'USE'.
It will ask to delete then restore connections select
'Delete'.
d.) Right click on source system and select 'Check'. Message should
show on bottom left 'Check Source System OK'
Download