bc621_en_46a_fv_010807[1] - sap idoc interface development
TRANSCRIPT
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 1/65
© SAP AG 1999
%&6$3,'RF,QWHUIDFH'HYHORSPHQW
%&%&
6$3,'RF,QWHUIDFH
'HYHORSPHQW
6$3,'RF,QWHUIDFH
'HYHORSPHQW
n R/3
n Release 4.6A
n October 1999
n Material Number 5003 5260
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 2/65
© SAP AG 1999
&RS\ULJKW6$3$*$OOULJKWVUHVHUYHG
1HLWKHUWKLVWUDLQLQJPDQXDOQRUDQ\SDUWWKHUHRIPD\
EHFRSLHGRUUHSURGXFHGLQDQ\IRUPRUE\DQ\PHDQV
RUWUDQVODWHGLQWRDQRWKHUODQJXDJHZLWKRXWWKHSULRU
FRQVHQWRI6$3$*7KHLQIRUPDWLRQFRQWDLQHGLQWKLV
GRFXPHQWLVVXEMHFWWRFKDQJHDQGVXSSOHPHQWZLWKRXWSULRU
QRWLFH
$OOULJKWVUHVHUYHG
&RS\ULJKW
7UDGHPDUNV
n Microsoft ®, Windows ®, NT ®, PowerPoint ®, WinWord ®, Excel ®, Project ®, SQL-Server ®,
Multimedia Viewer ®, Video for Windows ®, Internet Explorer ®, NetShow ®, and HTML Help ®are registered trademarks of Microsoft Corporation.
n Lotus ScreenCam ® is a registered trademark of Lotus Development Corporation.
n Vivo ® and VivoActive ® are registered trademarks of RealNetworks, Inc.
n ARIS Toolset ® is a registered Trademark of IDS Prof. Scheer GmbH, Saarbrücken
n Adobe ® and Acrobat ® are registered trademarks of Adobe Systems Inc.
n TouchSend Index ® is a registered trademark of TouchSend Corporation.
n Visio ® is a registered trademark of Visio Corporation.
n IBM ®, OS/2 ®, DB2/6000 ® and AIX ® are a registered trademark of IBM Corporation.
n Indeo ® is a registered trademark of Intel Corporation.
n Netscape Navigator ®, and Netscape Communicator ® are registered trademarks of NetscapeCommunications, Inc.
n OSF/Motif ® is a registered trademark of Open Software Foundation.
n ORACLE ® is a registered trademark of ORACLE Corporation, California, USA.
n INFORMIX ®-OnLine for SAP is a registered trademark of Informix Software Incorporated.
n UNIX ® and X/Open ® are registered trademarks of SCO Santa Cruz Operation.
n ADABAS ® is a registered trademark of Software AG
n The following are trademarks or registered trademarks of SAP AG; ABAP/4, InterSAP, RIVA, R/2,
R/3, R/3 Retail, SAP (Word), SAPaccess, SAPfile, SAPfind, SAPmail, SAPoffice, SAPscript,
SAPtime, SAPtronic, SAP-EDI, SAP EarlyWatch, SAP ArchiveLink, SAP Business Workflow, and
ALE/WEB. The SAP logo and all other SAP products, services, logos, or brand names includedherein are also trademarks or registered trademarks of SAP AG.
n Other products, services, logos, or brand names included herein are trademarks or registered
trademarks of their respective owners.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 3/65
© SAP AG 1999
%XVLQHVV,QWHJUDWLRQ7HFKQRORJLHV,,
Business IntegrationTechnology
¢ ¡ £ ¥ §
3 days
/HYHO /HYHO
Building EnterpriseSolutions with SAP
Components
¡ © § £
2 days
Data Transfer
¡ £
5 days
Programming withBAPIs in Visual Basic
¡ © ¥ §
5 days
R/3 Interface and BAPIProgramming in C++
¡ © ¥
5 days
Application LinkEnabling (ALE)Technology
¡ ¥
3 days
EDI Interface
¡ © £
4 days
! # % ' ( 0 2 %
5 ' 7 8 ' 0 @ @ B ! 8
D 0 # 0 G H9 2 3 I 0 ! 8 %
CommunicationInterfaces in ABAP
¡ §
2 days
Programming withBAPIs in JAVA
¡ © ¥
5 days
SAP IDoc Interface -Development
¡
1 day
SAP IDoc InterfaceTechnology
¡ £
2 days
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 4/65
© SAP AG 1999
&RXUVH3UHUHTXLVLWHV
l 5HFRPPHQGHG%DVLV%&$%$3
:RUNEHQFK%DVLFV
l 5HTXLUHG%DVLV%&,'RF,QWHUIDFH6WDQGDUG
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 5/65
© SAP AG 1999
7DUJHW$XGLHQFH
l $%$3'HYHORSHUV
l &RQVXOWDQWV
1RWHVWRWKHXVHU
n The training materials are QRWWHDFK\RXUVHOISURJUDPV7KH\FRPSOHPHQWWKHFRXUVH
LQVWUXFWRUVH[SODQDWLRQVOn the sheets, there is space for you to write down additional
information.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 6/65
(C) SAP AG BC621 1-1
© SAP AG 1999
l &RXUVH*RDOV
l &RXUVH2EMHFWLYHV
l &RXUVH&RQWHQW
l &RXUVH2YHUYLHZ'LDJUDP
l 0DLQ%XVLQHVV6FHQDULR
,QWURGXFWLRQ&RQWHQWV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 7/65
(C) SAP AG BC621 1-2
© SAP AG 1999
$WWKHFRQFOXVLRQRIWKLVFRXUVH\RXZLOOEHDEOHWR
l ([WHQG,'RFW\SHV
l 'HILQHQHZ,'RFW\SHV
&RXUVH*RDOV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 8/65
(C) SAP AG BC621 1-3
© SAP AG 1999
$WWKHFRQFOXVLRQRIWKLVFRXUVH\RXZLOOEHDEOHWR
l %XLOGDQGH[WHQGWKHGDWDVWUXFWXUHRI,'RFW\SHV
l 8VHWKH,'RFW\SHHGLWRUDQGVHJPHQWHGLWRU
l 8VHFXVWRPHUH[LWVWRSURFHVV,'RFW\SHV
&RXUVH2EMHFWLYHV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 9/65
(C) SAP AG BC621 1-4
© SAP AG 1999
8QLW Introduction
8QLW Development Environment for IDoc Types
8QLW Extension of IDoc Types
8QLW Development of IDoc Types
3UHIDFH
$SSHQGL[
&RXUVH&RQWHQW
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 10/65
(C) SAP AG BC621 1-5
© SAP AG 1999
¢ ¡ £ ¥ § © £ § ¡
! "
§ $ %
¡ £
' ¡
!
¥ § ¡ %
¡ £ 0 § ¥
§ 1 3 $
4
' 5 £
¡
4
§ ¡ § 0
§ 1 3 $
4
! "
§ $ %
¡ £
§ 0
§ 1 3 $
4
%&&RXUVH2YHUYLHZ'LDJUDP
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 11/65
(C) SAP AG BC621 1-6
© SAP AG 1999
(QWHUSULVHWUDGLQJFRPSDQ\$ZDQWV9HQGRU
%WRVKLSWKHLUPDWHULDORUGHUVYLD(',+HUUPDQQ5LHPHUZLOOGLHHQWVSUHFKHQGHQ
%HVWHOOXQJHQJOHLFKHOHNWURQLVFKYHUEXFKHQ
$OV*UXQGODJHZROOHQGLH8QWHUQHKPHQGHQ
,'RF7\S25'/*7YHUZHQGHQGHUDEHU
HYHQWXHOOQRFKGHQ%HGUIQLVVHQ
HQWVSUHFKHQGHUZHLWHUWZHUGHQPX$OV
3URMHNWWHDPPLWJOLHGLQIRUPLHUHQ6LHVLFKDOVR
EHUGLH(QWZLFNOXQJVP|JOLFKNHLWHQGLHGLH
,'RF6FKQLWWVWHOOHELHWHW
C D F F I Q D
S T U VS T U V
9HQGRU%(QWHUSULVHWUDGLQJ
FRPSDQ\$
6$356\VWHP6$356\VWHP
(',6XEV\VWHP(',6XEV\VWHP (',6XEV\VWHP(',6XEV\VWHP
6$356\VWHP6$356\VWHP
0DLQ%XVLQHVV6FHQDULR
n Enterprise trading company A wants vendor B to ship their material orders via EDI. Vendor B would
like to electronically update the placed orders immediately. As a basis for this transaction, A & Bintend to use IDoc type ORDLGT01. However, IDoc type ORDLGT01 needs to be extended to meet
their needs. Your task as a member of the project team is to research the possibilities of the
development of the IDoc Interface.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 12/65
(C) SAP AG BC621 2-1
© SAP AG 1999
l 'DWD6WUXFWXUHV
,'RF5HFRUG7\SHV
,'RF7\SHV
,'RF6HJPHQWV
l 'HYHORSPHQWDQG([WHQVLRQ
'HYHORSPHQW(QYLURQPHQWIRU,'RF7\SHV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 13/65
(C) SAP AG BC621 2-2
© SAP AG 1999
l 8QGHUVWDQGWKHGHYHORSPHQWHQYLURQPHQWIRU,'RF
W\SHV
l 'HVFULEHWKHIXQFWLRQDOLW\RIWKHGHYHORSPHQW
HQYLURQPHQWIRU,'RFW\SHV
l ([SODLQWKHGLIIHUHQFHEHWZHHQGHYHORSPHQWDQG
H[WHQVLRQV
&RXUVH2EMHFWLYHV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 14/65
(C) SAP AG BC621 2-3
© SAP AG 1999
¡¢ ¤ ¦ ¨ ¤ ¨ ¢
" $ ¨ & ( ¢ ¤
2 ¢ " ¦ ¨ ¢ ( ¢ ¤
8¨
¦ ¡ ¨ @ B & D
2 E ¤ ¢ D ¨ ¢ ¨
8
¡ ¨ @ B & D
" $ ¨ & ( ¢ ¤
¨ 8 ¡ ¨ @ B & D
&RXUVH2YHUYLHZ'LDJUDP
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 15/65
(C) SAP AG BC621 2-4
© SAP AG 1999
P ¢ ¤ ¨ ¢ ( ¨ $
R¦ ¨ S ¦ T (
U & ¨ ¦ ¤
V D ¢ D D X ¨ ¦ `
8
$ ¨ b
P ¢ ¤ ¨ ¢ ( ¨ $
,'RF,QWHUIDFH
$SSOLFDWLRQ
e
S ( ¢ ¤
¤B &
e
S ( ¢ ¤
¡ ¨ @ B &
e
S ( ¢ ¤
¢T (
&RPSRQHQWVRIWKH,'RF3URFHVV
n The IDoc Interface consists of a data structure (the IDoc type) and process programs for this data
structure.
n The Subsystem Interface is built through the data structure.
n The process programs are inserted between SAP application and interface.
• In outbound processing you should be able to read the master and movement data as well as be
able to format it into an IDoc format.
• In inbound processing you can generate or change application data from the IDoc format.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 16/65
(C) SAP AG BC621 2-5
© SAP AG 1999
&RQWURO5HFRUG
'DWD5HFRUGV
IDoc IDPartner
IDoc Type and Logical MessageExternal Structure
Control Part Application Data
6WDWXV5HFRUGV IDoc IDStatus Information
,'RF5HFRUG7\SHV
n Every IDoc in the SAP database consists of:
• One control record,
• Data records, containing the application data in the segments describing the hierarchy. These
segments are in a hierarchy sequence,
• Status records, which monitor specific IDoc steps. The further the IDoc is in its process the more
status records it has.
n An IDoc that has been exchanged with an external system, will only contain
• The control record and
• The data records.
n If the external system communicates the status of the sending IDoc with the R/3 System, this can becarried out with a status confirmation. The R/3 System connects the received status records to the
corresponding outbound IDoc in the database. The R/3 System can also transmit status confirmations
about IDocs received. This, however, can only happen through the specific IDoc type SYSTAT01,
that is, the control and data records are exchanged here. In this case, the status information is
therefore contained in the IDoc data records.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 17/65
(C) SAP AG BC621 2-6
© SAP AG 1999
,'RF7HUPV%DVLF7\SHDQG([WHQVLRQV
%DVLF7\SH%DVLF7\SH
,'RF7\SH,'RF7\SH
%DVLF7\SH%DVLF7\SH
,'RF7\SH,'RF7\SH
([WHQVLRQ([WHQVLRQ
n The IDoc type is a hierarchy consisting of segments and complex data structures which can receive
an application document
n There is a formal distinction between basic types and extensions
n The specific document in "IDoc format" is called an IDoc and has a specific IDoc type.
n An extension expands a basic type (SAP standard) by a customer specific segment, which are
directly or indirectly dependent of basic type segments. The segments of the basic type are
represented by the roots and the sub-trees, formed by the customer segments.
n The control record identifies the IDoc type using the following fields:
IDOCTYP Name of the basic type
CIMTYP Name of extension
n Examples:é IDoc type ORDERS01 from standard system, not extended:
The field IDOCTYP has the value ORDERS01
The field CIMTYP is empty
é IDoc type ORDERS01 from standard system, extended by customers:
The field IDOCTYP has the value ORDERS01
The field CIMTYP has the value of the name of the extension
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 18/65
(C) SAP AG BC621 2-7
© SAP AG 1999
,'RF7HUPV6HJPHQW
6HJPHQWW\SH SDUWQHUFFFFF
6HJPHQWW\SH
SDUWQHUFFFFF
6HJPHQWQDPH SDUWQHUFFFFF
6HJPHQWQDPH
SDUWQHUFFFFF
6HJPHQWQDPH
SDUWQHUFFFFF
6HJPHQWW\SH(FFFFF6HJPHQWW\SH(FFFFF
6HJPHQWQDPH(FFFFF
6HJPHQWQDPH
(FFFFF
6HJPHQWQDPH
(FFFFF
6HJPHQWQDPH
(FFFFF
6HJPHQWQDPH
(FFFFF
6HJPHQWQDPH
(FFFFF
Version 1e.g. 3.0A
Version 2e.g. 3.0C
f ¦ D ¨ ¢ h p
e.g.7.7x
6HJPHQWQDPH
SDUWQHUFFFFF
n A segment consists of one
Í SAP release independent segment type
Í At least one SAP release dependent segment name (segment definition)
n Segment types are structures in the dictionary. They are used as internal names in the SAP System.
n An external system, for example an EDI subsystem, can recognize the version of the current segment
by the segment name.
n Segment types are a maximum of 27 digits. Segment names are derived from the segment types by
adding 3 digits (starting with 000). The naming conventions are preserved through the IDoc
definition tools.
n SAP segments differ from this rule:
é Segment types start with “E1”, segment names with “E2“ and additionally have a version number.
é The customer can also use the namespace "Z1"/ "Z2" or a customer prefix. Partners always use a
prefix.
n All segment fields are of type CHAR. Thus all SAP data types with similar characters are permitted,
for example NUMC or CLNT.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 19/65
(C) SAP AG BC621 2-8
© SAP AG 1999
l %\UHOHDVLQJVHJPHQWVDQG,'RFW\SHVWKHH[WHUQDOLQWHUIDFHLVIUR]HQDQGJLYHQXQLTXHQDPHVIRU
WKHVHREMHFWVIRUDQH[WHUQDOSDUWQHUV\VWHP
l 7KHUHFDQRQO\EHRQHVHJPHQWYHUVLRQIRUHDFK6$3
UHOHDVHIRUH[DPSOH%
l 7KH,'RFGHILQLWLRQWRROVFRQWUROWKHUHOHDVH$IWHU
HDFKUHOHDVHIXUWKHUGHYHORSPHQWOHDGVWRQHZ
YHUVLRQV
l&KDQJHVPXVWEHPDGHLQDFFRUGDQFHZLWKVWULFWUXOHVVRWKDWWKHLQWHUIDFHUHPDLQVFRPSDWLEOH
,'RF)XQFWLRQV5HOHDVHDQG9HUVLRQ&UHDWLRQ
r
The version of an IDoc type or segment is created at a maintenance level. The last version remains the current one in all
following maintenance levels. The current version is only replaced by the development of a new version.r
All old versions remain in the system so that it is possible to reduce the current version to an older version at any time. This
enables the subsystems to be kept compatible even after an upgrade.
r
Segment version:
é New fields can only be added to an existing segment.
é By doing this the structure of segment types gets extended.
é A new segment name is formed.
r
Version of an IDoc type:
é You may only add new segments.
é A new IDoc type is created.é A new version of an existing segment alone does not lead to a new version of IDoc type.
r
1RWHIRURXWERXQGSURFHVVLQJ In the partner profiles the versions are listed as follows:
é IDoc type: By entering the IDoc type.
é Segment: By entering a SAP release. This leads to the reduction of all segments which are used in the IDoc type to an
older version, that is, to the current version stated in the release. If the field remains empty, the current version of all
segments relating to the current release is used.
r
1RWHIRULQERXQG3URFHVVLQJNo settings are necessary or possible. The IDoc Interface recognizes the version and
processes the data accordingly.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 20/65
(C) SAP AG BC621 2-9
© SAP AG 1999
$%$33URJUDPPLQJ1DPHV
st u w x t x t x
(','&
w w x t x
(','6(',B'6
w x t x
(',''GLVSOD\HGDVDVHJPHQWWUHH
(7/680
(+'$'5
(,76&+
(+''2&
(,7'2&
j k l
no# j
k l
(,76&+
C 5
(,7'2&
M 1
C 99
M 1
C 5
C 1
,'RF7\SH
n ABAP programming exclusively uses the segment types of the segments, for example in the
TABLES statement.
n Segment types implemented in the SAP standard system start with prefix "E1".
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 21/65
(C) SAP AG BC621 2-10
© SAP AG 1999
6XEV\VWHP1DPHV
st u w x t x t x
(',B'&
w w x t x
(',B'6
w x t x
GLVSOD\HGDVDVHJPHQWWUHH
(7/680
(+'$'5
(,76&+
(+''2&
(,7'2&
j k l
no# j k l
(,76&+
C 5
(,7'2&
M 1
C 99
M 1
C 5
C 1
,'RF7\SH
n The segment names of the segments are exclusively visible by the subsystem.
n Segment names implemented in the SAP standard system start with prefix "E2".
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 22/65
(C) SAP AG BC621 2-11
© SAP AG 1999
,'RF'HILQLWLRQ7RROV
,'RF7\SH(GLWRU
z | }
(+''2&6HJPHQWHGLWRU
z | ~
n Design and definition of IDoc types and their segments are supported by the IDoc definition tools
through the following:
• Testing of the formal design rules
• Simple usage in application of an ABAP development workbench
n The IDoc type editor allows:
• Definition of basic types (possible through SAP, partners and customers)
• Definition of extensions (only possible through customers)
n The segment editor permits the definition of segments for later use in the IDoc type editor.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 23/65
(C) SAP AG BC621 2-12
© SAP AG 1999
:KHQLV:KLFK$FWLRQ1HFHVVDU\"
J7KH,'RFW\SHUHTXLUHGLVDYDLODEOHDQGPHHWVDOOUHTXLUHPHQWV
1RDFWLRQQHHGHG
K 7KH,'RFW\SHUHTXLUHGLVSUHVHQWEXWGRHVQRWPHHWDOO
UHTXLUHPHQWV
$FWLRQ&XVWRPHUH[WHQVLRQ
L 7KH,'RFW\SHUHTXLUHGLVQRWDYDLODEOHRULW SUHVHQWEXW
GRHVQRWPHHWDOOWKHUHTXLUHPHQWV
$FWLRQ'HYHORSPHQW
n The customer extension, that is, the development of an extension does not represent a modification.
Since all actions are captured in their own namespace, the extension can automatically be expandedto new versions of the extended IDoc type.
n The customer development is totally independent of the standard. The necessary processes can easily
be activated as table entries using the process codes.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 24/65
(C) SAP AG BC621 2-13
© SAP AG 1999
l $Q,'RFW\SHLVDFRPSOH[GDWDVWUXFWXUHFRPSRVHGRIVHJPHQWV
l 6HJPHQWW\SHVDUHVWUXFWXUHVLQWKH$%$3GDWD
UHSRVLWRU\
l ,'RFW\SHVDQGWKHLUSURFHVVLQJFDQEHH[WHQGHGLQ
WKHDSSURSULDWHSRVLWLRQVE\FXVWRPHUV
6XPPDU\
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 25/65
(C) SAP AG BC621 3-1
© SAP AG 1999
l ([WHQVLRQRIWKHGDWDVWUXFWXUH
l ([WHQVLRQRIRXWERXQGSURFHVVLQJ
l ([WHQVLRQRILQERXQGSURFHVVLQJ
([WHQVLRQRIDQ,'RFW\SH
n We will consider the outbound order processing (enterprise trading company A is placing an
electronic order with vendor B) as well as the sales order (order being electronically processed by thecustomer service department of vendor B).
n The course uses a sample IDoc type (ORDLGT01) for purchase orders and sales orders. This IDoc
type only consists of a segment for the document header and the item. The course does not correct
any errors in order to emphasize all important aspects of the IDoc type extensions.
n The IDoc type ORDLGT01 with logical message ORDLGT does not support transmission of
specialists name or delivery conditions. In this lesson, this information will be added to the IDoc
type.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 26/65
(C) SAP AG BC621 3-2
© SAP AG 1999
l &UHDWH,'RF6HJPHQW
l ([WHQGDQ,'RF7\SH
l ,PSOHPHQWDFXVWRPHUH[LWLQRXWERXQGSURFHVVLQJ
l ,PSOHPHQWDFXVWRPHUH[LWLQLQERXQGSURFHVVLQJ
&RXUVH2EMHFWLYHV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 27/65
(C) SAP AG BC621 3-3
© SAP AG 1999
&RXUVH2YHUYLHZ'LDJUDP
¡ ¢ ¤ ¦ ¡ ¦ © ©
¦ " ¦ ¤ ¢ ¡ ¦ ©
¦ © " ' © ¡ ¦ © 0 '
¥ 2 3 4 ¢ ¦ 6
7 8 ¦ © 6 © 0
©̈ C 2 4 ¢ ¦
¦ " ¦ ¤ ¢ ¡ ¦ © 0
1 2 4 ¢ ¦
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 28/65
(C) SAP AG BC621 3-4
© SAP AG 1999
l 7KHFRGLQJSURYLGHGLQWKHVWDQGDUGV\VWHPIRU
SURFHVVLQJLVXVHG
l 'HYHORSPHQWVDQGFRUUHFWLRQVRIWKHFRGLQJ
GHOLYHUHGLQWKHVWDQGDUGV\VWHPDUHWKHUHIRUH
DXWRPDWLFDOO\DYDLODEOH
l ([WHQVLRQLVOHVVWLPHFRQVXPLQJWKDQQHZ
GHYHORSPHQW
$GYDQWDJHVRI&XVWRPHU(QKDQFHPHQW
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 29/65
(C) SAP AG BC621 3-5
© SAP AG 1999
l $GGLWLRQDOFXVWRPHUILHOGVDUHUHFRUGHGLQWKHLURZQ
FXVWRPHUVHJPHQWV
l &XVWRPHUVHJPHQWVGHSHQGRQ6$3VHJPHQWV
VXFFHVVRURUFKLOGUHODWLRQVKLSV
l 7KHSURFHVVLQJRIFXVWRPHUVHJPHQWVLVH[FOXVLYHO\
LPSOHPHQWHGLQWKHFXVWRPHUH[LWVRIWKHFRGLQJ
SURYLGHGLQWKHVWDQGDUGV\VWHP
%DVLF5XOHVIRU&XVWRPHU([WHQVLRQ
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 30/65
(C) SAP AG BC621 3-6
© SAP AG 1999
P Q © 2 © S V Q ¤ ¦
W ' Y ' ¡
` ¦ ¢ '
a Q 6 © ¦ 6 6 d ' f 0 ¤ i
P Q © 2 © S V Q ¤ ¦
,'RF,QWHUIDFH
$SSOLFDWLRQ
p ¦ Y ¡ ¦ ©
q 4 ¢ ¦
p ¦ Y ¡ ¦ ©
5 ¥ 2 A q 4 ¢ ¦
p ¦ Y ¡ ¦ ©
r ¡ ¦
l 'DWDVWUXFWXUHLQWKH:(',DUHDPHQX
l 2XWERXQGDQGLQERXQG
SURFHVVLQJ7\SLFDOO\WKURXJK
WUDQVDFWLRQ&02'RWKHUZLVH
WKURXJKLQGLYLGXDOWHFKQLTXH
l 'RFXPHQWDWLRQ,QWKH:(',
DUHDPHQX
$UHDVRI&XVWRPHU([WHQVLRQ
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 31/65
(C) SAP AG BC621 3-7
© SAP AG 1999
l &RPELQHWKHUHTXLUHGILHOGVDQGWKHLUGDWD
W\SHVLQWKHGLFWLRQDU\
l 'HILQLWLRQRIUHTXLUHGVHJPHQWV
VHJPHQWHGLWRU
l 'HILQLWLRQRIH[WHQVLRQ,'RFW\SHHGLWRU
l $VVLJQPHQWRIDORJLFDOPHVVDJHWRWKH
,'RFW\SHVXUURXQGLQJILHOGPHQXRI,'RF
W\SHHGLWRU
6WHSV)RU([WHQGLQJWKH'DWD6WUXFWXUH
n In the segment editor you assign a name to each field and enter a data element that describes the field
in the application (documentation). The editor calculates the necessary character length of the field inthe segment from the data element.
n Segment editor, transaction WE31.
n In the IDoc type editor you build a complex data structure from the single segments. In doing so the
order and the hierarchical relationships of the segments are documented. 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: SAP processing, inbound: 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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 32/65
(C) SAP AG BC621 3-8
© SAP AG 1999
l 'HILQLWLRQRIDSURMHFWSURMHFWPDQDJHPHQWDWWULEXWH
l &KRRVLQJWKHFRUUHFWFXVWRPHUH[LWV
SURMHFWPDQDJHPHQW6$3H[WHQVLRQV
l ,PSOHPHQWDWLRQRIWKHVHOHFWHGFXVWRPHUH[LWV
SURMHFWPDQDJHPHQWH[WHQVLRQFRPSRQHQWV
s
2XWERXQGSURFHVVLQJUHDGLQJRIWKH6$3GDWDEDVH
DQGGDWDLQ,'RFIRUPDW
s
,QERXQGSURFHVVLQJZULWLQJGDWDIURPWKH,'RFIRUPDWLQWRWKH6$3GDWDEDVH
l $FWLYDWHSURMHFWLQSURMHFWPDQDJHPHQW
6WHSVIRU([WHQGLQJ3URFHVVLQJ
n Project management, transaction CMOD, radio button $WWULEXWH
• Enter a project name and select &UHDWH
• Enter short text and select 6DYH
• Choose SAP Extensions.
n Project management, transaction CMOD, radio button 6$3([WHQVLRQV.
• Find customer exit through the development class (F4 Help).
• Select the required SAP extensions and choose &RS\
• Select 6DYHand return to the initial screen of the transaction (F3).
n Project management, transaction CMOD, radio button ([WHQVLRQFRPSRQHQWV.
• Select &KDQJH
• Position the cursor on a component and choose (GLWFRPSRQHQW .
• Double-click the include in the program editor and follow the instructions in the window. Before
saving the program, don’t forget syntax testing.
• Activate the project after returning to the initial screen of the transaction.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 33/65
(C) SAP AG BC621 3-9
© SAP AG 1999
2XWSXW'RFXPHQWDWLRQRIWKH([WHQVLRQ
%HJLQ
«
(QG
W\SHGHILQHVWUXFWHGLBGF
^«`
HGLBGF
;0/
n The documentation tools are started from the initial node of the IDoc Interface by selecting
'RFXPHQWDWLRQ In addition, the parser output format has its own menu point for record types as wellas 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
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 34/65
(C) SAP AG BC621 3-10
© SAP AG 1999
l $QH[WHQVLRQFDQEHOLPLWHGWRSURFHVVLQJ
l 1RUPDOO\DQH[WHQVLRQHQFRPSDVVHVWKHGDWD
VWUXFWXUHDVZHOODVWKHSURFHVVLQJ
l ([WHQGHGGDWDVWUXFWXUHVFDQEHFRPPXQLFDWHGWR
WKHVXEV\VWHPE\WKHGRFXPHQWDWLRQWRROV
6XPPDU\
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 35/65
(C) SAP AG BC621 3-11
([HUFLVHV
'DWD8VHGLQWKH([HUFLVHV
7UDLQLQJ6\VWHP7KHLQVWUXFWRUZLOOLQIRUP\RXIRUH[DPSOH,
&OLHQW7KHLQVWUXFWRUZLOOLQIRUP\RXIRUH[DPSOH
8VHU%&QQ
3DVVZRUG.856
3RUW68%6<67(0RI7\SH´'DWD´SUHSURJUDPPHG
'DWD 'DWDLQ7UDLQLQJ6\VWHP 'DWDLQ,'(66\VWHP
&XVWRPHU
Material SH-100 SH-100Vendor T-BILQQ 1014
Purchasing Organization 1000 1000
Purchasing Group 001 001
Plant 1100 1100
9HQGRU
Material SH-100 SH-100
Sold-to party T-BIKQQ 1110
Order Type TA
Sales Organization 1020 1020
Distribution Channel 22 22
Division 00 00
QQ is your group number
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 36/65
(C) SAP AG BC621 3-12
8QLW([WHQVLRQRIDQ,'RF7\SH
• Make preparations for the extension
In the scenario send a purchase order to vendor T-BILQQ. In the second
step make the purchase order the sales order from customer T-BIKQQ.
In order to keep the exercises manageable, the IDoc type ORDLGT01 has been
introduced with message ORDLGT. This is a simplification of SAP standard
ORDERS01 and is only used for this course.
1-1 Prepare via /RJLVWLFV!0DWHULDOVPDQDJHPHQW!3XUFKDVLQJ!3XUFKDVHRUGHU
!&UHDWH!9HQGRUNQRZQ (transaction ME21) a purchase order with your vendor
T-BILQQ for methanol, material number SH-100. You belong to purchasing
organization 1000 and the purchasing group is 001. The methanol is being
purchased for plant 1100.
A partner profile for your partner already exists. It ensures that the IDoc is written
in a file and thus receives the status 03.
1-2 You simulate the incoming orders via the LQERXQGPRGLILHGRXWERXQGILOH test
program from the purchase order. You can offer default values for source,
destination and port by choosing *RWR→ 8VHUVHWWLQJV and selecting the port
SUBSYSTEM for the test.
Enter the following values on the tab page 6HQGHU:
Recipient, Port: SAP<SID>, System ID of SAPsystem, for example SAPT80
Sender, Port: 68%6<67(0
Sender, partner number: 7%,. QQ
Sender, Partner type: .8
Sender, Partner function: $*
A corresponding inbound partner profile is already available. Select ([HFXWH. The
inbound IDoc generated gets status 51 with the error “document type NBunknown”.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 37/65
(C) SAP AG BC621 3-13
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRILQERXQGSURFHVVLQJ
• Get to know project administration
• Be able to write program code for inbound processing.
2-1 Extend the inbound processing of IDoc type ORDLGT01 to avoid errors status“51”. Change the received error document type NB in one of the customer exits to
document type TA expected by the sales order. There is no need to extend the IDoc
type.
2-2 Create the 3URMHFW%&QQ in the project administration (transaction CMOD).
Select the SAP extension %&(QQ for the project. Write the extension code in
the inbound component.
2-3 Now activate your project.
2-4 Repeat the inbound sales order process with the help of the test program ,QERXQG PRGLILHGRXWERXQGILOH 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%,. QQ
Sender, Partner type: .8
Sender, Partner function: $*
QQ is the number of your group (from 01 to 18)
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 38/65
(C) SAP AG BC621 3-14
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRIRXWERXQGSURFHVVLQJ
• Get to know project management
• Be able to write the program code for outbound processing
In exercise 1 the field for 6SHFLDOLVWQDPH remained blank, even though it
was defined in the IDoc type. Since it has been agreed with your partner
to transfer the field, you decide to take care of the field through a
customer exit. There is no need to extend the IDoc type.
3-1 Change the 3URMHFW%&QQ in the project management (transaction CMOD) or
create it for the first time (if you have not completed exercise 2). Select the SAP
extension %&(QQ for the project. Write the program code in the extension
component for the outbound processing.
3-2 Activate your project.
3-3 Now repeat the purchase order through /RJLVWLFV!0DWHULDOVPDQDJHPHQW!
3XUFKDVLQJ!3XUFKDVHRUGHU!&UHDWH!9HQGRUNQRZQ(transaction ME21) to
your vendor T-BILQQ for methanol, material number SH-100.
3-4 Change to 3XUFKDVHRUGHU→ 'LVSOD\. You can display the IDoc that was just
generated from the overview screen by choosing 6\VWHP→ /LQNV. Check that the
field with the user name has now been filled .
1RWH The number of filled fields is displayed in the bottom right area of the detail
display of a data record. It has increased to 8.
QQ is the number of your group (from 01 to 18)
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 39/65
(C) SAP AG BC621 3-15
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRIWKH'DWD6WUXFWXUH,'RF7\SH
• Know how to use IDoc type editor
Your IDoc type ORDLGT01 does not contain any fields in order to
transfer the document header delivery conditions. You have to extend the
data structure, that is, the IDoc type, since delivery conditions have been
agreed to with your partner.
4-1 First define the customer segment =,1&2QQ in the segment editor. Customer
segment Z1INCOnn is to contain application fields INCO1 and INCO2. In the
application both fields INCO1 and INCO2 are contained in the structure EKKO.
4-2 In the segment editor, test that your definition is correct. Ignore the warning that the
segment has not yet been released.
4-3 Define the extension =(;7(1QQin the IDoc type editor. Extend the basic IDoc
type ORDLGT01 by segment Z1INCOQQ.
4-4 Add to the logical message ORDLGT the basic type ORDLGT01 with the
extension ZEXTENQQ in the IDoc type editor.
4-5 In the IDoc type editor, test that your definition is correct. Ignore the warning that
the IDoc type as well as the segment Z1INCOQQ has not yet been released.
QQ is the number of your group (from 01 to 18)
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 40/65
(C) SAP AG BC621 3-16
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRI2XWERXQG3URFHVVLQJ
• Revise project management
• Revise programming of outbound processing
After you have completed exercise 4, extending the customer segment
Z1INCOQQ of the IDoc type, in order to transfer the delivery conditions,
you now have to enter the delivery conditions in the customer segment in
a customer exit.
5-1 Change the 3URMHFW%&QQ in the project management (transaction CMOD) or
create it for the first time. Select the SAP extension %&(QQ for the project.
Write the program code in the extension component for the outbound processing.
5-2 Activate your project.
5-3 In partner agreement for vendor 7%,/QQ, in the outbound parameter table changethe IDoc type from basic IDoc type 25'/*7to extension =(;7(1QQ
5-4 Now repeat the purchase order through /RJLVWLFV!0DWHULDOVPDQDJHPHQW!
3XUFKDVLQJ!3XUFKDVHRUGHU!&UHDWH!9HQGRUNQRZQ(transaction ME21) to
your vendor T-BILQQ for methanol, material number SH-100.
5-5 Change to 3XUFKDVHRUGHU→ 'LVSOD\. You can display the IDoc that was just
generated from the overview screen by choosing 6\VWHP→ /LQNV. Check if
customer segment Z1INCOQQ was created and filled. The IDoc has status 03, that is
a file was generated.
QQ is the number of your group (from 01 to 18)
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 41/65
(C) SAP AG BC621 3-17
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRI,QERXQG3URFHVVLQJ
• Revise project management
• Revise programming of input process
In exercise 4, after you extended IDoc type with customer segment
Z1INCOQQ 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%&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
PRGLILHGRXWERXQGILOH 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%,. 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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 42/65
(C) SAP AG BC621 3-18
6ROXWLRQV
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRI,QERXQG3URFHVVLQJ
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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 43/65
(C) SAP AG BC621 3-19
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRI2XWERXQG3URFHVVLQJ
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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 44/65
(C) SAP AG BC621 3-20
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRIWKH'DWD6WUXFWXUH,'RF7\SH
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 Z1INCOQQas child segment depends on standard segment
E1HEAD.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 45/65
(C) SAP AG BC621 3-21
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRI2XWERXQG3URFHVVLQJ
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 57
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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 46/65
(C) SAP AG BC621 3-22
8QLW([WHQVLRQRIDQ,'RF7\SH
7RSLF([WHQVLRQRI,QERXQG3URFHVVLQJ
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
78 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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 47/65
(C) SAP AG BC621 4-1
© SAP AG 1999
l 'HYHORSPHQWRIWKHGDWDVWUXFWXUH
l 3URFHVVLQJH[DPSOH
'HYHORSPHQWRI,'RF7\SH
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 48/65
(C) SAP AG BC621 4-2
© SAP AG 1999
l&UHDWH,'RFVHJPHQWV
l 'HYHORSQHZ,'RFW\SHV
l 7HPSODWHIRU,'RFRXWERXQGSURFHVVLQJ
l 7HPSODWHIRU,'RFLQERXQGSURFHVVLQJ
7RSLF2EMHFWLYHV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 49/65
(C) SAP AG BC621 4-3
© SAP AG 1999
¡ ¢ ¤ ¦ ¡ ¦ © ©
¦ " ¦ ¤ ¢ ¡ ¦ ©
¦ © " ( © ¡ ¦ © 1 (
) 3 5 ¢ ¦ 7
8 9 ¦ © 7 © 1
© 3 5 ¢ ¦
¦ " ¦ ¤ ¢ ¡ ¦ © 1
3 5 ¢ ¦
&RXUVH2YHUYLHZ'LDJUDP
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 50/65
(C) SAP AG BC621 4-4
© SAP AG 1999
l 6HJPHQWVDUHIRUPHGDVORJLFDOXQLWVEDVHGRQWKH
DSSOLFDWLRQILHOGV7KH\DUHUHXVDEOHPRGXOHVRI ,'RFGHYHORSPHQW
l 6HJPHQWJURXSVDUHIRUPHGDVORJLFDOXQLWVIURP
VHJPHQWV
l ,'RFW\SHVDUHGHULYHGIURPVHJPHQWVDQGVHJPHQW
JURXSV
7KH\DUHWKHGDWDVWUXFWXUHRIDQDSSOLFDWLRQGRFXPHQW
IRUWKHWUDQVPLVVLRQ
l
'XULQJGHYHORSPHQW,'RFW\SHVDUHFUHDWHGDVEDVLF,'RFW\SHV
l 7KHEXVLQHVVSURFHVVLWVHOILVQRWLGHQWLILHGWKURXJK
DQ,'RFW\SHEXWUDWKHUWKURXJKWKHORJLFDOPHVVDJH
%DVLF5XOHVIRU'HYHORSPHQW
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 lengthfor the field using the data element. ([DPSOHV
é 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”).
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 51/65
(C) SAP AG BC621 4-5
© SAP AG 1999
$SSOLFDWLRQQ R © 3 © T U R ¤ ¦
V ( W ( ¡
X ¦ ¢ (
` R 7 © ¦ 7 7 c ( e 1 ¤ h
Q R © 3 © T U R ¤ ¦
,'RF,QWHUIDFH
p
¦ W ¡ ¦ ©
q 5 ¢ ¦
p ¦ W ¡ ¦ ©
H 3 q 5 ¢ ¦
p
¦ W ¡ ¦ ©
t ¡ ¦
l
'DWDVWUXFWXUHLQWKH:(',DUHDPHQX
l 2XWERXQGDQGLQERXQG
SURFHVVLQJLQWKH2EMHFW
%URZVHU6(
l 'RFXPHQWDWLRQ
LQWKH:(',PHQX
$UHDVRI'HYHORSPHQW
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 52/65
(C) SAP AG BC621 4-6
© SAP AG 1999
l &RPELQHWKHUHTXLUHGILHOGVDQGWKHLUGDWD
W\SHVLQWKHGLFWLRQDU\
l 'HILQLWLRQRIUHTXLUHGVHJPHQWV
VHJPHQWHGLWRU
l 'HILQLWLRQRIEDVLF,'RFW\SHV
,'RFW\SHHGLWRU
l &UHDWLRQRIDORJLFDOPHVVDJHVXUURXQGLQJ
ILHOGPHQXRI,'RFW\SHHGLWRU
l $VVLJQPHQWRIDORJLFDOPHVVDJHWRWKH
,'RFW\SHVXUURXQGLQJILHOGPHQXRI,'RF
W\SHHGLWRU
6WHSVIRUWKH'HYHORSPHQWRID'DWD6WUXFWXUH
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 fieldusing 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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 53/65
(C) SAP AG BC621 4-7
© SAP AG 1999
l 2XWERXQGSURFHVVLQJXVLQJ
u
0HVVDJH&RQWURO0&"
u
$/(,QWHUIDFH)00$67(5B,'2&B',675,%87("
l ,QERXQGSURFHVVLQJXVLQJ
u
%XVLQHVV:RUNIORZVLQJOHVWHSRUPXOWLVWHSWDVN"
u
$/(,QWHUIDFHIXQFWLRQPRGXOH"
3URFHVVLQJ7\SHV
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 54/65
(C) SAP AG BC621 4-8
© SAP AG 1999
6WHSVIRU'HYHORSPHQWRI2XWERXQG3URFHVVLQJXVLQJ0&
l &KHFNLQJ0HVVDJH&RQWUROWKDWLVWKHFRQQHFWLRQ
IRUWKHPHVVDJHGHIDXOW
u
&RQGLWLRQWDEOH
u
$FFHVVVHTXHQFH
u
&RQGLWLRQW\SHV
u
3URFHGXUH
u
$SSOLFDWLRQ
l ,PSOHPHQWDWLRQRIDIXQFWLRQPRGXOHWKDWPDNHVDSSOLFDWLRQGDWDDYDLODEOHLQ,'RFIRUPDW
l 'HILQLWLRQRIDQRXWERXQGSURFHVVFRGH
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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 55/65
(C) SAP AG BC621 4-9
© SAP AG 1999
l ,PSOHPHQWDWLRQRIDSURJUDPWKDWFDOOVWKHIXQFWLRQPRGXOH
0$67(5B,'2&B',675,%87(,QWHUIDFH
u
,PSRUW 0$67(5B,'2&B&21752/OLNH(','&
u
7DEOHV &20081,&$7,21B,'2&B&21752/OLNH(','&
0$67(5B,'2&B'$7$OLNH(',''
l )RUWKLVSURJUDP\RXKDYHWRGHILQHKRZWKHFRQWUROZRUNV
VSHFLILFDOO\LIWKHFRQWUROLVWRWDNHSODFHYLDDWLPHWDEOH
HYHQWRUGLDORJVWHS
'HYHORSPHQW6WHSVIRU2XWERXQG3URFHVVLQJXVLQJWKH$/(,QWHUIDFH
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 1RWHVThe 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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 56/65
(C) SAP AG BC621 4-10
© SAP AG 1999
'HYHORSPHQW6WHSVRI,QERXQG3URFHVVLQJXVLQJ%XVLQHVV:RUNIORZ
l ,PSOHPHQWDWLRQRIDZRUNIORZWRFRQWUROLQERXQG
SURFHVVLQJ
7KLVLQFOXGHV
u
'HILQLWLRQRIREMHFWDQGPHWKRGVLQ%25
u
'HILQLWLRQRIZRUNIORZ
l 'HILQLWLRQRILQERXQGSURFHVVFRGH
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.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 57/65
(C) SAP AG BC621 4-11
© SAP AG 1999
l :ULWHIXQFWLRQPRGXOHWKDWSRVWVWKH,'RFDVDQ
DSSOLFDWLRQGRFXPHQW
l ,PSOHPHQWDWLRQRIDZRUNIORZWRVHQGPHVVDJHVLQFDVH
RIHUURU7KLVLQFOXGHV
u
'HILQLWLRQRIREMHFWDQGPHWKRGVLQ%25
u
'HILQLWLRQRIZRUNIORZ
l 0DLQWHQDQFHRIWKHFKDUDFWHULVWLFVIRUWKHIXQFWLRQ
PRGXOHIRUWKH$/(&DOO
l $OORFDWLRQRIWKHIXQFWLRQPRGXOHWRDORJLFDOPHVVDJHDQGWRDQ,'RFW\SHIRUWKH$/(&DOO
l 'HILQLWLRQRIDQLQERXQGSURFHVVFRGHDQGHVWDEOLVKLQJD
FRQQHFWLRQZLWKWKH$/(OD\HU
'HYHORSPHQW6WHSVIRU,QERXQG3URFHVVLQJXVLQJ$/(,QWHUIDFH
v
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.
v
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.v
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%'.
v
Assignment of the function module: The allocation of a function module to a business process, called by ALE,
has to be executed via WUDQVDFWLRQ:(.
v
Inbound process code and ALE Connection:
• The process code for the IDoc Interface is defined via WUDQVDFWLRQ:(
• As of this point, WUDQVDFWLRQ%' 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.
v
For examples, see the appendix.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 58/65
(C) SAP AG BC621 4-12
© SAP AG 1999
2XWSXW'RFXPHQWDWLRQRI1HZ'HYHORSPHQW
%HJLQ
«
(QG
W\SHGHILQHVWUXFWHGLBGF
^«`
HGLBGF
;0/
n The documentation tools are started from the initial node of the IDoc Interface by selecting
'RFXPHQWDWLRQ In addition, the parser output format has its own menu point for record types as wellas 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
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 59/65
(C) SAP AG BC621 4-13
© SAP AG 1999
l 7KHGDWDVWUXFWXUHLVGHILQHGDVDQ,'RFW\SH
l 'HSHQGLQJRQWKHSURFHVVLQJFRXUVHDQGGLUHFWLRQ
GLIIHUHQWSURJUDPPLQJWHPSODWHVFDQEHXVHG
u
2XWERXQGXVHVPHWKRGV
0HVVDJH&RQWURODQG$/(
u
,QERXQGXVHVPHWKRGV
:RUNIORZDQG$/(
6XPPDU\
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 60/65
(C) SAP AG BC621 5-1
$SSHQGL[
*ORVVDU\
Access An access identifies the document fields used by the system when searching for a
condition record.
Access sequence Sequence used by Message Control to access condition records when searching for
messages.
Basic type IDoc type supplied by SAP. Basic types can be modified by customers to create a
new, upward-compatible IDoc type.
Condition element Part of hierarchy which is examined when searching for a message. An example is
the output type which is at the top of this hierarchy: When a (new) purchase order is
posted, only the messages under the node for the message type NEW are searched.
Condition record Data record in which the key fields represent the condition under which the message
is "found". The remaining fields describe the message itself. Therefore, if one of thedata records transferred from the application matches these key fields, the message
is found and can then be processed (for example exported as a print form or as an
electronic message).
Control record The part of an IDoc which contains the data for identifying the sender and recipient,
as well as the structure of the IDoc itself. Each IDoc always has one control record.
Data record The part of an IDoc which contains the application data. An IDoc usually contains
more than one data record.
EDI = Electronic Data Interchange. EDI (for example of business documents) between
business partners, sometimes in separate countries, who may use different hardware,
software and communication services. The data is formatted according to specific
standards.EDI message Standard format for a business process (for example, a purchase order) to
be handled by EDI. Various EDI standards (EDIFACT or ANSI X12) candefine different EDI messages for the same business process.
EDI standard General format for data to be transferred electronically. An EDI standard generallycomprises:
o EDI syntax
o Data element service
o Message type service
The SAP standard ’IDoc’ is not yet an EDI standard, but can be compared to other
EDI standards.
EDI subsystem System which converts the SAP standard IDoc into an EDI standard (for example
EDIFACT, ANSI X12) and vice versa. In addition to this task (which is carried out
by the EDI subsystem convertor), there are also administration activities, for
example, archiving the transferred messages, and technical tasks, for example,
technical connection to the subsequent system and syntax checks for formats, to be
considered.
Field catalog Contains all fields which can be selected as key fields for condition tables in
Message Control.
File interface = port type “file”
Hierarchy level Determines the position of a segment in a tree segment. A segment carries business
data in an IDoc. Dependencies in the application data can be represented in this treestructure, that is, the various hierarchy levels.
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 61/65
(C) SAP AG BC621 5-2
IDoc interface Definition of formats (IDoc types, previously: intermediate structures) and methods
(port definitions) for electronic data exchange between SAP Systems and partner
systems.
IDoc type SAP format in which data for a business process is to be transferred. An IDoc is areal business process formatted according to a certain IDoc type.
Inbound processing Conversion and processing of data for a business process from the time the data is
received in IDoc format to the posting of the corresponding document(s) in the SAP
application.
Mandatory segment The part of an IDoc type which contains important application data and musttherefore exist in an IDoc for an actual business process.
Mapping Rules for assigning the data elements of an EDI message type to the fields of an
IDoc type.
Message Business process (for example, a purchase order), which is transferred in IDoc
format between an SAP System and an external system.
Message Control Module designed to offer interfaces for further processing for applications. This
includes descriptions of the various data configurations and the required actions. An
example of an action is printing a document at a certain time in German. The action
is triggered when the application transfers data which matches your configuration.Message determination A check to determine whether the application data matches the condition records
(specified in Customizing). If this is the case, one or more messages are "found" and
can then be processed (for example, sent electronically). In message determination, asearch is made for the condition records using a predefined hierarchy.
Message status record = MC record. Log record for the MC table which describes the send status of a
message in Message Control.
Notification If an error occurs (for example, an IDoc with incorrect syntax), a notification is sent
to one or more users. The users responsible are defined in the IDoc Interface or
indirectly via the organization model. Notifications are sent to the integrated inbox.
Optional segment Part of an IDoc type which can include additional, optional data about the business
process. The segment does not therefore have to appear in an IDoc for a specificbusiness process.
Outbound file Contains specific IDocs to be sent for port type “file”.
Outbound processing Conversion and processing of SAP document data from posting a document tosending the data in IDoc format.
Partner Communication partner for the IDoc Interface. Definition from Sales and
Distribution: "An individual within or outside of your own organization who is of
commercial interest and who can be contacted in the course of a business
transaction".
Partner profile Definition of the general conditions for electronic data interchange with a businesspartner via the IDoc Interface: which message is sent in which direction using which
method?
If a partner profile does not exist, communication with a partner via the IDoc
Interface is not possible.
Port Description of the channel used by the SAP system for communicating with the
external system during external data interchange. There are various technicalmethods for implementing this type of communication (port types). The selection of
the port type depends on the technical configuration of the external system.
Example: Most EDI subsystems read IDocs in the form of sequential files, that is,
the port type ’file’ is used.
Procedure A group of messages. A procedure is searched for messages which are to be
processed for the specified data configuration (for example, sent electronically or
printed).
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 62/65
(C) SAP AG BC621 5-3
Process code Another name for a defined processing type, for example a function module or an
SAP Business Workflow task. In contrast, a defined IDoc type (standard format for
data communication) is usually assigned to a certain process code. If the process
type for this IDoc type is to be changed, you should assign the correspondingprocess code to the new processing type. Without this process code, this IDoc type
must be assigned to the new processing code directly.
Record type An IDoc type consists of the following three record types:
• Control record
• Data record
• Status record
Segment Structure which includes the application data for an IDoc from the data records. As
a result, the data can be assigned to the correct application fields.
Status Processing status of an IDoc, either "generated" or "ready for sending".
An IDoc usually has several statuses which are stored in the status records and
reveal information about the IDoc history. The current (processing) status is alsostored in the control record for the IDoc.
Status confirmation Report from an external system about the processing status of business data receivedfrom the R/3 System in the form of status records. The status confirmation is added
to the IDoc in the R/3 System in the form of status records.
Status file File which contains the status records sent to the IDoc Interface by the EDI
subsystem for outbound messages.
Status group The status group contains several statuses ("milestones" in the process chain), so that
the monitoring programs only have to consider these groups and not each individual
status. Examples:
Group 3 = outbound: IDoc in the external system
Group B = inbound: IDoc sent to the application
Status record One of three record types in an IDoc (SAP standard format for electronic exchangeof application data).
Each status record contains a status which corresponds to one step in IDoc
processing. This means that the number of status records increases as the processing
continues.
Translator Converts internal data formats (IDocs) into EDI messages and vice versa. Thetranslator is a component of the EDI Subsystem.
Transmission file A data packet which contains the messages to be exchanged electronically. The
messages are EDI messages, that is, they are formatted according to an EDI standard
(for example EDIFACT).
The conversion of the SAP standard IDoc into the EDI standard is carried out by an
external system (EDI subsystem).
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 63/65
(C) SAP AG BC621 5-4
,PSRUWDQW0HQX3DWKV
$/(5HJLVWUDWLRQ
IDoc initial node: 'HYHORSPHQW → 0HVVDJH$SSOLFDWLRQREMHFW
$UFKLYLQJ7RROV→ $GPLQLVWUDWLRQ$GPLQLVWUDWLRQ→ 'DWDDUFKLYLQJ
0DLQWDLQLQJ$UFKLYLQJ6WDWXV
IDoc initial node: &RQWURO → 0DLQWDLQVWDWXVYDOXHV
,'RF$GPLQLVWUDWLRQ
IDoc initial node: &RQWURO → ,'RF$GPLQLVWUDWLRQ
'LVSOD\,'RF
IDoc initial node: ,'RF→ 'LVSOD\,'RF
,'RF,QLWLDO1RGH
7RROV→ %XVLQHVV&RPPXQLFDWLRQ,'RF→ ,'RF%DVLV
,'RF6WDWLVWLFV
IDoc initial node: ,'RF→ ,'RF6WDWLVWLFV
,'RF7\SH(GLWRU
IDoc initial node: 'HYHORSPHQW → ,'RFW\SHV
3DUWQHU3URILOH
IDoc initial node: ,'RF→ 3DUWQHUSURILOH
3RUW'HILQLWLRQ
IDoc initial node:,'RF→ 3RUW'HILQLWLRQ→ 0DLQWDLQ5)&GHVWLQDWLRQ
IDoc initial node: ,'RF→ ,'RFGHVWLQDWLRQ
6HJPHQW(GLWRU
IDoc initial node: 'HYHORSPHQW → ,'RFVHJPHQWV
3URFHVVLQJ7HVWV
IDoc initial node: 7HVW → PHQXRSWLRQDFFRUGLQJWRWKHUHTXLUHGIXQFWLRQ!
0HVVDJH$OORFDWLRQ±,'RF7\SH
IDoc initial node: 'HYHORSPHQW → ,'RFW\SHPHVVDJH
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 64/65
(C) SAP AG BC621 5-5
([DPSOHVIRU8QLW
([DPSOHV6WHSVIRUGHYHORSPHQWRIRXWERXQGSURFHVVLQJXVLQJ0&
3XUFKDVHRUGHU00
IDoc type ORDERS01
Logical message ORDERS
Function module IDOC_OUTPUT_ORDERS
Outbound process code: ME10
2UGHUFRQILUPDWLRQ6'
IDoc type ORDERS01
Logical message ORDRSP
Function module IDOC_OUTPUT_ORDRSP
Outbound process code: SD10
,QERXQGSURFHVVFRGH 7;7
([DPSOH'HYHORSPHQWVWHSVRILQERXQGSURFHVVLQJE\%XVLQHVV
:RUNIORZ7H[WPHVVDJHLQERXQGIDoc type: TXTRAW01
Logical message: TXTRAW
Object with method: IDOCTXTRAW.MAILCREATE
One-step task: TS30000008
Inbound process code: TXT1
7/30/2019 BC621_EN_46A_FV_010807[1] - SAP Idoc Interface Development
http://slidepdf.com/reader/full/bc621en46afv0108071-sap-idoc-interface-development 65/65
([DPSOHV'HYHORSPHQWVWHSVIRULQERXQGSURFHVVLQJXVLQJ$/(,QWHUIDFH
&XVWRPHURUGHU6'
Transaction VA01
IDoc type ORDERS01
Logical message ORDERS
Function module IDOC_INPUT_ORDERS
Inbound process code ORDE
Object with method IDOCORDERS.INPUTFOREGROUND
One-step task TS00008046
This function module starts the command CALL TRANSACTION and thus an implicit COMMIT WORK (case 1
in the slide). This is the ALE layer (transaction BD51). VA01 calls IDOC_INPUT_OPEN and
IDOC_INPUT_CLOSE in order to write the IDoc status in the same LUW (it is "ALE-compatible“). If errors
occur, foreground processing is possible.
2UGHUDFNQRZOHGJPHQW00
IDoc type ORDERS01
Logical message ORDRSP
Function module IDOC_INPUT_ORDRSP
Inbound process code ORDR
Object with method IDOCORDRSP.INPUTFOREGROUND
One-step task TS00008075
This function module uses APIs (not a transaction) and does not start a COMMIT WORK (case 2 on theslide). If errors occur, foreground processing is not possible.