第 41 页 / 共 65 页
8QLW(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)DQ(cid:3),’RF(cid:3)7\SH
7RSLF(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3),QERXQG(cid:3)3URFHVVLQJ
• Revise project management
• Revise programming of input process
In exercise 4, after you extended IDoc type with customer segment
Z1INCOQQ(cid:17) In order to receive the delivery conditions, you need to read
the customer segment with delivery conditions in the customer exit and
this needs to be transmitted to the input process (BDC).
Exercise 5 is a prerequisite for this exercise.
6-1 Change the 3URMHFW(cid:3)%&(cid:25)(cid:21)(cid:20)(cid:16)QQ in the project management (transaction CMOD).
Write the program code in the extension component for the outbound processing.
6-2 Activate your project.
6-3 Repeat the inbound sales order process with the help of the test program ,QERXQG
PRGLILHG(cid:3)RXWERXQG(cid:3)ILOH derived from the already created purchase order.
Enter the following values on the tab page 6HQGHU:
Recipient, Port: SAP<SID>, System ID of SAP
system, for example SAPT80
Sender, Port: 68%6<67(0
Sender, Partner number: 7(cid:16)%,.QQ
Sender, Partner type: .8
Sender, Partner function: $*
The generated IDoc contains the status 53 (application document posted).
6-4 Check the order to see if it contains the delivery conditions. The condition text
should contain the string from the customer exit.
(C) SAP AG BC621 3-17
| Recipient, Port: | SAP<SID>, System ID of SAP system, for example SAPT80 |
|---|---|
| Sender, Port: | 68%6<67(0 |
| Sender, Partner number: | 7(cid:16)%,.QQ |
| Sender, Partner type: | .8 |
| Sender, Partner function: | $* |
第 42 页 / 共 65 页
6ROXWLRQV
8QLW(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)DQ(cid:3),’RF(cid:3)7\SH
7RSLF(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3),QERXQG(cid:3)3URFHVVLQJ
2-1 Program code for outbound processing extension:
1 *----------------------------------------------------------------------*
2 * INCLUDE ZXDIXU02
3 *----------------------------------------------------------------------*
4
5 data: h_e1head like e1head. " Exercise 2
6
7 pe_vbak621 = pi_vbak621.
8
9 * Exercise 2
10 loop at pt_idoc_data_records
11 where segnam = ’E1HEAD’.
12 h_e1head = pt_idoc_data_records-sdata.
13 if h_e1head-auart = ’NB’.
14 pe_vbak621-auart = ’TA’.
15 endif.
16 endloop.
(C) SAP AG BC621 3-18
第 43 页 / 共 65 页
8QLW(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)DQ(cid:3),’RF(cid:3)7\SH
7RSLF(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)2XWERXQG(cid:3)3URFHVVLQJ
3-1 Program code for outbound processing extension:
1 *----------------------------------------------------------------------*
2 * INCLUDE ZXDIXU01
3 *----------------------------------------------------------------------*
4
5 data: k_e1head like e1head. " Exercise 3
6
7 loop at pt_idoc_data_records
8 where segnam = ’E1HEAD’.
9 * Exercise 3
10 k_e1head = pt_idoc_data_records-sdata.
11 k_e1head-name = pi_ekko-ernam.
12 pt_idoc_data_records-sdata = k_e1head.
13 modify pt_idoc_data_records.
14 endloop.
(C) SAP AG BC621 3-19
第 44 页 / 共 65 页
8QLW(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)DQ(cid:3),’RF(cid:3)7\SH
7RSLF(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)WKH(cid:3)’DWD(cid:3)6WUXFWXUH(cid:3)(cid:11),’RF(cid:3)7\SH(cid:12)
4-1 Segment Z1INCOQQ contains two fields:
INCO1 with data element INCO1 in export length 3
INCO2 with data element INCO2 in export length 28
4-2 The extension ZEXTENQQ consists of standard segments E1HEAD and E1ITEM.
The customer segment Z1INCOQQ(cid:15)(cid:3)as child segment depends on standard segment
E1HEAD.
(C) SAP AG BC621 3-20
第 45 页 / 共 65 页
8QLW(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)DQ(cid:3),’RF(cid:3)7\SH
7RSLF(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)2XWERXQG(cid:3)3URFHVVLQJ
5-1 Program code for outbound processing extension (extended INCLUDE from
exercise 3):
1 *----------------------------------------------------------------------*
2 * INCLUDE ZXDIXU01
3 *----------------------------------------------------------------------*
4
5 data: k_e1head like e1head. " Exercise 3
6 data: k_z1inco like z1incodx. " Exercise 5
7
8 loop at pt_idoc_data_records
9 where segnam = ’E1HEAD’.
10 * Exercise 3
11 k_e1head = pt_idoc_data_records-sdata.
12 k_e1head-name = pi_ekko-ernam.
13 pt_idoc_data_records-sdata = k_e1head.
14 modify pt_idoc_data_records.
15 * Exercise 5
16 clear pt_idoc_data_records.
17 clear k_z1inco.
18 k_z1inco-inco1 = pi_ekko-inco1.
19 k_z1inco-inco2 = pi_ekko-inco2.
20 pt_idoc_data_records-segnam = ’Z1INCODX’.
21 pt_idoc_data_records-sdata = k_z1inco.
22 append pt_idoc_data_records.
23 endloop.
(C) SAP AG BC621 3-21
第 46 页 / 共 65 页
8QLW(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3)DQ(cid:3),’RF(cid:3)7\SH
7RSLF(cid:29)(cid:3)([WHQVLRQ(cid:3)RI(cid:3),QERXQG(cid:3)3URFHVVLQJ
6-1 Program code for inbound processing extension (extended INCLUDE from exercise
2):
1 *----------------------------------------------------------------------*
2 * INCLUDE ZXDIXU02
3 *----------------------------------------------------------------------*
4
5 data: h_e1head like e1head. " Exercise 2
6 data: h_z1inco like z1incodx. " Exercise 6
7
8 pe_vbak621 = pi_vbak621.
9
10 * Exercise 2
11 loop at pt_idoc_data_records
12 where segnam = ’E1HEAD’.
13 h_e1head = pt_idoc_data_records-sdata.
14 if h_e1head-auart = ’NB’.
15 pe_vbak621-auart = ’TA’.
16 endif.
17 endloop.
18
19 * Exercise 6
20 loop at pt_idoc_data_records
21 where segnam = ’Z1INCODX’.
22 h_z1inco = pt_idoc_data_records-sdata.
23 pe_vbak621-inco1 = h_z1inco-inco1.
24 * pe_vbak621-inco2 = h_z1inco-inco2.
25 pe_vbak621-inco2 = ‘Test BC621-DX’.
26 endloop.
(C) SAP AG BC621 3-22
第 47 页 / 共 65 页
’HYHORSPHQW(cid:3)RI(cid:3),’RF(cid:3)7\SH
l
’HYHORSPHQW(cid:3)RI(cid:3)WKH(cid:3)GDWD(cid:3)VWUXFWXUH
l
3URFHVVLQJ(cid:3)H[DPSOH
ª SAP AG 1999
(C) SAP AG BC621 4-1
第 48 页 / 共 65 页
7RSLF(cid:3)2EMHFWLYHV
l
&UHDWH(cid:3),’RF(cid:3)VHJPHQWV
l
’HYHORS(cid:3)QHZ(cid:3),’RF(cid:3)W\SHV
l
7HPSODWH(cid:3)IRU(cid:3),’RF(cid:3)RXWERXQG(cid:3)SURFHVVLQJ
l
7HPSODWH(cid:3)IRU(cid:3),’RF(cid:3)LQERXQG(cid:3)SURFHVVLQJ
ª SAP AG 1999
(C) SAP AG BC621 4-2
第 49 页 / 共 65 页
ª SAP AG 1999
(C) SAP AG BC621 4-3
(cid:0)(cid:1)(cid:3) (cid:2)(cid:5) (cid:4)(cid:6)(cid:7) (cid:1)(cid:8) (cid:6)(cid:10) (cid:9)(cid:12) (cid:11)(cid:14) (cid:13)(cid:15) (cid:11)(cid:17) (cid:16)(cid:18)(cid:19) (cid:9)
(cid:23)(cid:23)
(cid:20)(cid:21) (cid:6)(cid:15) (cid:22)(cid:23)
(cid:6)(cid:10) (cid:9)(cid:15) (cid:22)(cid:27)
(cid:0)(cid:29)(cid:20)(cid:21) (cid:18)(cid:5)
(cid:6)(cid:10)
(cid:16)(cid:29)(cid:28)(cid:30)
!"
(cid:4)(cid:18)(cid:24) (cid:2)(cid:23) (cid:1)(cid:25)
(cid:18)(cid:24) (cid:9)(cid:10) (cid:1)(cid:8)
(cid:11)$#(cid:27) (cid:2)(cid:26) (cid:6)(cid:12)
(cid:6)(cid:10) (cid:9)(cid:26) (cid:11)
(cid:6)(cid:10) (cid:9)(cid:26) (cid:11)(cid:5) (cid:31)
%
(cid:18)(cid:24) (cid:28)
&(cid:5)
(cid:13)(cid:5)
’(cid:26)
(cid:9)*
(cid:11)((cid:6)(cid:27)
(cid:0)+(cid:20),
(cid:9)(cid:12) %(cid:5)
(cid:18)(cid:5)
(cid:16)(cid:18)(cid:19) (cid:9))
!- (cid:11)(#(cid:27)
(cid:18)(cid:23) (cid:31)
(cid:2)(cid:26) (cid:6)
(cid:20).
(cid:0)0(cid:20)1
(cid:6)/ (cid:22)(cid:23)
(cid:18)(cid:5)
(cid:6)(cid:5)
!2
(cid:4)(cid:18)(cid:24)
(cid:11)$#(cid:27)
(cid:2)(cid:23)
(cid:2)(cid:26)
(cid:1)(cid:8)
(cid:6)
(cid:6)(cid:10) (cid:9)(cid:12) (cid:11)(cid:24) (cid:18)(cid:23) (cid:31)
&RXUVH(cid:3)2YHUYLHZ(cid:3)’LDJUDP
第 50 页 / 共 65 页
%DVLF(cid:3)5XOHV(cid:3)IRU(cid:3)’HYHORSPHQW
l
6HJPHQWV(cid:3)DUH(cid:3)IRUPHG(cid:3)DV(cid:3)ORJLFDO(cid:3)XQLWV(cid:3)EDVHG(cid:3)RQ(cid:3)WKH
(cid:11)DSSOLFDWLRQ(cid:12)(cid:3)ILHOGV(cid:17)(cid:3)7KH\(cid:3)DUH(cid:3)UHXVDEOH(cid:3)(cid:5)PRGXOHV(cid:5)(cid:3)RI
,’RF(cid:3)GHYHORSPHQW
l
6HJPHQW(cid:3)JURXSV(cid:3)DUH(cid:3)IRUPHG(cid:3)DV(cid:3)ORJLFDO(cid:3)XQLWV(cid:3)IURP
VHJPHQWV
l
,’RF(cid:3)W\SHV(cid:3)DUH(cid:3)GHULYHG(cid:3)IURP(cid:3)VHJPHQWV(cid:3)DQG(cid:3)VHJPHQW
JURXSV
7KH\(cid:3)DUH(cid:3)WKH(cid:3)GDWD(cid:3)VWUXFWXUH(cid:3)RI(cid:3)DQ(cid:3)DSSOLFDWLRQ(cid:3)GRFXPHQW
IRU(cid:3)WKH(cid:3)WUDQVPLVVLRQ
l
’XULQJ(cid:3)GHYHORSPHQW(cid:3),’RF(cid:3)W\SHV(cid:3)DUH(cid:3)FUHDWHG(cid:3)DV(cid:3)EDVLF
,’RF(cid:3)W\SHV
l
7KH(cid:3)EXVLQHVV(cid:3)SURFHVV(cid:3)LWVHOI(cid:3)LV(cid:3)QRW(cid:3)LGHQWLILHG(cid:3)WKURXJK
DQ(cid:3),’RF(cid:3)W\SH(cid:3)EXW(cid:3)UDWKHU(cid:3)WKURXJK(cid:3)WKH(cid:3)ORJLFDO(cid:3)PHVVDJH
ª SAP AG 1999
n In the segment editor you assign a name to the field and enter a data element that describes the usage
of the field in the application (documentation). The editor calculates the necessary character length
for the field using the data element. ([DPSOHV(cid:29)
Ø
Logical unit segment:
- An address consists of the fields street, postcode and city.
- Contact person consists of the fields first name, last name and telephone number.
Ø
Logical unit of segment group:
- A company address consists of an address (logical unit segment) as well as several contact
persons (logical unit segment) in this company.
n In the IDoc type editor you build a complex data structure from the single segments. There you
determine the order and the hierarchical relationship of the segments. In addition, you assign a status
(optional/mandatory) as well as the number of repetitions per segment and segment group.
The IDoc API tests that the generated program (outbound processing: SAP processing, inbound
processing: subsystem) conforms to these characteristics. Violations of these characteristics are
recorded through the IDoc status syntax error (outbound: 26, inbound 60). “26”, inbound: “60”).
(C) SAP AG BC621 4-4
| %DVLF(cid:3)5XOHV(cid:3)IRU(cid:3)’HYHORSPHQW |
|---|
| l |
| 6HJPHQWV(cid:3)DUH(cid:3)IRUPHG(cid:3)DV(cid:3)ORJLFDO(cid:3)XQLWV(cid:3)EDVHG(cid:3)RQ(cid:3)WKH |
| (cid:11)DSSOLFDWLRQ(cid:12)(cid:3)ILHOGV(cid:17)(cid:3)7KH\(cid:3)DUH(cid:3)UHXVDEOH(cid:3)(cid:5)PRGXOHV(cid:5)(cid:3)RI |
| ,’RF(cid:3)GHYHORSPHQW |
| l |
| 6HJPHQW(cid:3)JURXSV(cid:3)DUH(cid:3)IRUPHG(cid:3)DV(cid:3)ORJLFDO(cid:3)XQLWV(cid:3)IURP |
| VHJPHQWV |
| l |
| ,’RF(cid:3)W\SHV(cid:3)DUH(cid:3)GHULYHG(cid:3)IURP(cid:3)VHJPHQWV(cid:3)DQG(cid:3)VHJPHQW |
| JURXSV |
| 7KH\(cid:3)DUH(cid:3)WKH(cid:3)GDWD(cid:3)VWUXFWXUH(cid:3)RI(cid:3)DQ(cid:3)DSSOLFDWLRQ(cid:3)GRFXPHQW |
| IRU(cid:3)WKH(cid:3)WUDQVPLVVLRQ |
| l |
| ’XULQJ(cid:3)GHYHORSPHQW(cid:3),’RF(cid:3)W\SHV(cid:3)DUH(cid:3)FUHDWHG(cid:3)DV(cid:3)EDVLF |
| ,’RF(cid:3)W\SHV |
| l |
| 7KH(cid:3)EXVLQHVV(cid:3)SURFHVV(cid:3)LWVHOI(cid:3)LV(cid:3)QRW(cid:3)LGHQWLILHG(cid:3)WKURXJK |
| DQ(cid:3),’RF(cid:3)W\SH(cid:3)EXW(cid:3)UDWKHU(cid:3)WKURXJK(cid:3)WKH(cid:3)ORJLFDO(cid:3)PHVVDJH |
| ª SAP AG 1999 |
第 51 页 / 共 65 页
$SSOLFDWLRQ
ª SAP AG 1999
(C) SAP AG BC621 4-5
3(cid:5)
81
:.
4(cid:5)
(cid:28)(cid:30)
(cid:6)(cid:10)
(cid:9)(cid:7)
(cid:18)(cid:5)
(cid:2)(cid:7)
!(cid:15)
9(cid:19)
(cid:18)(cid:21)
(cid:11)5 (cid:16)(cid:18)(cid:24)
(cid:28) (cid:13)(cid:7) (cid:1)
(cid:28);(cid:11)
(cid:9)(cid:25) 6- (cid:18)(cid:5) 7(cid:24) 4(cid:5) (cid:4)(cid:6) <= 4(cid:12) %(cid:27)
3(cid:10)
(cid:16)>(cid:9)(cid:26) (cid:6)(cid:15) %(cid:7) %2
4(cid:5) (cid:9)(cid:10) !/ (cid:11)B (cid:16)(cid:18)(cid:24)
?@
(cid:9)*
(cid:18)(cid:24)
6E
(cid:28)B AC
(cid:18)(cid:5)
(cid:31)(cid:17)
7(cid:21)
(cid:4)(cid:18)(cid:7)
4(cid:5)
D
(cid:4)(cid:6)
,’RF(cid:3),QWHUIDFH
F (cid:6)(cid:26) 9(cid:27)
G(cid:23)
(cid:1)(cid:25)
#(cid:24)
(cid:6)(cid:10)
(cid:2)(cid:26)
(cid:0)0(cid:20)1
F
(cid:9)(cid:12) (cid:11)
(cid:6)
(cid:18)(cid:5)
(cid:6)(cid:26)
!"
9(cid:24)
G(cid:23)
(cid:1)H
#I
(cid:6)(cid:10)
(cid:2)(cid:26)
(cid:9)(cid:26)
F
(cid:6)
(cid:11)
(cid:6)(cid:26) 9(cid:27)
J1
(cid:1)(cid:8)
(cid:13)(cid:23)
(cid:6)(cid:10)
(cid:1)H
(cid:9)(cid:12)
(cid:6)
(cid:11)
$UHDV(cid:3)RI(cid:3)’HYHORSPHQW
l
’DWD(cid:3)VWUXFWXUH(cid:29)
LQ(cid:3)WKH(cid:3):(’,(cid:3)DUHD(cid:3)PHQX
l
2XWERXQG(cid:3)DQG(cid:3)LQERXQG
SURFHVVLQJ(cid:29)(cid:3)LQ(cid:3)WKH(cid:3)2EMHFW
%URZVHU(cid:3)(cid:5)6((cid:27)(cid:19)(cid:5)
l
’RFXPHQWDWLRQ(cid:29)
LQ(cid:3)WKH(cid:3):(’,(cid:3)PHQX
第 52 页 / 共 65 页
6WHSV(cid:3)IRU(cid:3)WKH(cid:3)’HYHORSPHQW(cid:3)RI(cid:3)D(cid:3)’DWD(cid:3)6WUXFWXUH
l
&RPELQH(cid:3)WKH(cid:3)UHTXLUHG(cid:3)ILHOGV(cid:3)DQG(cid:3)WKHLU(cid:3)GDWD
W\SHV(cid:3)LQ(cid:3)WKH(cid:3)GLFWLRQDU\
l
’HILQLWLRQ(cid:3)RI(cid:3)UHTXLUHG(cid:3)VHJPHQWV(cid:15)
VHJPHQW(cid:3)HGLWRU
l
’HILQLWLRQ(cid:3)RI(cid:3)EDVLF(cid:3),’RF(cid:3)W\SHV(cid:15)
,’RF(cid:3)W\SH(cid:3)HGLWRU
l
&UHDWLRQ(cid:3)RI(cid:3)D(cid:3)ORJLFDO(cid:3)PHVVDJH(cid:15)(cid:3)(cid:3)VXUURXQGLQJ
ILHOG(cid:3)PHQX(cid:3)RI(cid:3),’RF(cid:3)W\SH(cid:3)HGLWRU
l
$VVLJQPHQW(cid:3)RI(cid:3)D(cid:3)ORJLFDO(cid:3)PHVVDJH(cid:3)WR(cid:3)WKH
,’RF(cid:3)W\SH(cid:15)(cid:3)VXUURXQGLQJ(cid:3)ILHOG(cid:3)PHQX(cid:3)RI(cid:3),’RF
W\SH(cid:3)HGLWRU
ª SAP AG 1999
n In the segment editor you assign a name to the field and enter a data element that describes the field
in the application (documentation). The editor calculates the necessary character length for the field
using the data element.
n Segment editor, transaction WE31.
n You build a complex data structure from the single segments in the IDoc type editor. There you
determine the order and the hierarchical relationship of the segments. In addition, you assign a status
(optional/mandatory) as well as the number of repetitions per segment and segment group.
The IDoc API tests that the generated program (outbound processing: SAP processing, inbound
processing: subsystem) conforms to these characteristics. Violations of these characteristics are
recorded through the IDoc status syntax error (outbound: 26, inbound 60).
n IDoc type editor, transaction WE30.
(C) SAP AG BC621 4-6
第 53 页 / 共 65 页
l
2XWERXQG(cid:3)SURFHVVLQJ(cid:3)XVLQJ
ª SAP AG 1999
(C) SAP AG BC621 4-7
K 0HVVDJH(cid:3)&RQWURO(cid:3)(cid:11)0&(cid:12)(cid:3)"
K $/((cid:3),QWHUIDFH(cid:3)(cid:11))0(cid:3)0$67(5B,’2&B’,675,%87((cid:12)"
l
,QERXQG(cid:3)SURFHVVLQJ(cid:3)XVLQJ
K %XVLQHVV(cid:3):RUNIORZ(cid:3)(cid:11)VLQJOH(cid:3)VWHS(cid:3)RU(cid:3)PXOWLVWHS(cid:3)WDVN(cid:12)(cid:3)"
K
3URFHVVLQJ(cid:3)7\SHV
$/((cid:3),QWHUIDFH(cid:3)(cid:11)IXQFWLRQ(cid:3)PRGXOH(cid:12)(cid:3)"
第 54 页 / 共 65 页
6WHSV(cid:3)IRU(cid:3)’HYHORSPHQW(cid:3)RI(cid:3)2XWERXQG(cid:3)3URFHVVLQJ
XVLQJ(cid:3)0&
l
&KHFNLQJ(cid:3)0HVVDJH(cid:3)&RQWURO(cid:15)(cid:3)WKDW(cid:3)LV(cid:15)(cid:3)WKH(cid:3)FRQQHFWLRQ
IRU(cid:3)WKH(cid:3)PHVVDJH(cid:3)GHIDXOW(cid:29)
ª SAP AG 1999
(C) SAP AG BC621 4-8
K &RQGLWLRQ(cid:3)WDEOH
K $FFHVV(cid:3)VHTXHQFH
K &RQGLWLRQ(cid:3)W\SHV
K 3URFHGXUH
K $SSOLFDWLRQ
l
,PSOHPHQWDWLRQ(cid:3)RI(cid:3)D(cid:3)IXQFWLRQ(cid:3)PRGXOH(cid:3)WKDW(cid:3)PDNHV
DSSOLFDWLRQ(cid:3)GDWD(cid:3)DYDLODEOH(cid:3)LQ(cid:3)(cid:5),’RF(cid:3)IRUPDW(cid:5)
l
’HILQLWLRQ(cid:3)RI(cid:3)DQ(cid:3)RXWERXQG(cid:3)SURFHVV(cid:3)FRGH
n The function module must adhere to the following interface:
• Import OBJECT like MC
CONTROL_RECORD_IN like EDIDC
• Export OBJECT_TYPE like WFAS1-ASGTP
CONTROL_RECORD_OUT like EDIDC
• Tables INT_EDIDD like EDIDD
• Exceptions ERROR_MESSAGE_RECEIVED
n The function module cannot transmit any explicit or implicit COMMITs.
n Function module, transaction SE80.
n Outbound process code, transaction WE41.
n For examples, see the appendix.
第 55 页 / 共 65 页
l
,PSOHPHQWDWLRQ(cid:3)RI(cid:3)D(cid:3)SURJUDP(cid:3)WKDW(cid:3)FDOOV(cid:3)WKH(cid:3)IXQFWLRQ(cid:3)PRGXOH
0$67(5B,’2&B’,675,%87((cid:17)(cid:3),QWHUIDFH
ª SAP AG 1999
(C) SAP AG BC621 4-9
K ,PSRUW 0$67(5B,’2&B&21752/(cid:3)OLNH(cid:3)(’,’&
K
’HYHORSPHQW(cid:3)6WHSV(cid:3)IRU(cid:3)2XWERXQG(cid:3)3URFHVVLQJ
XVLQJ(cid:3)WKH(cid:3)$/((cid:3),QWHUIDFH
7DEOHV &20081,&$7,21B,’2&B&21752/(cid:3)OLNH(cid:3)(’,’&
0$67(5B,’2&B’$7$(cid:3)OLNH(cid:3)(’,’’
l
)RU(cid:3)WKLV(cid:3)SURJUDP(cid:3)\RX(cid:3)KDYH(cid:3)WR(cid:3)GHILQH(cid:3)KRZ(cid:3)WKH(cid:3)FRQWURO(cid:3)ZRUNV(cid:15)
VSHFLILFDOO\(cid:15)(cid:3)LI(cid:3)WKH(cid:3)FRQWURO(cid:3)LV(cid:3)WR(cid:3)WDNH(cid:3)SODFH(cid:3)YLD(cid:3)D(cid:3)WLPH(cid:3)WDEOH(cid:15)
HYHQW(cid:3)RU(cid:3)GLDORJ(cid:3)VWHS(cid:17)
n The function module 0$67(5B,’2&B’,675,%87( has the following interface:
Ø
Import MASTER_IDOC_CONTROL like EDIDC
OBJ_TYPE like SERIAL-OBJ_TYPE
CHNUM like SERIAL-CHNUM
Ø
Tables COMMUNICATION_IDOC_CONTROL like EDIDC
MASTER_IDOC_DATA like EDIDD
Ø
Exceptions ERROR_IN_IDOC_CONTROL
ERROR_WRITING_IDOC_STATUS
ERROR_IN_IDOC_DATA
SENDING_LOGICAL_SYSTEM_UNKNOWN
n 1RWHV(cid:29)(cid:3)The import parameter OBJ_TYPE and CHNUM will be available for the ALE Serializing as
of Release 4.5.
n The program calling the function module MASTER_IDOC_DISTRIBUTE has to transmit a
COMMIT WORK. Otherwise it’s possible that the IDocs will not be sent but rather will remain in
the sending system.
第 56 页 / 共 65 页
’HYHORSPHQW(cid:3)6WHSV(cid:3)RI(cid:3),QERXQG(cid:3)3URFHVVLQJ(cid:3)XVLQJ
%XVLQHVV(cid:3):RUNIORZ
l
,PSOHPHQWDWLRQ(cid:3)RI(cid:3)D(cid:3)ZRUNIORZ(cid:3)WR(cid:3)FRQWURO(cid:3)LQERXQG
SURFHVVLQJ
7KLV(cid:3)LQFOXGHV(cid:29)
ª SAP AG 1999
(C) SAP AG BC621 4-10
K ’HILQLWLRQ(cid:3)RI(cid:3)REMHFW(cid:3)DQG(cid:3)PHWKRG(cid:11)V(cid:12)(cid:3)LQ(cid:3)%25
K ’HILQLWLRQ(cid:3)RI(cid:3)ZRUNIORZ
l
’HILQLWLRQ(cid:3)RI(cid:3)LQERXQG(cid:3)SURFHVV(cid:3)FRGH
n BOR - Business Object Repository, transaction SWO1 (Business Object Builder).
n Workflow, transaction PFTC until 4.0B, from 4.5 on transactions PFTC_INS, PFTC_CHG and
PFTC_DIS.
n Inbound process code, transaction WE42.
n For an example, see the appendix.
第 57 页 / 共 65 页
l
:ULWH(cid:3)IXQFWLRQ(cid:3)PRGXOH(cid:3)WKDW(cid:3)SRVWV(cid:3)WKH(cid:3),’RF(cid:3)DV(cid:3)DQ
DSSOLFDWLRQ(cid:3)GRFXPHQW
l
,PSOHPHQWDWLRQ(cid:3)RI(cid:3)D(cid:3)ZRUNIORZ(cid:3)WR(cid:3)VHQG(cid:3)PHVVDJHV(cid:3)LQ(cid:3)FDVH
RI(cid:3)HUURU(cid:17)(cid:3)7KLV(cid:3)LQFOXGHV(cid:29)
ª SAP AG 1999
(C) SAP AG BC621 4-11
K ’HILQLWLRQ(cid:3)RI(cid:3)REMHFW(cid:3)DQG(cid:3)PHWKRG(cid:11)V(cid:12)(cid:3)LQ(cid:3)%25
K
’HYHORSPHQW(cid:3)6WHSV(cid:3)IRU(cid:3),QERXQG(cid:3)3URFHVVLQJ(cid:3)XVLQJ
$/((cid:3),QWHUIDFH
’HILQLWLRQ(cid:3)RI(cid:3)ZRUNIORZ
l
0DLQWHQDQFH(cid:3)RI(cid:3)WKH(cid:3)FKDUDFWHULVWLFV(cid:3)IRU(cid:3)WKH(cid:3)IXQFWLRQ
PRGXOH(cid:3)IRU(cid:3)WKH(cid:3)$/((cid:3)&DOO
l
$OORFDWLRQ(cid:3)RI(cid:3)WKH(cid:3)IXQFWLRQ(cid:3)PRGXOH(cid:3)WR(cid:3)D(cid:3)ORJLFDO(cid:3)PHVVDJH
DQG(cid:3)WR(cid:3)DQ(cid:3),’RF(cid:3)W\SH(cid:3)IRU(cid:3)WKH(cid:3)$/((cid:3)&DOO
l
’HILQLWLRQ(cid:3)RI(cid:3)DQ(cid:3)LQERXQG(cid:3)SURFHVV(cid:3)FRGH(cid:3)DQG(cid:3)HVWDEOLVKLQJ(cid:3)D
FRQQHFWLRQ(cid:3)ZLWK(cid:3)WKH(cid:3)$/((cid:3)OD\HU
L Post application document: Function module, transaction SE80.
Ø Case 1: The function module uses an internal CALL TRANSACTION which triggers a COMMIT. In this
case you must display the ALE layer in the transaction BD51. The transaction uses internal function
modules IDOC_INPUT_OPEN and IDOC_INPUT_CLOSE, in order to write the IDoc status within the
LUW. In case of an error, foreground processing is possible using such a function module.
Ø Case 2: The function module uses internal APIs (Programming Interfaces) and does not release a COMMIT.
In case of an error, foreground processing is not possible using such a function module.
L Notification in case of error:
• BOR - Business Object Repository, transaction SWO1 (Business Object Builder).
• Workflow, transaction PFTC until 4.0B, from 4.5 on, transactions PFTC_INS, PFTC_CHG and
PFTC_DIS.
L Maintaining the characteristics of the function module: You must make the (technical program) characteristics
of the function module called by ALE known to the ALE layer, by using WUDQVDFWLRQ(cid:3)%’(cid:24)(cid:20).
L Assignment of the function module: The allocation of a function module to a business process, called by ALE,
has to be executed via WUDQVDFWLRQ(cid:3):((cid:24)(cid:26).
L Inbound process code and ALE Connection:
• The process code for the IDoc Interface is defined via WUDQVDFWLRQ(cid:3):((cid:23)(cid:21)(cid:17)
• As of this point, WUDQVDFWLRQ(cid:3)%’(cid:25)(cid:26) branches to establish the connection to the ALE layer. In case of an
error (IDoc trigger event) and the connection of IDoc and application document, information is stored in a
table.
L For examples, see the appendix.
第 58 页 / 共 65 页
2XWSXW(cid:3)’RFXPHQWDWLRQ(cid:3)RI(cid:3)1HZ(cid:3)’HYHORSPHQW
%HJLQ W\SHGHILQH(cid:3)VWUXFW(cid:3)HGLBGF
« ;0/ ^«‘
(QG HGLBGF
ª SAP AG 1999
n The documentation tools are started from the initial node of the IDoc Interface by selecting
’RFXPHQWDWLRQ(cid:17) In addition, the parser output format has its own menu point for record types as well
as IDoc types.
n Automatic formats are:
• Simple, readable with a parser begin..end-Declaration sequence.
C-header.
• Meta IDoc from type SYRECD01 (IDoc record types) or SYIDOC01 (IDoc types).
• Meta data for IDocs in XML format.
n Navigation-compatible formats are:
• The tree display in the R/3 System.
• HTML file (three files, the *_ f-file is the frame that should be loaded by the browser and the
index *_i and actual documentation *_d).
n Documentation, IDoc record types: Transaction WE61
n Documentation, IDoc types: Transaction WE60
n Documentation, IDoc type (parser): Transaction WE63
(C) SAP AG BC621 4-12
| 2XWSXW(cid:3)’RFXPHQWDWLRQ(cid:3)RI(cid:3)1HZ(cid:3)’HYHORSPHQW | |||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| %HJLQ | W\SHGHILQH(cid:3)VWUXFW(cid:3)HGLBGF | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| « | ;0/ | ^«‘ | |||||||||||||||||||||||||||||||||||||||||||||||||||
| (QG | HGLBGF | ||||||||||||||||||||||||||||||||||||||||||||||||||||
| ª SAP AG 1999 |
第 59 页 / 共 65 页
l
7KH(cid:3)GDWD(cid:3)VWUXFWXUH(cid:3)LV(cid:3)GHILQHG(cid:3)DV(cid:3)DQ(cid:3),’RF(cid:3)W\SH
l
’HSHQGLQJ(cid:3)RQ(cid:3)WKH(cid:3)SURFHVVLQJ(cid:3)FRXUVH(cid:3)DQG(cid:3)GLUHFWLRQ(cid:15)
GLIIHUHQW(cid:3)SURJUDPPLQJ(cid:3)WHPSODWHV(cid:3)FDQ(cid:3)EH(cid:3)XVHG
ª SAP AG 1999
(C) SAP AG BC621 4-13
K 2XWERXQG(cid:3)XVHV(cid:3)(cid:21)(cid:3)PHWKRGV(cid:29)
0HVVDJH(cid:3)&RQWURO(cid:3)DQG(cid:3)$/(
K
6XPPDU\
,QERXQG(cid:3)XVHV(cid:3)(cid:21)(cid:3)PHWKRGV(cid:29)
:RUNIORZ(cid:3)DQG(cid:3)$/(