You are on page 1of 7

0NISCN

SAP Supplg Chcin - Home video





An SAP view of DI

8g
mmcnuel Hcdzipetros

0NISCN


Lost Rev|sed. 4/6/2005
$^P L0l vh|te Poper New.doc Poge 2 o 7
Contents

So what is this thing called EDI?.................................................................................................... 3
The big picture: a puzzle with many pieces................................................................................ 3
Just another pretty interface........................................................................................................ 4
Consistency and Flexibility..................................................................................................... 4
Bringing it home ......................................................................................................................... 4
Reach out and touch somebody .................................................................................................. 6
Wrapping up ........................................................................................................................... 7

Figures

Figure 1: Basic EDI processing flow.............................................................................................. 4
Figure 2: Inbound processing of EDI messages in SAP................................................................. 5
Figure 3: A birds eye view of Outbound EDI processing in SAP................................................. 6

0NISCN


Lost Rev|sed. 4/6/2005
$^P L0l vh|te Poper New.doc Poge 3 o 7
So whct is this thing cclled DI?
lt's not Rocket $c|ence. L0l, or L|ectron|c 0oto lnterchonge, |s no more thon whot |t oppeors to be. on
e|ectron|c exchonge o doto between d|erent computer sgstems.
ln the reo| wor|d, th|s meons thot e|ectron|c representot|ons o such bus|ness documents os
Purchose 0rders ond lnvo|ces ore exchonged between bus|ness portners through pr|vote or pub||c
networks |n o common|g occepted structured ormot.
L0l prov|des stondord messoge ormots to support th|s exchonge. These stondords ore mo|nto|ned
bg bod|es such os the ^N$l ^$C |^ccred|ted $tondords Comm|ttee o the ^mer|con Not|ono|
$tondords lnst|tutel, wh|ch governs the ^N$l ^$C l2 stondord used |n the U.$. ond Conodo, ond the
U. N. 0|rector|es or L|ectron|c 0oto lnterchonge or ^dm|n|strot|on, Commerce ond Tronsport, wh|ch
governs the UN/L0lf^CT stondord w|de|g used throughout most o the rest o the wor|d.
These messoge ormot stondords ore the stort|ng po|nt, the t|es thot b|nd portners together. L0l |s o||
obout bus|ness re|ot|onsh|ps ond oc|||tot|ng the exchonge o doto needed to run the bus|ness on
both s|des. 3ut no two compon|es do bus|ness |n the some wog, even |ong-t|me portners.
$o L0l stondords need to be |ex|b|e to occommodote un|que c|rcumstonces thot mog ex|st between
ong two portners. These occommodot|ons, o|ong w|th such th|ngs os tronsm|ss|on ond secur|tg
pro||es, ore worked out |n the portner ogreements negot|oted beore L0l tronsm|ss|ons beg|n. L0l |s
thus |ex|b|e enough to occommodote evergbodg's needs.
The good news obout L0l con be summed up |n two words. cons|stencg ond |ex|b|||tg.
7he big picture: o puzzle with mong pieces
^t |ts most bos|c, the p|eces needed or L0l ore os |||ustroted |n f|gure l. These |nc|ude..
^ sender bus|ness opp||cot|on sgstem to generote on e|ectron|c ||e or document.
^n L0l subsgstem to mop the extrocted ||e to on l2 messoge. ^n 0rder, or exomp|e, wou|d
be mopped to on 850.
^n e|ectron|c '0utbox' ond meons o tronsm|ss|on. Cho|ces |nc|ude.
o vo|ue ^dded Networks |v^Nsl.
o fTP or ^$2 |on L0l 'ort||ed' |ovor o fTPl ocross the |nternet.
^n e|ectron|c 'lnbox' ot the portner's end to rece|ve the sender's l2 messoge.
^n L0l subsgstem thot wou|d vo||dote the l2 messoge ond the sender ond convert the
messoge to o ||e ormot thot cou|d post to the rece|ver's opp||cot|on sgstem.
^ progrom or scr|pt to post the converted ||e to the rece|ver's opp||cot|on sgstem.
lon|tor|ng too|s ond reports ot everg cr|t|co| m||estone trock ond record the progress o the
document ocross the ent|re orch|tecture. These he|p |n |dent|g|ng prob|ems when theg occur.
Th|s |s the h|gh |eve| v|ew, c|eonsed o |ts techn|co| comp|ex|tg. for the overoge bus|ness user, the L0l
subsgstem ond |ts oct|v|t|es ore not os |mportont os |ts resu|ts. thot the number o messoges
rece|ved |s the some os the number o messoge sent, thot the doto theg corrg |s vo||d, ond thot the
messoges post correct|g to the correct opp||cot|on |n the rece|v|ng sgstem. |n other words, the
bus|ness process |s successu||g comp|eted.

