Sie sind auf Seite 1von 67

File to IDOC Scenario

In this Scenario:
Get the Vendor Master Data from file and create a Vendor in R/3 System
Perquisites: Try creating a vendor in R/3 using transaction XK! and get list o" #andatory "ields to
$ave t$e source "ile structure% &ere 'e are using XI server as File Syste# and ID(S as R/3 Syste#%
T$e IDOC ty)e used is CR(*+S,
Exercise Steps:
!% Syste# -andSca)e .S-D/
0% Integration 1uilder: Design
3% Integration 1uilder: Con"iguration
,% Testing
Step 1: SLD
Create a Product and so"t'are Co#)onent "or File Syste#%
Create a T$ird Party Tec$nical and 1usiness Syste# "or File Syste#%
Create a 2e3 +S +1+P Tec$nical Syste# and 1usiness Syste# "or S+P R/3 Syste#
4o t$e transaction code 5SX*16IFR7 and go "or Syste# -andsac)e
8nder t$e So"t'are Catalog9 you $ave t$e o)tion to create t$e Product and So"t'are Co#)onent%
!.a/%Select t$e Product and go "or :e' Product ;ersion as s$o'n in t$e 3elo' screens$ot%
(nter t$e Product :a#e9 ;endor and ;ersion o" t$e Product%
4o "or Create
(nter t$e :on<S+P So"t'are 8nit :a#e and go "or Create
!.3/% De"ine your So"t'are Co#)onent:
!.c/ Create Tec$inical Syste#:
4o to t$e S-D $o#e)age 3y clic=ing on 5&o#e7 in t$e u))er corner
Select t$e Tec$nical Syste#s
4o to :e' Tec$nical Syste#
Since 'e are creating t$e Tec$nical Syste# "or File Syste#9 select t$e radio<3utton 5T$ird<Party7 and go
to :e>t
(nter t$e File Syste# :a#e and &ost :a#e and go "or :e>t
Select t$e Product and So"'are Co#)onent and go "or Finis$
T$e Tec$nical Syste#.ne' t$ird )arty syste# is created/
S'itc$ over to ta3 Installed Products o" your Tec$nical Syste#: &ere you can "ind your Product and
So"t'are Co#)onent
!.d/% To Create :e' 1usiness Syste#:T$ere are t'o 'ays o" creating 3usiness syste#
!% Fro# S-D &o#e Page9 you can select t$e 1usiness Syste# and create
2. T$e 3elo' #entioned 'ay is t$e second 'ay '$ere you can add t$e 3usiness syste# to your
tec$nical syste# 3y S'itc$ing over to ta3 1usiness Syste#s o" your Tec$nical Syste#% ?ou can
"ollo' eit$er o" t$e 'ays%
S'itc$ over to ta3 1usiness Syste#s o" your Tec$nical Syste# and go "or +dd :e' 1usiness Syste#
Select your Tec$nical Syste# "or t$e 3usiness syste# and )rovide t$e logical syste# na#e and go "or
:e>t and enter t$e 1usiness Syste# :a#e and go "or :e>t
Select you Product and So"t'are Co#)onent and go "or :e>t
(nter t$e related Integration Server and go "or Finis$
+s "ar as no' 'e $ave created t$e )roduct9 so"t'are co#)onent 9 "ile syste#7s tec$nical syste# and
3usiness syste#
!.e/% Create a 2e3 +S +1+P Tec$nical Syste# and 1usiness Syste# "or S+P R/3 Syste# :
4o to t$e S-D $o#e)age 3y clic=ing on 5&o#e7 in t$e u))er corner
Select t$e Tec$nical Syste#s
4o to :e' Tec$nical Syste#
Since 'e are creating t$e Tec$nical Syste# "or S+P R/3 Syste#9 select t$e radio<3utton 52e3 +S +1+P7
and go to :e>t
-ogon to (C@. S+P R/3 Syste# and go to Syste# <A Status and co)y t$e installataion nu#3er and
Data3ase &ost :a#e
ote: Please )rovide t$e details o" your relevant R/3 Syste# not t$e values #entioned in t$e screens$ot%
I" you $ave any dou3t in entering t$ese values you can a))roac$ your trainer%
(nter t$e R/3 Syste# :a#e% Installation and Data3ase &ost :a#e and go "or :e>t
(nter t$e *essage Server9 Port and Central +))lication Server details and go "or :e>t
(nter
t$e +))lication Server &ost :a#e and Instance :u#3er and go "or :e>t
+dd t$e client and t$e logical client na#e and go "or :e>t
Select your Product and So"t'are Co#)onent and go "or "inis$
!."/%To Create :e' 1usiness Syste#: Re"er to t$e )oint !.d/ in t$e sa#e docu#ent
Step !:
Inte"ration Repository # Desi"n:
I#)ort t$e So"t'are Co#)onent "ro# S-D
Create t$e :a#es)ace "or "ile to IDOC scenario
I#)ort t$e IDOC Cre#as3
0.a/% I#)ort t$e So"t'are Co#)onent "ro# S-D as "ollo's:
4o to Tools<A Trans"er "ro# Syste# -andsca)e Directory<AI#)ort So"t'are Co#)onent ;ersions
Select your so"t'are co#)onent "ro# t$e list and i#)ort
0.3/% T$e ne'ly created S2C s$ould a))ear in t$e le"t "ra#e% 4o to your S2C and create ne'
:a#es)ace
In our scenario 'e need to $ave connection 'it$ S+P R/3 Syste# to i#)ort t$e IDOC9 so '$ile creating
t$e na#es)ace select t$e radio 3utton 5I#)ort o" RFC and IDOC Inter"ace "ro# S+P Syste# Per#itted7%
(nter t$e S+P R/3 Syste# details li=e Syste#9 Client9 *essage Server and 4rou) and S+;(
0.3/% To I#)ort t$e IDOC CR(*+S3 "ro# your S+P R/3 Syste#9 go to 5I#)orted O3Bects7 in your
:a#es)ace%
Select t 5IDOCS7 and rig$t clic= on t$at
Select t$e I#)ort "ro# S+P O3Bects
(nter t$e details o" +))lication Server9 Syste# :u#3er9 8ser :a#e and Pass'ord o" t$e S+P R/3
Syste# and go "or continue and Select 5IDOC7 and (>)and
Searc$ your IDOC CR(*+S%CR(*+S3 and select it and go "or continue and Finis$
T$e IDOC got i#)orted in your :a#es)ace
0.c/% 8nder your na#es)ace in t$e le"t "ra#e9 e>)and t$e node
$Interface o%&ects'
Create ne' data ty)es%
Rig$t<clic= on CData typesD and select Ce(D% First 'e 'ill create a data ty)e called
C+ddress6DTD
0.d/% In t$e data ty)e editor9 create a structure "or t$e +ddress 'it$ t$e "our
String ele#ents Street9 City9 Ei)9 Country9 as s)eci"ied 3elo'%
Save t$e o3Bect%
0.e/% :o' create anot$er data ty)e called C;endor6DTD% Its structure s$ould 3e as "ollo's:
:ote t$at t$e +ddress6DT ty)e )reviously created is no' re"erenced "ro# t$e #ain data ty)e%
T$is is called nesting o" data ty)es% T$is is ac$ieved 3y selecting CSearc$ &el)D "ro# t$e
Dro)<do'n #enu in t$e CTy)eD colu#n% T$ere you 'ill 3e a3le to select any e>isting data ty)e in t$e sa#e
S2C%
0."/% Create *essage Ty)e
Create a ne' #essage ty)e called ;endor% In t$e le"t "ra#e9 rig$t<clic= on t$e node
C*essage Ty)esD and select C:e'D%
T$e na#e o" t$e #essage ty)e 'ill 3e C;endorD% Please note t$at t$e root ele#ent o" t$e
X*- 3usiness docu#ent needs to #atc$ t$e #essage ty)e e>actly .case<sensitive/%
For t$e section Cdata ty)e usedD you can go to t$e in)ut $el) .F,/ and c$oose your data
ty)e .;endor6DT/ "ro# t$ere% +s an alternative you can also drag and dro) t$e data ty)e
"ro# t$e le"t "ra#e .onto t$e icon 'it$ t$e $and/% *a=e sure t$at t$e na#es)ace is "illed
in correctly% Save t$e o3Bect%
0.g/% Create a C*essage Inter"aceD o3Bect ."ro# t$e le"t "ra#e/9 called C;endor6outD% T$e
inter"ace s$ould 3e out3ound and async$ronous% It s$ould re"erence your #essage ty)e
.drag and dro) or use F, $el)/%
Create a gra)$ical #a))ing 3et'een t$e custo# X*- #essage and t$e IDoc%
0.$/% (>)and t$e node C*a))ing O3BectsD% Create a C*essage *a))ingD o3Bect and na#e it
C;endor6CR(*+S3D%
?ou are no' in t$e gra)$ical #a))ing editor% T$e source #essage is on t$e le"t9 t$e target #essage on t$e
rig$t9 and t$e #a))ing rules at t$e 3otto#%
+s source #essage9 select your #essage ty)e C;endorD% ?ou can c$oose CSearc$ "or Re)ository o3BectD%
*a=e sure t$at you select your o'n S2C%
T$ere you 'ill 3e a3le to "ind your na#es)ace and #essage ty)e% +lternatively9 you can drag and dro)
your #essage ty)e onto t$is area o" t$e screen .onto t$e icon 'it$ t$e $and/%
+s target #essage9 select t$e CR(*+S%CR(*+S3 IDoc% +s a re#inder9 you can "ind t$e IDoc under
S2C CI#)orted O3BectsD%
0.i/% :o' t$at 'e $ave de"ined t$e source and target #essage9 'e can start de"ining t$e
*a))ing rules%
:ote: in order to get a larger 'or=ing area9 you can detac$ t$e 'indo' 3y clic=ing on t$e t$u#3nail in
t$e u))er rig$t corner%
*a) t$e "ields o" t$e source docu#ent to t$e equivalent "ields in t$e IDoc%
T$is can 3e ac$ieved easily 3y locating t$e target "ield in t$e IDoc structure and t$en drag<and<dro) "ro#
t$e source "ield to target "ield%
Please re"er to t$e ta3le 3elo' "or t$e #a))ing rules .seg#ents and "ields are sorted according to t$eir
order o" a))earance in t$e IDoc/%
Source "ield in ;endor Target "ield in CR(*+S3
;endor :u#3er (!-F+!* -IF:R
+ddress Country (!-F+!* -+:D!
-ast :a#e (!-F+!* :+*(!
+ddress City (!-F+!* ORT!
+ddress Ei) (!-F+!* PST-E
Searc$ Ter# (!-F+!* SORT-
+ddress Street (!-F+!* STR+S
;endor :u#3er (!-F+!* (!-F1!* -IF:R
;endor :u#3er (!-F+!* (!-F*!* -IF:R
Currency (!-F+!* (!-F*!* 2+(RS
T$is is a good ti#e to save your #a))ing%
:o' 'e $ave to assign constants to certain "ields and attri3utes in t$e IDoc ."or seg#ent Fuali"iers9
$ardcoded values and X*- attri3utes/% T$is can 3e ac$ieved 3y "ollo'ing t$e )rocedure 3elo'%
Dou3le<clic= on t$e target "ield in t$e IDoc% +t t$e 3otto# o" t$e screen9 select CConstantsD "ro# t$e
dro)<do'n list "or "unction ty)e% Clic= on t$e "unction CConstantD% :o' t$e Ce#)tyD constant a))ears in
t$e screen%
Dou3le<clic= on t$e Ce#)tyD constant and assign a s)eci"ic value%
Connect t$e constant to t$e target "ield%


Constant Target "ield in CR(*+S
T$is is a good ti#e to save your #a))ing again%
For t$e seg#ents (!-F1!* and (!-F*!* )lease assign an e#)ty constant% T$is is necessary 3ecause
t$ese seg#ents are o)tional in t$e IDoc%
+lt$oug$ so#e underlying "ields $ave already 3een #a))ed9 i" t$e )arent node is not e>)licitly used as
t$e target o" a #a))ing9 t$e seg#ent 'ill not 3e instantiated at all%
Finally9 rig$t<clic= on t$e seg#ent 5(DI6DC,7 and disa3le it .t$is seg#ent is #andatory 3ut 'ill 3e
"illed out auto#atically 3y t$e IDoc ada)ter/%
! CR(*+S3 IDOC 1(4I:
G (!-F+!* *S4F:
CO*P+:? (!-F+!* +:R(D
-I(F (!-F+!* KTOKK
! (!-F+!* (!-F1!* S(4*(:T
G (!-F+!* (!-F1!* *S4F:
3 (!-F+!* (!-F1!* 18KRS
3! (!-F+!* (!-F1!* +KO:T
+! (!-F+!* (!-F1!* FD4R;
! (!-F+!* (!-F*!* S(4*(:T
G (!-F+!* (!-F*!* *S4F:
3 (!-F+!* (!-F*!* (KOR4
Save your #a))ing%
0.B/% :o' you can test your #a))ing 3y selecting t$e CtestD ta3%
Fill in t$e "ollo'ing values in t$e X*- instance and clic= Ce>ecute #a))ingD% In t$e
Rig$t<$and side you s$ould see t$e IDoc )o)ulated 'it$ t$e a))ro)riate values%
:ote t$at all o)tional seg#ents and "ields o" t$e IDoc9 t$at 'ere not e>)licitly #a))ed9 'ere not
generated%
;endor :u#3er: 30HH .HH is your (#)ID nu#3er/
-ast :a#e I?our c$oiceA
Searc$ Ter# I?our c$oiceA
Currency 8SD
+ddress Street I?our c$oiceA
+ddress City I?our c$oiceA
+ddress Ei) I?our c$oiceA
+ddress Country 8S
Save t$e source X*- instance to t$e XI server directory% T$is 'ill 3e used later as a in)ut "ile "or testing%
Select CSource docu#ent vie'D%

&ig$lig$t t$e entire X*- docu#ent and co)y it to t$e cli)3oard%
O)en note)ad .on t$e 2TS session/9 )aste t$e cli)3oard and save t$e docu#ent to a "ile na#ed
CVendor))*xmlD on your "older C*y Docu#entsD on t$e server:
0.B/% Create an CInter"ace #a))ingD9 na#ed CVendor+o,t+-REM.S/3D% +ssign t$e "ollo'ing re"erences:
Source inter"ace: Vendor+o,t .your out3ound inter"ace/
Target inter"ace: -REM.S*-REM.S/3 .t$e IDoc "ro# t$e 3ase S2C/
.Select CRe"res$ Inter"acesD and assign your #a))ing )rogra#/
< *a))ing )rogra#: Vendor+-REM.S/3 .your #essage #a))ing/
Follo' t$e 3elo' #entioned ste)s to ac$ieve t$e inter"ace #a))ing
Finally9 in t$e le"t<$and "ra#e9 go to your c$ange list and activate it%
8ntil no' 'e $ave created t$e "ollo'ing o3Bects in t$e Integration Re)ository:
Data type: ;endor6DT .;endor data ty)e/%
Data type: +ddress6DT .:ested DT/%
Messa"e type: ;endor .;endor #essage ty)e/%
Messa"e interface: ;endor6out
Messa"e mappin": ;endor6CR(*+S3
Interface mappin": ;endor6out6CR(*+S3
Ste) 3: Inte"ration Directory
3%! Fro# t$e Integration 1uilder $o#e )age9 select CIntegration DirectoryD% T$is 'ill launc$ t$e Java 2e3
Start a))lication%
-og in 'it$ your user ID and )ass'ord "ro# t$e Integration Server
3%0 T$e "irst ste) is to create Con"iguration Scenario O3Bect
3%3 +dd your 5S+P 1usiness Syste#7 to your scenario
3%, Go to Ser0ice (itho,t partyD and rig$t<clic= on C1,siness SystemD
.ssi"n 1,siness System2D
3%, :o' create a Comm,nication -hannel% T$e co##unication c$annel is essentially t$e )$ysical
connectivity to/"ro# t$e a))lication syste#% T$is is '$ere t$e ada)ter con"iguration ta=es )lace% In t$is
case 'e need to con"igure t$e "ile ada)ter to )oll "or ne' "iles and send t$e# to t$e Integration Server%
In t$e 'iKard9 leave t$e Party na#e 3lan= and t$en select your o'n 3usiness syste#
8nc$ec= t$e 3o> CCreate Co##unication C$annels +uto#aticallyD% T$is service .3usiness syste#/
re)resents t$e legacy syste# '$ic$ 'ill 3e sending data as X*- "iles%
Note: In case your business system is not listed, a cache refresh is necessary. Close the wizard and use the
menu Environment / Clear S! data cache. "nce this is done by any user, the Inte#ration !irectory will
fetch all currently available business systems from the S!.
:o' create a comm,nication channel% T$e co##unication c$annel is essentially t$e )$ysical
connectivity to/"ro# t$e a))lication syste#% T$is is '$ere t$e ada)ter con"iguration ta=es )lace% In t$is
case 'e need to con"igure t$e "ile ada)ter to )oll "or ne' "iles and send t$e# to t$e Integration Server%
(>)and your service .Con"iguration Scenario/ and rig$t<clic= on CCo##unication
C$annelD
C:e'LD :a#e your co##unication c$annel% For t$e ada)ter ty)e9 use t$e F, $el) and select CFileD%
S)eci"y CSenderD since t$e ada)ter 'ill 3e sending #essages to t$e Integration Server%
S)eci"y t$e "ollo'ing )ara#eters: < Trans)ort Protocol: 3ile System 43S5 .:FS or FTP could 3e used/%
*essage Protocol: 3ile .you can )rocess t$e "ile as<is9 or convert a "lat "ile to X*-/%
+da)ter (ngine: Inte"ration Ser0er .t$is is '$ere you can c$oose 3et'een t$e central or local +da)ter
(ngine/%
For t$e File Syste# +ccess Para#eters9 enter t$e "ollo'ing:
Source Directory:/,sr/sap/trans/tmp/"ro,p))4 path of file 5
.+ttention: use C/D instead o" t$e 3ac=slas$ CMD used in 'indo's/
File :a#e: Vendor))*xml
Select File Ty)e C%inaryD%
(nter t$e "ollo'ing )rocessing )ara#eters:<
Fuality o" service: Exactly 6nce
Poll Interval .secs/:7////
.N:ote t$at t$e )oll interval is very $ig$ on )ur)ose9 in order to =ee) t$e a#ount o" #essages to a
#ini#u#9 "or training )ur)oses/%
< Processing #ode: delete .t$e "ile 'ill 3e deleted a"ter 3eing )rocessed/%
T$e sender "ile ada)ter is no' con"igured%
Save your co##unication c$annel%
3%O Receiver syste# Co##unication c$annel: .Select IDOC/
T$e receiver idoc ada)ter is no' con"igured%
3*7 Sender ."reement: T$is de"ines a 3inding 3et'een t$e co##unication c$annel you Bust created9 and
t$e out3ound inter"ace%
In t$e le"t "ra#e9 rig$t<clic= on CSender +gree#entD :e'
+s service9 select your 3usiness syste#%.no )arty/%
Select your inter"ace .Vendor+o,t/% *a=e sure t$at t$e correct na#es)ace is utiliKed%
In t$e screen C(dit Sender +gree#entD9 use F, $el) "or t$e Sender Co##unication
C$annel "ield% Select your co##unication c$annel
.Save and close/
3%P Fro# t$e le"t "ra#e9 create a ne' CRecei0er DeterminationD o3Bect% T$is is t$e #ain )art o" t$e
routing )rocess9 '$ere you assign a receiver "or your #essage%
Select your sender service and inter"ace
In t$e CCon"igured ReceiversD area9 c$oose t$e e>isting service "or t$e target R/3 syste#
R3+1.-8ED.c$ec= 'it$ instructor/% Save your receiver deter#ination%
(nter t$e sender "ile 3usiness syste# and t$e sender #essage inter"ace in t$e a3ove screen
Deter#ine your receiver syste#
3*9 In t$e "ollo'ing ste)s9 you 'ill create an CInterface DeterminationD o3Bect% :o' t$at 'e $ave
de"ined a receiver "or t$e #essage9 'e need to assign an in3ound inter"ace9 and an inter"ace #a))ing .i"
necessary/%
In t$e receiver deter#ination you Bust created9 $ave a loo= 3elo' at t$e area
CCon"iguration Overvie' "or Receiver Deter#inationD at t$e 3otto# o" your screen9 and $it
Refresh "or t$at t$e 3usiness syste# you assigned is dis)layed in t$at area as 'ell%
In t$e colu#n CReceiver .Partner/Service/D o)en t$e details 3y using t$e little triangle%
T$e entry C:ot de"inedD s$o's you t$at t$ere is no inter"ace deter#ination )resent% Rig$t<clic= on t$e
entry C:ot De"inedD and select Ce( SpecificD9 in order to create a ne' inter"ace deter#ination o3Bect%
?ou are no' in t$e screen C(dit Inter"ace Deter#inationD% In t$e section CCon"igured
In3ound Inter"acesD select t$e In3ound Inter"ace -REM.S*-REM.S/3 using F, $el)% ?ou #ig$t need
to select 3utton C.llD "or t$e inter"ace
-REM.S*-REM.S/3 to s$o'

.Since t$e so"t'are co#)onent t$is inter"ace 3elongs to #ay not 3e assigned to t$e 3usiness syste#/%+"ter
c$oosing-REM.S*-REM.S/39 t$e in3ound inter"ace is s$o'n in t$e inter"ace deter#ination%
+ #a))ing $as to 3e s)eci"ied since t$e sender inter"ace is di""erent "ro# t$e selected receiver inter"ace%
8se t$e F, $el) ne>t to t$e In3ound Inter"ace to select your inter"ace #a))ing%
2$en you are done9 )lease save t$e Inter"ace Deter#ination o3Bect%
3*: De"ine Receiver +gree#ent
T$is 'ill allo' you to assign a receiver co##unication c$annel to t$e receiver service/inter"ace you $ave
c$osen% 4o 3ac= to t$e #ain screen "or your receiver deter#ination%
In t$e area CCon"iguration Overvie' "or Receiver Deter#inationD at t$e 3otto# o" t$e screen9 $it
CRe"res$D% In t$e colu#n CReceiver +gree#ent .Co##unication C$annel/D rig$t clic= and select C:e'
S)eci"icD%
In t$e screen C(dit Receiver +gree#entD9 "or t$e "ield CReceiver Co##unication C$annelD use t$e in)ut
$el) .F,/9 and select t$e co##unication c$annel CIDoc6receiverD% T$is is a )rede"ined c$annel '$ic$ is
used "or all in3ound IDocs into t$e R/3 syste#%
Save t$e Receiver +gree#ent%
4o 3ac= to t$e #ain receiver deter#ination screen and re"res$% :o' your con"iguration is co#)lete%
1e"ore activating t$e o3Bects 'e need to set u) t$e in)ut "ile in t$e ne>t ste) .indeed9 as soon as your
sender co##unication c$annel is activated9 t$e )olling sequence o" t$e "ile ada)ter 'ill start
i##ediately/%
Step ; Q Testing
;*1 Find t$e "ile Vendor))*xml '$ic$ you $ad )reviously saved9 and co)y it to your s$ared "older grou)HH
on t$e XI server% Please note9 t$e na#e o" t$e "ile s$ould #atc$ e>actly '$at you $ave s)eci"ied in your
sender co##unication c$annel%
;*! :o' you can go 3ac= to t$e Integration Directory9 o)en your c$ange list and activate your o3Bects%
;*3 *onitor your directory% +"ter a "e' seconds your "ile
Vendor))*xml s$ould disa))ear% T$is #eans t$at t$e "ile ada)ter $as success"ully )rocessed it and t$e "ile
'as deleted%
;*; In S+P48I9 c$oose #onitoring Integration (ngine #onitoring .transaction S<M1+M6I/%
;*= C$oose CMonitor for >rocessed <ML Messa"esD% ?ou can "ilter using di""erent criteria9 "or e>a#)le
3y date and also 3y sender service ."ind your o'n 3usiness service na#e in t$e dro)<do'n list/% In t$e
#onitor9 your #essage s$ould a))ear 'it$ a c$ec=ered "lag .#essage )rocessed success"ully/% Fro# t$ere
you can also navigate to t$e IDoc ada)ter%
;*7 In t$e 3ac=end R/3 syste#9 go to transaction?E/= or 1D9@ and searc$ "or IDocs according
to t$e logical syste# na#e used 3y your sender% ;eri"y t$at your IDoc 'as )osted% I" everyt$ing goes 'ell9
t$e IDoc s$ould $ave status O3 .a))lication docu#ent )osted/% I" you e>)and t$e status record you 'ill see
t$e vendor nu#3er t$at 'as created% 2rite do'n t$e vendor nu#3er "or "uture re"erence%
,%P C$ec= in transaction M8/3 t$at your vendor 'as created%

Das könnte Ihnen auch gefallen