Upload
trinhdung
View
231
Download
3
Embed Size (px)
Citation preview
1
How to implement the interface between R/3 and webMethods using IDoc and xml
SAP ECC6.0
webMethods IS6.5
Window XP
How to implement the interface between R/3 and webMethods using IDoc and xml ....... 1 Overview of IDoc processing ............................................................................................. 2 Part A. ................................................................................................................................. 3
1. Create IDoc segments ............................................................................................. 3 2. Create IDoc basic type ............................................................................................ 5 3. Create logical message type.................................................................................... 9 4. Assign message type to IDoc type ........................................................................ 11 5. Create IDoc XML Schema file to use in webMethods ......................................... 13
Part B. ............................................................................................................................... 16 1. Create XML and IDoc document using XML Schema. ....................................... 16 2. Define XML Schema ............................................................................................ 16 3. Create XML Document Type ............................................................................... 16 4. Map XML and IDoc.............................................................................................. 16 5. Send IDoc.............................................................................................................. 16
Part C. ............................................................................................................................... 16 1. Create RFC Destination ........................................................................................ 16 2. Create Port Definition ........................................................................................... 18
Created By Hojin Jeon
Document version: 1.0-5/05/2008
2
Overview of IDoc processing
**Prerequisite
Define RFC Destination
Define Port Definition
Define Partner Profile
Part A: Define IDoc segments and basic type to map message type and IDoc in R/3.
1. Create IDoc segments 2. Create IDoc basic type 3. Create logical message type 4. Assign message type to IDoc type 5. Create IDoc XML Schema file to use in webMethods
Part B: Define xml document and map xml to IDoc in webMethods.
1. Create IDoc document type using IDoc xml schema 2. Define XML Schema for inbound/outbound XML files 3. Create XML document type 4. Map XML and IDoc 5. Send IDoc
Part C: Define RFC Destination.
1. Create RFC Destination 2. Create Port Definition
Define sender and
receiver
Message Type Semantic
IDoc Type Syntax
Partner Type LS
Partner Profile
Process Code
Define Context
Determine action
For every partner a separate profile
Function Module to process an
IDoc
3
Part A.
1. Create IDoc segments a. T-Code WE31 b. Type Segment name c. Menu Bar: Segment � Create or click F5 key d. Type Description e. Add Fields Name and Data Elements f. Click Save button
g. Click Back button h. Menu Bar: Edit � Set Release
a. WE31
b. Segment Name
4
c. ~f.
g. Back
5
h. Release
2. Create IDoc basic type a. T-Code WE30 b. Type Object Name and select Basic type option c. Menu Bar: Development object � Create or click F5 key d. Type Description and click Enter key e. Menu Bar: Edit � Create Segment or click Shift + F6 Key f. Type segment name
g. Click Enter key h. Click Save button i. Menu Bar: Edit � Set Release
a.~ b. WE30 and Object Name
6
c. Create
d. Description
7
e. Create
f. Segment Name
8
h. Save
i. Release
9
3. Create logical message type a. T-Code WE81 b. Menu Bar: Table View � Display � Change or click Ctrl + F1 key c. Menu Bar: Edit � New Entry or click F5 key d. Type message type and short text e. Click Save button
a. ~ b. WE81 and Change
10
c. New entry
d. Message Type
11
e. Save
4. Assign message type to IDoc type a. T-Code WE82 b. Menu Bar: Table View � Display � Change or click Ctrl + F1 key c. Menu Bar: Edit � New Entry or click F5 key d. Type message type and basic type text e. Click Save button
a. WE82
b. Change
12
c. New Entry
d. Message Type
e. Save
13
5. Create IDoc XML Schema file to use in webMethods a. T-Code WE60 b. Type Basic type c. Menu Bar: Documentation � XML Schema d. Menu Bar: XML Download… e. Select folder to save a file (The file name could be RMSXX.XSD)
a. ~ b. WE60
c. XML Schema
14
15
d. Download
e. Save
16
Part B.
1. Create XML and IDoc document using XML Schema.
2. Define XML Schema
3. Create XML Document Type
4. Map XML and IDoc
5. Send IDoc
Part C.
1. Create RFC Destination a. T-CODE SM59 b. Menu Bar: Edit�Create or Click F8 key c. Type RFC Destination, Type and Description d. Select Activation type e. Type program id, Gateway host and service f. Click Save button
a. SM59
17
b. Create
c. ~ f.
18
2. Create Port Definition a. T-CODE WE21 b. Menu Bar : Port� Create or click F7 key c. Select own port name and type port name d. Type description and RFC Destination e. Click Save button
a. WE21
b. Create
19
c. Port Name
d. ~ e.