0NISCN


Lost Rev|sed. 4/6/2005
$^P L0l vh|te Poper New.doc Poge 4 o 7
Figure 1: Basic EDI processing flow
Sender
Business App
Business
Document
Receiver
Business App
Business
Document
ED Subsystem ED Subsystem
Transmission ...
Sender
"Outbox".
Send.
Receiver
"Inbox".
Receive.
File extracted and
formatted by Sender
system
Receiver info confirmed,
document mapped to an
X12 message file. Sent
to "Outbox"
Picked up by from
"Inbox". Sender info
confirmed, document
mapped from an X12 to
Receiver system
document format.
Receiver file ready for
posting to local system.

1ust onother prettg interfoce
ln the $^P wor|d, L0l bo||s down to on |nteroce between $^P ond on L0l subsgstem. vh||e the ldoc
|nteroce |s o poweru| ond |mpress|ve L0l-|nsp|red messog|ng too| or exchong|ng doto w|th the
outs|de wor|d, $^P connot hond|e o|| o the tosks requ|red to support L0l.
for exomp|e, $^P hos no mopp|ng too|s to tronsorm on ldoc to on l2 messoge ond |t connot
monoge commun|cot|ons between portners, un|ess |t's commun|cot|ng w|th onother $^P sgstem.
lt con export ldocs or spec||c portners |n on ^$Cll ||e or v|o memorg through on RfC |Remote
funct|on Co||l to on externo| sgstem, |t con o|so tr|gger on L0l subsgstem. 3ut |t connot send on l2
messoge d|rect|g to o bus|ness portner w|thout extens|ve custom|zot|on.
Th|s |s true o vers|on 4.6C. The more recent vers|ons con hond|e mopp|ng ond commun|cot|ons
through $^P l |Lxchonge lnrostructurel, os we|| os o|| the other unct|ons trod|t|ono||g reserved or
the L0l subsgstem. 3ut thot's o subject or onother wh|te poper.
Consistencg cnd flexibilitg
The beoutg o $^P's opprooch |s |n |ts |nterno| cons|stencg. the ldoc |nteroce o|wogs works the
some. o|wogs o||ows the some process|ng sequence, regord|ess o unct|ono| oreo or opp||cot|on,
o|wogs prov|des the some stondord too|s or process|ng, report|ng ond mon|tor|ng o ldocs.
vhen on ldoc posts to o tronsoct|on, |t o|wogs co||s stondord $^P doto |ood progroms, |nvok|ng o||
the stondord or custom bus|ness ru|es thot hove been bu||t |nto the opp||cot|on |tse|, os | o user
were monuo||g creot|ng the some document.
Th|s cons|stencg |s morr|ed to o h|gh degree o |ex|b|||tg. the ldoc con be extended or reduced to
occommodote spec|o| c|rcumstonces, user ex|ts con be coded to enorce custom vo||dot|ons or ru|es
beore the ldoc posts, custom ldocs con be creoted ond con|gured, ond custom unct|ons con be
wr|tten to process stondord or custom ldocs.
8ringing it home
Let's toke o qu|ck tour o the |nbound L0l process |n on $^P env|ronment.
lnbound process|ng beg|ns w|th the rece|pt o on L0l messoge rom the portner.
The L0l odopter |n the subsgstem vo||dotes the l2 messoge, tronsorms |t to on lL ormot
ond posses the lL to on $^P odopter.
0NISCN


Lost Rev|sed. 4/6/2005
$^P L0l vh|te Poper New.doc Poge 5 o 7
Figure 2: Inbound processing of EDI messages in SAP
EDI Subsystem
Confirms Partner send/
receive & connect info,
security profile, handles
acknowledgements
IDoc
Adapter
Maps
XML to
Idoc calls
R3
XML
SAP Environment
Idoc
VAN
Partner
Partner
Partner
FTP
AS2
In file or pass through
API via direct ALE call
Call Idoc
Interface
Validated against
Partner Profile
Create Idoc on
DB: status = 64
Inbound Hold
Run pgm
RBDAPP01
Standard functions provide
interface services
Can post immediately if set in
Partner Profile
Determines business function,
applies custom validations in user
exits, posts to transaction
invoking all built-in business rules.
Bus Doc
Created/Saved
EDI
Adapter
Map,
transform,
X12 to
XML


The $^P odopter tronsorms the lL to on ldoc comp|ete w|th contro| segment doto thot
|dent||es the portner, messoge ond other sgstem porometers necessorg to process the ldoc.
The ldoc |s sent |nto $^P where |t tr|ggers ldoc |nteroce process|ng.
$^P |dent||es the ldoc ond con|rms |ts portner |normot|on ogo|nst the Portner Pro||e.
The ldoc |s then wr|tten to the ldoc dotobose ot stotus 64, con|rm|ng thot the ldoc possed o||
sgstem checks ond |s reodg to be possed to the bus|ness opp||cot|on or process|ng.
The ldoc wo|ts ot stotus 64 unt|| o progrom |s k|cked o to tr|gger bus|ness opp||cot|on
process|ng. The progrom con be set to tr|gger outomot|co||g on rece|pt but |t's usuo||g best to
botch up the ldocs ond process them o|| ot once ot set t|mes.
The sgstem |dent||es the correct post|ng progrom or the ldoc rom doto |n the Contro|
$egment ond Portner Pro||e. ^ process code |n the Portner Pro||e ||nks the ldoc lessoge
Tgpe or thot portner to o unct|on thot w||| post the ldoc.
$tondord $^P progroms ore used to post the ldoc. These progroms enorce the bus|ness ru|es
wr|tten |nto the opp||cot|on ogo|nst the doto com|ng |n through the ldoc.
Post|ng o the bus|ness document through the ldoc o|so tr|ggers ong o||ow-on process|ng
normo||g tr|ggered bg monuo| creot|on o the document or bus|ness object.
l the post|ng succeeds, the ldoc returns stotus 53 ond the ldoc's ||ecgc|e |s over.
l the post|ng o||s, the ldoc returns stotus 5l ond on error messoge |dent|g|ng the source o
o||ure. $omet|mes, these messoges ore even |normot|ve. Theg con usuo||g serve ot |eost os
o stort|ng po|nt |n |gur|ng out whot went wrong.
Throughout th|s process|ng cgc|e, customer ex|ts ore prov|ded ot cr|t|co| m||estones where
custom code con be |nserted to perorm non-stondord vo||dot|ons or other tosks thot m|ght
be requ|red bg the bus|ness ond not supported bg the opp||cot|on.
0NISCN


Lost Rev|sed. 4/6/2005
$^P L0l vh|te Poper New.doc Poge 6 o 7
Reoch out ond touch somebodg
0utbound process|ng o||ows o s|m||or pottern. The |ssue here |s 0utput |o|so co||ed lessogel Contro|,
used bg the sgstem to generote on ldoc when o bus|ness document |s creoted or chonged.
Th|s |s set up |n con|gurot|on ond |s the some os sett|ng up o document to pr|nt or ox o hord copg.
Th|s con|gurot|on con be os s|mp|e os o|wogs generot|ng on ldoc whenever o bus|ness document |s
soved or os comp|ex os restr|ct|ng output to o sequence o cond|t|ons or o port|cu|or portner or to
generote mu|t|p|e ldocs ||e, o vendor 0rder ond on ^$Nl rom the some document bosed on o
port|cu|or set o cond|t|ons.
Figure 3: A birds eye view of Outbound EDI processing in SAP
EDI Subsystem
Confirms Partner send/
receive & connect info,
security profile, handles
acknowledgements
IDoc
Adapter
Maps Idoc
to XML
EDI
Adapter
Map,
transform,
XML to
X12
XML
SAP Environment
VAN
Partner
Partner
Partner
FTP
AS2
Run pgm
RSNAST00
Generates doc
from NAST
output record
Create doc on
DB: status = 30
Outbound Hold
Run pgm
RSEOUT00
Output record identifies bus doc no,
partner, output type
Reads Partner Profile, identifies
and calls processing function
Assumes batch processing for
Idocs set in Partner Profile
Bus Doc
Created/Saved
Creates output
record in NAST
type = ED
Gets doc from
DB, Exports thru
File/RFC Port
Port points to external system,
triggers during esxport of Idoc
doc
In file or pass through
API via direct ALE call

The outbound process beg|ns when o bus|ness document |s creoted or chonged.
0utput Contro| determ|nes thot on ldoc |s to be generoted or Portner \ |n botch mode.
^n output record |s |nserted |nto tob|e N^$T, wh|ch stores |normot|on obout the method o
output or everg document soved.
Progrom R$N^$T00 |s then run. lt reods N^$T ond |dent||es L0l output. from the portner ond
opp||cot|on |normot|on stored |n the N^$T record, |t reods the Portner Pro||e ond determ|nes
whot unct|on shou|d be co||ed to process the outbound ldoc.
The unct|on popu|otes the ldoc w|th doto rom the bus|ness document. l the ldoc hos
custom segments, user ex|ts popu|ote ond ottoch the custom segments to the ldoc.
The ldoc |s then soved to the ldoc dotobose ot stotus 30, wh|ch meons |t's reodg to be
honded o to the outbound opp||cot|on or |no| export.
The outbound progrom |s co||ed, e|ther outomot|co||g or through the $^P job schedu|er.
0NISCN


Lost Rev|sed. 4/6/2005
$^P L0l vh|te Poper New.doc Poge 7 o 7
The ldoc |s pu||ed rom the ldoc dotobose ond the Portner Pro||e checked or the Port. The
ldoc |s then exported through the |dent||ed Port.
Lxport con be to o phgs|co| ||e or through o remote unct|on co|| to on externo| L0l
subsgstem such os $^P l. Th|s |normot|on |s stored |n the Port con|gurot|on.
l the export succeeds, the |nteroce returns stotus 03, |nd|cot|ng the ldoc hos successu||g
possed through the port.
The $^P odopter |n the L0l subsgstem converts the ldoc to on lL ormot ond posses |t to
the L0l odopter.
The L0l odopter vo||dotes portner |normot|on, |nc|ud|ng secur|tg ond connect|on
porometers, ond mops the lL ||e to |ts correspond|ng l2 L0l messoge.
lt then posses the l2 on to the portner through the v^N or bg fTP or ^$2.
Wropping up .
^nd thot's bos|co||g |t. L0l con be prettg scorg becouse |t's so b|g ond so cr|t|co| to the successu|
monogement o the bus|ness. ^nd ges, the vo|umes con be |nt|m|dot|ng ond mopp|ng con be o
comp|ex exerc|se.
3ut keep |n m|nd our two buzz words. cons|stencg ond |ex|b|||tg. ve hove proven stondords thot
prov|de o pred|ctob|e rood mop to whot needs to be done. ^nd we hove open orch|tectures thot
o||ow us to toke |nto occount the un|que requ|rements o our bus|ness.
^s |ong os we con |dent|g these requ|rements, we con occommodote them. ^s |ong os we con test
them, we con moke them work. L0l mog be o b|t o o beost, but |t's o beost thot con be tomed.

You might also like