Practical Guide to IDoc Development for SAP
April 3, 2017 | Author: Vikash Vijay | Category: N/A
Short Description
Download Practical Guide to IDoc Development for SAP...
Description
Sabine Maisel
Practical Guide to IDoc Development for SAP ®
www.sap-press.com
332 Book.indb 3
Bonn � Boston
11/3/09 10:21:31 AM
Contents at a Glance 1
Introduction ................................................................. 15
2
Generating IDocs ........................................................ 29
3
Test Tools . .................................................................... 51
4
Changes to IDocs ........................................................ 67
5
Confirmations . ............................................................. 187
6
Serializing IDocs . ........................................................ 193
7
Administration ............................................................. 211
8 IDocs in Conjunction with SAP NetWeaver Process Integration ...................................................... 243
www.sap-press.com
332 Book.indb 5
11/3/09 10:21:31 AM
Contents Preface ......................................................................................... 11
1 Introduction .................................................................. 15 1.1 1.2
1.3 1.4
What Is ALE? ................................................................. BAPIs and IDocs — An Introduction .............................. 1.2.1 BAPIs ................................................................ 1.2.2 IDocs ................................................................ Differentiation of ALE and EDI ....................................... Summary .......................................................................
15 18 18 19 25 27
2 Generating IDocs ......................................................... 29 2.1
Standard Methods for the IDoc Generation ................... 2.1.1 Shared Master Data Tool ................................... 2.1.2 Message Control ............................................... 2.1.3 Special Functions .............................................. 2.2 Use of Logical Systems in the Message Control .............. 2.3 Summary .......................................................................
29 29 43 46 49 50
3 Test Tools ...................................................................... 51 3.1 Individual IDocs . ........................................................... 3.2 Testing Processing of Multiple IDocs ............................. 3.2.1 Message Control ............................................... 3.2.2 Sending Ready-for-Dispatch IDocs .................... 3.2.3 Files .................................................................. 3.3 Processing Status Files ................................................... 3.4 Summary .......................................................................
52 57 57 58 59 61 66
4 Changes to IDocs . ....................................................... 67 4.1
Customizing . ................................................................. 67 4.1.1 Filtering Using Filter Objects ............................. 67
www.sap-press.com
332 Book.indb 7
7
11/3/09 10:21:31 AM
4.2
4.3 4.4
4.5
4.1.2 Custom Filter Objects . ...................................... 4.1.3 Filtering Segments . ........................................... 4.1.4 Reducing IDocs Through Views ......................... 4.1.5 Rules . ............................................................... 4.1.6 Version Conversion ........................................... 4.1.7 Special Conversions in SAP ERP Financials . ....... Adapting Existing IDoc Types ......................................... 4.2.1 Different Exit Types on the Basis of the Material Master Example .................................. 4.2.2 General Exits ..................................................... 4.2.3 Custom Segments . ............................................ 4.2.4 Special Requirements for Master Data ............... Custom Function Modules for File Generation in File Ports ................................................................... Custom IDocs ............................................................... 4.4.1 Creating Custom IDoc Types and Message Types .................................................. 4.4.2 Generating an IDoc ........................................... 4.4.3 Updating an IDoc .............................................. 4.4.4 Generating IDoc Function Modules ................... 4.4.5 Error Workflow for Custom IDocs . .................... 4.4.6 Useful Function Modules .................................. Summary .......................................................................
73 76 77 80 84 85 89 90 119 122 134 138 141 143 153 161 172 175 184 186
5 Confirmations ............................................................... 187 5.1 “ALEAUD” IDocs ........................................................... 187 5.2 “STATUS” IDocs ............................................................. 190 5.3 Summary ....................................................................... 192
6 Serializing IDocs .......................................................... 193 6.1 6.2 6.3 6.4 6.5
8
332 Book.indb 8
Serialization Using Groups ............................................. Serialization Using Timestamps ...................................... Serialization Using Business Objects . ............................. Serialization Using qRFC ................................................ Summary .......................................................................
193 198 200 205 209
www.sap-press.com
11/3/09 10:21:31 AM
7 Administration .............................................................. 211 7.1 7.2 7.3 7.4 7.5 7.6
IDoc Links ..................................................................... Regular Jobs .................................................................. Transaction Code Overview . .......................................... Archiving ....................................................................... Status Conversion .......................................................... Summary .......................................................................
211 216 217 224 230 242
8 IDocs in Conjunction with SAP NetWeaver Process Integration . ..................................................... 243 8.1 8.2 8.3 8.4 8.5 8.6
Conversion of Logical Systems to Business Systems ........ Conversion of IDoc Partner Roles . ................................. Header Mapping . .......................................................... Handling the Control Record in SAP NetWeaver PI ........ Updating IDocs Directly in SAP NetWeaver PI ............... Summary .......................................................................
243 244 245 246 248 248
The Author ................................................................................... 249 Index.............................................................................................. 251
www.sap-press.com
332 Book.indb 9
9
11/3/09 10:21:31 AM
S a b in e M a i s e l
Practical Guide to IDoc Development for SAP'
Galileo Press
Preface
ID o c s r e p r e s e n t a s t a n d a r d i n t e r f a c e to SAP s y s t e m s . T h e y a r e a l w a y s a sy n c h ro n o u s, so th e sy stem sh o u ld b e d e sig n e d fo r ch a n g in g a n d creat in g d a t a in t h e d a t a b a s e . T h e e r r o r h a n d l i n g , w h i c h c a n b e c a r r i e d o u t w i t h a t i m e d e l a y in a s y n c h r o n o u s c o m m u n i c a t i o n , is a l w a y s h a n d l e d w h e r e t h e e r r o r o c c u r s — in c o n t r a s t t o t h e n o r m a l RFC c o m m u n i c a t i o n w h e r e t h e e r r o r is a l w a y s n o t i f i e d to t h e s e n d e r . A l t h o u g h m o r e r e c e n t SAP r e le a s e s a ls o h a v e o t h e r n o n - S A P - p r o p r i e t a r y c o m m u n i c a t i o n o p t i o n s (s u c h as SOAP, HTTP, a n d p r o x i e s ) , t h e i m p o r t a n c e o f ID o c s is u n d i m i n i s h e d : T h i s is b e c a u s e o f t h e h i g h n u m b e r in w h i c h t h e y a r e a v a ila b le , a s w e ll as t h e m u l t i t u d e o f s o f t w a r e s o l u t i o n s t h a t w o r k w i t h SAP a n d a l r e a d y s u p p o r t t h i s f o r m a t . ID o c s a s s t a n d a r d i n t e r f a c e s t o SAP s y s t e m s a r e u s e d b o t h f o r EDI s c e n a r i o s b e t w e e n d i f f e r e n t e n t e r p r i s e s a n d f o r ALE s c e n a r i o s w i t h i n e n t e r p r i s e s . L ike all s t a n d a r d i n t e r f a c e s , t h e ID o c s r e f e r to t h e p a r t o f t h e SAP s y s t e m t h a t is d e l i v e r e d b y SAP. In m o s t b u s i n e s s e s , h o w e v e r , i t's n e c e s s a r y to b r e a k a d a p t a t i o n s t h a t w e r e m a d e i n t h e b u s i n e s s p a r t o f t h e SAP s y s t e m d o w n t o t h e i n t e r f a c e s . T h i s t a s k is c a r r i e d o u t b y A B A P d e v e l o p e r s . This b o o k is p a r t i c u l a r l y i n t e n d e d f o r t h e m , a n d t h e ta s k s r e l a t i n g to t h e s e a d a p t a t i o n s a r e d i s c u s s e d in d e t a i l . T h e s y s t e m a d m i n i s t r a t o r s u s u a l l y h a n d le th e c o m m u n ic a tio n se ttin g s so th e se s ettin g s a r e o n ly m e n tio n e d i f th e y are d irec tly re la te d to th e d e v e lo p m e n t w o rk .
C o n te n t of T h is B o o k T h is b o o k d e s c r i b e s t h i n g s in t h e s e q u e n c e in w h i c h t h e y a p p e a r . It s ta rts w i t h t h e c r e a t i o n o f I D o c s a n d c o n c l u d e s w i t h t h e r e g u l a r ta s k s . T h e a d a p ta tio n o f ID ocs to c u s to m e r r e q u ir e m e n ts sta rts w ith th e lo w e s t e f fo rt, t h a t is, t h e o p t i o n s o f C u s t o m i z i n g , a n d p r o c e e d s s t e p b y s t e p to
11
Preface
t h e ta s k t h a t r e q u i r e s t h e h i g h e s t e f f o r t : t h e c o m p l e t e c u s t o m p r o g r a m m i n g o f ID ocs. C h a p t e r 1, In tr o d u c tio n , d i f f e r e n t i a t e s ALE a n d E D I a n d d e s c r i b e s t h e b a s i c p r i n c i p l e s o f ID o c s . C h a p t e r 2 , G enerating ID ocs, o u t l i n e s t h e d i f f e r e n t o p t i o n s f o r g e n e r a t i n g ID o c s . C h a p t e r 3, Test Tools, d i s c u s s e s h o w y o u c a n t e s t ID o c s f o r t h e d a t a e x c h a n g e e v e n w i t h o u t t h e c o m m u n i c a tio n p a rtn e r. A f t e r t h e g e n e r a t i o n o f s t a n d a r d I D o c s h a s b e e n f u l l y o u t l i n e d , th is c h a p t e r d e t a i l s t h e c u s t o m e r a d a p t a t i o n s . H e re , I D o c s a r e c o n n e c t e d to t h e d i f f e r e n t e n h a n c e m e n t t e c h n o l o g i e s o f SAP. S o m e o p t i o n s o f ID o c m a n i p u l a t i o n a l r e a d y a r i s e i n C u s to m i z i n g , w h i l e o t h e r s r e q u i r e c u s t o m d e v e l o p m e n t s o r t h e e n h a n c e m e n t o f t h e s t a n d a r d ID o c f u n c t i o n m o d u l e s . T h e r e a r e a ls o s p e c ia l d e v e l o p m e n t o b j e c t s t h a t a r e o n l y u s e d in c o m b i n a t i o n w i t h ID o c s . So C h a p t e r 4 , C hanges to ID ocs, d e s c r i b e s p a r tic u l a r l y w i t h r e g a r d t o ID o c s h o w y o u m u s t h a n d l e e n h a n c e m e n t s a n d w h a t y o u n e e d t o c o n s i d e r . T h e fo c u s is o n t h e e n h a n c e m e n t t e c h n o l o g ie s r e l e v a n t f o r ID o c s . T h o s e e n h a n c e m e n t s t h a t a r e u s e d f o r all IDoc t y p e s a r c d i s c u s s e d in d e t a i l . T h is c h a p t e r a l s o d e s c r i b e s t h e s p e c if ic fe a t u r e s in t h e c o n t e x t o f e n h a n c e m e n t s o r c u s t o m - d e v e l o p e d ID o c s, s u c h as th e w o rk flo w co n n e ctio n . C h a p t e r 5, C o n firm a tio n s, t h e n d i s c u s s e s t h e liv e o p e r a t i o n a n d s h o w s h o w y o u can learn fro m y o u r c o m m u n ic a tio n p a r tn e rs w h a t h a p p e n e d to t h e ID o c d e s p i t e t h e a s y n c h r o n o u s p r o c e d u r e . C h a p t e r 6, Seria lizin g ID ocs, o u t l i n e s t h e d i f f e r e n t o p t i o n s t o k e e p a s p e c if ic s e q u e n c e f o r p r o c e s s in g ID o c s , a s w e l l a s t h e a v a il a b il i t y o f t h e s e o p t i o n s . C h a p t e r 7, A d m in is tr a tio n , d e s c r i b e s n e c e s s a r y r e g u l a r ta s k s in d e t a i l . F in a lly , in C h a p t e r 8, ID ocs in C o n ju n ctio n w ith S A P N e tW e a v e r Process In te g ra tio n , t h o s e w h o w o r k w i t h SAP N e t W e a v e r PI ( f o r m e r l y SAP N e t W e a v e r XI) l e a r n h o w t h e y c a n i m p l e m e n t ta s k s t h a t a r e o n l y r e q u i r e d in t h e c o n t e x t o f ID o c s , s p e c if ic a lly in t h e c o m m u n i c a t i o n w i t h SAP N e t W e a v e r PI.
12
Preface
A c k n o w le d g m e n ts A b o v e all, I w o u l d lik e t o l h a n k m y h u s b a n d M a n f r e d . T h i s b o o k c o n s u m e d a l o t o f o u r tim e , a n d w i t h o u t h i s s u p p o r t a n d all t h e w o r k h e did, I w o u l d n ' t h a v e b e e n a b l e t o w r i t e it. I w o u l d a l s o lik e to t h a n k M a i k e L u b b e r s , S te f a n P r o k s c h , a n d M e g D u n k e r l e y o f G a li l e o P re s s — w i t h o u t t h e i r e n c o u r a g e m e n t a n d s u p p o r t , I m i g h t h a v e b e e n a b l e to fi n i s h t h i s b o o k , b u t i t w o u l d d e f in i t e l y have c o n ta in e d m a n y errors.
S a b in e M aisel
13
T his c h a p te r in tro d u c e s th e in te r fa c e ty p e s u se d b y S A P in A L E scen a rio s. Y o u 'll le a r n a b o u t th e c h a r a c te r istic s o f th e d iffe r e n t te c h n iq u e s a n d w h y d iffe r e n t a rea s n e e d d iffe r e n t in te r fa c e typ es. Y o u ’l l a lso re v ie w te r m in o lo g y u s e d th r o u g h o u t th e book.
1
Introduction
Y o u 'r e c e r t a i n l y f a m i l i a r w i t h t h e t o p i c o f e l e c t r o n i c d a t a e x c h a n g e b e tw e e n d iffe re n t e n te r p ris e s . B ut e v e n w ith in e n te r p ris e s , in d iv id u a l p r o c e s s s t e p s c a n ’t b e c a r r i e d o u t o n t h e s a m e m a c h i n e ( o r in t h e s a m e d a t a b a s e ) u s i n g t h e s a m e s o f t w a r e . SAP m e e t s t h i s r e q u i r e m e n t b y p r o v i d i n g s t a n d a r d i n t e r f a c e s f o r l o c a t i o n s w h e r e t h i s k i n d o f s e p a r a t i o n is c o m m o n . S ta n d a r d in terfa ces a p p l y s p e c if ic n o r m s to a c tu a l d a t a t r a n s f e r to p r o v i d e y o u w i t h a c e r t a i n r e l e a s e s e c u rity .
1.1
W h a t Is A L E ?
A n e x a m p le o f h o w y o u ca n s tru c tu re th e c o m m u n ic a tio n acco rd in g
S t r u c t u r in g
to p r o c e s s s t e p s is t h e s e p a r a t i o n o f h u m a n r e s o u r c e m a n a g e m e n t a n d
c o m m u n ic a t io n
a c c o u n t i n g , w h i c h y o u c a n fin d in m a n y c o m p a n i e s . All d a t a g e n e r a t e d in H R — o n b u s i n e s s t r i p s , f o r e x a m p l e — t h a t a ls o n e e d s to b e t r a n s f e r r e d to a c c o u n t i n g c a n b e p o s t e d in t h e SA P s y s t e m b o t h l o c a lly o r r e m o t e ly . B e c a u s e o f th is , i t is a t t h e s o l e d i s c r e t i o n o f a c o m p a n y w h e t h e r t o u s e o n e o r s e v e r a l s y s t e m s . SA P r e f e r s to t h i s s e p a r a t i o n o f p r o c e s s e s w i t h i n a n e n t e r p r i s e a s A p p lic a tio n L in k E n a b lin g (ALE); p r o c e s s e s t h a t c o n t a i n t h e r e l e v a n t i n t e r f a c e s a r e c a lle d A L E business processes o r A L E scenarios. A n i n t e r f a c e g e n e r a l l y a l l o w s y o u to s e n d d a t a f r o m a c e r t a i n p o i n t w i t h i n t h e p r o c e s s ( o u t b o u n d i n t e r f a c e ) o r to r e c e i v e d a t a a t a sp ec ific p o in t ( in b o u n d in terfa ce). A p re re q u is ite fo r th e u sefu l e m p l o y m e n t o f
15
I n te r fa c e s
1
In tro d u ctio n
a n i n t e r f a c e is t h a t b o t h a t e c h n i c a l a n d s e m a n t i c d e s c r i p t i o n o f t h a t i n t e r f a c e a r c a v a ila b le . T e c h n ic a l
T h e technical description s p e c if ie s w h i c h d a t a is s u p p l i e d o r e x p e c t e d in
d e s c r ip t io n
w h i c h f o r m a t a n d i n w h i c h s e q u e n c e . T h is d e s c r i p t i o n is r e q u i r e d to u n p a c k th e data.
S e m a n tic
T h e se m a n tic d escrip tio n c o n t a i n s all o f t h e r e q u i r e d b u s i n e s s i n f o r m a
d e s c r ip t io n
t i o n c o n c e r n i n g t h e u s e o f t h e i n t e r f a c e , f o r i n s t a n c e , w h e t h e r t h e d a ta is r e a d - o n l y o r c a n b e e d i t e d . T h i s d e s c r i p t i o n is r e q u i r e d to i n t e r p r e t t h e i n c o m i n g d a ta . Technical and Sem antic Descriptions o f an Interface Consider an interface th a t w e all use very often in o u r daily life: transferring senten c es by tele p h o n e . Here, th e sem antic description co rresp o n d s to the kn ow led g e t h a t t h e last s e n te n c e is usually a farewell; t h e technical descrip tion, o n t h e o th e r h and, co rresp o n d s t o t h e kn ow led g e of h o w t o structure a farewell n o te in English.
R e m o te F u n c tio n
O f c o u r s e , in a d d i t i o n t o t h e d e s c r i p t i o n s , t h e p h y s i c a l t r a n s f e r o f d a ta
C a ll
is n e c e s s a i y a s w e l l v ia a p r o t o c o l . SAP s u p p o r t s its o w n RFC p r o t o c o l (R em ote F unction Call) in all re le a s e s , w h e r e a s n e w e r r e le a s e s a ls o s u p p o r t HTTP (H y p e rte x t T ransfer Protocol) a n d S O A P ( w h i c h o r i g i n a l l y s t o o d f o r S im p le O bject Access Protocol). B e c a u s e ALE b u s i n e s s p r o c e s s e s r e p r e s e n t a s l i g h tl y o l d e r t e c h n o l o g y , t h e y u s e o n l y s t a n d a r d i n t e r f a c e s b a s e d o n RFC a n d d o n ' t s u p p o r t t h e n e w p r o x y i n t e r f a c e s y e t , w h i c h a r c b a s e d o n SOAP. Protocol o f an Interface
P ro to c o l
Let's g e t back to o u r te le p h o n e analogy: The p h o n e line basically allows you to transfer d a ta via fax o r language. However, before you d o th a t, you must agree w ith your p artn er o n which of t h e t w o o p tio n s you w a n t to use. This corresponds t o selecting t h e protocol, t h a t is. t h e transfer type.
W h e n d e sig n in g an interface, y o u h a v e th e fo llo w in g o p tio n s: S y n c h ro n o u s
► S y n c h ro n o u s in te rfa c e s
c o m m u n ic a t io n
S y n c h r o n o u s i n t e r f a c e s c o n s i s t o f a req u est a n d a response. D u r i n g th is p r o c e s s , t h e c o n n e c t i o n b e t w e e n t h e s y s t e m s is k e p t a liv e . C o n sc -
16
W h a t Is A L E
|
q u e n t l y , s y n c h r o n o u s i n t e r f a c e s i m m e d i a t e l y p r o v i d e a re s u lt. This m e a n s th a t y o u — th e u s e r o f th is ty p e o f in te rfa c e — c a n w a it fo r th e r e s p o n s e . T h e a d v a n t a g e o f a s y n c h r o n o u s i n t e r f a c e is t h a t y o u r e c e i v e a d i r e c t c o n f i r m a t i o n a s t o w h e t h e r y o u r o r d e r w a s p r o c e s s e d o r n o t. I t 's y o u r r e s p o n s i b i l i t y t o t r i g g e r t h e e x e c u t i o n o f t h e t a s k . T h e d i s a d v a n t a g e o f t h i s t y p e o f i n t e r f a c e is t h a t y o u c a n ’t c o n t i n u e to w o r k until th e o th e r sy ste m pro cesses th e re q u e s t o r w h e n th e o th e r system i s n ' t a v a il a b le . In a d d i t i o n to t h a t , l o n g r u n t i m e s c a n r e q u i r e y o u to re p e a t th e s a m e o p e ra tio n if y o u th in k a n e r ro r h as occurred. Example: Synchronous Interface Y o u w a n t t o b u y a b o o k a b o u t A L E a n d I D o c s a n d c a ll y o u r lo c a l b o o k s h o p t o o b t a i n i n f o r m a t i o n o n a v a ila b le b o o k s a n d t h e r e s p e c t iv e p r i c e s . I t d e p e n d s o n t h e r e s p o n s e y o u g e t w h e t h e r y o u ’ l l a c t u a l l y m a k e t h e p u r c h a s e o r n o t . If a t e c h n i c a l f a i l u r e t e r m i n a t e s t h e p h o n e c a ll p r e m a t u r e ly , y o u ’ l l c a ll b a c k o n ly i f y o u h a v e n ' t r e c e iv e d a n y r e s p o n s e y e t .
► A sy n c h ro n o u s in te rfa c e s
A s y n c h ro n o u s
A sy n c h ro n o u s interfaces se n d th e re q u ire d d ata to th e o th e r system
c o m m u n ic a t io n
in v o lv e d a n d d o n 't receiv e an im m e d ia te re s p o n se . T h is m e a n s th at o n l y a r e q u e s t is s e n t . As a p r e r e q u i s i t e , n o r e s p o n s e is n e e d e d f o r this process. C o n se q u e n tly , y o u c a n c o n tin u e w o rk in g irre sp ectiv e o f th e o t h e r sy stem . H o w e v er, b ec au se y o u w o n 't receiv e a n im m e d ia te r e s u lt , in a n a s y n c h r o n o u s c o m m u n i c a t i o n p r o c e s s , i t m u s t b e e n s u r e d w i t h o u t y o u r i n t e r f e r e n c e t h a t t h e r e q u e s t a r r i v e s in t h e o t h e r s y s t e m — a n d o n l y o n c e . T h e fact t h a t a n a c ti o n is c a r r i e d o u t o n l y o n c e is r e f e r r e d to a s transaction security. Example: Transaction Security Y o u w a n t t o b u y m y b o o k a n d s e n d a fa x c o n ta in in g t h e p u rc h a s e o r d e r d a ta t o t h e b o o k s h o p . T h e b o o k s e l le r d o e s n ' t r e s p o n d t o y o u r f a x . H o w e v e r , t h e t r a n s m is s io n r e p o r t o f y o u r f a x m a c h in e t e l l s y o u t h a t t h e b o o k s h o p h a s r e c e iv e d t h e p u r c h a s e o r d e r e x a c t ly o n c e .
ALE s c e n a r i o s c a n c o n s i s t o f a n y n u m b e r o f s y n c h r o n o u s a n d a s y n c h r o
I n te r f a c e s in A L E
n o u s i n t e r f a c e s . SAP u s e s s y n c h r o n o u s i n t e r f a c e s e v e r y t i m e d a t a fr o m
s c e n a rio s
t h e d a t a b a s e is s u p p o s e d to b e d i s p l a y e d ; a s y n c h r o n o u s i n t e r f a c e s , in t u r n , a r e u s e d e v e i y t i m e y o u w a n t to c r e a t e o r c h a n g e d a t a i n t h e d a ta -
17
1 .1
1
|
In tro d u ctio n
b a s e . I n t h e l a t t e r c a s e , t h e t r a n s a c t i o n s e c u r i t y is p a r t i c u l a r l y i m p o r t a n t to m a in ta in d a ta b a s e co n sisten cy .
1.2 B A P is
B A P Is an d ID o c s — A n In tro d u ctio n
T h e m e d i u m f o r s y n c h r o n o u s i n t e r f a c e s i n ALE s c e n a r i o s is t h e B u si ness A p p lic a tio n P ro g ra m m in g In te rfa c e (BAPI). T h e t e r m A p p lic a tio n Pro g r a m m in g In te rfa c e (API) is g e n e r a l l y u s e d in t h e IT e n v i r o n m e n t . SAP e x t e n d e d it b y t h e a d d i t i o n " B u s in e s s " to i n d i c a t e t h a t t h e p r o c e s s n o t o n l y i n v o l v e s a p u r e l y t e c h n i c a l d a t a t r a n s f e r , b u t a s t e p w i t h i n a b u s i n e s s p r o c e s s . In t h i s c o n t e x t , t h e i n d i v i d u a l s t e p s t h a t m a k e u p t h e p r o ce ss c a n o c c u r in d i f f e r e n t s y s t e m s .
ID o c s
A s y n c h r o n o u s i n t e r f a c e s in ALE s c e n a r i o s a r c i m p l e m e n t e d u s i n g In te r m e d ia te D o c u m en ts (ID o cs). I n a d d i t i o n t o t h e b u s i n e s s d o c u m e n t s t h a t a r e c r e a t e d in t h e d i f f e r e n t s y s t e m s i n v o l v e d , a s y n c h r o n o u s p r o c e s s e s a l s o g e n e r a t e a d a t a d o c u m e n t t h a t e n s u r e s t r a n s a c t i o n s e c u r i ty . B e c a u s e t h i s d o c u m e n t i s n 't p a r t o f t h e a c tu a l b u s i n e s s p r o c e s s b u t is r a t h e r an in te rm e d ia te d o c u m e n t, it h a s b e e n a ssig n ed th e c o r re s p o n d in g n am e. T h e f o l l o w i n g s e c t i o n s p r o v i d e a b r i e f i n t r o d u c t i o n t o t h e t o p i c o f BAPIs a n d ID o c s . You'll l e a r n h o w t h e s e d i f f e r e n t m e t h o d s w o r k a n d w h y t w o d i f f e r e n t t y p e s o f i n t e r f a c e e x i s t w i t h i n ALE s c e n a r i o s .
1.2.1
B A P is
A BAPI is a r e m o t e - e n a b l e d f u n c t i o n m o d u l e , t h a t is, a m o d u l e t h a t c a n b e e x e c u t e d b y a n o t h e r p r o g r a m . In t h i s c o n t e x t , it i s n 't i m p o r t a n t w h e t h e r t h a t p r o g r a m calls t h e f u n c t i o n m o d u l e lo c a lly o r f r o m w i t h i n a d i f f e r e n t s y s t e m . BAPis d i f f e r f r o m r e g u l a r RFC -enabled f u n c tio n m odules (R FM ) i n t h e f o l l o w i n g a s p e c ts : bapi
r e q u ir e m e n t s
► A s a m e t h o d , a BAPI is p a r t o f a b u s i n e s s o b j e c t t y p e f r o m t h e Business O bject R ep o sito ry (BOR). F o r all r e l e v a n t o b j e c t s i n t h e SAP s y s t e m , S AP p r o v i d e s a c o r r e s p o n d i n g e l e m e n t i n t h e BOR. I n t h e BOR, y o u c a n fin d i n f o r m a t i o n r e g a r d i n g w h i c h t a b l e s p e r t a i n t o a n o b j e c t a n d w h a t y o u c a n d o w i t h t h e m . It's a ls o t h e b a sis f o r t h e b u sin ess w o rk f l o w . S o , i t m a k e s m u c h s e n s e t o a ls o s t o r e in t h e B O R i n f o r m a t i o n
18
B A P Is a n d ID o c s — A n In tro d u ctio n
a b o u t w h i c h p r o c e s s s t e p s in ALE s c e n a r i o s y o u c a n c a r r y o u t w i t h th e r e s p e c t i v e o b je c ts . ► B APIs a r e r e l e a s e d , h a v e a f r o z e n s i g n a t u r e , a n d t h u s p r o v i d e re le a s e s e c u rity . ► T h e y ty p ically u se an u p d a te te c h n iq u e fo r p o stin g s in s te a d o f p o stin g d ire c tly . M o r e o v e r , t h e y d o n ' t c o n t a i n a n y
C o m m it
or
Rol l back
state
m e n t s . (T h e fe w , m o s t l y v e r y o l d e x c e p t i o n s a r e s p e c ific a lly d o c u m e n t e d b y SAP.) ► T h e a c tu a l p o s t i n g p r o c e s s is t r i g g e r e d b y t h e s p e c ia l T IO N . C O M M IT
BAPl o r is u n d o n e v ia
B A P I_ T R A N S A C -
B A P I_ T R A N $ A C T IO N _ R O L L B A C K .
► BAPIs u s u a l l y d o n ’t d i s p l a y t h e r e s u l t s b e c a u s e i t's u n l i k e l y t h a t t h e c a ll e r h a s a G U I (graphical u se r in terfa ce) a v a il a b le . BAPIs t h a t w e r e s p e c ific a lly d e v e l o p e d f o r a n S A P /S A P c o m m u n i c a t i o n a r e a n e x c e p t i o n t o t h a t . H o w e v e r , t h e s e BAPIs a r e n 't r e l e v a n t f o r i n t e r f a c e s to e x te rn a l sy stem s. L ike all r e m o t e - e n a b l e d f u n c t i o n m o d u l e s , B APIs c a n g e n e r a l l y b e ca lle d
C a llin g B A P Is
u s i n g a syn ch ro n o u s RFC (sRFC) o r a tra n sa c tio n a l RFC (tRFC). T h e t r a n s
v ia RFC
a c t i o n a l c a ll is a s y n c h r o n o u s a n d m a k e s s u r e t h a t t h e call is e x e c u t e d ex actly o n c e . H o w e v e r, n o te th a t b o th th e s y n c h r o n o u s a n d th e tran sa c ti o n a l call n o t i f y o n l y t h e c a llin g s y s t e m in c a s e o f p o t e n t i a l e r r o r s , e v e n i f t h a t s y s t e m c a n ’t r e m o v e t h e e r r o r . T h a t 's w h y BAPIs a r e g e n e r a l l y u s e d o n l y f o r s y n c h r o n o u s calls in ALE s c e n a r i o s . I n a s y n c h r o n o u s cases, e r r o r s s h o u l d p r e f e r a b l y b e r e p o r t e d d i r e c t l y t o t h e re c e iv e r , p r o v i d e d t h e s e e r r o r s a r e b u s i n e s s - r e l a t e d . BAPIs a r e n ' t i n t e n d e d f o r t h i s p u r p o s e . T h e f o l l o w i n g s e c t i o n d e s c r i b e s h o w t h e s e p a r a t i o n b y e r r o r t y p e s is i m p l e m e n t e d b y m e a n s o f ID o c s.
1 .2 .2
ID O C S
SAP d e v e l o p e d ID o c s s p e c if ic a lly t o e n a b l e t h e a s y n c h r o n o u s m e s s a g e e x c h a n g e b e t w e e n m u l t i p l e SAP a n d / o r n o n - S A P s y s t e m s . T h e a d v a n ta g e s o v e r a n o r m a l , a s y n c h r o n o u s l y (t r a n s a c t i o n a l l y ) c a lle d R FM i n c l u d e a n i m p r o v e d e r r o r - h a n d l i n g p r o c e s s a s w e l l a s a s p e c if ic m o n i t o r i n g l a y e r m a d e a v a il a b le t o I D o c s . B e c a u s e e r r o r p r o c e s s i n g v i a ID o c s a ffec ts t h e s t r u c t u r e o f ID o c i n t e r f a c e s , w e ’ll l o o k a t i t first in t h e f o l l o w i n g s e c ti o n s .
19
|
1 .2
1
In tro d u ctio n
E rro r H a n d lin g w it h ID ocs You c a n g e n e r a l l y d i s t i n g u i s h b e t w e e n t w o d i f f e r e n t t y p e s o f e r r o r : E r r o r ty p e s
► T ech n ical e r r o r s T e c h n ic a l e r r o r s o b v i a t e t h e c o m m u n i c a t i o n w i t h t h e p a r t n e r s y s t e m . T h e y o c c u r , f o r e x a m p l e , i f t h e p a r t n e r s y s t e m i s n ’t a v a il a b le , t h e d a t a b a s e in t h a t s y s t e m c a n ' t a c c e p t a n y a d d i t i o n a l r e q u e s t s , o r t h e s p e c if ie d p a s s w o r d is i n c o r r e c t . ► B u sin e ss-re la te d e rro rs B u s in e s s - r e la te d e r r o r s o c c u r i f t h e p a r t n e r s y s t e m g e n e r a l l y r e s p o n d s t o r e q u e s t s b u t c a n ' t p r o c e s s y o u r s p e c if ic r e q u e s t . M i s s i n g a u t h o r i z a t i o n s , m i s s i n g C u s t o m i z i n g , o r t h e lik e c a n c a u s e t h i s t y p e o f e r r o r . I n t h e c o n t e x t o f RFCs, t h i s d i s t i n c t i o n i s n ’t m a d e . I n a RFC, t h e u s e r d irec tly receiv es a n e r r o r m e ssa g e a n d m u s t m a k e s u r e th a t th e re q u est w ill b e r e p e a t e d a t a l a t e r p o i n t in t i m e . B e c a u s e calls c o n t a i n i n g e r r o r s c a n 't b e r e p e a t e d a u t o m a t i c a l l y a n d d o n ' t h a v e t o b e lo g g e d , t h e d i s t i n c tio n b e tw e e n e rro r ty p es w o u ld n 't m a k e sen se h ere. In tR FC s, e a c h call t h a t c o n t a i n s a n e r r o r is w r i t t e n t o a t a b l e in t h e s e n d in g s y s t e m a n d c a n b e r e s t a r t e d u s i n g a s p e c if ic t r a n s a c t i o n . I n t h i s case, it d o e s m a k e s e n s e t o d i s t i n g u i s h b e t w e e n t h e t y p e s o f e r r o r . I n t h a t case, t e c h n ic a l e r r o r s w o u l d b e lo g g e d in t h e s e n d i n g s y s t e m , a n d t h e call w o u l d b e r e p e a t e d , i f n e c e s s a i y , w h i l e b u s i n e s s - r e l a t e d e r r o r s w o u l d be l o g g e d a n d p r o c e s s e d in t h e r e c e i v i n g s y s t e m . T h is o p t i o n t o d i s t i n g u i s h b e t w e e n d i f f e r e n t t y p e s o f e r r o r s is a s p e c if ic f e a t u r e o f ID o c s a n d i s n ’t p r o v i d e d b y RFCs t h e i r self. In a d d i t i o n , y o u c a n a ls o c h a n g e t h e c o n t e n t s o f I D o c s r e t r o a c t i v e l y in c a s e o f e r r o r s , w h i c h i s n ’t p o s s i b l e e i t h e r w i t h s t a n d a r d RFCs.
E rro rs in s e n d in g
To d i s t i n g u i s h b e t w e e n t e c h n i c a l e r r o r s a n d b u s i n e s s - r e l a t e d e r r o r s , t h e
a n d r e c e iv in g
p r o c e s s i n g o f t h e r e s p e c t i v e p r o c e s s e s m u s t b e d i v i d e d i n t o t w o s t e p s as
s y s te m s
w e ll . T h e first s t e p is r e s p o n s i b l e f o r p u r e l y t r a n s f e r r i n g t h e r e q u e s t to t h e d a t a b a s e o f t h e r e c e i v i n g s y s t e m . T h is s t e p d o e s n ’t d e p e n d o n t h e t y p e o f d a t a t h a t is t r a n s f e r r e d . F o r e x a m p l e , i t d o e s n ’t m a k e a n y d i f f e r e n c e w h e t h e r y o u w a n t t o c r e a t e m a t e r i a l s o r c a n c e l a s a le s o r d e r . To c a r t y o u t t h e t r a n s f e r in t h e s a m e m a n n e r f o r all k i n d s o f d a t a , y o u u s e a n e u t r a l f o r m a t : t h e ID o c f o r m a t .
20
B A P Is a n d ID o c s — A n In tro d u ctio n
|
1 .2
T h e s e c o n d s t e p is c a r r i e d o u t lo c a lly in t h e r e c e i v i n g s y s t e m a n d i n v o lv e s p o s tin g t h e re le v a n t d o c u m e n t . T h is s t e p c a n v a ry d e p e n d in g o n th e bu sin ess o b ject to b e processed.
Technical D e s c rip tio n o f th e ID o c F o rm a t A n ID o c c o n s i s t s o f a h ea d e r record, a n y n u m b e r o f lin e s o f a p p l i c a t i o n
I D o c a s a n e u tr a l
d a t a (a p p lic a tio n records), a n d a n y n u m b e r o f s ta tu s records p e r IDoc.
fo rm a t
► H eader
H e a d e r re c o rd /
T h e h e a d e r c o n t a i n s g e n e r a l i n f o r m a t i o n a b o u t w h i c h d a t a is s u p
c o n t r o l re c o rd
p o s e d to b e t r a n s f e r r e d , w h o is t h e s e n d e r , a n d w h o is t h e re c e iv e r. T h is m e a n s t h a t t h e r e c e i v e r c a n l e a r n f r o m t h e h e a d e r r e c o r d w h i c h d a t a h a s b e e n r e c e i v e d a n d — b a s e d o n t h i s i n f o r m a t i o n — d e c id e h o w to p ro c e ss th is data. ► D a ta re co rd s
D a t a re c o r d s
T h e d a t a r e c o r d s c o n t a i n b u s i n e s s - r e l a t e d i n f o r m a t i o n . To m a k e s u r e t h e t e c h n i c a l f o r m a t is i n d e p e n d e n t o f t h e b u s i n e s s o b j e c t a n d c a n a ls o b e u n d e r s t o o d b y n o n - S A P s y s t e m s , t h e c o n t e n t o f e a c h d a t a r e c o r d is s t o r e d a s a s t r i n g o f 1 0 0 0 c h a r a c t e r s . T h is c h a r a c t e r s t r i n g is p r e c e d e d b y a c o n t r o l a r e a c o n t a i n i n g i n f o r m a t i o n a b o u t h o w to i n t e r p re t th e
1000 c h a r a c te r s .
► S ta tu s re c o rd s
S ta tu s re c o r d s
S ta tu s r e c o r d s c o n t a i n i n f o r m a t i o n a b o u t t h e p r e v i o u s s t a t u s e s o f t h e ID o c , s u c h a s " s u c c e s s f u ll y c r e a t e d " o r " s u c c e s s f u lly p o s t e d . " S ta tu s r e c o r d s a r e n ' t t r a n s f e r r e d ; t h a t is, b o t h t h e s e n d e r a n d r e c e i v e r k e e p t h e i r o w n s t a t u s re c o r d s . F ro m a tech n ical p o in t o f v iew , th e s e th re e ty p es o f re co rd h a v e th e s a m e s t r u c t u r e . C o n s e q u e n t l y , t h e s t r u c t u r e d o e s n ' t p r o v i d e a n y c l u e a s to w h ic h k in d o f b u sin e s s -re la te d in fo rm a tio n y o u 'r e d ea lin g w ith . F ig u r e 1.1 c o n t a i n s a t h e o r e t i c a l i l l u s t r a t i o n o f h o w t h e d i f f e r e n t ty p e s o f re c o rd s c a n b e u sed . N o te th a t y o u c a n u se an u n lim ite d n u m b e r o f d a t a r e c o r d s a n d s t a t u s r e c o r d s . T h is is d e s c r i b e d in g r e a t e r d e t a i l in t h e f o l l o w i n g s e c ti o n .
21
1
In tro d u ctio n
C o n t r o l R e c o rd
ID o c N u m b e r S e n d e r a n d R e c e iv e r M e s s a g e T y p e a n d I D o c Typ e E x te r n a l S tr u c tu r e
D a ta R e c o rd s C o n tr o l S e c tio n w it h
A p p lic a t io n D a ta
ID o c N u m b e r
S e g m e n t T y p e e tc .
M a t e r i a l N u m b e r , D a t e e t c . a s C h a r a c te r S trin g (L e n g th : 1 0 0 0 )
S ta tu s R e c o rd s
ID o c N u m b e r S ta tu s In fo r m a t io n (e .g .. 5 3 : P o s t e d S u ccessfu lly )
F ig u r e 1.1
S tr u c tu r e o f a n ID o c
To p r o c e s s i h e IDoc, t h e r e c e i v e r n e e d s m eta in fo rm a tio n , t h a t is, i n f o r m a t i o n c o n c c m i n g t h e m a n n e r in w h i c h t h e d a t a is s u p p o s e d to b e p ro c e s s e d . T h e m e t a i n f o r m a t i o n t h a t d e s c r i b e s a n ID o c c o n s i s t s o f t h r e e parts: M e ssa g e ty p e
►
M essag e ty p e T h e m e s s a g e t y p e p r o v i d e s a s e m a n t i c d e s c r i p t i o n o f t h e d a t a to be p ro c essed . F o r e x a m p le , m e ssag e ty p e
M ATM A S
i n d i c a t e s t h a t m a t e r ia l
m a s t e r d a t a is s u p p o s e d t o b e e x c h a n g e d . T h e m e s s a g e t y p e is also r e s p o n s i b l e f o r t h e w a y a m e s s a g e w ill b e p r o c e s s e d . W h e n y o u c r e a t e o r c h a n g e a s ales o r d e r , f o r e x a m p l e , t h e a c tu a l i n f o r m a t i o n is i d e n t i c a l , b u t t h e p r o c e s s i n g is d i f f e r e n t , w h i c h is w h y t h e c r e a t i o n o f t h e o r d e r is a s s i g n e d t h e OROCHG
O R D ER S
m e ssa g e ty p e , w h ile m e ssa g e type
is a s s i g n e d t o t h e c h a n g e a c tiv ity . T h e n a m e s o f m e s s a g e t y p e s
a r e b a s e d o n t h e n a m e s o f t h e U N /E D IF A C T s t a n d a r d ( U n ited N a tio n s E lectronic D a ta In terc h a n g e f o r A d m in istra tio n , C om m erce a n d T ransport), b u t a p a r t f r o m t h e n a m e s , t h e r e a r e n o o t h e r s i m il a r it i e s b e t w e e n t h e I D o c a n d E D IFA C T f o r m a t s . ID o c ty p e
►
ID o c ty p e T h e ID o c t y p e r e p r e s e n t s t h e t e c h n i c a l d e s c r i p t i o n o f t h e d a t a . It tells y o u w h i c h fie ld s o f w h i c h b u s i n e s s o b j e c t s a r e s u p p o s e d t o b e filled
22
B A P Is a n d ID o c s — A n In tro d u ctio n
|
w i t h w h i c h v a l u e s . T h i s m e a n s t h a t t h e ID o c t y p e d e s c r i b e s h o w to i n t e r p r e t t h e 1 0 0 0 c h a r a c t e r s in t h e d a t a re c o rd . ► S eg m en t ty p e
Segment type
F o r e a c h p o s s i b le v a r i a n t o f t h e s e 1 0 0 0 c h a r a c te r s , t h e r e is o n e s e g m e n t ty p e. F o r e x a m p le , s e g m e n t ty p e m a s t e r d a t a f r o m T a b le
M ARA
E 1M A R A M
i n d i c a t e s t h a t m a t e r ia l
is g o i n g to fo llo w . I n e a c h SAP s y s t e m ,
i n f o r m a t i o n is s t o r e d a s to w h i c h ID o c t y p e c a n h a v e w h i c h s e g m e n t s , h o w o f t e n , a n d in w h i c h s e q u e n c e . You c a n e x p o r t t h i s d a t a t o e x t e r n a l s y s t e m s to a v o i d h a v i n g t o m a i n t a i n a ll s t r u c t u r e s m a n u a l l y . SAP s u p p o r t s t h e t r a n s f e r o f d a t a v i a t r a n s p o r t ID o c s , C files, D TD (D o c u m e n t Type D escription), o r H T M L (H y p ertext M a r k u p L anguage). I f y o u w a n t to u s e t r a n s p o r t ID o c s , y o u m u s t e n s u r e t h a t y o u r p a r t n e r c a n g e n e r a l l y r e c e i v e ID o c s f r o m y o u , w h i c h m e a n s t h a t y o u r SAP s y s t e m m u s t k n o w t h e p a r t n e r as a logical s y s t e m . T h e ID o c , w h i c h e x i s t s a s a s e t o f d a t a r e c o r d s , is t h e n t r a n s f e r r e d f r o m t h e s e n d e r to t h e re c e iv e r . T h e m o s t c o m m o n l y u s e d t y p e o f t r a n s f e r is t h e tR FC . T h e t r a n s f e r is c a r r i e d o u t in s u c h a w a y t h a t t h e s e n d i n g s y s t e m calls t h e f u n c t i o n m o d u l e ID0C_INB0UND_ASYNCHR0N0US in t h e re c e iv in g s y s te m . T h is fu n c tio n m o d u le receiv es th e d a ta a n d p o s ts th e h e a d e r a n d d a t a r e c o r d s to t h e a s s o c i a t e d d a t a b a s e t a b l e s EDIOC a n d EDID4, a n d t h e s t a t u s o f t h e ID o c t o ED I OS. A f t e r t h a t h a s b e e n d o n e , t h e t e c h n ic a l p a r t is f i n i s h e d . I f p r o b l e m s o c c u r d u r i n g t h i s p r o c e s s , t h e s e n d e r w ill b e n o t i f i e d a n d m u s t r e s e n d t h e d a t a a t a l a t e r p o i n t in tim e . O t h e r t y p e s o f t r a n s f e r , s u c h a s f i l e (fla t file), X M L (file i n X M L f o r m a t ) ,
IDoc as file
o r H TTP c a n a ls o b e u s e d b e c a u s e o f t h e s e p a r a t i o n o f d a t a t r a n s f e r a n d d a t a p r o c e s s i n g . F ig u r e 1 .2 s h o w s t h e first p a r t o f a s m a ll m a t e r i a l m a s t e r I D o c a s a file, o p e n e d in N o t e p a d .
i
:D I_ D C 4 0 _ U 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 700 301 2 MATMftSOS £2H AB A*007 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 0 0 0 0 0 1 0 0 0 0 0 0 0 2 005 S H -1 0 0
£2KABA1001 • 2MAKTM001 E2HAKTM001 E2KAKTM001 E2HAKTM001 E2MAKTM001
F ig u re 1.2
ZSM1 19951005/
/
800000000000076076400000200000103/ 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 0 0 0 0 0 3 0 0 0 001030 05C W M a n o l 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 0 0 0 0 0 4 0 0 0 0 0 1 0 3 005 EM et h a n o l 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 0 0 0 0 0 5 0 0 0 0 0 1 0 3 0 0 5 rM e t h a n o l 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 0 0 0 0 0 6 0 0 0 0 0 1 0 3 0 0 5 J r fs y - * 8 0 0 0 0 0 0 0 0 0 0 0 0 7 6 0 7 6 4 0 0 0 0 0 7 0 0 0 0 0 1 0 3 0 0 5 P w et a n o l
ID o c in N o te p a d Ed ito r
23
1 .2
1
In tro d u ctio n
You c a n s p e c i f y t h e t y p e o f t r a n s f e r t o b e u s e d f o r t r a n s f e r r i n g ID o c s to t h e p a r t n e r s y s t e m v i a t h e o u tb o u n d p a r tn e r p rojile (T r a n s a c tio n W E 2 0 ) . A f t e r t h e ID o c h a s a r r i v e d in t h e r e c e i v i n g s y s t e m , t h e b u s i n e s s - r e l a t e d p o s t i n g p r o c e s s b e g i n s . T y pically , t h i s is a ls o c a r r i e d o u t b y m e a n s o f a fu n c tio n m o d u le. T h e in b o u n d p a r tn e r p ro jile (a lso T r a n s a c t i o n W E 2 0 ) s p e c if ie s t h e p r o c e s s co d e to b e u sed . F o r each p o ssib le c o m b in a tio n o f s e n d e r a n d m essage t y p e , y o u c a n d e f i n e w h i c h f u n c t i o n m o d u l e w ill b e u s e d . SAP p r o v i d e s all n e c e s s a i y f u n c t i o n m o d u l e s f o r a ll ALE s c e n a r i o s a v a il a b le . N o t e t h a t y o u c a n c u s t o m i z e t h e s e f u n c t i o n m o d u l e s o r e v e n r e p la c e t h e m w i t h y o u r o w n . C h a p t e r 4 , C h a n g e s t o ID o c s , p r o v i d e s m o r e d e t a i l e d i n f o r m a t i o n o n this. IDoc tracking
I f a n e r r o r o c c u r s d u r i n g t h e b u s i n e s s - r e l a t e d p o s t i n g , t h e e r r o r w ill be d o c u m e n t e d in t h e s u b s e q u e n t s t a t u s r e c o r d o f t h e ID oc, a n d y o u can r e s ta r t t h e p o s t i n g p r o c e s s later. SAP p r o v i d e s a s e p a r a t e t r a n s a c t i o n fo r p o s i n g a n I D o c a f t e r a p r o c e s s i n g e r r o r : T ra n s a c tio n B D 8 7 . This t r a n s a c tio n can r e s e n d ID ocs t h a t c o n t a i n e d e r r o r s in t h e s e n d i n g s y s t e m d u r i n g th e first a t t e m p t a n d c a n r e -p ro c e s s e r r o n e o u s ID o c s in t h e re c e iv in g s y s t e m , i f n e c e s s a iy . A f t e r t h e r e p r o c e s s , e v e r y t h i n g is f i n i s h e d . T h e p o s t i n g o f th e ID o c c r e a te s t h e b u s in e s s D o c u m e n t , o r c h a n g e s it. T h is is o n l y d o n e o n c e . O n c e it is s u c c e s s fu lly c r e a t e d o r c h a n g e d , t h e B u s in e s s D o c u m e n t is n o t t o u c h e d a g a in . I f b o t h s y s t e m s a r e SAP s y s t e m s , y o u c a n e v e n u s e t h e IDoc tra ckin g f u n c ti o n f r o m w i t h i n t h e s e n d i n g s y s t e m to o b t a i n i n f o r m a t i o n o n t h e c u r r e n t s t a t u s o f t h e r e s p e c t i v e ID o c in t h e re c e iv in g s y s t e m . You can s t a r t ID o c t ra c k in g fr o m w i t h i n t h e I D o c m o n i t o r (T ra n s a c tio n B D 8 7). T h is f u n c ti o n u s e s t h e f u n c ti o n m o d u l e I D0C_DATE_T IME_GET v i a sRFC to re ad t h e I D o c n u m b e r a n d its s t a t u s in t h e r e c e i v i n g s y s t e m . BAPIs and IDocs in ALE Scenarios D u e t o t h e t r a n s a c t i o n s e c u r it y e n a b l e d b y t h e u p d a t i n g o f e r r o n e o u s c o n n e c t io n s a n d b e c a u s e o f t a r g e t - o r i e n t e d e r r o r - h a n d l i n g p r o c e d u r e s , t h e A L E i n t e g r a t i o n s c e n a r io s p r o v i d e d b y S A P a lw a y s u s e B A P Is f o r s y n c h r o n o u s , r e q u e s t i n g a c c e s s , a n d I D o c s f o r a s y n c h r o n o u s , c h a n g i n g a c c e s s . I f i t ' s p o s s ib le t o t r a n s f e r d a t a in b o t h w a y s , t h a t is , s y n c h r o n o u s ly a n d a s y n c h r o n o u s ly ( e . g ., in a f i r s t , s y n c h r o n o u s t e s t r u n , a n d t h e n t h e a c t u a l p o s t i n g a s y n c h r o n o u s ly ) , b o t h a B A P I a n d a m a tc h in g ID o c a re n e e d e d . T h e ID o c t h e r e fo r e c a n b e c re a t e d v ia T r a n s a c t io n B D B G , w h i c h is a ls o a v a ila b le t o c u s t o m e r s .
24
D if f e r e n t ia t io n o f A L E a n d E D I
1.3
|
D iffe re n tia tio n of A LE an d ED I
T h e c o n c e p t o f ALE c o m p r i s e s c o m m u n i c a t i o n w i t h i n a n e n t e r p r i s e . H o w e v e r , w i t h i n a n e n t e r p r i s e , d i f f e r e n t p r o c e s s e s a r e c a r r i e d o u t in p h y s i c a l l y d i f f e r e n t IT s y s t e m s , w h i c h m e a n s t h a t i n d i v i d u a l p r o c e s s step s ca n in v o lv e d iffe re n t sy stem s. A s y o u 'v e alre a d y learn ed , th ese s t e p s c a n b e c a r r i e d o u t in a s y n c h r o n o u s p r o c e s s v ia BAPIs as w e ll a s in a n a s y n c h r o n o u s p r o c e s s i n v o l v i n g ID ocs. I n t h i s c o n t e x t , t h e c o m m u n i c a t i o n i t s e l f is c a r r i e d o u t b e t w e e n t h e lo g i
L o g ic a l s y s te m
cal s y s t e m s (LSs). E ac h LS r e p r e s e n t s a c o m b i n a t i o n o f h a r d w a r e a n d s o f t w a r e in s t a l le d o n t h a t s y s t e m . In a n SA P s y s t e m , a c l i e n t c o r r e s p o n d s to a LS. T h e LS is a s s i g n e d t o t h e c l i e n t a n d p r o v i d e s i n f o r m a t i o n a s to w h e t h e r a d o c u m e n t w a s c r e a t e d o n t h a t SAP c l i e n t o r w h e t h e r i t w a s a d o p te d b y m e a n s o f c o n so lid atio n processes (th e m ajo rity o f d o c u m e n ts c o n t a i n t h e o r i g i n a l s y s t e m in a sp ec ific field in t h e d a t a b a s e ) . T h e a s s i g n m e n t o f t h e LS is p a r t o f t h e p o s t - i n s t a l l a t i o n p r o c e d u r e s . A s y s t e m m u s t k n o w its o w n s y s t e m n a m e a s w e ll a s t h e n a m e s o f all LSs it c o m m u n i c a te s w i t h . T h e LSs m u s t b e u n i q u e a c r o s s t h e e n t i r e e n t e r p r i s e ( a c t u a l l y a c r o s s th e
U n iq u e n e s s o f
e n t i r e r a n g e o f c o m m u n i c a t i o n ) . M o r e o v e r , t h e LSs f o r n o n -S A P s y s t e m s
lo g ic a l s y s te m s
w i t h w h i c h a c o m m u n i c a t i o n is e s t a b l i s h e d m u s t a l s o b e k n o w n . You c a n a s s i g n t h e LS f o r y o u r o w n c l i e n t a s w e ll a s m a k e s y s t e m s k n o w n w i t h w h i c h m e s s a g e s w ill b e e x c h a n g e d v ia A L E - C u s to m iz in g , w h i c h can b e r e a c h e d u s i n g T r a n s a c t i o n SALE. F ig u r e 1 .3 s h o w s t h e C u s to m i z i n g f u n c t i o n s , D e f i n e Logical S y s t e m a n d A s s ig n L og ical S y s t e m to C lie n t. T r a n s a c t i o n B D 5 4 e n a b l e s y o u to a s s ig n n a m e s t o LSs. In a d d i t i o n to th e n a m e f o r t h e LS, y o u s h o u l d a l s o e n t e r a b r i e f d e s c r i p t i o n .
S tru c tu re ^
ID o c li^ r f a c e V B a s ic S e ttin g s [ £ Q
ID o c A d m in is tra tio n ( £ > In b o u n d S O A P fo r ID o c : R e g is te r S e rv ic e P e rfo r m A u to m a tic W o r k flo w C u s to m iz in g
Q 1:7
A c tiv a te e v e n t re c e iv e r lin k a g e fo r ID o c in b o u n d L o g ic a l S y s te m s D e fin e L o g ic a l S y s te m A s s ig n L o g ic a l S y s te m to C lie n t____________________ |
F ig u re 1.3
S e ttin g U p Lo gical System s
1 .3
1
In tro d u ctio n
C u s to m e r
T h e cu sto m e r d istrib u tio n m o d el (T r a n s a c tio n B D 6 4 ) a l l o w s y o u to d e f in e
d i s t r i b u t io n m o d e l
w h i c h BAPIs a n d ID o c s w ill b e e x c h a n g e d b e t w e e n w h i c h s y s t e m s . In t h i s c o n t e x t , e a c h s y s t e m c a n f u n c t i o n as t h e s e n d e r o r re c e iv e r . I n o u r e x a m p l e (s e e F ig u re 1 .4 ), t h e LS t h e LS
SALES,
w h i l e t h e ID o c
T 9 0 CLNT0 9 0
M ATFET
T9 0 C LNT090
to
SALES,
M ATM A S
to
is s e n t in t h e o p p o s i t e d i r e c t i o n .
In a d d i t i o n , t w o BAPIs a r e e x c h a n g e d . T h e se n t from
s e n d s t h e ID o c
w h ile th e
M a te r i a 1 . G e tD e ta i 1
BAPI is
M a te r ia l . A v a il i b i 1 i t y
BAPI
is s e n t in t h e o p p o s i t e d i r e c t i o n .
D is tr ib u tio n M o d e l ^
^
ZSM 1
ggZSM I ^
0 X D O c lie n t 8 0 0 ^
@
V
^
T90C LN T090
S a l e s s y s te m (c lie n t 8 1 0 )
SALES
f a M ATM AS
M a te r ia l m a s t e r
$
D e te r m in e d e t a ils o n m a te r ia l
S t a n d a r d M a te r la l.G e tD e ta il
@
S a le s s y s te m (c lie n t 8 1 0 )
^
0
F ig u r e 1 .4
EDI
|D e s c r ip t io n /t e c h n ic a l n a m e
M o d e l v ie w s
SALES
X D O c lie n t 8 0 0
T90C LN T090
f a M ATFET
R e q u e s t m a te r ia l
$
A T P in fo rm a tio n
S ta n d a r d M a te r ia lA v a ila b ility
D is t r ib u t io n M o d e l w i t h E x a m p le f o r ID o c a n d B A P I
In c o n t r a s t to ALE a s a m e a n s o f e n t e r p r i s e - i n t e r n a l c o m m u n i c a t i o n , EDI (Electronic D a ta In terch a n g e) c o m p r i s e s t h e t r a n s f e r o f d a t a b e t w e e n d i f f e r e n t e n t e r p r i s e s , f o r e x a m p l e , b e t w e e n c u s t o m e r s a n d s u p p l i e r s . Each c o m p a n y h a s its o w n p r o c e s s flo w s . H o w e v e r , a t c e r t a i n p o i n t s w i t h i n a p r o c e s s , t h e p a r t n e r m u s t b e i n f o r m e d . To p r e v e n t t h e p a r t n e r f r o m h a v in g to e n t e r s p e c if ic i n f o r m a t i o n m a n u a l l y i n t o t h e s y s t e m , t h e r e l e v a n t i n f o r m a t i o n m u s t b e t r a n s m i t t e d to t h e p a r t n e r e le c tro n ic a lly . EDI is a l w a y s a n a s y n c h r o n o u s p r o c e s s . W i t h r e g a r d t o SA P s y s t e m s , th is m e a n s t h a t ID o c s a r c a ls o u s e d f o r EDI c o m m u n i c a t i o n . H o w e v e r , n o t e t h a t EDI c o m m u n i c a t i o n is a l w a y s c a r r i e d o u t w i t h o u t t h e d i s t r i b u t i o n m o d e l a n d LSs. W i t h i n t h e s y s t e m , t h e r e l e v a n t s e n d e r s a n d r e c e iv e r s o f m e s s a g e s a r e a ls o r e f e r r e d t o as p a r tn e r s ’, c u s t o m e r s a n d s u p p l i e r s a re o n e e x a m p le h e re . N o te th a t th e y m u s t b e m a in ta in e d as c u s to m e rs a n d s u p p l i e r s in t h e SA P s y s t e m . N o n e w , ID o c -s p e c ific m a s t e r d a t a is n e e d e d in t h i s c o n t e x t .
E D I s ta n d a r d s
B e c a u s e d i f f e r e n t c o m p a n i e s u s e d i f f e r e n t IT s y s t e m s , s p e c if ic E D I s t a n d a r d s e x i s t to f a c ilita te d a t a tr a n s f e r s . In E u r o p e a n c o u n t r i e s , t h e EDI-
26
S u m m a ry
FACT s t a n d a r d is p r i m a r i l y u s e d , w h e r e a s i n t h e U n i t e d S ta te s , A N S I ASC X I 2 {A m erican N a tio n a l S ta n d a rd s In s titu te A ccred ited S ta n d a r d s C o m m ittee X I 2 ) is t h e p r e d o m i n a n t s t a n d a r d . EDIFACT a s s i g n s n a m e s to m e s s a g e s , w h i l e A N S I u s e s n u m b e r s . F o r e x a m p l e , a c c o r d i n g t o t h e E D IFA C T s t a n dard, th e m essage
O R D ER S
rep resen ts a p u rch ase ord er; ac co rd in g to th e
A N SI s t a n d a r d , t h e s a m e m e s s a g e is c a lle d 8 5 0 . W i t h r e g a r d t o m e s s a g e t y p e s , SAP h a s b a s e d its n a m i n g c o n v e n t i o n s o n t h e E D IFA C T s t a n d a r d ; h o w e v e r, th e s tru c tu re o f th e m essag e s d iffe rs su b s ta n tia lly fro m that s t a n d a r d . ( C h a p t e r 2, G e n e r a t i n g ID o c s, d e s c r i b e s t h e s t r u c t u r e o f ID ocs in g r e a t e r d e t a i l . ) In SAP s y s t e m s , ID o c s a r e u s e d f o r a s y n c h r o n o u s d a ta t r a n s f e r s b o t h in E D I a n d ALE p r o c e s s e s , w h i c h is w h y t h e p r o c e d u r e s d e s c rib e d in th e c o u rs e o f th is b o o k c a n alw ay s b e a p p lie d to b o th w ays o f co m m u n icatio n . T h e f o l l o w i n g c h a p t e r s w i l l f o c u s e n t i r e l y o n u s i n g ID o c s . A s f a r a s t h e u s e o f BAPIs is c o n c e r n e d , i t's s i m i l a r to u s i n g f u n c t i o n m o d u l e s . C o n s e q u e n tl y , d e v e l o p e r s w h o a r e f a m i l i a r w i t h f u n c t i o n m o d u l e s c a n c a r i y o u t all d e v e l o p m e n t ta s k s r e l a t e d t o BAPIs w i t h o u t a p r o b l e m . ID ocs, o n t h e o t h e r h a n d , c o n t a i n s o m e s p e c if ic f e a t u r e s t h a t a r e n ’t u s u a l l y d e s c r i b e d in d e v e l o p e r m a n u a l s . T h e s e s p e c if ic f e a t u r e s a r e d e s c r i b e d in th is b o o k .
1.4
S u m m a ry
I n t h i s c h a p t e r , w e d i s c u s s e d t h e r e a s o n s f o r u s i n g i n t e r f a c e s in g e n e r a l , as w e l l a s t h e t y p e s o f i n t e r f a c e s p r o v i d e d f r o m SAP. You l e a r n e d t h a t C u s t o m i z i n g a n d p r o g r a m m i n g w i t h ID o c s is v e i y i m p o r t a n t . I n t h e n e x t c h a p t e r , w e ’ll t a k e a d e e p e r l o o k a t ID o c s , b y s t a r t i n g a t t h e v e i y b e g i n n i n g - t h e d i f f e r e n t p o s s i b il i t i e s t o c r e a t e ID o c s f o r s e n d i n g t h e m t o o u r LSs o r p a r t n e r s .
27
|
1 .4
I n th e s e n d in g s y s te m , i t 's necessa ry to g e n e r a te ID ocs so t h a t th e y c a n b e s e n t to th e rec eivin g s y s te m . H o w th is is d o n e d e p e n d s on th e ty p e o f d a ta a n d th e a p p lic a tio n . T his c h a p te r describes th e d iffe r e n t g e n e r a tio n o p tio n s a n d th e ir use.
2
Generating IDocs
SAP h a s p r o v i d e d t o o l s f o r t h e g e n e r a t i o n o f I D o c s in all l o c a t i o n s w h e r e t h e y a r e u s e d i n ALE s c e n a r i o s o r c lassic ED I, a n d t h e y c a n u s u a l l y be a c tiv a te d u s in g th e C u sto m iz in g s e ttin g s . H o w e v e r, th e re a r e d iffe re n t m e t h o d s o f ID o c g e n e r a t i o n d e p e n d i n g o n t h e t y p e o f d a t a a n d t h e l o c a t i o n w h e r e t h e ID o c w ill b e g e n e r a t e d . T h i s c h a p t e r p r e s e n t s t h e m o s t c o m m o n m e t h o d s o f ID o c g e n e r a t i o n . U s u a lly t h e ID o c a d m i n i s t r a t o r — n o t t h e d e v e l o p e r — i m p l e m e n t s t h e s e t t i n g s r e q u i r e d f o r c r e a t i n g th e p a r t n e r p ro f ile s , f o r i n s t a n c e , s o t h e y a r e o u t l i n e d o n l y b riefly, a n d m o r e i m p o r t a n c e is a t t a c h e d t o t h e f u n c t i o n a l p r o c e s s flow.
2.1
S ta n d a rd M e th o d s fo r th e ID o c
G e n e ra tio n
Initially, y o u m u s t d i s t i n g u i s h b e t w e e n t h e g e n e r a t i o n o f m a s t e r d a t a a n d th e g e n e ra tio n o f tran sa c tio n d ata b ec au se th e re are d iffe re n t re q u ire m e n ts o n th e g e n e ra tio n process o r the g e n e ra tio n fre q u e n c y d e p e n d in g o n t h e t y p e o f d a t a . A s p e c ia l t o o l is a v a il a b le to g e n e r a t e m a s t e r d a t a , c a ll e d t h e S h a r e d M a s te r D a ta Tool (S M D ). T r a n s a c t i o n d a t a I D o c s a re g e n e r a t e d v ia t h e a l r e a d y - e x i s t i n g m e s s a g e c o n t r o l . T h e r e a r e a ls o s o m e s p e c ia l f u n c t i o n s f o r I D o c s t h a t a r c d i r e c t l y g e n e r a t e d in a p r o c e s s .
2.1.1
Shared M a ste r D a ta Tool
T h e S M D is a s p e c ia l t o o l f o r s e n d i n g m a s t e r d a t a v i a ID o c . M a s t e r d a t a
M a s te r d a ta
is c h a r a c t e r i z e d b y a r e la t iv e ly l o n g r e t e n t i o n p e r i o d in t h e s y s t e m d u r i n g
in t h e I D o c
29
2
|
G e n e ra tin g ID o cs
w h i c h t h e d a t a is c h a n g e d rarely. M a s t e r d a t a u s u a l l y c o n s i s t s o f m u l t i p l e v i e w s t h a t a r e n o t u s e d all t h e t i m e . You c a n o m i t v i e w s , i n c l u d i n g t h o s e t h a t c o n t a i n m a n d a t o r y field s, b e c a u s e t h e c h e c k o f w h e t h e r all m a n d a t o i y fields a r e p o p u l a t e d is o n l y c a r r i e d o u t i f t h e v i e w is a c tu a l ly u s e d . T h is e n a b l e s y o u to s e l e c t f r o m t h e w e a l t h o f i n f o r m a t i o n t h a t is o f f e r e d f o r a s p e c if ic o b j e c t a n d u s e e x a c t l y t h e d a t a t h a t is a c t u a l l y r e q u i r e d w ith in y o u r en terp rise. To d i s t r i b u t e d a t a u s i n g I D o c s , a n a u t o m a t e d p r o c e s s is d e s i r a b l e t h a t re s p o n d s to t h e c reatio n a n d m o d ificatio n o f m a s te r d a ta w ith o u t re q u ir i n g f u r t h e r u s e r i n t e r v e n t i o n s . A ls o , e m p t y v i e w s a r e n o t s u p p o s e d to be transferred. A u t o m a t io n a n d
T h e S M D tak es th e s e r e q u ir e m e n ts in to a c c o u n t. T h e tec h n ic a l im p le
c o n t r o l v ia v ie w s
m e n t a t i o n o f a u t o m a t i o n a n d c o n t r o l v ia v i e w s e n t a i l s t h a t a lre a d y -e x is tin g p ro c e d u re s ca n b e u se d fo r b o th fu n c tio n s. F o r a u to m a tio n , y o u r e v e r t to r e c o r d i n g c h a n g e s , w h i c h is i m p l e m e n t e d b y d e f a u l t ; f o r c o n t r o l v ia v i e w s , y o u u s e t h e o p t i o n ( w h i c h o r i g i n a t e d f r o m b a t c h i n p u t p r o c e s s i n g ) to c o n t r o l i r r e l e v a n t fields u s i n g a
N0_DATA
c h a r a c te r . T h e n ,
t h e ID o c s a r e r e g u la r l y g e n e r a t e d v ia b a c k g r o u n d j o b s . A d d i t i o n a l ly , f o r a l m o s t all o b j e c t s , y o u a ls o h a v e t h e o p t i o n to e x p lic itly g e n e r a t e ID o c s o r t o r e q u e s t ID o c s . You c a n u s e t h i s o p t i o n i f w a i t i n g f o r p e r i o d i c a l l y s c h e d u l e d j o b s is i m p o s s i b l e .
R e co rd in g C hanges C h a n g e p o in t e r
F o r c o n s i s t e n c y r e a s o n s , c h a n g e s to t h e m a s t e r d a t a a r e u p d a t e d i n d e p e n d e n t l y o f t h e u s e o f ALE in SAP s y s t e m s . F o r e a c h i n d i v i d u a l d a t a e l e m e n t o f t h e t a b l e s c o n c e r n e d , SA P h a s s t i p u l a t e d w h e t h e r a c h a n g e s h o u l d b e lo g g e d o r n o t . F ig u r e 2.1 s h o w s t h e
C
h a n g e
D
o c u m e n t
Fl a
g
,
w h i c h is a c ti v a te d in t h i s c a s e a s a n e x a m p l e o f B ISM T ( O ld M a te r ia l N u m ber) f r o m t h e W r i t i n g t h e h is t o r y in t h e a p p lic a t io n
M ARA
ta b le
.
F o r u p d a t i n g t h e c h a n g e s , y o u a l w a y s call t h e
C H A N G E D O C U M E N T .O P E N
func
tio n m o d u le , w h ic h p re p a re s th e w ritin g o f th e c h a n g e h isto ry . T h en , all c h a n g e s to b e w r i t t e n a r e c o l l e c t e d , a n d t h e p r o c e s s is c o n c l u d e d u sin g th e
30
C H A N G E D O C U M E N T .C L O S E
f u n c t i o n m o d u l e . B e c a u s e ID o c s a re
S tand ard M e th o d s fo r th e I D o c G e n e ra tio n
|
2 .1
s u p p o s e d t o b e g e n e r a t e d w h e r e v e r c h a n g e s a r e u p d a t e d b y d e f a u l t , th e CH A N G ED O C U M EN T_C LO SE
f u n c t i o n m o d u l e h a s a n ALE s h a r e in a d d i t i o n
to its s t a n d a r d f u n c t i o n . T h i s e n a b l e s y o u to g e n e r a t e ch a n g e p o in te rs f o r ALE f o r t h e d e s i r e d m e s s a g e t y p e s . In all U n i c o d e - e n a b l e d r e le a s e s , th i s is d o n e u s i n g t h e
C H A N G E _ P O IN T E R S _ C R E A T E _ L O N G
in o l d r e le a s e s , t h i s is d o n e u s i n g t h e
fu n c tio n m o d u le;
C H A N G E _ P O IN T E R S _ C R E A T E
fu n c tio n
m o d u le.
D ic tio n a ry: D isp la y Data Elem ent
ssiMMMiMMfisisMSMTsiasHi Data ele m e n t
BISH T
Short Description
Attributes
Active
Old m aterial num ber
D a ta Type
P«Aifi i.abei________
Search H elp Nam e Param eters
P a ra m e ter ID
Defau lt C o m p o n en t N a m e
Figure 2.1
OLD_HM_HO
C h a ra c te r is tic s o f D a ta E le m e n ts
You a ls o h a v e t h e
C H A N G E _ P O IN T E R S _ C R E A T E _ D IR E C T
f u n c t i o n m o d u l e as
a s e c o n d o p t i o n t o g e n e r a t e c h a n g e p o i n t e r s . T h i s f u n c t i o n m o d u l e is c a lle d b y a p p l i c a t i o n s t h a t a r e n o t c o n n e c t e d t o t h e p r e v i o u s l y d e s c r i b e d change m a n a g e m e n t fo r d o cu m en ts. In b o t h ca s e s , c h a n g e p o i n t e r s a r e o n l y w r i t t e n i f y o u u s e t h e S M D f o r p e r f o r m a n c e r e a s o n s . I n t h e ALE C u s t o m i z i n g , y o u c a n s p e c i f y w h e t h e r th i s is t h e c a s e a n d f o r w h i c h m a s t e r d a t a y o u r e q u i r e c h a n g e p o i n t e r s . T h e r e is a s e p a r a t e T r a n s a c t i o n c o d e SALE f o r t h e ALE C u s t o m i z i n g t h a t ta k e s y o u d i r e c t l y to t h e c o r r e c t p o s i t i o n in t h e m e n u t r e e . F ig u r e 2 .2 s h o w s t h e m e n u p a t h i n C u s t o m i z i n g in w h i c h y o u m a k e t h e n e c e s s a r y se ttin g s .
31
G e n e r a t in g c h a n g e p o in t e r s d ir e c t ly
2
|
G e n e ra tin g I D ocs
S tru c tu r e
___________________________________________________________________________
^.Interface P
B a s ic S e ttin g s
P
C o m m u n ic a tio n
^
M o d e llin g a n d Im p le m e n t in g B u s in e s s P r o c e s s e s
P
G lo b a l O rg a n iz a tio n a l U n its
t>
C o n fig u r e P r e d e fin e d A L E B u s in e s s P r o c e s s e s
M a in ta in D is tn b u tio n M o d e l a n d D is trib u te V ie w s
________ ^
M a s t e r D a t a D is tn b u tio n ^
R e p lic a t io n o f M o d ifie d D a ta B
( £ > A c tiv a te C h a n g e P o in t e r s - G e n e r a lly
_____________________________A c tiv a te C h a n g e P o in t e r s fo r M e s s a g e T y p e s ______________
F ig u r e 2 .2
A c t iv a t in g C h a n g e P o in te r s f o r t h e S M D
A c t iv a t in g c h a n g e
In itia lly , y o u a c t i v a t e t h e g e n e r a t i o n o f c h a n g e p o i n t e r s g e n e r a l l y . As
p o in t e r s
a r e s u lt, t h e s h a r e o f t h e CHANGEDOCUNENT_CLOSE f u n c t i o n m o d u l e t h a t h a s n o t b e e n u s e d u p t o n o w a n d t h a t is r e s p o n s i b l e f o r t h e S M D is r u n t h r o u g h . T h is m u s t b e s e t o n c e o n l y f o r all m a s t e r d a t a . F ig u r e 2 .3 s h o w s t h e a p p r o p r i a t e fu n c tio n a lity .
A c tiv a te C h a n g e P o in te rs G e n e ra lly
Activation s i a t u s / p ] C h a n g e p o in te rs activated - g e n e ra l^
F ig u r e 2 .3
A c t iv a t e C h a n g e P o in te rs G e n e ra lly
A c t iv a t in g c h a n g e
I f t h e c h a n g e p o i n t e r s a r e a c tiv a te d g e n e ra lly , y o u c a n s p e c if y i n a s e c o n d
p o in t e r s f o r o b je c t
s te p fo r w h ic h m essag e ty p e y o u re q u ire th e g e n e ra tio n o f ch a n g e p o in t ers . T h is is d o n e in t h e s e c o n d m e n u s u b i t e m (A c tiv a te C h a n g e P o in te rs f o r M e s s a g e T y p es) a n d h a s b e e n i m p l e m e n t e d f o r t h e m e s s a g e ty p e s , M ATMAS
for
and
M ATCOR
M ATMAS_W M S
and
m a t m a s .G
(s e e F ig u r e 2 . 4 ) . N o c h a n g e p o i n t e r s a r e w r i t t e n DS,
w h i c h h a v e n o t b e e n a c tiv a te d .
In t h i s c o n t e x t , it’s i m p o r t a n t t h a t a c h a n g e p o i n t e r i s n ' t w r i t t e n f o r ea c h c h a n g e d field b e c a u s e t h e r e a r e field s w h o s e v a l u e s a r e n o t s ig n if i c a n t f o r t h e d o w n s t r e a m s y s t e m . By m e a n s o f T r a n s a c t i o n B D 5 2 , SAP p r o v i d e s fields f o r e a c h m e s s a g e t y p e c o n n e c t e d to t h e S M D , w h i c h are r e l e v a n t f o r c h a n g e s f r o m SA P's p o i n t o f v iew . F o r t h e m a t e r ia l m a s te r , t h e DM AKT-SPRAS field is i m p o r t a n t , f o r e x a m p l e . I n t h e tr a n s a c tio n , y o u e n t e r t h e field s t h a t a r e u s e d w i t h i n y o u r e n t e r p r i s e . I f y o u ' v e m a d e
32
S tand ard M e th o d s fo r th e ID o c G e n e ra tio n
|
c h a n g e s t o t h e c o r r e s p o n d i n g m a s t e r d a t a t a b l e s v ia t h e SAP e n h a n c e m e n t c o n c e p t a n d u s e c u s t o m e r - s p e c i f i c field s, y o u c a n a l s o s e t t h e c u s t o m e r - s p e c i f i c fie ld s h e r e . R e fe r t o C h a p t e r 4 , C h a n g e s to ID o c s , to l e a r n h o w to p r o v i d e t h e s e fields.
C h a n g e V ie w "A c tiv a te C h a n g e p o in te rs f o r M e s s a g e T y p e " : ^
N e w E r f r .e s |
S |
Activate C h a n g e p o in te rs for M e s s a g e Type M essgType
active
|d
MATMAS
0
□
MATMAS_6DS
□
0
M ATHASJMS
0
MATQM
°
F ig u r e 2 .4
1
A c t iv a t e C h a n g e Po n te rs f o r M e s s a g e T yp e
C h a n g e V ie w "C h a n g e d o c u m e n t ite m s f o r m e ssa g e ty p e " : O ve rvie w ^
N e w Entries
Q .
©
©
Q
MATMAS
M e s s a a e Type
C h a n a e do c u m en t item s fo r m e s s a a e fro e T“
O bject
[fa b le N a m e
MATERIAL
D6ESV
fFieiC N a m e KEY
MATERIAL
D6ESV
KOVBM
MATERIAL
D6ESV
VBWRT
MATERIAL
DMAKT
KEY
MATERIAL
DMAKT
flAKTX
MATERIAL
|DMAKT___________________________
[SPRAS
m• AT I FC lPMl 1A1L
rM t PnNn U nA
R Pe 1I T1 oR n
MATERIAL
DMARM
BR6EW
MATERIAL
pHARH
EAN11
MATERIAL
DMARM
GE WEI
1ATERIAL
DMARM
GTIN_VARIAMT
MATERIAL
DMARM
HOEHE
MATERIAL
DMARM
KEY
|
___
F ig u r e 2 .5
C h a n g e -R e le v a n t F ie ld s in T ra n s a c tio n B D 52
F ig u r e 2 . 5 s h o w s a s e c t i o n o f t h e field s f o r t h e
M ATMAS
m essag e type,
w h i c h a r e p r o v i d e d b y SAP a s c h a n g e - r e l e v a n t . T h e m e s s a g e t y p e is d i r e c t ly r e f e r e n c e d to fields a n d ta b le s o f t h e m a t e r ia l m a s t e r e x c e p t f o r t h e KEY field . T h is field i s n ’t p a r t o f t h e r e s p e c t i v e t a b l e b u t a s s u m e s a v e i y i m p o r t a n t , a d d i t i o n a l c o n t r o l ro le : It e n s u r e s t h a t t h e c r e a t i o n o f a
33
C h a n g e - r e le v a n t f ie ld s
2 .1
2
|
G e n e ra tin g ID o cs
ta b le e n t r y c a n b e s e n t v i a ID o c . I f t h e KEY field is s p e c if ie d in T ra n s a c t i o n B D 5 2 , a c h a n g e p o i n t e r is w r i t t e n d u r i n g t h e c r e a t i o n o f t h e c o r r e s p o n d i n g o b j e c t , f o r e x a m p l e , d u r i n g t h e in itia l c r e a t i o n o f t h e m a t e r ia l f o r t h e M A R A -K EY d u m m y field o r d u r i n g t h e c r e a t i o n o f a t e x t in a n e w l a n g u a g e f o r t h e M AKT-KEY d u m m y field. I m a g i n e t h a t t h e k e y v a l u e o f t h e ta b le c o n c e r n e d is c h a n g e d f r o m " e m p t y " to t h e n e w v a l u e . A s a re s u lt, all fie ld s o f t h i s t a b l e a r e t r a n s f e r r e d . A s s ig n in g c h a n g e
A d d i t i o n a l ly , f o r e a c h o f t h e c h a n g e - r e l e v a n t field s, y o u m u s t s p e c if y to
r e le v a n t fie ld s
w h i c h fie ld in w h i c h s e g m e n t o f t h e I D o c t y p e it b e l o n g s . T h i s is d o n e in T r a n s a c t i o n B D 6 6 , w h i c h is s h o w n i n F ig u r e 2 . 6 . T h e DMAKT-SPRAS s a m p l e fie ld f r o m T r a n s a c t i o n B D 5 2 b e l o n g s t o t h e E1MAKTM I D o c s e g m e n t a n d t o t h e field t h a t is a ls o c a lle d "SPRAS." F o r y o u r o w n fields, y o u m u s t s p e c if y t h i s u s i n g t h e N e w E n t r i e s b u t t o n .
C h a n g e V ie w "S e g m e n t F ie ld - C h a n g e D o c u m e n t F ie ld ” : O v e rv ie w *
N e w E n tn e s
MATMAS
M e s s a g e Type
S e g m e n t F ie ld - C h a n g e D o c u m e n t Field S e g m e n t type
F ie ld N a m e
1MAKTM
O bject MATERIAL
Table N a m e
: ie id N a m e
j
DNAKT
key
m
1MAKTM
MAKTX
MATERIAL
DMAKT
MAKTX
W
1MAKTM
SPRAS
MATERIAL
DMAKT
SPRAS
I ]
MATERIAL
MARA
KEY AENAM
1MARAM 1MARAM
AENAM
MATERIAL
MARA
1MARAM
AESZN
MATERIAL
MARA
AESZN
1MARAM
8E6RU
MATERIAL
MARA
8E6RU
1MARAM
BEHVO
MATERIAL
MARA
8EHV0
1MARAM
8 IS M T
MATERIAL
MARA
8 IS M T
1MARAM
8LA NZ
MATERIAL
MARA
8LANZ
tMARAM
8L A T T
MATERIAL
MARA
8LA TT
1MARAM
8MATN
MATERIAL
MARA
8MATN
F ig u r e 2 .6
A s s ig n m e n t o f I D o c F ie ld s t o C h a n g e - R e le v a n t F ie ld s
E v a lu a t in g c h a n g e
T h e c h a n g e p o i n t e r s a r e t h e n e v a l u a t e d . It j u s t d e p e n d s o n t h e o b j e c t
p o in t e r s
c o n c e r n e d w h i c h f u n c t i o n m o d u l e is u s e d h e r e . W h e n y o u call T ra n s a c tio n BD60, y o u can v ie w th e s e f u n c tio n m o d u le s a n d re p la c e th e m w ith y o u r o w n f u n c t i o n m o d u l e s i f y o u w a n t to m a k e s o m a n y c h a n g e s t o t h e
34
S tand ard M e th o d s fo r th e ID o c G e n e ra tio n
|
s t a n d a r d f u n c t i o n a l i t y t h a t y o u d o n ’t w a n t to e n h a n c e o r m o d i f y t h e SAP o r i g i n a l . F ig u re 2 . 7 s h o w s a n o t h e r e x a m p l e o f t h e m a t e r i a l m a s t e r d a ta . T h e r e , t h e f u n c t i o n m o d u l e t h a t u s e s c h a n g e p o i n t e r s t o g e n e r a t e ID o cs is c a ll e d
M ASTER I DO C_CREATE_SM D_M ATM AS.
C h a n g e V ie w " A d d it io n a l D a ta f o r M e s s a g e T y p e " : O v e r v ie w ^
Q
N e w E n tr .e s
A d d itio n a l D a t a fo r M e s s a g e T y p e M essgType
-
F u n d Mod
T a b le
hathas
Im a t h a s
HA STE R ID O C _C R E A TE _SM D _H A TM A S
HARA
nA TH A SJM S
|MATHAS
N A STE RIDO C_C RE ATE _SM D_M A TM A S
URA
F ig u r e 2 .7
The
R e fm s g .
E j
F u n c tio n M o d u le s t o E v a lu a te C h a n g e P o in te r s
R B D M I DOC
r e p o r t , w h i c h m u s t b e s c h e d u l e d a t r e g u l a r i n t e r v a ls , m u s t
t h e n u se th e s e f u n c tio n m o d u le s to g e n e r a te ID ocs fro m t h e c h a n g e
" R B D M ID O C ” b a c k g ro u n d jo b
p o i n t e r s a n d u p d a t e w h i c h c h a n g e p o i n t e r s h a v e b e e n p r o c e s s e d . As a t r a n s f e r v a l u e , y o u c a n s p e c i f y f o r w h i c h m e s s a g e t y p e y o u w a n t to i m p le m e n t th e ev a lu a tio n . F or th is p u rp o s e , y o u sp ec ify th e a p p r o p ria te ty p e (here: R B D M I DOC
m atm aS)
in t h e M e s s a g e T y p e field in t h e in itia l s c r e e n o f t h e
r e p o r t . T h i s is i l l u s t r a t e d in F ig u r e 2 .8 .
C r e a tin g ID o c T y p e f r o m C h a n g e P o in te r s
M e s s a g e ty p e
F ig u r e 2 .8
MATMAS|
E>
I n it ia l S c re e n o f t h e " R B D M I D O C " R e p o rt
F o r s e n d in g ID ocs u sin g th e S M D a n d fo r c h a n g e p o in te rs , th e a p p lica
C h a n g e s in th e
t i o n a n d t h e ALE c o m m u n i c a t i o n l a y e r i n t e r a c t closely. F ig u re 2 . 9 s c h e
SMD
m a t i c a l l y s h o w s t h e p r o c e s s f l o w o f ID o c g e n e r a t i o n . T h e e n t i r e p ro c e s s o f w r i t i n g c h a n g e p o i n t e r s t a k e s p la c e in t h e a p p l i c a t i o n ; t h e e v a l u a t i o n o f th e c h a n g e p o in te r a n d th e g e n e ra tio n o f ID ocs are carried o u t b y th e ALE c o m m u n i c a t i o n lay er.
35
2 .1
2
|
G e n e ra tin g ID o cs
A p p lic a tio n
1.
W r it e n o r m a l h is to r y
2.
C h e c k i f c h a n g e p o in t e r s a r e g e n e r a lly s u p p o s e d t o b e w r i t t e n
3.
C h e c k i f c h a n g e p o in te r s a r e s u p p o s e d t o b e w r i t t e n f o r th e o b je c t in q u e s tio n
4.
W r i t e c h a n g e p o in te r s
R B D M ID O C
A p p lic a t io n D ocum ent
C hange
1.
R e a d c h a n g e p o in te r s
2.
W r it e ID o c
3.
M a r k c h a n g e p o i n t e r s as
P o in t e r s
p ro c e s s e d
Change Docum ent
F ig u r e 2 .9
ID o c G e n e r a t io n U s in g t h e S M D
N o t e t h a t w h e n y o u s e n d ID o c s v ia c h a n g e p o i n t e r s , y o u o n l y s e n d t h o s e v i e w s in w h i c h c h a n g e s h a v e a c tu a l ly b e e n m a d e . I f a n e w v i e w h a s b e e n c r e a t e d , all its fie ld s a r e t r a n s f e r r e d ; i f a v i e w h a s b e e n c h a n g e d , o n l y t h e c h a n g e d fie ld s a r e t r a n s f e r r e d to i n c r e a s e p e r f o r m a n c e . C h a p t e r 4, C h a n g e s t o ID o c s , u s e s t h e e x a m p l e o f t h e m a t e r i a l m a s t e r t o d e s c r i b e h o w y o u c a n c h a n g e th is d e fa u lt b e h a v io r u s in g a m i n o r m o d ificatio n . You c a n f i n d t h e c h a n g e p o i n t e r s in t h e in g s t a t u s r e c o r d s in t h e
BDCPS
BD C P
tab le a n d th e c o r re s p o n d
t a b l e . As o f SAP N e t W e a v e r A p p l i c a t i o n
S e r v e r 6 . 2 0 (SAP N e t W e a v e r AS), p r o c e s s i n g w i t h h i g h e r p e r f o r m a n c e is p o s s i b l e v ia a s h a r e d t a b l e c a lle d
BDC P2.
H o w e v er, th is n e w p ro c e d u re
i s n 't s u p p o r t e d f o r all m e s s a g e t y p e s . W h e t h e r i t's a p p l i c a b l e f o r y o u r m e s s a g e t y p e is i n d i c a t e d in t h e d e ta il v i e w o f T r a n s a c t i o n B D 6 0 . A s o f R e le a se 7 . 1 , o n l y t h e n e w p r o c e s s i n g u s i n g T a b le
8DCP2
is a v a il a b le f o r
all m e s s a g e ty p e s . D i s t r i b u t i o n lo c k
F o r t h e d i s t r i b u t i o n v i a t h e S M D , y o u m u s t c o n s i d e r s o m e sp e c ific s f o r s o m e m a s t e r d a t a . You c a n s e t a d i s t r i b u t i o n lo c k f o r t h e m a t e r i a l m a s t e r to g e n e r a l l y p r e v e n t t h e s e n d i n g o f a m a t e r i a l . F o r t h i s p u r p o s e , y o u
36
S tand ard M e th o d s fo r th e ID o c G e n e ra tio n
m u s t m a k e a s h o r t d e t o u r . In t h e d e s i g n d a t a o f t h e m a t e r ia l in t h e
|
2 .1
m a ra
ta b l e , t h e r e is a c r o s s - p l a n t m a t e r i a l s t a t u s (M A R A -M S T A E field ). T h is s t a t u s r e f e r s t o a n e x i s t i n g e n t r y in t h e
T14l
ta b le . H e r e , y o u c a n as s ig n
a d d i t i o n a l p r o p e r t i e s f o r e a c h s t a t u s v a l u e . I f t h e DLOC K field p r o v i d e d h e r e is s e l e c t e d , t h e d i s t r i b u t i o n lo c k is set. F o r co n tracts
(B L A O R D
m e s s a g e t y p e ) , o n l y r e le a s e d c o n t r a c t s a r e t r a n s
ferred u sin g th e SMD.
R e d u c in g M e ssa ge s T h e s e c o n d r e q u i r e m e n t o n t h e d i s t r i b u t i o n o f m a s t e r d a t a a r is e s fr o m t h e d i s t r i b u t i o n o f all m a s t e r d a t a t o i n d i v i d u a l v i e w s a n d t h e o p t i o n to d e f in e , in C u s t o m i z i n g , w h i c h fie ld s o f a v i e w a r e a c t u a l l y s u p p o s e d to b e u s e d . T h i s is s c a la b l e f o r t h e ID o c t r a n s f e r b y u s i n g t h e r e d u c e d m e s s a g e ty p e s . A r e d u c e d m e s s a g e t y p e a l w a y s r e la t e s t o a n e x i s t i n g m e s s a g e t y p e b u t
R e d u ce d m essage
t r a n s f e r s le ss d a t a . T h e r e d u c t i o n i s n ' t p o s s i b l e f o r a ll m e s s a g e t y p e s ;
ty p e
s o t h e d e v e l o p e r o f t h e m e s s a g e t y p e m u s t e x p l i c i t l y d e f i n e it a s r e d u c ib le . All v i e w s a n d fie ld s t h a t m u s t b e t r a n s f e r r e d a s a m i n i m u m a rc p r e d e f i n e d h e r e ; all o t h e r v i e w s a n d fie ld s c a n b e s e l e c t e d a d d i t i o n a l l y i f r e q u i r e d . T r a n s a c t i o n B D 6 0 in t h e d e t a i l v i e w f o r a m e s s a g e t y p e is t h e t r a n s a c t i o n f o r d e f i n i n g a m e s s a g e t y p e as r e d u c i b l e . B y c a llin g T r a n s a c ti o n B D 6 5 , y o u d e f i n e t h e m a n d a t o i y fields. F o r e a c h d e l i v e r e d m e s s a g e t y p e , SAP s p e c if ic s w h e t h e r i t ’s r e d u c i b l e . B e c a u s e t h i s i n v o l v e s f u n c t i o n s in t h e g e n e r a t i o n a n d u p d a t e m o d u l e fo r t h e c o r r e s p o n d i n g ID o c , c u s t o m e r s c a n ' t s i m p l y s e t t h e m e s s a g e t y p e to r e d u c i b l e r e tr o a c t i v e l y . T h e m a n d a t o r y fie ld s t h a t SAP p r o v i d e s w i t h T r a n s a c t i o n B D 6 5 c o r r e s p o n d t o t h e C u s t o m i z i n g t h a t SA P p r o v i d e s f o r t r a n s a c t i o n s t h a t a r e u s e d to m a i n t a i n m a s t e r d a t a , f o r i n s t a n c e , T r a n s a c t i o n M AT1 f o r m a i n t a i n i n g t h e m a t e r ia l m a s t e r . I f y o u m a k e c h a n g e s to t h e m a n d a t o r y fie ld s in t h e a p p l i c a t i o n 's C u s t o m i z i n g , y o u a ls o a d a p t t h e m in T r a n s a c t i o n B D 6 5 s o t h a t c u s t o m - d e v e l o p e d m a n d a t o i y fields a r e a ls o m a n d a t o r y f o r r e d u c i n g in t h e ID o c. F ig u r e 2 . 1 0 s h o w s a s e c t i o n o f th e d ata fo r th e
M ATM AS
m e s s a g e ty p e .
37
G e n e r a tin g ID o c s
C h a n g e V ie w " A d d itio n a l D a ta f o r M e s s a g e T y p e " : D e ta ils
\
N*w Entn*$ ] 1 2
B D 6 0 - D e ta il
Type
S A P d e fin e s m e s s a g e ty p e
i£>
a y
" A T IU S
A aom onM O a t a t a M e s s a g e l i o e
Additional o,u
a s r e d u c ib l e
R e fe re n c e M e s s a g e Type
f o r m * F u n ctio n M odulo
C h a n g e V ie w " M a n d a t o r y F ie ld s o f M e s s a g e T y p e " : O v e rv ie w N e w E n t r ie s
Q Ei
B D
M » n o » io r v f n i a t o ' w « s » g » t » d *
B D 65 IHAKTH
1HMIH D e f i n e m a n d a t o r y f ie l d s
. th
S P ftA S
ih a r m i
6»0ES
ih a
(b o th S A P a n d y o u )
1 1 1 *6 *"
VOS"
«««
(U T K l
ih a
IHMM 1HMU1
lU lltft
1HA®»H
fin s
ih a
E I*
H 8RSH
*»k
ih a h
F ig u r e 2.10
ru m HS6FX
«h
HTAR1
IN A R M
P S IA t
ih a s » h
SPA RI
B a s ic M a i n t e n a n c e f o r R e d u c i b l e M e s s a g e T y p e s
R e d u c t io n in
You t h e n c r e a t e y o u r o w n r e d u c e d m e s s a g e t y p e s in C u s t o m i z i n g o f
C u s t o m iz in g
T r a n s a c t i o n SALE. U n d e r t h e C r e a te R e d u c e d M e s s a g e T y p e m e n u i t e m o r v i a T r a n s a c t i o n B D 5 3 y o u c a n fin d t h e in itia l s c r e e n a s s h o w n in Fig u r e 2 .1 1 .
Structure
^ Df
5®.f P ! 1.':? P.^P.®!?.9.
I
B asicSettno’s
I
Comm unication
^
Modelling an d im plem enting B usiness Processes
P
Q<
G loba l O rg a n iz a tio n a l Units Maintain Distribution Model and Distribute Views
I' Q t
Configure Predefined A i E B usiness Processes
“
Master D ata Distribution
Q . l>
Replication o f Modified Data
^
v
S e n alizato n for Sending an d Receiving Data ^ v
Scope o f D ata for Distnbution [£
M essag e Reduction Q Q
F ig u re 2 .11
< £ Create Reduced M essag e Type G enerate Transport Request for M essage Type
C reate R e d u ced M e ssag e Type
S ta n d a rd M e th o d s fo r th e ID o c G e n e ra tio n
W h e n y o u s p e c if y t h e n a m e o f t h e n e w r e d u c e d m e s s a g e t y p e (see F ig u re 2 .1 2 ), y o u m u st c o n s id e r th e n a m in g ru les for y o u r o w n o b jec ts
R e d u c tio n s te p s
(th e
n a m e m u st start w ith Y o r Z o r y o u r o w n nam espace).
ID o c R e d u c t io n M a in t e n a n c e : In it ia l S c r e e n [0
]\0 \
1 [ a ] 11A C K W Change pantm
Reduced mes s a g e
] C * t t l V i » ( M j l P O r tt'S
?S «1
S te p 1 :
R e d u c e d m o s s a g o t*te
Wo ieW «nn
4“
B.
& S w e c t « n o ' M e s t a ? e T . s e as ntfifencetc*** Reducoon
A s s ig n n a m e a n d d e s c r ip t io n
ZSMI
IUTIU$
ID o c R e d u c t io n M a in t e n a n c e : In it ia l S c r e e n
?
0
■£>-
0
* i ~ j t e c h a n g e p o .- * * - *
Poduce8
1
—
EE
1
data
(PARA)
S te p 2 :
(•) A d d i t i o n a l f i e l d * t o r { i p a k a k
(•) Discrete Industries Fields IPAUP
I*) P a s t e r « i t e r u l
1 HAKCB 11 Ml nur.nn
(•) Raster e a te n al C segeent (PABC) (•) P a s t e r e a t e r i a l
units of M a t u r e
1 HBCM"
(•) Ita s t e r e a t e n a l
eateriil
imam
(.) Paster e a te n al e a te n a l data p e r (•) P a t t e r e a t e n a l s a l e s d a t a (PVIC)
1P V K " 1 Ml 11.1
S e le c t r e le v a n t
(PMI)
s e g m e n ts
(IMS*)
valuation
(PBC»)
earehouse nueeer
(•) P a s t e r e a t e n a l
l o n g teit
F.eiflt
Field
Text
PSfiFK HATXfi
(•) F u n c t i o n (•) " a t e r t a l
Kuabcr
S te p 3 :
(•) H a a e o f P o r s o n e h o C r o a t e d t h e O b ) e c t
4—
P
■ o o L o g ic a l aessage ty p e I n t e r n a l le n g t h 000006 E x te r n a l le n g t h 000006 O ff s e t 000063 D a ta t y p e CHAR D a ta e le a e n t E01J1ES1P3 » o o nessa ge ty p e I n t e r n a l le n g t h 000030 E x te r n a l le n g t h 000030 O ff s e t 000069 D a ta t y p e CHAR D a ta e le a e n t E0IJ1ES1YP
'--------- HESIYP4Q
E1ALE01
■ • AIE R equest ID oc • I t e a Segaent Segaent d e f i n i t i o n E2AIEG1 R e le a s e d f r a a n d a to ry a m . / t a x . 0000000001 .
tse 30A
Segaent f i e l d s ---------0BJVALUE
-SI6M ---------OPTION
-HISH
F ig u r e 2.16
42
■ o o O b je c t v a lu e ( e i t h o l d le n g t h o f 40) I n te r n a l le n g t h 000040 E x te r n a l le n g t h 000040 D a ta t y p e CHAR D a ta e le a e n t F08JV01D ■ o 0 ABAP: ID : l/ E ( in c lu d e / e x c lu d e v a lu e * ) I n t e r n a l le n g t h 000001 E x te r n a l le n g t h 000001 D a ta t y p e CHAR D a ta e le a e n t TVARV_SISN ■ o o ABAP: S e le c t io n o p t io n (E 0 /B T /C P /.. . ) I n te r n a l le n g t h 000002 E x te r n a l le n g t h 000002 D a ta t y p e CHAR D a ta e le a e n t TVARV.OPTI ■ o o C h a ra c te r f i e l d o f le n g t h 40 I n t e r n a l le n g t h 000040 E x te r n a l le n g t h 000040 D a ta t y p e CHAR D a ta e le a e n t CHAR40 ■ o o C h a ra c te r f i e l d o f le n g t h 40 I n t e r n a l le n g t h 000040 E x te r n a l le n g t h 000040 D a ta t y p e CHAR D a ta e le a o n t CHAR40
'A L E R E Q 0 1 " I D o c T yp e
O f f s e t 000063
O f f s e t 000103
O f f s e t 000104
O f f s e t 000106
O f f s e t 000146
S tand ard M e th o d s fo r th e ID o c G e n e ra tio n
|
T h e a c t u a l l y s e n t f e tc h m e s s a g e c o n t a i n s i n f o r m a t i o n o n t h e m e s s a g e
E x a m p le o f
t y p e t h a t is e x p e c t e d a s t h e r e s p o n s e , t h e s h o r t a n d t h e l o n g n a m e
" M A T F E T ” ID o c
( b e f o r e o r a f t e r R e le a s e 4 .0 ), a n d t h e k e y s o f e l e m e n t s t h a t a r e s u p p o s e d to b e s e n t a s a r e s p o n s e . F ig u r e 2 . 1 7 s h o w s a t h e ZSM1 m a t e r i a l . F o r t h e
M ATM A S
M ATFET
ID o c t h a t r e q u e s t
ID oc, b o t h t h e l o n g a n d t h e s h o r t n a m e
is " M A T M A S " b e c a u s e t h i s is a v e r y o l d m e s s a g e ty p e .
4E STYP
L o g ic a l m e s s a g e ty p e
M ATM AS
M ESTYP40
M e s s a g e Type
M ATM AS
SEGNUM
Segm ent Num ber
000002
SEGNAM
Segm ent Nam e
E1ALE01
O B JVA LU E
O b je c t v a l u e (w ith o ld le n g t h
M ATNR
S IG N
A B A P ID : l/E ( in c lu d e /e x c lu d e
1
O P T IO N
A8AP
EO
LO W
C h a r a c t e r f i e l d o f le n g t h 4 0
F ig u r e 2.17
S e le c t i o n o p t io n ( E O /B T /
ZSM1
M A T F E T ID o c
B e c a u s e m a s t e r d a t a is u s u a l l y e x c h a n g e d b e t w e e n d i f f e r e n t s y s t e m s o f t h e s a m e e n t e r p r i s e , lo g ic a l s y s t e m s a r c u s e d as p a r t n e r s lik e t h e y a r e u s e d in ALE.
2.1.2
M essage Control
T h e m e s s a g e c o n t r o l is a s t a n d a r d f u n c t i o n o f SAP, w h i c h t r i g g e r s a d a t a t r a n s f e r f o r all t r a n s a c t i o n d a t a t h a t is s u p p o s e d t o b e r e c e i v e d b y o t h e r e n t e r p r i s e s , t o o . T h is c a n b e d o n e u s i n g a p r i n t e r , fax, o r a n ID o c . F o r p r o c e s s i n g u s i n g ID o c s , y o u c a n u s e tra n sm issio n m e d iu m 6 f o r p r o c e s s i n g u s i n g p a r t n e r f u n c t i o n s , a n d y o u c a n u s e tra n sm issio n m e d iu m A f o r p r o c e s s in g u s i n g lo g ic a l s y s t e m s . All t h e r e q u i r e d s e t t i n g s f o r t h e m e s s a g e c o n t r o l a r e in T r a n s a c t i o n NACE. You u s e t h e co n d itio n te c h n iq u e t o s p e c i f y w h e n y o u g e n e r a t e w h i c h m e s s a g e s in w h i c h w a y . T h e k e y f o r t h e c o n d i t i o n s is c o m p o s e d o f th e a p p l i c a t i o n y o u ' r e in (e .g ., “EF" f o r p u r c h a s i n g ) , t h e o u t p u t t y p e y o u w a n t t o g e n e r a t e (e.g., " N E U " f o r a p u r c h a s e o r d e r ) , a n d t h e p a r t n e r r o le e v e r y t h i n g w ill b e s e n t t o (e .g ., p a r t n e r " v e n d o r " in its r o l e a s g o o d s v endor).
43
M e s s a g e c o n tro l
2 .1
2
|
G e n e ra tin g I D ocs
” E D I_ P R O C E S S IN G " f u n c t io n
I n m essa g e d e te r m in a tio n , t h e a c tu a l m e s s a g e is g e n e r a t e d u s i n g t h e RSNASTOO
rep o rt. T he
E D I_ P R 0 C E S S I NG
f u n c t i o n t h a t is u s e d h e r e t r a n s f e r s
t h e m e s s a g e as a n EDI m e s s a g e u s i n g t h e ID o c ; it b e l o n g s to t r a n s m i s s i o n m e d i u m 6 . D e p e n d i n g o n t h e s y s t e m s e t t i n g , y o u c a n call t h e
RSNASTOO
re p o r t d ire c tly u p o n sa v in g th e d o c u m e n t o r a t re g u la r in te rv a ls as a batch jo b . In m essage co n tro l, a n E D I c o m m u n i c a t i o n is u s u a l l y a s s u m e d s o t h a t y o u w o r k w i t h p a r t n e r s a n d n o t w i t h lo g ic a l s y s t e m s . O u tb o u n d p a rtn e r
T h e i n f o r m a t i o n o n h o w a n ID o c is s e n t to t h e r e c e i v e r (e.g., v ia RFC o r
p r o f ile
file) a n d w h e t h e r a n E D I s u b s y s t e m is s u p p o s e d t o b e u s e d i f n e c e ss a ry , is s e t in t h e o u tb o u n d p a r tn e r profile in T r a n s a c t i o n W E 2 0 b o t h f o r t h e c o m m u n i c a t i o n w i t h p a r t n e r s a n d f o r t h e c o m m u n i c a t i o n w i t h logical system s.
P ro c e s s c o d e
H e re , y o u a l s o s p e c if y w h i c h ID o c t y p e is s u p p o s e d t o b e u s e d . I f y o u w o r k w i t h t h e m e s s a g e c o n t r o l , in t h e o u t b o u n d p a r t n e r p ro f ile u n d e r t h e M e s s a g e C o n t r o l ta b , y o u s p e c i f y w h i c h p r o c e s s c o d e ( a n d w h i c h u n d e r l y i n g f u n c t i o n m o d u l e ) w ill b e u s e d to p o p u l a t e t h e I D o c d a t a . You c a n f i n d t h e v a l i d p r o c e s s c o d e s f o r t h e r e s p e c t i v e o u t p u t t y p e in T r a n s a c t i o n W E 4 1 (F ig u re 2 .1 8 ) .
Pr&cOiS (000 ^
HE 10
ORDERS PurcM S * (Xdor
□ OulDound process code Q L O flic a l message
Assignm ent to logical message ORDERS
Purchase o rd e r/ order
types • Message code C A lc o d e s
• Message «unc*or> :C M fc in c *> n s
F ig u r e 2.18
A s s ig n m e n t o f t h e P ro c e s s C o d e t o t h e M e s s a g e T yp e
M essa g e codes
You c a n a ls o s p e c i f y t h e o p t i o n a l m essage codes a n d m essa g e fu n c tio n s ,
a n d m essage
w h i c h y o u k n o w f r o m t h e p a r t n e r p ro f ile s , t o b e a b l e to u s e d i f f e r e n t
f u n c t io n s
p r o c e s s c o d e s f o r u p d a t i n g t h e ID o c s . M e s s a g e c o d e s a n d f u n c t i o n s a re
44
S tand ard M e th o d s fo r th e ID o c G e n e ra tio n
|
f r e e l y s e l e c t a b l e , a n d y o u d o n ' t n e e d t o a d h e r e to n a m i n g r u l e s . H o w e v e r, t h i s a ls o m e a n s t h a t n o i n p u t h e l p is p r o v i d e d in T r a n s a c t i o n W E 2 0 , s o y o u m u s t e n s u r e t h e c o r r e c t s p e l l i n g o f t h e n a m e s y o u r s e l f . In t h e d etails o f th e s a m p le p ro c e ss c o d e fo r th e
O R D ER S
g e n e r a t i o n , w h i c h is
s h o w n i n F ig u r e 2 . 1 9 , y o u c a n v i e w t h e lin k t o t h e a s s o c i a t e d f u n c t i o n m o d u le.
Structure :
Q
OutDound p ro c e s s c o de CD Log ical m e s s a g e
P ro c ess code
HE10
Description
O R D E R S P u rchase order
Function m odule
1PQC QUTPUI TOPERS
O ption A L E -S ervcelinb.procg • P ro c e s s in g w ith A L E s e rv ic e P ro c e s s in g W o A L E service P ro c e s s in g w . trig g e r (in b o u n d )
V e rs io n o f function m odule • P ro c e s s in g w ith fu n c tio n m o d u le v e rs io n 3.0 P ro c e s s in g w ith fu n c tio n m o d u le v e rs io n 2.2
F ig u r e 2.19
A s s ig n m e n t o f t h e P ro c e s s C o d e t o t h e F u n c tio n M o d u le
U n d e r O p t i o n A L E - S e r v ic e /I n b . P ro c g , y o u c a n s e l e c t w h e t h e r t h e ALE
A L E s e rv ic e s
s e r v ic e s a r e s u p p o s e d to b e u s e d o r n o t . T h e ALE s e r v i c e s r e p r e s e n t o p t i o n s o f ID o c m a n i p u l a t i o n u s i n g filters a n d ru le s . C h a p t e r 4, S e c tio n 4 . 1 , C u s t o m i z i n g , d i s c u s s e s t h e ALE s e r v ic e s t o p i c in m o r e d e ta il. B e c a u s e y o u o f t e n r e q u i r e a lo t o f p a r t n e r p r o f ile s — e s p e c i a l l y i f y o u w o rk w ith p a rtn e rs -
y o u h a v e t h e o p t i o n to c r e a t e t e m p l a t e s to s a v e
s o m e t i m e . T h e p a r t n e r p r o f il e f r o m T r a n s a c t i o n W E 2 0 c a n b e c r e a t e d fro m th is te m p la te , so y o u d o n 't n e e d to c re a te it m an u ally . T ran sactio n W E 2 4 is t h e t r a n s a c t i o n f o r t h e t e m p l a t e in t h e o u t b o u n d p r o c e s s i n g (see F ig u r e 2 . 2 0 ) . T r a n s a c t i o n VVE27 is t h e c o r r e s p o n d i n g t r a n s a c t i o n f o r t h e in b o u n d p ro cessin g .
45
D e f a u lt v a lu e s
2 .1
2
|
G e n e ra tin g ID o cs
C h a n g e V ie w " P ro p o s a l f o r o u tb o u n d p a r tn e r p r o file s " : D e ta ils *2 ?
N e w Entries
^
s
i
a
P a rln Typ e
LI
Direction
l]
M e s s a g e Type
0RDCH6
a
a
Vendor
P a rtn e r Role
M e s s a g e co d e M e s s a g e function -----------0
1=1
C o lle c t ID o c s
□ S ta rt su b system
R e c e iv e r port
SUBSYSTEM
B a sic type
DELF0R01
P o rt fur ein E D I-S u b s y s te m v ia D a teisch n ittste lle
D e livery scheduleAJIT sch ed u le
E xtension V ie w
R e c ip ie n t type
0
O rg an iza tio n al unit
R e c ip ie n t
50010120
E D I D e p a rtm e n t
A pplication
EF
H C h a n g e m essage
O utp ut type
NEU
P r o c e s s co d e (out)
ME11
M e s s a g e control p a ra m e te r
F ig u r e 2 .2 0
2.1.3
O R D C H G : P u rc h a s e o rd e r c h a n g e
D e f a u lt V a lu e s f o r O u t b o u n d P a rtn e r P ro file s
Special Functions
W a re h o u s e
I n s o m e ca s e s , a s p e c if ic b u s i n e s s p r o c e s s c a n b e i m p l e m e n t e d c o m
m anagem ent
p l e t e l y lo c a lly o n a n SAP s y s t e m o r d i s t r i b u t e d a c r o s s m u l t i p l e SAP o r
e x a m p le
n o n -S A P s y s t e m s . ID o c s a r e o n l y g e n e r a t e d w h e n p r o c e s s e s a r e d i s t r i b u te d across m u ltip le sy stem s, a n d th e g e n e ra tio n can b e a c tiv a te d v ia th e C u sto m izin g fu n c tio n s o f th e re sp ectiv e a p p lic a tio n . W a re h o u s e m a n a g e m e n t is a n e x a m p l e o f t h i s d i r e c t ID o c g e n e r a t i o n . T h e d e f a u l t s e t t i n g o f w a r e h o u s e m a n a g e m e n t a s s u m e s t h a t y o u r w a r e h o u s e is m a n a g e d b y y o u r SA P s y s t e m . I f t h i s i s n ’t t h e c a s e , y o u c a n a c t i v a t e t h e c o n n e c t i o n o f y o u r w a r e h o u s e s y s t e m v ia ALE in C u s t o m i z i n g . T h i s c o n n e c t i o n c a u s e s a
WMTORD
ID o c to b e g e n e r a t e d d i r e c t l y w h e n y o u c r e a t e a w a r e h o u s e
t r a n s p o r t r e q u e s t to n o t i f y t h e e x t e r n a l w a r e h o u s e o f w h a t is s u p p o s e d
46
S tand ard M e th o d s fo r th e ID o c G e n e ra tio n
|
t o b e t r a n s p o r t e d . H o w e v e r , t h e s e s p e c ia l c a s e s c a n ’t b e d e s c r i b e d in g e n e r a l b u t i n s t e a d m u s t b e n a m e d a n d s e t u p in c o o p e r a t i o n w i t h t h e i n d i v i d u a l e n d - u s e r . B e c a u s e all t r a n s a c t i o n s t h a t a r e r e q u i r e d f o r s u c h a s p e c ia l c a s e a r e m o d u l e - s p e c i f i c , t h e y a r e n o t d i s c u s s e d f u r t h e r h e r e , b u t j u s t b e a w a r e t h a t s u c h s p e c ia l c a s e s e x ist. W i t h i n t h e s c o p e o f ALE s c e n a r i o s , t h e r e c a n a l s o b e c a s e s in w h i c h
ID o c - BAPI
s a m p l e p o s t i n g s a r e i m p l e m e n t e d s y n c h r o n o u s l y v ia BAPI, a n d t h e ac tu a l
in te r fa c e
p o s t i n g s a r e i m p l e m e n t e d a s y n c h r o n o u s l y v ia ID o c . T h e n , t h e BAPI is c r e a t e d o n t h e d e v e l o p m e n t s i d e , a n d t h e a p p r o p r i a t e ID o c is g e n e r a t e d u s i n g T r a n s a c t i o n B D B G . You c a n a ls o u s e t h i s t r a n s a c t i o n i f SAP d o e s n ' t p r o v i d e a n ID o c f o r a BAPI a n d y o u still r e q u i r e i t f o r a d i s t r i b u t i o n s c e n a r i o t h a t i s n 't p r o v i d e d f o r b y SAP. A g a in in t h i s c a s e , y o u m u s t o b s e r v e th e n a m in g ru le s fo r c u s to m e r o bjects. F ig u r e 2 . 2 1 s h o w s a n I D o c g e n e r a t e d b y SA P i n t h e SA P n a m e s p a c e . In t h e ID o c I n t e r f a c e ta b , y o u c a n v i e w t h e n a m e s f o r t h e m e s s a g e ty p e a n d t h e ID o c t y p e ; in t h e ALE O u t b o u n d P ro c e s s i n g ta b , y o u c a n v i e w t h e f u n c t i o n g r o u p in w h i c h t h e ID o c m o d u l e s a r e l o c a t e d a s w e ll as t h e n a m e o f t h e m o d u l e t h a t g e n e r a t e s t h e ID o c ; a n d in t h e ALE I n b o u n d P r o c e s s i n g ta b , y o u c a n v i e w t h e n a m e o f t h e m o d u l e t h a t e x t r a c t s th e I D o c in t h e r e c e i v i n g s y s t e m a n d t r i g g e r s t h e u p d a t e . T h e p r o c e s s o f g e n e r a t i n g a n I D o c f r o m a BAPI is a s fo llo w s :
B A P I p r o c e s s in g
1. T h e s e n d i n g s y s t e m w a n t s t o call t h e BAPI a n d c h e c k s w h e t h e r t h i s is s u p p o s e d to b e c a r r i e d o u t l o c a lly o r r e m o t e ly . 2 . I f t h e call is r e m o t e a n d is s u p p o s e d t o b e c a r r i e d o u t tr a n s a c t i o n a l ly , t h e f u n c t i o n m o d u l e t h a t is g e n e r a t e d in T r a n s a c t i o n BD B G is ca lle d in th e s e n d in g sy stem . T his fu n c tio n m o d u le tran sfers th e tra n s fe r p a r a m e t e r s o f t h e BAPI t o t h e I D o c f o r m a t . 3. A f t e r y o u ’v e m a d e t h e s e t t i n g s in t h e c u s t o m e r d i s t r i b u t i o n m o d e l a n d in T r a n s a c t i o n W E 2 0 , t h i s g e n e r a t e d I D o c is t r a n s f e r r e d t o t h e re ceiv in g system . 4 . In th e receiv in g sy ste m , th e c a lle d u s i n g t h e BAPP
BAPI
B A P I _ I D0 C _ I N P U T 1
process c o d e o r
f u n c t i o n m o d u l e is
B A P I _ I D 0 C _ IN P U T P
u sin g the
p ro cess c o d e ; th is d e p e n d s o n w h e t h e r o n e o r m o re d a ta reco rd s
a r e r e c e i v e d s i m u l t a n e o u s l y . T h e s e f u n c t i o n m o d u l e s call t h e i n b o u n d f u n c t i o n m o d u l e t h a t is g e n e r a t e d in T r a n s a c t i o n B DBG, w h i c h e x t r a c t s
47
2 .1
2
|
G e n e ra tin g ID o cs
( h e ID o c a n d u s e s t h e t r a n s f e r r e d d a t a t o call t h e o r i g i n a l BAPI th a t c a r r i e s o u t t h e a c tu a l u p d a t e . G e n e ra te A L E In te rfa c e f o r B A P I
#
9
q o C heck interface
6? D is p la y interface
ObiecVlnterface Type
BUS6006
Method
POST
4 ^ D is p la y available interfaces
Category -Enter Interface Par
M e s s a g e Type
ACC_EHP10YEE_PAY
ID oc type
ACC_EMPL0YEE_PAY02
Package
ACID_IF
A L E Outbound Processing Function Module Function group
AIE_ACC_EHP10YEE_PAY_P0ST ACAS 0
Data FiRenng Allowed
A L E Inbound P roc e s sin g /
F ig u r e 2.21
Function Module
ID 0C _t HPUT_ACC_EHP10YEE_PAY
Funcbon group
ACC4 0
Cali in u p d a te Task
0
Packet P roc e s s in g Allow ed
I D o c I n te r f a c e t o a B A P I
A s y n c h ro n o u s
B e c a u s e b o t h c a s e s r e p r e s e n t a n ALE s c e n a r i o , y o u m a i n t a i n t h e c u s
B A P Is
t o m e r d i s t r i b u t i o n m o d e l f o r BAPIs a n d I D o c s . F o r t h e BAPIs, y o u e n t e r the m e th o d s th a t m u s t b e p ro c e sse d b o th s y n c h ro n o u sly a n d asynchron o u s l y v i a ID o c s . A d d i t i o n a l ly , y o u r e q u i r e p a r t n e r p r o f ile s f o r t h e t r a n s a c ti o n a l c a s e a s u s u a l . I f y o u h a v e t h e s e p a r t n e r p r o f ile s g e n e r a t e d f r o m t h e d i s t r i b u t i o n m o d e l , t h e s y s t e m a u t o m a t i c a l l y k n o w s f o r w h i c h BAPIs t h e r e a r c m e s s a g e t y p e s a n d t h u s f o r w h i c h it r e q u i r e s a p a r t n e r p ro file .
D e t e r m in in g th e
U s e T r a n s a c t i o n B D 9 7 to m a i n t a i n t h e d e s t i n a t i o n f o r t h e s y n c h r o n o u s
t a r g e t s y s te m f o r
BAPI call i n a r e m o t e s y s t e m . T h i s c a n b e d o n e b o t h g e n e r a l l y f o r all
s y n c h r o n o u s B A P Is
m e t h o d c a lls a n d o n l y f o r s p e c ia l BAPIs a n d f o r d i a l o g calls. You n e e d t h e d i a l o g calls i f y o u w a n t to w o r k w i t h t h e I D o c t r a c i n g in T r a n s a c t i o n B D 8 7 . T h e d i s t i n c t i o n w i t h r e g a r d to d i a l o g s is m a d e f o r s e c u r i ty reasons.
48
U se o f Lo gical System s in th e M e ssag e C o n tro l
|
B e c a u s c a d i a l o g u s e r m u s t b e u s e d in t h e RFC d e s t i n a t i o n , t h i s u s e r s h o u ld h a v e o n ly a fe w a u th o riz atio n s. F ig u r e 2 . 2 2 s h o w s a n e x a m p l e f o r e a c h o f t h e t h r e e cases.
A s s i g n R F C D e s t i n a t i o n s f o r S y n c h r o n o u s M e t h o d C a lls
&
9 ^ & □
Standaid BAPi destination
Q
Standard dialog destnabo n
Q
Special m em od destination
1090 * 0 0 c l i e n t 800 -AHRCLNT000 -AHRCLNT003 -AHRCLHT006 -AHRCLNT026 -A 1 I_ 0 0 _ 8 0 0 "AIN1 -A1N2 -A IN _ 8 0 0 -AIN_8O0NBI -AIRCLNT000 -ALRCLHT006 -ALRCLNT062 -AP0CLNT100 AP0CLNI8JP
AHR (HR s y s te m ) c l i e n t 000 AHR (HR s y s te m ) C l ie n t 003 AHR CATTS c l i e n t 006 AHR C A IIS C l i e n t 026 A M S y s t e * c l i e n t 800 AutO ID Node 1 A u to ID Node 2 A u to ID Node 2 .1 c l i e n t 800 A u to ID Node c l i e n t 800 NB I ALR C l i e n t 000 ( ) a i r n a n d t 006 ALR fla n d a n t 062 APOCLNTIOO APOCLNT8O0
— Gj S ta n d a rd RFC d e s t in a t i o n f o r BAPI c a l l s AP0CLNI800
••• /
S ta n d a rd RFC d e s t in a t i o n f o r d i a lo g c a l l s AIEHAHU 3
l e s t ALE c o m u M c a t io n * i t h
n a n u g is t ie s
RFC d e s t in a t i o n s f o r s p e c ia l « e th o d c a l l s
L -O
A c c tn g E « p ly e e P a y b l* s c n e c k A c c o u n tin g
C heck V e ndor A c c t A s $ ig n « e n t f o r HR P o s tin g (0 A 6 : LOAD PAYABLE)
I----------BACKEND
F ig u r e 2 .2 2
C u s t o m iz in g f o r S y n c h r o n o u s B A P I C a lls in A L E S c e n a rio s
T h e s t a n d a r d d e s t i n a t i o n f o r BAPI calls f o r t h e t e m is
APO C LN TSO O ,
and th e
BACKEND
APO C LN TSO O
lo g ic a l s y s
t h e d e s t i n a t i o n f o r t h e d i a l o g calls is c a lle d
d e s t i n a t i o n is u s e d f o r t h e
ALEM ANU,
A c c tn g E m p ly e e P a y b le s . C h e c k
m e t h o d o n ly.
2.2
U se of Lo g ica l S y ste m s in the M e ss a g e C o n tro l
T r a n s a c t i o n d a t a m a y b e e x c h a n g e d w i t h i n ALE s c e n a r i o s . F o r e x a m p l e ,
"A L E _
th is c o u ld b e th e s c e n a rio o f ce n tral sa le s /d e c e n tra liz e d s h ip p in g . H ere,
P R O C E S S IN G ’
p u r c h a s e o r d e r s , d e l i v e r ie s , a n d i n v o i c e s a r e e x c h a n g e d b e t w e e n p l a n t s
subroutme
o f t h e s a m e e n t e r p r i s e . F o r t h i s c a s e , i n m e s s a g e c o n t r o l , y o u s i m p l y use t h e c u s t o m e r o r v e n d o r a s t h e p a r t n e r . I n s t e a d o f " 6 " f o r t h e E D I pro -
49
2 .2
2
|
G e n e ra tin g I D ocs
c e s s in g , h o w e v e r , y o u e n t e r "A" f o r t h e ALE p r o c e s s i n g a s t h e t r a n s m i s s i o n m e d i u m f o r t h e f o u n d m e s s a g e . As a r e s u lt , t h e s y s t e m n o l o n g e r uses th e IN G
E D I_ P R O C E S S IN G
s u b ro u tin e a n d in ste a d uses the
ALE _P R O C ES S-
su b ro u tin e.
M e s s a g e c o n tro l
You t h e n m a i n t a i n a c u s t o m e r d i s t r i b u t i o n m o d e l as u s u a l a n d u s e a
a n d ALE
logical s y s t e m as t h e s e n d e r a n d a lo g ic a l s y s t e m as t h e r e c e i v e r o f t h e m essag e . A fte r th e m e ssa g e c o n tro l w ith in th e ap p lic a tio n , th e tra n s m is s i o n m e d i u m A r e a d s t h e c u s t o m e r d i s t r i b u t i o n m o d e l a n d r e p la c e s t h e p a r t n e r f o u n d i n t h e m e s s a g e c o n t r o l w i t h t h e lo g ic a l s y s t e m f o u n d in t h e m o d e l . F o r t h i s p u r p o s e , y o u n e e d t h e a s s i g n m e n t o f o u t p u t t y p e s to m e s s a g e t y p e s . T h e y a r e a v a il a b le in t h e p r o c e s s c o d e s in t h e o u t b o u n d p r o c e s s i n g in T r a n s a c t i o n W E 4 1 a n d in t h e s e t t i n g s t h a t y o u m a d e f o r t h e m e s s a g e c o n t r o l in t h e o u t b o u n d p a r t n e r p r o f il e in T r a n s a c t i o n W E 2 0 .
U n iq u e n e s s o f th e a s s ig n m e n t
T h e d a t a f r o m T r a n s a c t i o n W E 2 0 is e v a l u a t e d i n t h e
A L E .P R O C E S S IN G
s u b r o u t i n e . B e c a u s e t h e s u b s e q u e n t r e c e i v e r i s n 't y e t d e t e r m i n e d in th is f ir s t s t e p , t h e s y s t e m s e a r c h e s u s i n g t h e “L og ical S y s t e m " p a r t n e r t y p e a n d t h e o u t p u t t y p e o n ly . I f m o r e t h a n o n e e n t r y is f o u n d in T r a n s a c t i o n W E 2 0 , fo r ex a m p le , NEU -
ZSM OR D
NEU
-
ORDERS,
w h ic h w o u ld be th e sta n d a rd , a n d
fo r a s e lf-p ro g ra m m e d m essag e ty p e,
A L E _ P R O C E S S IN G
can
cels w i t h a n e r r o r . You e s t a b l i s h t h e r e q u i r e d u n i q u e n e s s b y u s i n g y o u r o w n o u t p u t t y p e s f o r y o u r o w n m e s s a g e ty p e s . T h e s e a r c h v ia t h e "Logical S y s te m " p a r t n e r t y p e a n d t h e p a r t n e r t y p e r e s u lt s in t h e b e n e f i t o f a r e d u c e d n u m b e r o f p a r t n e r p ro f ile s . T h e n y o u c a n j u s t h a v e a p a r t n e r p r o f il e f o r t h e logical s y s t e m i n s t e a d o f a p a r t n e r p ro f ile f o r e a c h v e n d o r o r c u s t o m e r .
2.3
S u m m a ry
I n t h i s c h a p t e r , w e ' v e t a k e n a c l o s e r l o o k a t t h e c r e a t i o n o f ID o c s . Y ou ’v e l e a r n e d w h i c h m e t h o d s f o r c r e a t i o n e x i s t a n d h o w t h e y a r e r e l a t e d to t h e d i f f e r e n t n e e d s o f d i f f e r e n t p r o c e s s e s o r d a t a t y p e s . T h e d e c i s i o n as t o w h i c h o n e s h o u l d b e u s e d is m a d e b y SAP. N o w l e t ’s t a k e i t a s t e p f u r t h e r r e g a r d i n g o u r w o r k w i t h I D o c s . T h e n e x t c h a p t e r w i l l t e a c h y o u h o w to t e s t t h e c r e a t i o n a n d t h e p o s t i n g o f ID ocs.
50
" A n y th in g t h a t ca n g o w r o n g w ill g o w ro n g ." (M u r p h y 's L aw ) To e n s u re t h a t a s little a s p o ss ib le g o e s w r o n g in y o u r p ro d u c tio n sy ste m , S A P p r o v id e s a v a r ie ty o f te s t tools, each o f w h ic h are d esc rib e d in th is ch a p ter.
3
Test Tools
A b u s i n e s s p r o c e s s t h a t s p a n s s e v e r a l s y s t e m s c a n ' t b e fu lly t e s t e d a n d
T e s tin g w i t h o u t a
a c c e p t e d u n l e s s all o f t h e p a r t n e r s t e s t t h e p r o c e s s . H o w e v e r , b a s i c s e t
p a rtn e r
tin g s u s u a l l y u n d e r g o a p r e l i m i n a r y te s t, w i t h o u t a n y i n v o l v e m e n t b y y o u r p a rtn e r. D u rin g th e d e fin itio n p h a se , it m a y also b e n e c e s s a ry fo r y o u to d e t e r m i n e e x a c t l y w h i c h f ie ld s a r e c o n t a i n e d in a n ID o c , a n d o f t h e s e field s, w h i c h a r e n e e d e d f o r a p a r t i c u l a r s c e n a r i o . F o r t h i s b a s ic te s t, SAP h a s d e l i v e r e d a t e s t e n v i r o n m e n t i n w h i c h s y s t e m s c a n g e n e r a t e a n d p o s t ID o c s w i t h o u t h a v i n g a s u i t a b l e SAP s y s t e m g r o u p . T h e s e ID o c s c a n t h e n b e u s e d a s s a m p l e ID o c s o r t e m p l a t e s f o r t h e p a r t n e r . You c a n m a n u a l l y c r e a t e ID o c s a n d p o s t t h e m to y o u r o w n SAP s y s t e m ,
In b o u n d a n d
as w e l l a s m a k e I D o c s a v a il a b le f o r o u t b o u n d p r o c e s s i n g . All o f t h e te s t
o u tb o u n d
t o o l s a r e s t o r e d u n d e r t h e a r e a m e n u in T r a n s a c t i o n W E D I . F ig u r e 3.1 s h o w s t h e s e v e n t e s t t r a n s a c t i o n s p r o v i d e d th e re .
S A P E a s y A c c e s s I D o c a n d E D I B a s is I
| lA
O tw rm e n u 11
| 0
E
I fQ
Create rote |
CD Favorites Q SAP menu .......< $ W E 0 2 - Display IDoc I- □ AdminisVatfon ^ < 3 T#*t ^ V * E 1 9 -T e s t tool 5 -O utbound from MC
0 0 0 0 0
V *E 14- Outbound Processing from lOoc V»E18 - Generate Status File W EI
7- Process Status File
W E12 - Inbound procg o f moOifled ou® file
V Q Documenta»on t> □ D e v e lo p m e n t t> Q Control______________________________________________________
F ig u re 3.1
Test T ra n sa ctio n s in the A re a M e n u o f Transactio n W E D I
51
p r o c e s s in g
3
|
T e s t T o o ls
P ari o f t h e s e t r a n s a c t i o n s is a ls o a v a il a b le in t h e m e n u s o f t h o s e a p p l i c a t i o n s t h a t f r e q u e n t l y w o r k w i t h ID o c s . H o w e v e r , t h i s c h a p t e r w ill p r i m arily focus o n using in d iv id u a l tran sa ctio n s, ra th e r th a n s h o w in g th e m in a s p e c if ic m o d u l e . N o t e t h a t m o s t v a l u e s e n t e r e d f o r t e s t p u r p o s e s a re c a s e -s e n s itiv e .
3.1 T r a n s a c tio n W E 19
In d iv id u a l ID o cs
T r a n s a c t i o n W E I 9 is t h e t e s t t o o l f o r i n d i v i d u a l ID o c s . You c a n c h o o s e w h e t h e r y o u w a n t t o u s e a f i n i s h e d ID o c a s a t e m p l a t e o r w h e t h e r y o u w a n t to c r e a t e a c o m p l e t e l y n e w I D o c b a s e d o n a m e s s a g e t y p e o r IDoc t y p e . You c a n a l s o u s e a n e x i s t i n g file. In t h i s c a s e , h o w e v e r , y o u m u s t u s e a flat file b e c a u s e X M L files a r e n ’t s u p p o r t e d .
I D o c t e m p la t e
T r a n s a c t i o n W E I 9 is p a r t i c u l a r l y h e l p f u l i f it's n o t y e t c l e a r w h i c h ID o c f ie ld s m u s t b e filled a n d w h i c h v a l u e s m u s t b e s p e c i f i e d . You c a n r u n t h r o u g h s e v e r a l v a r i a n t s u n t i l y o u ' v e d e t e r m i n e d t h e field i n f o r m a t i o n r e l e v a n t f o r y o u r s e t o f ta s k s . F ig u r e 3 .2 p r o v i d e s a n o v e r v i e w o f t h e in i tial s c r e e n a s w e l l as t h e s e l e c t i o n o p t i o n s a v a il a b le in t h i s t r a n s a c t i o n .
T e s t to o l f o r ID o c p ro c e s s in g
si T e m p la te fo i t e s t / Existing ID oc O BasicTyp w ith E n h a n c e m e n t O V i a m e s s a g e type O File a s tem p la te O w f o tem p la te
F ig u r e 3 .2
M a n u a l te s t ID o c
T e s t T o o l f o r I n d iv id u a l ID o c s
A f t e r y o u ' v e c a lle d a n ID o c , y o u c a n s t r u c t u r e it s o t h a t i t fulfills y o u r t e s t r e q u i r e m e n t s . E ac h s e g m e n t c a n b e e d i t e d s e p a r a t e l y . W h i l e y o u ’re in e d i t m o d e , y o u a l s o c a n c l e a r l y s e e w h i c h fie ld y o u ’re w o r k i n g in w i t h o u t h a v i n g t o c o u n t t h e field s. You c a n a ls o a d d m o r e s e g m e n t s . I f y o u ’re
52
I n d iv id u a l ID o c s
|
3 .1
usin g th e te m p la te o p tio n , th e sy ste m checks s o m e (u n fo rtu n a te ly , n o t all) o f t h e r e q u i r e d p r o p e r t i e s o f t h e ID o c t y p e o r m e s s a g e t y p e t h a t y o u ' v e s e l e c t e d . All o f t h e v a r i a n t s a r e c h e c k e d t o d e t e r m i n e w h e t h e r m a n d a t o i y s e g m e n t s a r e m i s s i n g o r w h e t h e r t h e s e g m e n t in u s e e x i s t s in t h e s e g m e n t d e f i n i t i o n in t h e SAP s y s t e m . F ig u r e 3 .3 s h o w s t h e s e g m e n t s o f a n e x a m p l e ID o c in T r a n s a c t i o n W E 1 9 .
E0I0C
8000000000000768745700 03
1SALES
LSSAIES
1
010 HUHBEft
— E1HAKTH ---------E l MARCH --------E l HARM ---------E l HARM --------E1HYKEH ---------E l HIAMU
F ig u r e 3 .3
OOSESatnnes 0e«o (la te r i s i 0053000* OOSCT 6 1 OOSPCEt 1 005360001 X 000009000 000 0050S UIXJ1
EH 0 0 HO 00 0 800 0 .0 80 0 000 0 080 0 ooo 0 000 0 080 0 ooo 0.080 0.80B 0 800
0 000 0 080 0 000
PCE
0.808 0 800 0 OOO
XCRH
V ie w o f a n I D o c in T ra n s a c tio n W E 19
You c a n n o w e d i t b o t h t h e c o n t r o l r e c o r d a n d t h e d a t a r e c o r d s a n d , f o r
E d it in g th e
e x a m p l e , s e n d a n ID o c to a r e c e i v e r o t h e r t h a n t h e o r i g i n a l r e c e iv e r . As
c o n t r o l re c o rd
y o u c a n s e e in F ig u r e 3 . 4 , o n l y t h e m o s t i m p o r t a n t fie ld s in t h e c o n t r o l r e c o r d a r e d i s p l a y e d in itially . H o w e v e r , i f y o u a ls o w a n t to v i e w o r e d i t t h e o t h e r field s, s i m p l y c h o o s e A ll F ields.
171 R e c e iv e r
Sender
P o rt
P o rt
P a rtn e r N o
P a rtn e r N o
P a ri T ype
P a rt T ype
P a rtn e r R o le
P a rtn e r R o le
L o g ic a l M e s s a g e T ype M e s s a g e Type M e s s a g e V a ria n t M e s s a g e F u n c tio n
□
T e s t F la g
F ig u re 3 .4
E d itin g th e C o n tro l R ecord
53
3
|
T e s t T o o ls
Test flag
T h e te s t f a g p l a y s a s p e c ia l ro le i f y o u a c tu a l ly s e n d te s t ID o c s t o o t h e r s y s t e m s . F o r e v e i y s i n g l e p a r t n e r p ro f ile w i t h i n i n b o u n d p r o c e s s i n g in SAP s y s t e m s , y o u c a n d e t e r m i n e w h e t h e r t h e T est Flag w ill a p p l y t o real o r t e s t I D o c s . I f y o u s e t t h e T est Flag, y o u c a n r e c e i v e t h e ID oc, s a v e i t to t h e d a t a b a s e , a n d v i e w its c o n t e n t s in T r a n s a c t i o n B D 8 7 , b u t y o u c a n ' t p o s t it. O t h e r s y s t e m s t h a t e x c h a n g e ID o c s o r EDI m e s s a g e s u s u a l l y h a v e s i m i l a r b u i l t- in s e c u r i t y m e c h a n i s m s f o r t e s t p u r p o s e s . E ac h t i m e y o u d o u b l e - c l i c k a d a t a r e c o r d , y o u g e t a lis t o f all p o s s i b le f ie ld s f o r t h i s s e g m e n t . You a ls o c a n s c r o ll d o w n t h r o u g h t h e e n t i r e d a ta r e c o r d (s e e F ig u r e 3 .5 ). I f y o u ’re n o t w o r k i n g w i t h a t e m p l a t e , y o u e n t e r t h e fie ld c o n t e n t s t h a t y o u r e q u i r e h e r e . I f y o u ' r e w o r k i n g w i t h a t e m p la te , t h e v a l u e s o f t h e t e m p l a t e ID o c a r e p r e fille d , a n d y o u c a n c h a n g e th e m as req u ired .
C h a n g e D a ta R e c o rd MSGFN
005
M ATN R
ZSM1
ERSDA ERNAM
20081006 _ [
m a is e l s a
L A E DA
20081006
AEN AM
M AISELSA
P S TAT LVO R M
KVE P I
M TAR T
fert]
M BRSH
h]
M ATKL
00107
✓
X
F ig u r e 3 .5
E d itin g a D a ta R e c o rd
Processing the
N o w t h a t y o u ’v e c r e a t e d y o u r c o m p l e t e I D o c , i t c a n b e p r o c e s s e d . In
test IDoc
o t h e r w o rd s , it c a n b e te s t e d w ith th e re le v a n t s ta n d a r d s e ttin g s fo r in b o u n d a n d o u tb o u n d p rocessing. F o r in b o u n d p rocessing, ad d itio n al t e s t o p t i o n s a r e a v a ila b le , e i t h e r d i r e c t l y b y e n t e r i n g a f u n c t i o n m o d u l e o r i n d i r e c t l y b y u s i n g a file ( w e 'l l d e s c r i b e t h i s in g r e a t e r d e t a i l later). F ig u re 3 . 6 s h o w s s ta n d a r d in b o u n d processing. All o f t h e d a t a is o b t a i n e d f r o m a p a r t n e r p ro file , a n d i t c a n ’t b e c h a n g e d . I f n o p a r t n e r p ro f ile is f o u n d , y o u c a n c r e a t e a n ID o c , b u t y o u c a n ’t p o s t it.
54
I n d iv id u a l ID o c s
|
[ & T e s i in b o u n d ID o c u s in g p a rtn e r p ro file CCO
P a fw 'e r 'p r o f i) ^
P a rtn e r N o
ZSM2
P a rt T y p e
LS
L o g ic a l s y s te m
P a rtn e r R o le
L o g ic a l M e s s a g e Typ e M essage
MATNAS
M a te ria l m a s te r
MATH
M ATM AS M a te ria l m a s te r da ta
M e s s a g e V a ria n t M s g F u n c tio n
P r o c e s s in g D e ta ils P ro c e s s code F u n c tio n n a m e
ID 0 C JN P U T J1 A T M A S 0 1
P I A L E Service
^
X
F ig u r e 3 . 6
T e s tin g S ta n d a r d In b o u n d P ro c e s s in g
W h e n y o u u s e t h e T est U s i n g a F u n c t i o n M o d u l e o p t i o n , i t ’s p o s s i b l e to
T e s t u s in g a
d i r e c t l y s p e c if y a f u n c t i o n m o d u l e f o r ID o c p r o c e s s i n g (s e e F ig u r e 3.7 ).
f u n c t io n m o d u le
T h e t e s t I D o c is t h e n p r o c e s s e d w i t h t h i s f u n c t i o n m o d u l e , ir r e s p e c t i v e o f w h e t h e r o r n o t a s u i t a b l e p a r t n e r p ro f ile e x is ts . T h i s e n a b l e s t e s t i n g t o b e c o m p l e t e d p r i o r to t h e fin a l s e t t i n g s , w h i c h a r e s o m e t i m e s i m p l e m e n t e d b y o t h e r s . You c a n a ls o t e s t y o u r o w n d e v e l o p m e n t s h e r e a n d n a v i g a t e d irec tly to d e b u g g in g , i f necessary. If th e re are sev eral p ro c e ss co d e s a n d s e v e r a l f u n c t i o n m o d u l e s f o r t h e s a m e m e s s a g e t y p e , y o u c a n a ls o r u n t h r o u g h all o f t h e m h e r e . You c a n t h e n u s e t h e r e s u lt s to d e t e r m i n e th e m o st re le v a n t p ro c ess c o d e fo r y o u r p u rp o se s.
S ’ T e s t in b o u n d ID o c u s in g a fu n c tio n m o d u le F u n c tio n M o d u le □
[lD 0 C _IN P U T _M A T H A S 01
□ g )
C a ll in d e b u g g in g m o d e C a ll tra n s a c tio n p r o c e s s in g / ® In B a c k g ro u n d O In fo re g ro u n d O In fo re g ro u n d a lte r e r ro r
✓
X
F ig u re 3 .7
E x ten d ed Test in In b o u n d Processing
55
3 .1
3
|
T e s t T o o ls
T e s t I D o c a s a file
T h e tw o s c e n a rio s d e s c rib e d p re v io u sly — a te s t u s in g th e s ta n d a r d set tin g s o r a t e s t u s i n g a f u n c t i o n m o d u l e — w o r k d i r e c t l y in t h e SAP s y s t e m . F r e q u e n tl y , h o w e v e r , y o u a ls o h a v e to i m p o r t p a r t n e r files i n t o y o u r b u s i n e s s p r o c e s s e s . To p r e v e n t e r r o r s f r o m o c c u r r i n g , y o u r p a r t n e r w ill m o s t lik e ly a p p r e c i a t e a sa m p le f i l e w h o s e s t r u c t u r e c a n b e u s e d d u r i n g l i v e i m p l e m e n t a t i o n . B y u s i n g a file to t e s t i n b o u n d p r o c e s s i n g , y o u c a n w r i t e s u c h a file w i t h s e v e r a l ID o c s a n d t h e n p r o c e s s i t d ire c tly .
T e s t in g in b o u n d
W r i t i n g a file w i t h a r e p e a t f a c t o r in a p p e n d m o d e c a n a ls o b e u s e d a s t h e
p ro c e s s in g
basis fo r m ass tests fo r p e r fo rm a n c e a n a ly sis p u rp o s e s . C o n se q u e n tly , ID o c s a r e g e n e r a t e d f r o m y o u r d a t a as o f t e n a s p e r m i t t e d b y t h e r e p e a t f a c t o r a n d t h e n p l a c e d in a l a r g e s h a r e d file. To u s e t h i s f u n c t i o n , y o u m u s t e n t e r a v a l i d file p o r t f o r w h i c h y o u c a n a c t i v a t e o r d e a c t i v a t e U n i c o d e (s e e F ig u r e 3 .8 ). H o w e v e r , y o u m u s t s p e c if y t h e file p a t h y o u r s e l f b e c a u s e it c a n ' t b e o b t a i n e d f r o m t h e p o r t i n f o r m a t i o n .
[*] /
E ’ T e s t in b o u n d ID o c u s in g tile F ile n a m e 3
f lio c a lh o s V d e m o fo id e r fd e m o fiie
S ta r t ID o c in b o u n d p r o c e s s in g o f file i m m e d ia t e ^
N o . o f ID o c s to w r it e in f ile (re p e titio n facto r)_____________________________ |1
F i le m o d e /
~
® O v e r w r ite file
O A ppend
ID o c to file
in b o u n d p r o c e s s in g
P o ri
S N F IL E
S a b in e s T e s tp o r t fo r F ile s
[ B E _______________________________________________________ F ig u r e 3 .8
T e s tin g In b o u n d P ro c e s s in g U s in g a F ile
S ta tu s v a lu e s o f
N o m a tte r w h ic h o f th e s e th re e test m e th o d s y o u u se to create an
t h e t e s t ID o c
i n b o u n d ID oc, t h e ID o c is s t o r e d w i t h a n a d d i t i o n a l s t a t u s r e c o r d t h a t a lw a y s i n d i c a t e s t h a t t h i s ID o c w a s n o t r e a l l y c r e a t e d b u t r a t h e r c r e a t e d u s i n g t e s t T r a n s a c t i o n W E 1 9 . H o w e v e r , t h e re a l c h a n g e s a r e w r i t t e n to
56
T e stin g P ro ce ssin g o f M u ltip le ID o c s
|
3 -2
( h e d a t a b a s e , s o y o u m u s t c a r e f u ll y c o n s i d e r w h e t h e r y o u w a n t t o p e r m i t t h e u s e o f t h i s t e s t t r a n s a c t i o n in a p r o d u c t i o n s y s t e m . F ig u r e 3 . 1 4 in S e c tio n 3 . 3 , P ro c e s s i n g S ta t u s Files, s h o w s t h e s t a t u s v a l u e s o f a n ID o c c r e a t e d u s i n g t e s t T r a n s a c t i o n W E I 9 . I n o u t b o u n d p r o c e s s i n g , t h e te s t s t a t u s v a l u e is 4 2 : IDoc w a s created b y te s t tra n sa ctio n . W h e n t e s t i n g o u t b o u n d p r o c e s s i n g , y o u c a n a ls o s e n d s e v e r a l ID o c s a t
T e s tin g o u t b o u n d
o nce. H o w e v e r, y o u d o n 't h a v e th e p re v io u sly m e n tio n e d ad d itio n a l
p r o c e s s in g
o p t i o n s o f d e b u g g i n g o r w o r k i n g w i t h o u t s u i t a b l e p a r t n e r p r o f ile s h e r e . You c a n o n l y u s e s t a n d a r d o u t b o u n d p r o c e s s i n g . As y o u c a n s e e in F ig u re 3 . 9 , all o f t h e i n f o r m a t i o n y o u r e q u i r e ( a p a r t f r o m t h e r e p e a t fa c to r) is o b t a i n e d f r o m t h e p a r t n e r p ro f ile s . T h e s e s e t t i n g s a r e t h e n u s e d t o s e n d a n ID o c t o a p a r tn e r .
| Q ? O u tb o u n d p r o c e s s in g o f lD o c 0
0
/
S la r l ID o c o u tb o u n d p ro c g o f file im m e d .
N o . o f ID o c s to b e g e n e r a te d ( r e p e a t facto r)
R e c e iv e r p o rt
SAPSM1
P o rtT y p e
tR F C P o rt
L o g .d e s tin a tio n ;
DEST_SM 1
F ig u r e 3 .9
3.2
1
T e s tin g S ta n d a rd O u t b o u n d P ro c e s s in g
T e stin g P ro ce ssin g o f M u lt ip le ID o cs
O n l y o n e I D o c w a s c r e a t e d w h e n w e u s e d t h e te s t m e t h o d s d e s c r i b e d in t h e p r e v i o u s s e c t i o n . H o w e v e r , y o u a l s o h a v e t h e o p t i o n o f c r e a t i n g m u l t i p l e ID o c s a t o n c e . W e ’ll n o w d e s c r i b e t h i s o p t i o n in d e ta il.
3.2.1
M essage Control
I f m e s s a g e c o n t r o l is u s e d to g e n e r a t e ID o c s, t h e a p p l i c a t i o n f r e q u e n t l y
T e s t tr a n s a c t io n
c o n f ig u r e s t h e p a r a m e t e r s e t t i n g s t h e r e . T h e a c tu a l ID o c s a r e first g e n
W E 15 a n d re p o rt
e r a t e d u s i n g a s c h e d u l e d r e p o r t ( a n d n o t a s s o o n a s t h e d o c u m e n t is
57
"R S N A S T O O "
3
|
T e s t T o o ls
p o s t e d ) . F r e q u e n tl y , t h i s p r o c e s s c a n ’t b e a d a p t e d f o r te s t p u r p o s e s , a n d , as a r e s u lt , y o u m u s t m a n u a l l y s t a r t t h e r e l e v a n t r e p o r t e a c h t i m e y o u w a n t to t e s t a n ID o c . To m a k e life a little e a s i e r f o r y o u , T r a n s a c t i o n W E I 5 is a v a il a b le f o r g e n e r a t i n g I D o c s f r o m m e s s a g e c o n t r o l re c o r d s . T h is t r a n s a c t i o n d i r e c t l y r e f e r e n c e s t h e r e p o r t
RSNASTOO,
a n d i t ’s l i s t e d in
y o u r E D I o v e r v i e w m e n u W E D I . F ig u r e 3 . 1 0 s h o w s a p u r c h a s i n g e x a m p l e t h a t u s e s t h e s t a n d a r d m e s s a g e t y p e d e l i v e r e d b y SAP.
S e le c tio n P r o g r a m f o r I s s u in g O u tp u t ;© -& n S e le c t io n p a r a m e t e r O u tp u t a p p lic a tio n
to
4500017125
O b je c t key O u tp u t type
to
T r a n s m i s s i o n m e d iu m
to
□
S e n d a g a in
S o rt
P a r a m e t e r fo r c a llin g u p th e p r o c e s s in g p r o g r a m s P r in te r d e fa u lt S p o o l: S u ffix 2
F ig u r e 3.10
T e s t T ra n s a c tio n f o r M e s s a g e C o n tr o l
T h e m a i n d i f f e r e n c e b e t w e e n t h i s t e s t t r a n s a c t i o n a n d all o t h e r t e s t t r a n s a c t i o n s is t h a t a n ID o c t h a t w a s a c t u a l l y g e n e r a t e d b y a n a p p l i c a t i o n is s e n t e a rlie r th a n p la n n e d , in s te a d o f w a itin g fo r th e s y s te m to ex ecu te the re p o rt
R SN ASTO O
b y d efau lt. A n e w ID oc i s n 't g e n e ra te d (th e original
j o b s c h e d u l e d l a t e r d o e s n ’t g e n e r a t e t h i s I D o c a g a in ) . I n s t a t u s m o n i t o r ing, y o u c a n ’t s e e h o w t h i s ID o c w a s g e n e r a t e d b e c a u s e i t s i m p l y s ta rts as n o r m a l w i t h s t a t u s 0 1 : ID oc generated.
3.2.2
Sending R e ad y-fo r-D isp atch IDocs
A d v a n c e d d is p a t c h
T r a n s a c t i o n W E I 4 is t h e o n l y t r a n s a c t i o n t h a t c a n b e u s e d to a n t i c i p a t e
o f f in is h e d ID o c s
a j o b t h a t is o t h e r w i s e s c h e d u l e d o n a r e g u l a r b a s is . H e r e , r e a d y - f o r d i s p a t c h ID o c s ( s t a t u s 3 0 ) a r e d i s p a t c h e d b e f o r e t h e r e g u l a r “d a t e , " i f
58
T e stin g P ro ce ssin g o f M u ltip le ID o c s
|
y o u d o n ’t w a n t t o w a i t u n t i l t h e n . H o w e v e r , y o u c a n a ls o s e t t h e t e s t flag h e r e , s o t h a t y o u r p a r t n e r k n o w s t h a t h e s h o u l d n o t p r o c e s s t h e ID oc. F ig u r e 3 .1 1 s h o w s h o w y o u c a n u s e T r a n s a c t i o n W E 1 4 to s p e c i f y w h i c h ID o c s y o u w a n t to c r e a te . S im ilarly , t h i s t r a n s a c t i o n d o e s n ' t g e n e r a t e a n e w ID o c . C o n s e q u e n t l y ,
S ta n d a r d r e p o r t
in T r a n s a c t i o n B D 8 7 ( I D o c M o n i t o r ) , y o u c a n ’t i d e n t i f y a d i f f e r e n c e to
"R S E O U T O O "
th e ID ocs th a t a r e d is p a tc h e d re g u la rly v ia a b a c k g ro u n d j o b b ec au se T r a n s a c t i o n W E I 4 a l s o p r o v i d e s s p e c i a l a c c e s s to t h e s t a n d a r d r e p o r t RSEO UTO O .
P ro c e ss A li Selected ID ocs (EDI)
Doc N um ber
i
.0
B a s le T y p e
Q ueue N am e S e n d c o m p le te ly 1? P o tt o f R e c e iv e r P a rtn e r T y p e o f R e c e iv e r P a rtn e r F u n c tio n o f R e c e iv e r P a rtn e r N u m b e r o f R e c e iv e r
L o g ic a l M e s s a g e
Last C hanged On Last C hanged
At
O u tp u t M o d e □
T e s t O p tio n
M a x im u m N u m b e r o f ID o c s
F ig u r e 3.11
3.2.3
S e le c tio n o f ID o c s t o Be S e n t
Files
In a d d i t i o n to t e s t i n g i n d i v i d u a l I D o c s , y o u c a n a l s o p r o c e s s c o m p l e t e files w i t h ID o c d a t a . You c a n c r e a t e t h e s e files o r t h e y c a n b e t r a n s f e r r e d f r o m a p a r t n e r . H e r e , w e 'l l a s s u m e t h a t all o f t h e d a t a in t h e p a r t n e r file is
59
3 -2
3
|
T e s t T o o ls
c o r r e c t a n d s i m p l y n e e d s to b e i m p o r t e d . T h i s is d o n e u s i n g T r a n s a c t i o n W E I 6 . O n c e a g a in , y o u o n l y h a v e to e n t e r t h e file n a m e , file p a t h , a n d p o r t , a s w e ll a s s e t t h e U n i c o d e flag o n t h e i n p u t s c r e e n . E d it in g th e
I n t h e c a s e o f files t h a t y o u c r e a t e y o u r s e l f , y o u c a n e i t h e r c r e a t e a file
c o n tro l re c o rd
in a n e d i t o r , w h i c h is a v e r y l a b o r i o u s ta s k , o r y o u c a n u s e a t e s t to o l in o u t b o u n d p r o c e s s i n g t o c r e a t e a file t h a t w ill c o n t a i n t h e d a t a y o u r e q u i r e . I n t h e l a t t e r s c e n a r i o , h o w e v e r , y o u r lo g ic a l s y s t e m is s p e c if ie d a s t h e s e n d e r ( a n d n o t t h e r e c e i v e r ) in t h e c o n t r o l r e c o r d . T h e r e f o r e , t h e c o n t r o l r e c o r d c a n ' t b e u s e d f o r y o u r p u r p o s e s . SAP p r o v i d e s T ra n s a c tio n W E I 2 h e r e , w h i c h y o u c a n u s e to o b t a i n t h e b u s i n e s s d a t a f r o m t h e file s p e c if ie d a s w e ll a s m a n u a l l y e n t e r t h e c o n t r o l r e c o r d d a t a . T h e r e s u lt i n g file is t h e n t e m p o r a r i l y s t o r e d a g a in .
C h a n g in g th e
You c a n , f o r e x a m p l e , m a k e t h i s file a v a il a b le t o a p a r t n e r a s a t e m p l a t e .
sender
F ig u re 3 . 1 2 s h o w s p a r t o n e o f t h e r e q u i r e d i n f o r m a t i o n o n t h e S e n d e r tab page.
M od ificatio n o f O utbound File T rig g e rin g Inb o un d Procg
Source D irectory • file \usrV sap\SM HSYS\gl0baftSM FILE_O U T8O U ND
Target D irectory • file lusr\sap'S M 1lS Y S \g loba l\S M F iLE _iN B O U N D
R ecipient
P a rtn e r n u m b e r
ZSH2
P a rtn e r T ype
LS
P a rtn e r Role
M e s s a g e type
m inus
vana nl Function
P o rt
F ig u re 3 .12
60
O Test
S H F lL fl
Transfer D a ta in S e n d in g System
P ro ce ssin g Status F ile s
O n th e R ecip ien t tab page, y o u e n t e r p art tw o o f th e in fo rm a tio n re q u ire d
C h a n g in g t h e
to o v e r r i d e t h e c o n t r o l r e c o r d (s e c F ig u r e 3 .1 3 ) . I D o c s g e n e r a t e d u s i n g
r e c e iv e r
T r a n s a c t i o n W F .12 a l s o o b t a i n t h e v a l u e 74: In b o u n d ID oc f r o m te st tra n s a ctio n a s t h e i r f ir s t s t a t u s , s o t h a t i t's a l w a y s c le a r t h a t t h e y a r e f o r te s t p u r p o s e s on ly .
M o d ific a tio n o f O u tb o u n d F ile
T rig g e rin g In b o u n d P ro c g
D irectory * file lu s r\$ a p \S M H S Y S lfllO b a n S M F IL E _ O U T 0 O U N D
Target D ire c to ry * t ile \u s r\s a p X S M U S Y S lg lo b a n S M F lL E _ lN B O U N D
S ftp s m ]
P o rt
F ig u r e 3.13
g )
T ra n s fe r D a ta in R e c e iv in g S yste m
You n o w k n o w all o f t h e o p t i o n s a v a il a b le f o r g e n e r a t i n g ID o c s f r o m test t r a n s a c t i o n s . In t h e n e x t s e c t i o n , w e 'l l t u r n o u r a t t e n t i o n t o s t a t u s files, w h ic h also h a v e s o m e g o o d te st o p tio n s.
3 .3
P ro ce ssin g S ta tu s File s
I D o c p r o c e s s i n g is a l w a y s a n a s y n c h r o n o u s p r o c e s s , w h i c h m e a n s t h a t , i f n o f u r t h e r a c t i o n is t a k e n , y o u d o n ' t r e c e i v e a n y i n f o r m a t i o n
61
|
3 .3
3
|
T e s t T o o ls
a b o u t w h e t h e r o r n o t t h e p a r t n e r h a s s u c c e s s f u l l y p r o c e s s e d y o u r ID o c. H o w e v e r , b e c a u s e t h i s i n f o r m a t i o n is f r e q u e n t l y r e q u i r e d , t h e r e a r c v a r i o u s w a y s in w h i c h y o u r p a r t n e r c a n m a k e t h i s i n f o r m a t i o n a v a il a b le to you. " s ta tu s " and "S Y S T A T 0 1 "
O n e o f t h e s e o p t i o n s , w h i c h is f r e q u e n t l y u s e d b y EDI s u b s y s t e m s , in v o lv es re s e n d in g an ID oc w ith m essag e ty p e S Y S TA T01
STATUS
a n d ID o c t y p e
a l o n g w i t h a n ID o c s t a t u s file. N o r m a ll y , t h e s e n d e r d o e s n ’t
k n o w i f t h e r e c e i v e r w a s a b l e t o s u c c e s s f u l l y p r o c e s s its ID o c . H o w e v e r , t h e r e c e i v e r c a n u s e a s t a t u s file o r s t a t u s ID o c t o m a k e t h i s i n f o r m a t i o n a v a il a b le t o t h e s e n d e r . T h e s t a t u s ID o c w ill b e d e s c r i b e d in g r e a t e r d eta il in C h a p t e r 5 , S e c t i o n 5 . 2 , STATUS ID o c s . T e s tin g c o n c e r n s t h e s t a t u s file only. F ig u r e 3 . 1 4 s h o w s t h e s t a t u s v a l u e s o f a n ID o c t h a t h a s a l r e a d y b e e n d i s p a t c h e d . T h i s ID o c w ill b e o u r s t a r t i n g p o i n t f o r t e s t i n g s t a t u s files. T h e s t a t u s v a l u e s 0 1 : ID oc g en e ra te d , 3 0 : ID oc re a d y f o r d isp a tch (A L E service), a n d 0 3 : D a ta p a ssed to p o r t O K a r e t h e s t a t u s v a l u e s t h a t a n ID o c m u s t r e c e i v e a t le a s t o n c e s o t h a t i t c a n b e d i s p a t c h e d s u c c e s s fu lly . In a d d i t i o n , s t a t u s 4 2 s p e c if ic s t h a t t h e t e s t t r a n s a c t i o n h a s s u c c e s s f u l l y c r e a t e d t h e ID o c . B e c a u s e ID o c s c a n a l s o b e v i e w e d b y a u d i t i n g a u t h o r i t i e s , i f r e q u i r e d , i t m u s t b e c l e a r t h a t a n ID o c is e i t h e r " re a l" o r h a s b e e n c r e a t e d f o r t e s t p u r p o s e s . SAP u s e s s t a t u s v a l u e 4 2 t o ta k e t h i s s i t u a t i o n i n t o acco u n t.
ID o c d is p la y _______________________
*
T e c h n ic a l s h o r l info
i ( U ID o c 0 0 0 0 0 0 0 0 0 0 7 6 8 7 5 9 0
C o n tr o l R e c
□
D a ta re c o rd s
D ir e c t io n C u r r e n t s ta t u s
P
03
O u tb o x CCO
T o ta l n u m b e r: 0 0 0 0 0 8 B a s ic ty p e
C 3 S t a t u s re c o r d s l>
1
hatmasos
[3
03
D a t a p a s s e d to p o rt O K
E x te n s io n
□
□
30
ID o c r e a d y fo r d is p a tc h (A L E s e r v ic e )
M e s s a g e ty p e
HATMAS
01
ID o c g e n e r a te d
P a rtn e r N o . _
ZSM
Q
42
ID o c w a s c r e a t e d b y te s t tra n s a c tio n
P a rtn T y p e
LS
P o rt
SAPSN1
F ig u r e 3.14
62
S ta tu s V a lu e s o f a n ID o c C r e a te d U s in g T ra n s a c tio n W E 1 9
P ro ce ssin g S ta tu s F ile s
W h e n t e s t i n g a s t a t u s file, t h e first s t e p is t o c r e a t e a s t a t u s file in T r a n s
C r e a t in g a
ac tio n W E 1 8 . T h e s y s te m p ro p o s e s c e rta in d e fa u lt v alu es th a t are u sed
s t a t u s f ile
|
w h e n c r e a t i n g a s t a t u s file, f o r e x a m p l e , 0 5 : E rror D u r in g T ranslation (s e e F ig u r e 3 . 1 5 ) . You c a n e d i t t h e s e s t a t u s v a l u e s a n d a d d n e w v a l u e s , i f req u ired .
Generate test status file for outbound IDocs q »
ush _ < F U N C T IO N >
C O N V E R S I O N _E X I T _ A L P H A _ O U T P U T
alpha
p a tte rn , fo r ex a m p le ,
f o r t h e m a p p i n g o n a d y n p r o in o u r
s a m p l e exit.
83
C o n v e rs io n e x its
4
|
C h an g e s to ID o cs
In a d d i t i o n , f o r all ru le s , y o u c a n d e f i n e t h e b e h a v i o r i f fie ld s c a n ' t be a s s i g n e d . You c a n c i t h e r c o p y a c o n s t a n t o r a s e n d e r field o r a l t e r n a t i v e l y trig g er an erro r. A s s ig n in g t h e rule
You d e c i d e w h e t h e r a r u l e is a c tu a l ly u s e d v i a T r a n s a c t i o n B D 5 5 , w h i c h e n a b l e s y o u t o a s s ig n t h e r u l e to a p a r t n e r . F ig u re 4 . 2 0 s h o w s h o w y o u d e f i n e f o r e a c h c o m b i n a t i o n o f s e n d e r a n d r e c e i v e r i f a r u l e is u s e d a n d w h i c h r u l e is u s e d . T h e u s e o f c o n v e r s i o n r u le s is a ls o a n ALE s e r v ic e .
M e ssag e Type
MATMAS
C o n v e rs io n R u le Ty
|S e n a e r
i s zsm Figure 4.20
iF u n c
|T y
|R e c e iv e r
Ls zsn2
( R o le
Is e g m e n t t y p e
C o n v e r s io n rule
E1MARAM
ZSM1
A s s i g n i n g t h e R u le t o t h e M e s s a g e T y p e a n d P a r t n e r
R estrictions fo r SAP ERP HCM Y o u c a n 't u se c o n v e rs io n ru le s in S A P ERP H C M . T h is d e p e n d s o n t h e c o m m o n p ro c e s s in g m e t h o d f o r in fo ty p e s h e re . B e c a u s e t h e a c tu a l v a lu e s c a n 't be a d d re s s e d d ir e c tly b u t o n ly v ia in fo ty p e s f o r s e c u rity re a so n s, t h e m e c h a n is m s u s e d in t h e c o n v e rs io n ru le s d o n ’ t ta k e e ffe c t b e c a u s e t h e p r o p e r in fo ty p e s a r e n ’t k n o w n a t e x e c u t i o n .
4.1.6
Version Conversion
C o n v e rs io n to
ID o c s a r e a l s o s u p p o s e d t o e x c h a n g e i n f o r m a t i o n b e t w e e n t w o s y s t e m s
o ld e r s e g m e n t
w i t h d i f f e r e n t r e l e a s e v e r s i o n s . To a d a p t t h e ID o c s a c c o r d i n g l y , y o u c a n
v e rsio n s
u s e t h e version conversion o p t i o n (s e e a l s o S e c t i o n 4 .2 .2 , G e n e r a l Exits). F o r t h i s p u r p o s e , y o u c a n e n t e r a n ID o c t y p e o f a n o l d e r r e l e a s e in t h e p a r t n e r o u t b o u n d p r o c e s s i n g , w h i c h r e m o v e s all s e g m e n t s t h a t d i d n ' t e x i s t i n t h e r e s p e c t i v e r e le a s e . You c a n a ls o s p e c if y a n o l d e r r e l e a s e v e r s i o n w i t h i n a se g m e n t version a n d c o n s e q u e n t l y e n s u r e t h a t t h e s y s t e m g e n e r a t e s t h e i n d i v i d u a l s e g m e n t s b a s e d o n t h i s r e le a s e . B y d e f a u l t , n o s p e c if ic a t i o n is m a d e in t h e s e g m e n t v e r s i o n ; s o t h e s y s t e m g e n e r a t e s t h e m o s t r e c e n t r e l e a s e v e r s i o n o f t h e i n d i v i d u a l s e g m e n t s f o r o l d e r IDoc ty p e s . T h e v e r s i o n c o n v e r s i o n is a ls o a n ALE se r v ic e .
84
C u sto m iz in g
|
Changes and ALE Services In t h e c o n t e x t o f th e I D o c f u n c t i o n
m o d u le C u s to m iz in g , y o u le a rn e d th a t
y o u ca n d e fin e f o r e v e ry fu n c tio n m o d u le w h e t h e r A L E s e rv ic e s a re a v a ila b le o r n o t. F ro m t h e p re v io u s ly d e s c rib e d c h a n g e o p tio n s , t h e f o llo w in g a re ALE se rvice s: ► F ilte r in g b y f ilt e r o b je c ts ( o u t b o u n d o n ly ) ► S e g m e n t filte rin g ► F ie ld c o n v e r s io n u s in g ru le s ► V e rs io n c o n v e rs io n You
c o n fig u re th e
v e rs io n c o n v e r s io n in t h e
p a r t n e r p r o file , a n d a ll o t h e r
o p t i o n s a r e s e t v i a C u s t o m i z i n g . F i l t e r i n g b y f i l t e r o b j e c t s is p o s s i b l e i n t h e s e n d in g s y s te m ( o u t b o u n d ) o n ly ; a ll o t h e r o p t io n s a re a ls o a v a ila b le o n th e re c e iv e r s id e ( in b o u n d ) . Y o u r s e ttin g s a re o n ly u s e d , h o w e v e r, if t h e c o rre s p o n d in g fu n c tio n
m o d u le
s u p p o r ts A L E s e rv ic e s ( w h ic h f o r t u n a t e ly h o ld s
tru e fo r m o s t o f th e m ).
4.1.7
Special C o nversions in SAP ERP Financials
F in a n c ia l A c c o u n t i n g i n c l u d e s c o m p a n y c o d e s a n d b u s i n e s s a r e a s , w h i c h
Global
c o v e r s p e c if ic c o n t r o l l i n g f u n c t i o n s . It's p a r t i c u l a r l y c ritic a l t h a t d a t a is
organizational
d e liv e re d to th e a p p r o p ria te area w h e n b e in g tra n sfe rre d . O ften , th e v a r i o u s s y s t e m s u s e t h e s a m e o r g a n i z a t i o n a l u n i t s (e .g ., t h e S A P -p rov i d e d c o m p a n y c o d e , 0001) w i t h a d i f f e r e n t m e a n i n g . F o r t h e r e s u l t i n g c o n v e r s i o n s t h a t a r e f r e q u e n t l y r e q u i r e d , SAP h a s d e v e l o p e d a sp ec ific a p p r o a c h : cross-system co m p a n y codes o r cross-system business areas. You can a c c e s s t h e s e s e t t i n g s v i a t h e ALE C u s t o m i z i n g o n l y b u t n o t v ia a n y t r a n s a c t i o n c o d e . F ig u r e 4 .2 1 s h o w s t h i s u s i n g T r a n s a c t i o n SALE in SAP ERP.
D isplay IMG E x istin g B C S e ts
B C S e ts fo r Activity
A c tu a te d B C S e ts fo r Ac tw it/
S tructure_____________________________________________________ ID o c in te rfa c e /A p p lic a tio n L in k E n a b lin g (A L E ) I-
B a s ic Settin gs
l>
C o m m u n ic a tio n
•3*
M o d e llin g a n d Im p le m e n tin g B u s in e s s P ro c e s s e s G lo b a l O rg a n iz a tio n a l U n its Q
( 5 » C r o s s -S y s te m C o m p a n y C o d e s (^
F ig u re 4-21
C r o s s -S y s te m B u s in e s s A re a s
M e n u Path fo r G lo b a l O rg a n iz a tio n a l U nits
85
units
4 .1
4
|
C h an g e s to ID o cs
T he ID oc Im
In t e r f a c e / A
plem en tin g
pplication
Business P
Li n k E n a b l i n g (A L E ) • M
rocesses
• G
lobal
O
o d elin g a nd
rg an iza tio n al
U
nits
path
e n a b l e s y o u to c o n f i g u r e c r o s s - s y s te m c o m p a n y c o d e s a n d c r o s s - s y s te m b u s i n e s s a r e a s . F ig u r e 4 . 2 2 d i s p l a y s t h e s t e p s t h a t y o u n e e d t o p e r f o r m f o r c r e a t i n g a c r o s s - s y s te m c o m p a n y c o d e : c r e a t i n g c r o s s - s y s t e m u n i q u e c o m p a n y c o d e s , a s s i g n i n g a c r o s s - s y s t e m c o m p a n y c o d e to t h e c h a r t o f a c c o u n t s , a n d a s s i g n i n g t h e lo cal c o m p a n y c o d e t o t h e c r o s s - s y s te m c o m p a n y code.
A c tivities P e rf
'l a m e o f Activity C ro s s -S y s te a
C o npany Codes
A s s ig n
C ro s s -S y s te n
A s s ig n
Conpany Code t o
F i g u r e 4-22
C o n p an y Code t o C ro s s -S y s te n
C h a rt o f
A c c o u n ts
C o n p an y Code
Settings for Cross-System C o m p a n y Codes
Cross-system
E ac h c r o s s - s y s t e m c o m p a n y c o d e is a s s i g n e d w i t h a u n i q u e n a m e . It
com pany code
c a n c o n t a i n six c h a r a c t e r s a n d c a n b e l o n g e r t h a n t h e n o r m a l c o m p a n y c o d e ( f o u r c h a r a c t e r s ) s o t h a t a d d i n g t h e p r e f i x "GL" f o r “g lo b a l'' m a k e s se n s e h e re . T h e re are n o ru les for n a m e s o f g lo b al c o m p a n y codes, h o w e v e r . F ig u re 4 . 2 3 s h o w s a n e x a m p l e f o r t h e s t r u c t u r e o f t h e n a m e o f a g l o b a l c o m p a n y c o d e . I t c o n s i s t s o f t h e p re fix "GL," t h e l e t t e r "Z," t h e c o d e “S M ," a n d t h e d i g i t “1.” T h e fin a n c ia l d e p a r t m e n t o f y o u r e n t e r p r i s e is r e s p o n s i b l e f o r p u b l i s h i n g t h e r e q u i r e d i n f o r m a t i o n o n c h a r t s o f a c c o u n t s , c o m p a n y c o d e s , a n d g l o b a l c o m p a n y c o d e s t h a t m a y h a v e to b e u s e d . You s h o u l d n o t m a k e t h i s d e c i s i o n y o u r s e l f b e c a u s e i t c a n affect o p e r a t i o n s t h a t a r e r e l e v a n t t o t h e fin a n c ia l s t a t e m e n t .
N e w E n trie s : O v e rv ie w o f A d d e d E n trie s
G lobal C oC de GIZSM1
Figure 4.23
Creating a Global C o m p a n y C ode
Chart o f account
You m u s t a s s ig n a c h a r t o f a c c o u n t to e v e r y g l o b a l c o m p a n y c o d e . This
assignm ent
c h a r t o f a c c o u n t is t h e n u s e d w h e n t h e I D o c s a r e u p d a t e d . T h e c h a r t s
86
C u sto m iz in g
|
o f a c c o u n t s in t h e s e n d i n g a n d r e c e i v i n g s y s t e m s m u s t c o r r e s p o n d w i t h r e g a r d to t h e i r a c c o u n t s . In t h e e x a m p l e , t h e t a r g e t c h a r t o f a c c o u n t , INT, h a s b e e n a s s i g n e d to t h e g l o b a l c o m p a n y c o d e , GLZSM1 ( s e e F ig ure 4 .2 4 ) .
C h a n g e V ie w " A s s ig n c ro s s -s y s te m c o .c d e -> c h r t o f a c c ts " : O v e rv ie w
B E IB H II G lo b al C o C d e
|Tar.chrtfacct$
6LZSH1
IN I
E
E
EJ Figure 4 24
Assigning the Chart of Accounts to the Cross-System Company Code
N o w , y o u a s s i g n t h i s g l o b a l c o m p a n y c o d e t o o n e o f t h e lo cal c o m p a n y
Assigning the
c o d e s in y o u r c l i e n t . T h e s e n d i n g s y s t e m t h e n g e n e r a t e s t h e g l o b a l c o m -
Slobal company
p a n y c o d e e v e i y w h e r e in t h e ID o c w h e r e t h e a s s i g n e d lo cal c o m p a n y c o d e w o u l d b e s p e c if ie d ; t h e r e c e i v i n g s y s t e m , in t u r n , r e p l a c e s e a c h g l o b a l c o m p a n y c o d e in t h e ID o c w i t h t h e a s s i g n e d lo cal c o m p a n y c o d e . B ecause this re p la c e m e n t m u s t w o rk o n b o th sid es, each g lo b al ob ject m u s t b e a s s i g n e d t o e x a c t l y o n e lo cal o b j e c t o n l y . In t h e e x a m p l e in F ig u r e 4 . 2 5 , t h e g l o b a l c o m p a n y c o d e , GLZSM1, w o u l d c o n s e q u e n t l y be a s s i g n e d to t h e CPFO c o m p a n y c o d e o f C o m p a n y Good Food.
C hange V ie w "A s s ig n c o m p a n y c o d e -> C ro s s -s y s te m c o m p a n y code* a fM fc i b ;o
3
IC o m p a n y N a m e
Icity
G lobal C o C d e GLZSN1
:PF0 O o o d Food____________________ Chicago
Figure 4.25
Assigning t h e Cross-System C o m p a n y C o d e to t h e C o m p a n y Code
In a s i m i l a r w a y , y o u c a n f o l l o w t h e I D o c E n a b l in g (ALE) • M G
lobal
O
o d elin g
rgan iza tio n al
U
a n d
n its
Im
In t e r f a c e / A
plem en tin g
pplication
Bu sin ess P
L in k
rocesses
•
m e n u p a t h i n T r a n s a c t i o n SALE to c o n
fig u re c r o s s - s y s te m b u s i n e s s a r e a s . F ig u r e 4 . 2 6 s h o w s t h e t w o s t e p s t h a t y o u n e e d t o p e r f o r m f o r t h i s p u r p o s e . As w i t h t h e c o m p a n y c o d e , th e first s t e p is t o s p e c i f y t h e n a m e o f t h e c r o s s - s y s t e m b u s i n e s s a r e a . T h e n y o u m u s t a s s i g n it to t h e b u s i n e s s a r e a in t h e c lie n t.
87
Cross-system business areas
4 .1
4
|
C h an g e s to ID o cs
D is p la y IMG E x is t in g B C S e lS ~ | | - .
El
B C S e t s lo r A t l r . f r |
OE Activities P e rf j N a m e o f Activity C r o s s - s y s t e m b u s in e s s a r e a s A s s ig n B u s in e s s A r e a t o
Figure 4.26
C r o s s - S y s t e n B u s in e s s A re a
Configuring Cross-System Business Areas
Creating the
In c o n tra s t to th e c ro ss-sy ste m c o m p a n y co d e , th e n a m e o f th e cro ss
cross-system
s y s t e m b u s i n e s s a r e a c o n s i s t s o n l y o f f o u r c h a r a c t e r s ( h e r e : GLZS, s e e
business area
F ig u re 4 . 2 7 ) . I n t h i s c a s e , t o o , o n l y t h e c r o s s - c o m m u n i c a t i o n u n i q u e n e s s is critic a l, a n d n o n a m i n g r u l e s a p p ly .
N ew E n trie s : O v e rv ie w o f A d d e d E n trie s S B E B H X -sys t b u s in e s s area GLZS
Figure 4.27
S a b in e s G lo b al B u s A /e a
S I
Cre atin g a C ross -Syste m Business Area
A f t e r w a r d , y o u m u s t a s s i g n t h e c r o s s - s y s t e m b u s i n e s s a r e a to a local b u s i n e s s a r e a . I n o u r e x a m p l e , t h e c r o s s - s y s te m b u s i n e s s a r e a , GLZS, is a s s i g n e d to t h e lo cal b u s i n e s s a r e a , 0001 (s e e F ig u r e 4 . 2 8 ) . H e r e , to o, e v e i y g l o b a l o b j e c t m u s t b e a s s i g n e d to e x a c t l y o n e lo cal o b j e c t .
C hange V ie w "A s s ig n B u s in e s s A re a to C ro ss-S yste m B u s in e s s A re a'
B u s A rea
[DescriptionB u sin ess a r e a 0001
F i g u r e 4*2 8
Description GLZS________ B u sin ess a r e a 1
A s si gn in g t h e C ro ss -S ys te m Business A r e a t o t h e Local Business Are a
T h e se ttin g s d e s c rib e d p re v io u sly fo rm th e p re re q u is ite fo r c o n v e rtin g g l o b a l o r g a n i z a t i o n a l u n i t s . T h e a c tu a l e x e c u t i o n , h o w e v e r , d e p e n d s o n th e co m m u n icatio n p artn e rs a n d o n th e m essage ty p es used. F o r e x a m p l e , y o u c a n o n l y u s e t h e lo cal c o m p a n y c o d e i f y o u s e n d d a t a t o y o u r o w n w a re h o u s e , a n d y o u can o n ly u se th e g lobal c o m p a n y c o d e i f y o u s e n d d a t a to a FI (F in a n c ia l A c c o u n t i n g ) c o n s o l i d a t i o n s y s t e m .
88
A d a p tin g E x istin g ID o c T yp e s
|
4-2
F ig u r e 4 . 2 9 s h o w s h o w T r a n s a c t i o n B D 5 8 c o n v e r t s t h e c o m p a n y c o d e
A c t i v a t i n g for e a c h
a n d t h e b u s i n e s s a r e a in all i n v o l v e d s e g m e n t s f o r t h e
s e g m e n t a n d fi el d
FIDCMT
m essage
t y p e . F o r t h i s p r o c e s s , i t ’s c ritic a l t h a t y o u s p e c i f y t h e field in F ield N a m e t h a t y o u w a n t to c o n v e r t b e c a u s e a n I D o c c a n c o n t a i n s e v e r a l a p p r o p r i a t e field s. T h e
FIDCMT
ID o c t r a n s f e r s l i n e i t e m s f o r t h e g e n e r a l l e d g e r in
SAP ER P F in a n c ia ls .
C h a n g e V ie w "C o n v e rs io n o f O rg a n iz a tio n a l U n its in to ID o c s ": O ve rvie w N e w E n n .e s
*
M e s s a g e Type
«
3
^
'
i
3
Q
F1DCHIT
Conversion o f O rganizational U nits into ID ocs S e g m e n t type E1FIH DR
:ie ld N a m e 8UKRS
□ jD o m a in
|Offset
8UKRS
0
E 1 F IP 0 S
6SBER
6SBER
[7
E 1 F IP 0 S
PARGB
GSBER
fii
E1FITA X
GSBER
GSBER
0
Figure 4.29
4 .2
ntLength
□ A
A c t iv a t in g t h e G l o b a l C o n v e r s i o n for Each M e s s a g e Type
A d a p t in g E x is tin g ID oc Types
C u sto m e rs w h o have im p le m e n te d th e ir o w n d e v e lo p m e n ts w ith in the SAP s y s t e m o f t e n a l s o w a n t t o u s e t h e s e m o d i f i c a t i o n s f o r t h e ID ocs t h a t b e l o n g t o t h e m o d i f i e d o b j e c t s . As w i t h i n t h e m o d u l e s , SA P m e e t s th i s r e q u i r e m e n t b y p r o v i d i n g a n e n h a n c e m e n t c o n c e p t . In a d d i t i o n to a d a p tin g ID ocs to th e c o m m o n e n h a n c e m e n t te c h n o lo g ie s , y o u m u s t a ls o a d a p t t h e m t o y o u r o w n d e v e l o p m e n t s b y s p e c i f y i n g w h i c h a d d i t i o n a l fie ld s a n d s e g m e n t s a r e r e q u i r e d . T h e f o l l o w i n g s e c t i o n first i n t r o d u c e s t h e d i f f e r e n t t y p e s o f e x i t s p r o -
Adapting through
v i d e d b y SAP a n d t h e n u s e s t h e m a t e r i a l m a s t e r a s a n e x a m p l e b e c a u s e i t
programming
c o n t a i n s a l o t o f e x i t s . Y ou'll a ls o l e a r n m o r e a b o u t t h e s p e c if ic e x its t h a t a p p l y t o all ID o c s . T h e s e c t i o n c o n c l u d e s b y d e s c r i b i n g I D o c - i n d e p e n d e n t e n h a n c e m e n t s o f I D o c t y p e s , w h i c h is i n t e r e s t i n g b e c a u s e i m p l e m e n t i n g c h a n g e s to t h e s e n d o r u p d a t e p r o c e s s f o r ID o c s u s u a l l y also i n v o l v e s a r e q u i r e m e n t f o r s p e c if ic fields.
89
4
|
C h an g e s to ID o cs
4 .2 .1
D if f e r e n t E x it T y p e s o n t h e B a s is o f t h e M a t e r ia l M a s t e r E x a m p le
SAP d i s t i n g u i s h e s b e t w e e n d i f f e r e n t t y p e s o f s y s t e m a d a p t a t i o n . C u s t o m iz in g a n d p e r s o n a l i z a t i o n a r e c u s t o m e r - s p e c i f i c o r u s e r - s p e c i f i c a d j u s t m e n t s . F o r e x a m p l e , y o u d e f i n e in C u s t o m i z i n g h o w m a n y a n d w h i c h p l a n t s y o u u s e in y o u r SAP s y s t e m a s w e ll a s t h e i r p r o p e r t i e s . T h e p e r s o n a l i z a ti o n a d j u s t m e n t c o m p r i s e s s p e c if ic a t i o n s o n t h e d e f a u l t p r i n t e r a n d t h e like. S u c h s y s t e m a d j u s t m e n t s d o n ' t i n v o l v e p r o g r a m m i n g w o r k . Exits
H o w e v e r , y o u c a n a l s o c h a n g e t h e SAP c o d e , w h i c h e n a b l e s y o u to c h a n g e s e t t i n g s d i r e c t l y in t h e o r i g i n a l SAP p r o g r a m . T h e s e m o d ifica tio n s c a n l e a d to m a j o r p r o b l e m s i n t h e c a s e o f r e l e a s e c h a n g e s , s o t h e y a re f r o w n e d u p o n a n d m u s t b e m a d e k n o w n t o SAP v i a t h e O n l i n e S erv ic e S y s te m . M a n y e n t e r p r i s e s d o n ’t a l l o w f o r m o d i f i c a t i o n s a t all f o r t h e s e reasons.
Properties of exits
To a v o i d t h e m o d i f i c a t i o n p r o b l e m , SAP p r o v i d e s e x i t s in p la c e s t h a t a re s u p p o s e d t o b e u s e d w i t h c h a n g e s c o m p a r e d to t h e s t a n d a r d . F o r s u c h a n e x it, SAP is r e s p o n s i b l e f o r a c t u a l l y p r o v i d i n g a n e x i t in a s t a n d a r d SAP p r o g r a m b y d e f i n i n g w h e t h e r a n e n h a n c e m e n t in t h e p r o g r a m e x is ts a n d w h e r e i t ’s c a lle d . SA P a ls o d e t e r m i n e s w h i c h d a t a is p r o v i d e d f o r t h e c u s t o m e r w i t h i n t h e e x i t a n d w h e t h e r t h e c u s t o m e r is a l l o w e d to c h a n g e a n d w r i t e b a c k c e r t a i n d a ta . T h e s e c o n d s t e p is i m p l e m e n t e d o n t h e c u s t o m e r s i d e . H e re , t h e exits t h a t w e r e d e l i v e r e d e m p t y c a n b e filled w i t h y o u r o w n c o d e . SAP p r o v i d e s d i f f e r e n t t y p e s o f exits:
Exit types
► C u s to m e r e x its C u s t o m e r e x its h a v e b e e n p r o v i d e d s i n c e R e le a s e 3 . 0 . T h e y c a n be u s e d o n l y o n c e , a r e u s e d c r o s s - c lie n t, a n d a r e d e l i v e r e d b y SAP in a n e n h a n c e m e n t a n d i m p l e m e n t e d a n d a c t i v a t e d b y c u s t o m e r s in a n e n h a n c e m e n t p r o j e c t . A f t e r a c h a n g e o f re le a s e , t h e y h a v e to b e r e a c ti v a t e d . ► B u sin e ss tra n s a c tio n e ven ts B u s in e s s t r a n s a c t i o n e v e n t s (BTE) h a v e b e e n d e l i v e r e d s i n c e R elea se 4 . 0 . O rig in a lly , t h e y w e r e j u s t u s e d in FI; n o w , m a n y o t h e r a p p l i c a t i o n s a ls o c o n t a i n BTEs in t h e s t a n d a r d SAP p r o g r a m s . You c a n u s e
90
A d a p tin g E x istin g ID o c T yp e s
|
BTEs c lie n t-sp e cifically . A d i s t i n c t i o n is m a d e b e t w e e n t w o t y p e s o f BTEs: P u b lis h & S u b s c rib e in te rfa c e s P u b l i s h & S u b s c r i b e o r P /S
in terfa ces are s u p p o s e d
to
in fo rm
c o m p o n e n t s o t h e r t h a n t h o s e in w h i c h y o u r p r o c e s s is c u r r e n t l y e x e c u t e d t h a t a p a r t i c u l a r p r o c e s s h a s b e e n c a r r i e d o u t in t h e SAP sy ste m a n d tran sfer d a ta to th ese c o m p o n e n ts . A re tu rn tra n sp o rt o f d a t a i s n 't p r o v i d e d fo r . P /S i n t e r f a c e s c a n t h e r e f o r e h a v e s e v e ra l a c tiv e i m p l e m e n t a t i o n s a t t h e s a m e t i m e . Process in te rfa c e s P ro c e s s i n t e r f a c e s r e p l a c e s t a n d a r d p r o c e s s e s . D a t a is t r a n s f e r r e d to a n d r e t u r n e d f r o m t h e p r o c e s s m o d u l e t h a t is e x e c u t e d i n s t e a d o f t h e s t a n d a r d . P ro c e s s i n t e r f a c e s c a n o n l y h a v e o n e a c ti v e i m p l e m en tatio n . ► B A d ls (B u s in e s s A d d -In s ) B A dls h a v e b e e n p r o v i d e d s i n c e R e le a se 4 . 6 in t h e c o m m o n v a r ia n t; t h e y h a v e a ls o b e e n d e l i v e r e d in a n e w v e r s i o n b o u n d to en h a n cem en ts s i n c e SAP N e t W e a v e r 7 . 0 . B A d ls a r c o b j e c t - o r i e n t e d e n h a n c e m e n t s . SA P p r o v i d e s a B A dl i n t e r f a c e , a n d t h e c u s t o m e r g e n e r a t e s t h e c o r r e s p o n d i n g i m p l e m e n t a t i o n . T h e SAP d e v e l o p e r w h o d e l i v e r s t h e BAdl c a n d e c i d e i f i t c a n b e u s e d m u l t i p l e t i m e s a n d i f i t w i l l b e filterd ep e n d en t. ► E n h a n c e m e n ts E n h a n c e m e n t s a r e t h e n e w c o n c e p t t h a t h a s b e e n r e c e n t l y a d d e d to SA P N e t W e a v e r 7 . 0 . You c a n w o r k w i t h e x p l i c i t e n h a n c e m e n t s , w h i c h a r e p r o v i d e d b y SA P t h r o u g h e n h a n c e m e n t s p o ts; h o w e v e r , im p li c i t e n h a n c e m e n t s a r e a ls o a v a il a b le , w h i c h c a n b e i m p l e m e n t e d a t s p e cific l o c a t i o n s o f e v e r y p r o g r a m t h a t d o e s n ' t d i r e c t l y b e l o n g to t h e SA P Basis w i t h o u t a n y i n t e r f e r e n c e o f t h e SAP d e v e l o p e r . T r a n s a c t i o n S E 8 4 (s e e F ig u r e 4 . 3 0 ) p r o v i d e s a n o v e r v i e w o f e x i s t i n g e x its
Development
a n d p o te n tia lly ex istin g in fo rm a tio n .
environm ent
W h e n im p le m e n tin g a n y o f th e s e exit tech n o lo g ies, y o u m u s t c o n s id e r s p e c if ic a s p e c t s b e c a u s e t h e g e n e r a l p r o g r a m f l o w m u s t n ' t b e c h a n g e d b y t h e exit.
91
4-2
4
|
C h an g e s to ID o c s
Object Navigator
^11H W lW eoitooiert] 5tR«po$itwi tformtbonSysww •g|^|Qo*1«/chr- | n |
H
O b je c ts ~
C J R e p o s ito ry inlo CD ABAP D it»onary I- CD P r o l a n lib ra r y I
CD C l a s s
5
r i n
w
M
Library
II C D w e o C w p r o
P
' 1 A
CD D o e to p m o n t C o o rd in atio n
CD B S P Library
► CD E ra e rp n s o S e r o c e s
^
CD E n h a n c e m e n ts ^
ABAP DEVELOPMENT WORKBENCH
[ 3 B u s in e s s A dd-ins 0
O e*nit»ons
0
Im p le m e n ta a o n s
*=* C 3 C u s to m e r Exits 0
E n h a n c e m e n ts
0 Projects 0
E n h a n c e m e n t iro p le m e n ta o o n s
0
C o m p o s ite E n h Im p a e m e n u tio n
0
E n h a n c e m e n t S p o ts
0
C o m p o s ite E n h a n c e m e n t S p o ts
F i g u r e 4- 30
Exit s in t h e R e p o s i t o r y I n f o r m a t i o n S y s t e m
P ro g ra m m in g G u id e lin e s f o r E xits A n y t h i n g t h a t a f fc c ts t h e f l o w o f t h e o r i g i n a l p r o g r a m i s n ’t a l l o w e d in e x i t s . In o t h e r w o r d s , y o u m u s t n ' t c r e a t e e v e n t s , s u b r o u t i n e s o r m o d u les
( MODULE)
( FO RM) ,
h e r e . I n s t e a d , y o u m u s t c r e a t e t h e m in s e p a r a t e
in clu d es. D a ta d e c la ra tio n s th a t h a v e b e e n ag re e d u p o n w ith th e
DATA
s t a t e m e n t a p p l y locally. C onsistency
F o r c o n s i s t e n c y r e a s o n s , y o u m u s t a ls o e n s u r e t h a t t h e c u s t o m e r d a t a is o n l y u p d a t e d o r r e s e t i f t h e s a m e is d o n e w i t h t h e SAP d a t a . S t a t e m e n t s , su ch as
COMMI T
or
ROL L BACK,
a r e th e re fo re n o t p e r m itte d . P o stin g s can
o n ly b e im p le m e n te d w ith u p d a te tech n o lo g ies a n d are th e n pro cessed b y th e
COMMI T
or
ROLLBACK
o p e r a t i o n o f t h e SAP p r o g r a m .
C o n s id e rin g th e d etails, th e d if f e r e n t e n h a n c e m e n t te c h n o lo g ie s this c h a p te r in tro d u c e s re q u ire d iffe re n t a p p ro a c h e s fo r g e n e ra tin g y o u r o w n c o d e , s o t h e s e t e c h n o l o g i e s a r e d e s c r i b e d in g r e a t e r d e ta il u s i n g th e m a t e r i a l m a s t e r a s a n e x a m p l e . T h e d e s c r i p t i o n s o n l y r e f e r to t h e e x i t t y p e s t h a t y o u c a n a c t u a l l y u s e in ID o c s . W h e r e s c r e e n a n d m e n u exits a r e p o s s i b l e , n o d e s c r i p t i o n is p r o v i d e d b e c a u s e ID o c s n e v e r w o r k w i t h m en u s o r dynpros.
92
A d a p tin g E x istin g ID o c T yp e s
|
T h i s s e c t i o n a ls o d o e s n ' t i n c l u d e c o d e . C o d e r a t h e r d e p e n d s o n w h e t h e r y o u w a n t t o s e n d o r r e c e i v e ID o c s a n d n o t o n t h e t y p e o f t h e e x it. T h e c o d e is d i s c u s s e d s e p a r a t e l y f r o m t h e d e s c r i b e d p r o p e r t i e s o f t h e v a r io u s e x its in S e c tio n s 4 . 2 . 2 , G e n e r a l E x its, a n d 4 . 2 . 3 , C u s t o m S e g m e n t s .
C u s to m e r E xits SAP c r e a t e s c u s t o m e r e x i t s i n T r a n s a c t i o n S M O D ; t h a t is, y o u c a n u s e th i s t r a n s a c t i o n to o b t a i n i n f o r m a t i o n o n w h i c h c u s t o m e r e x its a r e a v a il ab le . H e re , s e v e r a l e x its c a n b e c o m b i n e d in o n e e n h a n c e m e n t . I n t h e ID o c a r e a , t h e e x i t s f o r g e n e r a t i n g ID o c s in o u t b o u n d p r o c e s s i n g a n d f o r u p d a t i n g t h e s a m e m e s s a g e t y p e s in i n b o u n d p r o c e s s i n g o f t e n b e l o n g to th e sam e e n h a n c e m e n t. T h e SAP p r o g r a m calls a c u s t o m e r e x i t u s i n g t h e TION ‘ n n n ’
CALL
CUSTOMER-FUNC
c o m m a n d . T h e " n n n " a d d i t i o n is a n y t h r e e - d i g i t n u m b e r t h a t
is u n i q u e w i t h i n t h e e n h a n c e m e n t . S o i f y o u w a n t t o k n o w w h e t h e r a p r o g r a m p r o v i d e s a c u s t o m e r e x it, y o u c a n s e a r c h f o r TION.
"CALL CUSTOMERFUNCTION" command
CUSTOMER-FUNC
T h i s i n d i c a t e s w h i c h e x its a r e c a lle d , w h i c h s i g n a t u r e t h e u s e d e x i t
f u n c t i o n m o d u l e s h a v e , a n d w h e r e in t h e p r o g r a m t h e y a r e c a lle d . If y o u b ro w s e th e a lre a d y -k n o w n fu n c tio n m o d u le , ATE _ MAT MAS
M A S T E R I D0 C _ C R E -
( F i g u r e 4 . 3 1 ) , y o u s e e t h a t a n e x i t w i t h n u m b e r " 0 0 2 " is
a v a ila b le a n d t h a t i t h a s b e e n c a ll e d s e v e r a l t im e s , n a m e l y , e a c h t i m e a n e w s e g m e n t h a s b e e n g e n e r a t e d . You c a n a ls o s e e w h i c h d a t a h a s b e e n t r a n s f e r r e d . I n f o r m a t i o n is p r o v i d e d o n t h e m e s s a g e t y p e , t h e n a m e o f t h e c u r r e n t l y g e n e r a t e d s e g m e n t , a n d all p r e v i o u s l y g e n e r a t e d ID o c d a t a . You c a n c h a n g e t h e u s e r d a t a a n d r e t u r n t h e r e f e r e n c e f o r y o u r e n h a n c e m e n t o f t h e ID o c ,
CIMTYP.
S ectio n 4 .2 .3 , C u s to m S e g m e n ts, d esc rib es
t h i s in m o r e d e ta il. W h e n y o u k n o w t h e c a llin g p r o g r a m a n d t h e e x i t ID , y o u a ls o k n o w t h e n a m e o f th e ex it m o d u le , w h ic h fo llo w s th e
EXIT__nnn
p a t t e r n . In o u r e x a m p l e , t h e e x i t m o d u l e is c a lle d
EXIT_SAPLM V01_002.
D o u b l e - c l i c k i n g o n t h e t h r e e - d i g i t n u m b e r (002) o f t h e n a m e in t h e s e a r c h r e s u l t d i r e c t l y n a v i g a t e s y o u t o t h e f u n c t i o n m o d u l e (s e e F igu re 4 . 3 7 l a t e r in t h i s c h a p t e r ) .
93
Material master example
4-2
4
|
C h an g e s to ID o cs
G lo b a l S e a rc h in P ro g ra m s
0 @1
IH O
19 1B S B I S
P r o g r a n /E n h a n c e a e n t □
281
LM V01U06
CALL CUSTOMER-FUNCTION
•002*
EXPORTING MESSAGE TYPE = MESSA6 E .T Y P E SEGMENT_NAME = C_SE6NAM_E1MARAM F MARA
= MARA
IMPORTING ID 0C _C IM TYPE
= ID0C _CIM TYPE
TABLES I D0C_DAT A 334
CALL CUSTOMER-FUNCTION
= T_IDOC_OATA
•002'
EXPORTING MESSAGE_TYPE = MESSA6 E_TYPE SE6MENT_NAME = C_SE6NAM_E1MAKTM F_MAKT IMPORTING ID O C .C IM T Y P E
= MAKT = IDOC_CIMTYPE
TABLES ----------------------------------------- l . D 0 C _ D A T A _ 5 -T _ iP -Q C -D A T A .-----------
F i g u r e 4.31
F u n c t i o n M o d u l e Ex i t s W h e n G e n e r a t i n g M A T M A S I D o c s
Customer
W h e n y o u k n o w w h i c h c x i t y o u w a n t to i m p l e m e n t , y o u c a n c r e a t e y o u r
enhancement
o w n p r o j e c t u s i n g T r a n s a c tio n C M O D (s e e F ig u r e 4 . 3 2 ) . U s e t h e m a tc h
project
i c o n a t t h e left o f t h e t o o l b a r to a c ti v a te t h e p r o j e c t a t t h e e n d o f y o u r d e v e l o p m e n t w o r k . O n l y t h e n w ill y o u r e x i t b e a c tu a lly e x e c u t e d . First, a s s i g n a n a m e t o y o u r p r o j e c t . B e c a u s e SAP d o e s n ’t d e l i v e r p r o je c ts , y o u c a n th eo re tic ally u se th e e n tire n am esp a ce.
P ro je c t M a n a g e m e n t o f SAP E n h a n c e m e n ts S
f f l S
Project
« * >
ZSM
□
C re a te
© A ttrib u te s O E n h a n c e m e n t A s s ig n m e n t 0 C o m p o n e n ts 0 D o cu m e n ta tio n
Disp lay
F ig u re 4 .3 2
94
i?
C hange
C re a tin g a C u s to m e r Project
A d a p tin g E x istin g ID o c T yp e s
|
4 .2
A f t e r c l i c k i n g t h e C r e a te b u t t o n , y o u c a n d e f i n e t h e a t t r i b u t e s o f y o u r p r o j e c t . T h e f o l l o w i n g s a m p l e c u s t o m e r p r o j e c t (s e e F i g u r e 4 . 3 3 ) is a v e r y c o m m o n d e v e l o p m e n t o b j e c t . As s u c h , i t i n c l u d e s all g e n e r a l d a ta o f d e v e l o p m e n t o b j e c t s , f o r e x a m p l e , s p e c if ic a t i o n s o n t h e p e r s o n w h o c r e a t e d t h e o b j e c t a n d w h e n it w a s c r e a t e d , a s w e ll a s a p a c k a g e . You m a n a g e t h e o b j e c t v ia a t r a n s p o r t r e q u e s t , w h i c h y o u c a n u s e to t r a n s p o r t it t o t h e liv e s y s t e m .
A ttrib u te s o f E n h a n c e m e n t P ro je c t ZS M E n h a n c e m e n t a s s ig n m e n ts
[C o m p o n e n ts
P ro je c t
ZSM
S hort text
S a b in e s ID oc E n h an cem en ts)
A d m in istra tio n data Package O rig in al la n g u a g e
EN
C re a te d by
NAISELSA
0 8 /1 7 /2 0 0 9
L a s t c h a n g e d on/by
A ctuation Pro tect Status C hanged
Figure 4.33
A ttrib u tes o f t h e C u s to m e r Project
N o w y o u c a n a s s ig n o n e o r s e v e r a l e n h a n c e m e n t s t o y o u r c u s t o m e r p r o j
Assigning the
e c t u s i n g t h e E n h a n c e m e n t A s s i g n m e n t s b u t t o n . E v e r y e n h a n c e m e n t can
enhancement
o n l y b e l o n g t o o n e p r o j e c t . F i n d i n g t h e e n h a n c e m e n t t h a t y o u w a n t to i m p l e m e n t t o c h a n g e t h e m a t e r i a l m a s t e r I D o c is e a s i e r h e r e b e c a u s e y o u c a n e n t e r t h e n a m e o f t h e p r e v i o u s l y i d e n t i f i e d e x i t m o d u l e to d e t e r m i n e t h e e n h a n c e m e n t i t b e l o n g s t o . A s s h o w n in F ig u r e 4 . 3 4 , t h i s i s n ’t p r o v i d e d b y SAP b y d e f a u l t s o y o u n e e d t o s e l e c t t h e c o r r e s p o n d i n g o p t i o n s in t h e A d d i t i o n a l S e l e c t i o n s t a b first. T h e e n h a n c e m e n t f o u n d in t h e e x a m p l e is c a lle d MGV00001, a n d y o u can
E n h a n c e m e n t for
n o w a s s ig n it t o y o u r c u s t o m e r e n h a n c e m e n t p r o j e c t b y s p e c i f y i n g i t in
material m as te r IDoc
E n h a n c e m e n t ( F i g u r e 4 .3 5 ) .
95
4
|
C h an g e s to ID o cs
S A P E n h a n c e m e n t s in E n h a n c e m e n t P r o je c t Z S M §
e
l ^ j ^ l H
Enhancem ent 1 C o m p o n en t
0.
:
L a s t O b je c t S e le c te d
IS E x it
Standard selections S A P -E IS : U s e r
KKCD0001
e x its
fo r
d a ta
tra n s fe r
Exit n a m e S h o r t text
✓
3 f l i n f o r m a ti o n S y s t e m
a"0
sa p
A o o iic a t o o s
h i
X
P ackage A p p lic a tio n C o m p o n e n t
Adoiionai selections S fm o d o le e n ts
E S c re e n a re a s
C om ponent n am e
0 M e n u E n tn e s E X IT S a p l h v o i
002
C r e a t e d by C re a te d on L ast c h a n g e d by C h a n g e d on
M a n m u m N o o f H its
Figure 4.34
Finding t h e E n h a n c e m e n t
S A P E n h a n c e m e n ts in E n h a n c e m e n t P r o je c t Z S M V
a
g
a
U
Enhancem ent
C o m p o n e n ts
Enhancem ent
Text
M 6V000O 1
M a te ria l M a s te r (In d u s try ): A L E D is trib u tio n
Figure 4.35
MGV00001
Assigning t h e E n h a n c e m e n t
is a n e n h a n c e m e n t t h a t a l r e a d y c o n t a i n s t w o f u n c t i o n e x its .
You c a n a l s o i m p l e m e n t o n l y o n e o f t h e m i f y o u d o n ' t n e e d t h e o t h e r . T h e c r o s s e d - o u t c irc le s in F i g u r e 4 . 3 6 i n d i c a t e t h a t t h e e n h a n c e m e n t h a s n ' t b e e n a c t i v a t e d y e t . T h e e m p t y c o l u m n in f r o n t o f t h e t w o exits s h o w s t h a t t h e y a ls o h a v e n ’t b e e n i m p l e m e n t e d y e t . The
EX I T _ S A P L M V 0 1 _ 0 0 2
e x i t n o w c o m p r i s e s t h e c o m p l e t e s i g n a t u r e , as
y o u c a n s e c i n F ig u r e 4 . 3 7 . N e a r l y a ll i m p o r t p a r a m e t e r s a r e o p t i o n a l , w h i c h is w h y o n l y v e r y f e w w e r e d i s p l a y e d d u r i n g t h e call.
96
A d a p tin g E x istin g ID o c T yp e s
|
4-2
D is p la y ZSM En h an cem en t ass ig n m en ts
P r o je c t
D
ZSM
Enhancem ent
Iip l
1
Exp
F u n c t io n e x i t
Enhancem en t
S a b in e s IO o c Enhancem en ts
H 6V00001 M a t e r i a l
M a s te r
(In d u s tr y ):
ALE D i s t r i b u t i o n
EXIT_SAPLM V01_002 EX IT_SA PLM V02_002
C o m p o n e n ts o f th e E nhancem ent
F ig u r e 4 .3 6
F u n c tio n B u ild e r: D isp la y EXIT_SAPLM V01_002 a
I 3 9 llk s ] 3 g ia [
Function m o d u le
EXIT_SAPLMVO1_O0 2
Attributes
r m
Q
Im port
m
i a
E ip o rt
C h anging
Active T a b le s
Exceptions
a
FUNCTION EXIT_SAPLHV01_0O2 ■ • • • L o k a le S c h n it t s t e ll e IMPORTING VALUE(HESSAGE.TYPE) LIK E EDMSG-HS6TYP EDIDD-SE6NAH VALUE(SE6HENT_NAnE) LIK E VALUE (F_MARA) LIK E HARA STRUCTURE HARA HAKT STRUCTURE HAKT VALUE(FJ1AKT) LIK E VALUE (F MARC) LIK E MARC STRUCTURE MARC VALUE(F_HAR0) LIK E MARD STRUCTURE HARD VALUE(F_MFHM) LIK E MFHfl STRUCTURE MFHH VALUE (FJ1P G 0) LIK E MP6D STRUCTURE MPGD VA LUE (FJ1P0P) LIK E HPOP STRUCTURE "POP VALUE(F_HPRW) LIK E MPRW STRUCTURE HPRW VA LUE (FJ1VE 6) LIK E MVEG STRUCTURE HVEG VALUE(FJ1VEU) LIK E MVEU STRUCTURE h veu VALUE(FJ1KAL) LIK E MKAL STRUCTURE HKAL HARM VALUE(F_MARM) LIK E STRUCTURE HARM VALUE(FJ1EAN) LIK E MEAN STRUCTURE MEAN VALUE(F_MBE«) LIK E MBEW STRUCTURE M8EW VALUE(FJ1LGN) LIK E MLGN STRUCTURE HLGN VALUE(F_HVKE) LIK E MVKE STRUCTURE HVKE VALUE(F.M LAN) LIK E ULAN STRUCTURE HLAN VALUE (F HLGT) LIK E MLGT STRUCTURE HL6T EXPORTIN6 VALUE(IOOC_CIMTYPE) LIK E ED ID C -C IH T Y P TABLES IDOC.DATA STRUCTURE EDIDD ft •
OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL
INCLUDE ZXM6VU03
tuntiinr.niui-------F ig u r e 4 .3 7
C o n t e n t o f t h e S A P E x it s
T h e e x i t b e l o n g s t o t h e SAP s y s t e m a n d is l o c a t e d i n t h e SAP n a m e s p a c e .
C u s to m e r in c lu d e s
In a d d i t i o n , t h e c o n t e n t o f t h e e x i t m o d u l e c o n s i s t s o f o n l y o n e i n c l u d e
in t h e e x it
(ZXMGVU03). T h is i n c lu d e , in t u r n , is lo c a t e d in t h e c u s t o m e r n a m e s p a c e a n d d o e s n ' t e x i s t in t h e SAP s y s t e m u n t i l t h e e x i t h a s b e e n i m p l e m e n t e d .
97
4
|
C h an g e s to ID o cs
C re a tin g th e
If y o u d o u b le-c lic k o n (h e in c lu d e n a m e , y o u c a n c r e a te th e in clu d e
in c lu d e
v i a f o r w a r d n a v i g a t i o n , a s s h o w n in t h e C r e a t e O b j e c t d i a l o g in F ig u re 4 .3 8 .
F u n c tio n B u ild e r^ D is p la y E X IT _ S A P L M V 01 _ 0 02 w ra iiw io iH iiiiiig iF P iH g iis iia n iiiiB iin F u n ctio n m o d u le A ttributes
EX IT_S A P LM V O 1_O 02 Im p o rt
Export
^
iiB i
Active
C h a n g in g
T a b le s
E xceptions
urce code
i i innsai i iai FUNCTION E X IT SAPLMV01 0 0 2 . " L o k a le S c h n it t s t e lle : IMPORTING VALUE (HESSAGE_TYPE) VALUE(SEGMENT NAME)
L IK E L IK E
EDMSG-MSGTYP EPIDD-SE6NAM
're
0
/
In c lu d e Z X M G V U 0 3 d o e s n o t e x is t C r e a te O b jec t’
Yes
II
« M l. . VALUk VALUE (FJ1E A N ) VALUE(FJ1BEW ) V A LU E (F _H L6 N ) V A LUE (F_HV KE) VALUE (F J1L A N ) V A L U E (F MLGT)
NO
IX
Cancel
I
■ L IK E L IK E L IK E L IK E L IK E L IK E
MEAN MBEW HLSN HVKE MLAN HLBT
STRUCTURE STRUCTURE STRUCTURE STRUCTURE STRUCTURE STRUCTURE
I MEAN MBEW HL6N HVKE MLAN ML6T
IIV * OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL OPTIONAL
EXP0RT1N6 E D ID C -C IM T Y P V A L U E (I0 0 C _ C IH T Y P E ) L IK E TABLES E 0 I0 D ID0C _DA TA STRUCTURE
INCLUDE ZXMGVU03.
ENDFUNCTION
F ig u r e 4 .3 8
C r e a tin g a n In c lu d e in t h e C u s to m e r N a m esp a ce
T h e s y s t e m t h e n p r o v i d e s t h e e m p t y i n c l u d e (s e e F ig u r e 4 . 3 9 ) i n w h i c h y o u can in s e rt y o u r o w n c o d e . M a k e s u re y o u s a v e y o u r e n trie s alread y w h e n e d itin g th e in c lu d e . I f y o u a c tiv a te th e in c lu d e w i t h o u t h av in g s a v e d y o u r e n trie s a n d a n e r ro r occurs, y o u m ay h a v e to e n te r th e code all o v e r a g a in .
98
A d a p tin g E x istin g ID o c T yp e s
|
A B A P E d ito r: C h a n g e In c lu d e ZX M G V U 03 ■© £■- • @ * In c lu d e
„•
n i a s i
Z1HGVU83
P a tte rn
P retfr Pu nter
Inactive (R e v is e d )
liw n 'B la l ZX M G V U 03
F ig u r e 4 .3 9
I n c l u d e t o B e F ille d
You m a y w a n t t o g r o u p y o u r c o d e f o r g r e a t e r cla rity . T h is c a n b e d o n e b y c r e a t i n g a d d i t i o n a l i n c l u d e s . T h e i n c l u d e s t h e n b e g i n w i t h "Z"; t h a t is, t h e y a r e l o c a t e d in t h e c u s t o m e r n a m e s p a c e b u t still b e l o n g to t h e SAP e x i t f u n c t i o n g r o u p t h a t a l w a y s b e g i n s w i t h "X.” SA P p r o p o s e s ZXMGVF01 f o r its n a m e (s e e F ig u r e 4 .4 0 ).
A B A P E d ito r: C h a n g e In c lu d e ZX M G V U 03 M
l^ l I
IfrllttlB IIIl I P
inclu de
I
1
H T H B I fiS 1
ZXH6VU03
8 1 P a ttern | | Pretty Printer
Inactive (R e v is e d )
FILL.Z1M AR A
S u broutine
IN C L U D E Selection ZXKGVF01
Ne*
In c lu d e
3 3
F ig u r e 4 4 0
C u s to m e r In c lu d e
Business T ra n sa ctio n Events B u s in e s s t r a n s a c t i o n e v e n t s (BTEs) a r e a ls o h a n d l e d v i a f u n c t i o n m o d u l e s b u t i n a d i f f e r e n t w a y t h a n c u s t o m e r e x i t s . F o r BTEs, SAP calls i n t h e d eliv ered c o d in g a fu n c tio n m o d u le u sin g th e P E R F O R M_ X X X X X X X X _ E ’
c o m m a n d ; here,
CALL F U N C T I O N
XXXXXXXX
*0 P E N _ F I _
is t h e ev en t ID .
99
G ro u p in g code
4-2
4
|
C h an g e s to ID o cs
Determining b te s
You c a n s e a r c h f o r
0PEN_F
I * in t h e d e s i r e d c o d e t o f in d t h e e x i s t i n g BTEs
(sec F ig u r e 4 .4 1 ) . T h e s p e c i f i c a t i o n s in t h e r i g h t fie ld i n d i c a t e i f a BTE e x ists, w h e r e i t's c a lle d , a n d w h i c h s i g n a t u r e it p r o v i d e s . T h e BTE f o u n d h e r e h a s ID
MGV00100,
is c a ll e d o n l y o n c e , a n d p r o v i d e s all ID o c d a t a
to g e th e r w ith th e c o n tro l record.
G lobal S e arch in P ro g ra m s o n iF ira
a n
a
P ro g ra » /E n h a n c e a e n t
m m xm ------------------------------------------------------------------------------------------------------- P t ------------------------
□ LHV91UG6
2099
c a ll
fu n c tio n
ta b le s id o c _ d a ta
•O P E N J M .P E R F O R M J IG V O O IO O .E 1 = t _ id o c _ d a t a
c h a n g in g id o c _ h e a d e r = f _ id o c _ h e a d e r e x c e p t io n s
=1.
o th e rs
Figure 4 4 1
finding BTEs
Sample function
In T ra n s a c tio n B F01, y o u can fin d th e s a m p le f u n c tio n m o d u le s th a t
module
b e l o n g t o P/S i n te r f a c e s . T r a n s a c t i o n B F0 5 s p e c if ie s t h e s a m p l e f u n c t i o n m o d u le s th a t b e lo n g to p ro c ess in terfaces. T he s a m p le fu n c tio n m o d u le th a t b elo n g s to th e
MGV00100
BTE is t h e
SAMPLE_INTERFACE_MGV00100
f u n c t i o n m o d u l e (s e e F ig u r e 4 .4 2 ) . A lw a y s c h e c k b o t h BTE ty p e s i f y o u d o n 't k n o w w h ic h ty p e th e d e v e lo p e r used.
Change View "L ib ra ry o f th e Publish& S ubscribe B usiness Transaction ffifgflfNew Entries Event
—
|Te»t
module for BTEs
C
SA flP lE JN T E R F A C E J ievO O lO O
0
H6VO02O0 MATMAS : Inboun d P rocessing fo r ALE Distribn Unit
SA HP LEJN TER FAC EJ16V00200
El
Figure 4.42
Creating your own
S a m p le Function M odule
H6VO01O0 MATMAS : O utbound processing fo r ALE Distribn Unit
Event with Sample Function Module in Transaction BF01
T h e s a m p l e f u n c t i o n m o d u l e c o n t a i n s t h e s i g n a t u r e e x a c tly in a f o r m a t ex p ected by th e
0PEN_FI_PERF0RM
A B A P s t a t e m e n t o f t h e c a llin g p r o g r a m
s o t h a t y o u c a n u s e it a s a t e m p l a t e . C o p y th is f u n c t i o n m o d u l e to y o u r o w n n am esp a ce, a n d in se rt th e d esire d c o d e (in d ica te d b y * s ta rts
10 0
here
in F ig u r e 4 .4 3 ).
My o w n c o d e
A d a p tin g Ex istin g ID o c T yp e s
|
4 .2
F u n c tio n B u ild e r: C h a n g e Z _ E V E N T _ M G V 0 0 1 0 0
F I R I W R I B I f S l I P lf f l H F f r l I B S m n iP l I M W I Function m o d u le
Z _E V E N T _ H 6 V 0 0 1 0 0
A ttributes
Im p o rt
_ u
l m
Export
s o
II Pre«rPrinie7
Active
C h a n g in g
T a b le s
Exceptions
m m
FUNCTION Z_E VEN T_H 6VO 010 0 . •"L o c a l In te rfa c e TABLES ID O C .D A T A STRUCTURE EOIDD CHANGING REFERENCE( IDOC_HEADER) L IK E EXCEPTIONS
E01DC STRUCTURE
ED ID C
ERROR
E v en t r ls s e n by th e
ALE o u tb o u n d p r o c e s s f o r
HATHAS.
I t a l lo » s t o n o d if y t h e ld o c 's c o n tr o l h e a d e r t h e id o c d a ta a s » e l l a s s e r i a l i z a t i o n i n f o r m a t i o n c r e a t e d b y t h e s t a n d a r d SAP o u tb o u n d p ro c e s s . R a i s i n g t h e EXCEPTION ERROR w i l l s u b m i t t e d t o t h e ALE l a y e r .
p re v e n t th e
BE CAREFUL W ITH ANY CHANGES TO ID O C .C O N TR O L. ALE-SCENARIO
IDOC f r o *
IT
b e in g
HAY EFFECT YOUR WHOLE
■ My o « n c o d e s t a r t s h e r e ENDFUNCTION.
C o p y o f t h e S a m p le M o d u l e
F ig u r e 4 - 4 3
To a c t u a l l y e x e c u t e t h e c o r r e s p o n d i n g f u n c t i o n m o d u l e , y o u h a v e t o a c ti v a te it. H o w e v e r , t h i s is d o n e i n a c o m p l e t e l y d i f f e r e n t w a y t h a n fo r c u s t o m e r e x i t s . T h e t r a n s a c t i o n f o r m a n a g i n g BTEs is T r a n s a c t i o n FIBF. F ir s t o f all, y o u h a v e t o c r e a t e a c u s t o m e r m a n a g e m e n t o b j e c t b y f o l l o w in g th e
Se
t t in g s
• Pr
o d u c ts
• ...
o f a
c u sto m e r
m e n u p a t h (s e e F ig u re
4 .4 4 ).
asm Events
E d it
G o to
S e ttin g s
SAP B u s in e s s I
F ig u r e 4 . 4 4
E n viro n m en t
S y ste m
H e lp
*
. . . o f a partn er
P /S M o d u le s
•
... o f a cu s to m e r
P r o c e s s M o d u le s
*
»
M e n u Path f o r t h e C u s to m e r P ro d u c t
10 1
C u sto m e r p ro d u ct
4
|
C h an g e s to ID o cs
T h e e n t r i e s f o r t h e p r o d u c t m a i n l y c o n s i s t o f t h e n a m e (s e e F ig u r e 4 .4 5 ) . B e c a u s e SAP d e l i v e r s p r o d u c t s f o r p a r t i c u l a r ta s k s , a n d SAP p a r t n e r s u s e t h e s e BTEs in s o m e p r o d u c t s , y o u s h o u l d b e c a r e f u l w h e n a s s i g n i n g t h e nam es. A c tiv a tin g the
T h e last fie ld , w i t h "A" a s t h e h e a d i n g , p l a y s a p a r t i c u l a r l y critical role
c u s to m e r p ro d u c t
b e c a u s e it ’s t h e a c ti v a ti o n c o l u m n . T h e c o r r e s p o n d i n g c h e c k b o x in d ic a te s
f o r each c lie n t
w h e t h e r t h e p r o d u c t in t h e c u r r e n t c l i e n t is a c ti v e (BTEs c a n b e a c ti v a te d c l i e n t - i n d e p e n d e n t l y ) s o t h a t t h e r e s p e c t i v e BTEs c a n b e e x e c u t e d .
C h a n g e V ie w " C u s to m e r P ro d u c ts " : O v e rv ie w y
N e w E n trie s
lj? S
P ro d u ct
[Text
ZSH1
ID o c s
F ig u re 4 -4 5
i
. i
l l
E R F C des tin atio n
A 0
C re a tin g a C u s to m e r P ro d u ct
T h e RFC D e s t i n a t i o n field r e m a i n s e m p t y i f y o u r e m a i n in t h e s a m e s y s t e m t h a t e x e c u t e s t h e c a llin g p r o g r a m . I f y o u e n t e r a v a l i d d e s t i n a t i o n f r o m T r a n s a c t i o n S M 5 9 in t h i s field, t h e e v e n t s t h a t a r c a s s i g n e d t o th is p r o d u c t a r e e x e c u t e d o n t h e s y s t e m t h a t b e l o n g s to t h i s d e s t i n a t i o n . A s s ig n in g an e v e n t to th e p ro d u c t
You a s s i g n y o u r e v e n t s to t h e p r o d u c t ( c o m b i n e d a c c o r d i n g t o w h e t h e r all o r n o n e o f t h e s e e v e n t s a r e a c tiv e ) v i a t h e or
Process
M
o d u le s
Se
t t in g s
• P /S M
o d u le s
m e n u p a t h . F i g u r e 4 . 4 6 d i s p l a y s a ll r e q u i r e d
s p e c if ic a t i o n s .
C h a n g e V ie w "P u b lis h & S u b s c r ib e B T E : C u s to m e r E n h a n c e m e n ts ": N e w Entries
Event
IP roduct
H6VOO10OZSM1
jctr |Appl
f u n c t io n M odule
n
|Z_EVENT_HG V00100
id id
n F ig u re
4.46
A s s ig n in g Events t o P ro d u cts
D e p en d in g o n th e e n v iro n m e n t, y o u can use th e en trie s m a d e fo r count i y (C tr) a n d a p p l i c a t i o n (A p p l.) a s t h e filte r c r it e r i a ; f o r ID o c s , h o w e v e r , t h e s e r e s t r i c t i o n s d o n ’t h a v e a n y e ffec t, s o t h e fie ld s r e m a i n e m p t y .
10 2
A d a p tin g E x istin g ID o c T yp e s
|
C lassic B A dls C lassic B A d ls a r e h a n d l e d v i a a h a n d l e r class. T h e n a m e o f th i s c lass is CL.EXITHANDLER,
a n d its c lass m e t h o d ,
GET.INSTANCE,
is c a lle d o n c e f o r
e a c h B A d l. I f y o u w a n t t o k n o w i n a p r o g r a m i f y o u c a n u s e a BAdI, s e a r c h f o r "C L .E X IT H A N D L E R ." You c a n fin d t h e r e q u e s t e d BAdI in t h e EX I T_NAME
e x p o r t v a r ia b l e . A c o r r e s p o n d i n g i n s t a n c e v a r i a b l e c a lle d
LF_
EXIT is s p e c if ie d h e r e (s e e F ig u r e 4 .4 7 ).
G lo b a l S e a rc h in P r o g r a m s
*W .
S
a
*
F
2674 2080
□invotuee
F ig u r e 4 - 4 7
1 1- D-
CLASS Cl.EXITHANOlER DEFINITION 10A0 CALL REIMOD cl_exUhanoet_1nstance EXPORTING EXIT_NANE ■ 'B*t>t_NATI1AS_AlE_CR‘ INPORTIN6 ACT_1NP_EX1STIK6 i IF_EXII_AKT CHANGING tnstance = IF.EXIT
I d e n t i f y i n g a C la s sic B A d I
T h e n a m e o f th e in s ta n c e v a ria b le n o w e n a b le s y o u to d e te r m in e w h ic h
C a llin g t h e BAdI
m e t h o d s o f t h e BAdI a r e c a ll e d a n d w h e r e t h e y a r e c a lle d . H e re a s w e ll, SAP d e f i n e s w h i c h d a t a is t r a n s f e r r e d , w h i c h m e a n s t h e
CHANGE_MATMAS
m e t h o d is c a ll e d o n c e , t r a n s f e r s all ID o c d a t a a n d t h e c o n t r o l r e c o r d , a n d b o t h c a n b e c h a n g e d . F ig u r e 4 . 4 8 s h o w s t h e c o d e p r o v i d e d b y SAP f o r c a llin g t h e c la ssic BAdI. B A d ls h a v e to b e d e l i v e r e d b y SAP, s o SAP c r e a t e s t h e B AdI a n d t h e
C re a tin g a BAdI
m e t h o d s w i t h y o u r s i g n a t u r e a n d calls t h e m in t h e SAP p r o g r a m . C o n s e
im p le m e n ta tio n
q u e n tly , y o u o n l y h a v e to d e f i n e w h a t is s u p p o s e d t o b e d o n e in t h e BAdI. T h e B AdI is c r e a t e d in T r a n s a c t i o n S E 1 8 . You c a n u s e T r a n s a c t i o n S E 1 9 to c r e a t e a n i m p l e m e n t a t i o n f o r t h e BAdI w h e r e y o u d e f i n e w h a t y o u w a n t to d o w i t h t h e p r o v i d e d d a t a w i t h i n t h e m e t h o d . F ig u r e 4 . 4 9 d i s p l a y s t h e in itial s c r e e n o f t h e t r a n s a c t i o n in SAP N e t W e a v e r 7 .0 . In o l d e r re le a se s , t h e N e w BAdI o p t i o n w a s m is s in g ; e v e r y t h i n g e ls e s t a y s t h e s a m e .
10 3
4 .2
4
|
C h an g e s to ID o cs
F u nctio n B uild e r: D isp la y MASTERIDOC_CREATE_MATMAS Pattern Function m odule Attributes
MASTERIDOC_CREATE_MATMAS import
m
Export
loal |
C hanging
Active T a b le s
Exceptions,
ja j
HATMAS-IDOCS s e n a e n : s s s = i= = :s = i: i= = s = = s s = = : = ’ 1 I n s t a n z v a n a b l e z u n e is e n CLASS CL.EXITHANDLER D E F IN IT IO N LOAD STATICS L F _ E X IT TYPE REF TO IF_EX_BADI_HATMAS_ALE_CR STATICS: LF_EXIT_A K T( 1 ) TYPE C VALUE # \
sssssssssssss
' 2 In s ta n z e r o tfn e n I F l f . e x l t IS IN IT IA L CALL METHOD c l_ e x i t h a n d l e r « > g e t in s t a n c e EXP0RTIN6 EXIT_NAHE = 'BADI_MATnAS_ALE_CR' IHPORTINS ACT IMP E X IS TIN G = LF E X IT AKT CHAN6IN6 in s t a n c e = L F .E X IT . e n d lf . ' 3 S ta rte n I F NOT LF_EXIT_AKT IS IN IT IA L CALL METHOD L F _ E X IT • >CHAK6E_MATHAS CHAN6IN6 T_I00C_DATA = T_IDOC_DATA[] F_I00C_HEADER = F_!DOC_HEADER E N D IF . ■========= b a o I n a t h a s -IDOC s s e n d e n - - - - - - -
C a l l i n g t h e C la s s ic B A d l
F ig u r e 4 4 8
B A d l B u ild e r: In itia l S cre e n f o r Im p le m e nta tion s d Edil im plem entation
i m p i e m e n t a t i c
D e s c n p tio n
Z S n _ IO O C _ lH P _ H A T H A S
□
D e f a u lt im p le m e n ta tio n
□
E x a m p le Im p le m e n ta tio n
□
' A c t * ' n o t s w i t c h a b l e t h r o u g h C u s t o m (IM G )
R u n tim e B e h a v io r K
|[3
D o c u m e n ta tio n
7~
i m p l e m e n t a t i o n i s a c tiv e
E f f e c t i n C u r r e n t C li e n t
Im p le m e n ta tio n
is
c a lle d
P r o p e r t i e s o f B A d i D e fin itio n
1
C l
*1 * 1
1
1 «
Figure
112
*1
|
___ I m p l e m e n t a t i o n D a t e n M a t m a s - l d o c B e i m E r z e u g e n e r n e s i D O C s v e r a n d e i
B A d l D e f in itio n N a m e
B A Q j H A IH A $ A U
D e s c n p tio n
D a te n M a tm a s - ld o c b e im E r c e u g e n e r n e s iD O C s v e r a n d e r n
in te rf a c e
L r _ L ‘ —C J l11 n A i i i A ^ A L t 1 *
4 62 Properties of the Implementation
CR
A d a p tin g E x istin g ID o c T yp e s
|
4-2
To v i e w t h e i m p l e m e n t i n g class, d o u b l e - c l i c k o n I m p l e m e n t i n g C lass
M a in ta in in g the
(o n t h e l e ft in F ig u r e 4 . 6 3 ) . O n t h e r i g h t , t h e s y s t e m t h e n d i s p l a y s t h e
i m p l e m e n t i n g c la ss
i m p l e m e n t i n g m e t h o d t h a t is c o p i e d b y t h e BAdI i n t e r f a c e ( h e r e : IF _ EX_BADI_MATMAS_ALE_C R~CHANGE_MATMAS). C lic k in g t h e c h a n g e ic o n (p e n ) ta k e s y o u to t h e v i e w o f y o u r class.
E n h a n c e m e n t Im p le m e n ta tio n ZSM_ENH1 C h a n g e
H S IB S IH II0 D 1
-r A
E n h a r ^ ^ ^ n t Im p le m e n ta tio n
P ro p e rtie s
B B
ZSH_ENH1
H isto ry
T ec h n ic a l D e t a i l s ^
inaclive
E n h . im p le m e n ta tio n E le m e n ts
Im p le m e n tin g C la s s E ^ B A d l Im p le m e n ta tio n s ^
*
| D e s c rip tio n "|
Z S M J D O C J M P _ M A T » Im p iem en talic ©
im p le m e n tin g C las
in te rlace
IF £X BAPI
HAW S
4.63
CR
S h o rt descnption
M ethod el O i F _ E X _B A D I_ M A T M A S _ A L E _ C R 'C H A N G E _ M A T M A S
F ig u re
ale
Im p le m e n tin g C la s s
B a s e M ethod
N a v i g a t i o n t o t h e I m p l e m e n t i n g Class
N e w B A d ls e n a b l e t h e d e v e l o p e r o f t h e BAdI
10 p r o v i d e a s a m p l e class.
T h i s w a y , h e c a n e a s il y i n d i c a t e t h e i n t e n d e d u s a g e o p t i o n s f o r his BAdI.
S a m p l e c la s s f o r n e w B A d ls
T h i s f u n c t i o n is o p t i o n a l ; t h a t is, i t i s n 't p r o v i d e d b y all B A d ls. To illu s tr a t e t h i s f u n c t i o n , t h e e x a m p l e in F ig u r e 4 . 6 4 d i s p l a y s t h e c o r r e s p o n d i n g s c r e e n s h o t o f a d i f f e r e n t BAdI. T h e fig u re s h o w s t h e r e s p e c t i v e q u e r y as w e l l a s t h e a v a il a b le o p t i o n s . You c a n b a s ic a lly d e c i d e i f y o u w a n t to u s e a n e m p t y class, u s e t h e s a m p l e c lass a s a t e m p l a t e , o r h a v e a class i n h e r i t f r o m t h e s a m p l e class. T h e b e n e f i t o f h a v i n g y o u r BAdI i n h e r i t f r o m t h e s a m p l e c lass is t h a t y o u ’re a u t o m a t i c a l l y p r o v i d e d w i t h p o t e n tial c h a n g e s i n r e c e n t re le a s e s . W h e t h e r y o u q u e r y t h e s a m p l e m e t h o d o r n o t — t h e n e x t s t e p a lw a y s
S a m p le m e t h o d for
ta k e s y o u t o t h e c lass m a i n t e n a n c e ( s e e F ig u r e 4 . 6 5 ) f r o m w h e r e y o u can
n e w B A d ls
n a v i g a t e to t h e s o u r c e c o d e o f y o u r m e t h o d b y d o u b l e - c l i c k i n g o n th e m e t h o d i n t h e M e t h o d s tab.
11 3
4
|
C h an g e s to ID o cs
0/
C r e a te Im p le m e im p le m e n ta tio n e x a m p le c la s s e s a lre a d y exist Y o u have the follow ing options: C re a te a n e w e m p ty c la s s C opy o n e o f th e e x a m p le c la s s e s nh e rrt fro m a n e x a m p le c la s s no t d e c la re d a s "tin a f
im p le m e n ta tio n E x a m p le C la s s e s C la s s
Origin
CL_0NU 7AW _B AD I_IM PL_EXA HPLE
:mal
BAdI O e f.
j
viame B A d! E x a a p le
□
l a p le n e n t a t lo n C la s s
Q S □ E 0
i
m
r
m
'
i
i
a
a
i
________________________________________________________
■ e t h o d IF _ E X _ B A D 1_MATHAS_ALE_CR-CHANSE_HATHAS •
Y our
In p le n e n ta tio n
.
e n d n e th o d .
F ig u re
4.66
Im p le m e n tin g th e B A d l M e th o d
I m p lic it E n h a nce m e n ts as o f SAP ERP 6 .0 w it h Basis 7.0 In a d d i t i o n to t h e e n h a n c e m e n t s d e s c r i b e d s o far, t h e n e w e n h a n c e m e n t o p t i o n s a l s o i n c l u d e im p lic it en h a n c em e n ts. T h e s e a r e e n h a n c e m e n t s t h a t a r e n ' t p r e d e f i n e d b y t h e SA P d e v e l o p e r . I n s t e a d , t h e y a r e a v a il a b le a t sp ec ific l o c a t i o n s in all p r o g r a m s t h a t a r e n ' t p a r t o f t h e a c tu a l SAP Basis. F o r f u n c t i o n m o d u l e s a n d i n c l u d e s a s t h e y a r e p r o v i d e d in I D o c p r o c e s s in g, t h e s e a r e t h e f o l l o w i n g lo c a tio n s : ► A t t h e e n d o f a n i n c l u d e ( r e p o r t s a r e c o n s i d e r e d i n c l u d e s as w e ll) ► In th e s ig n a tu re o f fu n c tio n m o d u le s ► At th e e n d o f s tru c tu re ty p e d e fin itio n s (b e fo re
end
o f)
► At th e b eg in n in g a n d e n d o f form s T h e r e a r e s o m e m o r e l o c a t i o n s , p a r t i c u l a r l y in t h e c o n t e x t o f c lasse s, b u t th e y a r e n 't re le v a n t for ID oc processing. I m p l i c i t e n h a n c e m e n t s a r e a v a i l a b l e in e v e r y p r o g r a m a n d a r e h i d d e n
D is p la y in g im p lic it
a t firs t. O n l y i f y o u i n f o r m t h e s y s t e m t h a t y o u w a n t t o u s e i m p l i c i t
e n h a n c e m e n ts
e n h a n c e m e n ts d o e s th e sy stem d isp lay th e e n h a n c e m e n ts s o th a t y o u c a n e d i t t h e m . F irs t, c lick t h e e n h a n c e m e n t ic o n n o w o p e n s (s e e F ig u r e 4 .6 7 ) , f o l l o w t h e t io n s
• Snow
Im
p l ic it
En
h a n c e m e n t
O
Ed
it
p t io n s
HI. In
• En
th e sc re e n that
h a n c e m e n t
O
pera
m e n u p a t h to d i s p l a y th e
im p licit e n h a n c e m e n ts .
115
4
|
C h an g e s to ID o cs
P ro g ra m
E d it
G o to
U tilities(M )
E n v iro n m e n t
S y s te m ©
P a ttern A B A P E
* eport I
a o a i »
C tr l* F 6
C lip b o a rd
»
F in d /R e p la c e
C trl*F
F in d N e x t
C trl*G
m e n ts
fo r R B D M ID O C
n h a n c e m e n ts
®
a° Q g
3
C!h G l
P a ttern
Pretty Prin ter |
Active I
I
■
F0
to rt
H e lp
M ore functio ns
*
M odification O p e ra tio n s
•
E n h a n c e m e n t O p e ra tio n s
•
T4ne1
d a ta :
Da
d a ta
end o f t_ h e lp _ v a lu e .
d a ta
b e q in o f v a l u e s
C ancel
Ft 2
C re a te Undo R e p la c e
o c c u rs 0 .
s tr in .
C hange S h o w im p lic it E n h a n c e m e n t O p tio n s
t
h e l p . v a l u e - t a O n a n e = , E D IH S G \ h e l p . v a l u e - f i e l d n a n e = 'N E S T Y P '.
F ig u re 4 -6 7
H id e Im p licit E n h a n c e m e n t O p tio n s
D is p la y in g I m p li c it E n h a n c e m e n ts
Im p lic it
T he p ro g ra m te x t t h e n d isp lay s a d d itio n a l lin es th a t c o n sist o f q u o ta tio n
e n h a n c e m e n ts
m a r k s a n d n a m e s . T h e s e a r c t h e i m p l i c i t e n h a n c e m e n t s . B e c a u s e t h e y a rc
in th e "R B D M ID O C " report
a v a ila b le i n all p r o g r a m s , y o u n e e d to g e n e r a t e t h e i r n a m e s . T h e i r n a m e s a lw a y s c o n s i s t o f a s e q u e n t i a l n u m b e r a n d a d e s c r i p t i o n t h a t i n d i c a t e s t h e l o c a t i o n t o w h i c h t h e y b e l o n g (e .g ., a t t h e e n d o f a f o r m ) . F ig u re 4 .6 8 d isp la y s im p licit e n h a n c e m e n t b o th a t th e b e g in n in g a n d e n d o f a f o r m a n d i n a d a t a s t a t e m e n t a s w e ll as a t t h e e n d o f t h e i n c l u d e (th e RBDMI DOC
r e p o r t h e r e ) . T h is is i n d i c a t e d b y q u o t a t i o n m a r k s , w h i c h r u n
a c r o s s t h e e n t i r e lin e. Im p le m e n tin g
A n im p li c i t e n h a n c e m e n t is i m p l e m e n t e d in t h e s a m e w a y a s a n e x p lic it
an im p lic it
e n h a n c e m e n t. A n im p le m e n ta tio n th a t h a s a lre ad y b e e n c arried o u t
enhancem ent
r e m a i n s v i s i b le ( s e e F ig u r e 4 . 6 9 ) e v e n i f t h e d i s p l a y o f i m p l i c i t e n h a n c e m e n t s is d i s a b l e d a g a in , f o r e x a m p l e , a f t e r T r a n s a c t i o n S E 3 8 h a s b e e n r e c a lle d .
116
A d a p tin g E x istin g ID o c T yp e s
|
4-2
A B A P E d it o r : C h a n g e E n h a n c e m e n ts f o r R B D M ID O C
«•»>»*»»ISB| gqiy &*>»ftMiw>M«iWR^iBB33nPlllBW|p«B»»"lF^ SSWIOOC
I I I
I I Ml
‘jlrrt
I
la i
M h « ip _ ft> n a a e _ c r*< « t a e ie s t t M a e
ctta
s tru c tu re to o **
oe o l n o ' t_r>elp_valu8 o cc u r s 6 i nc l u a e st ru c t u r e ne l p vain*
H U
o i d o f t _ h * lp _ v a lu e
n il
B e g in o f - i l u H
o c c u rs
0,
s t r ir > g ( K • n o of values
, -C D iH S C * » w i o m > * C D I « $ 6 - i « t »p t _ r « i p _ v a i u e - f i e i ^ w » . ‘H f $ T Y P ‘ > > ■ “ ‘X' t o t _ h * i p _ « a i u « s * l e c t f l a a a p p e n d t.help.value t (i«lp _ v al u o •t • ’E D I " 6 6 1 ' • field tit l e EO t f t S S T K S C S P t . f e l p . v a l u e - f l e l d r i M e ■ -DESCfiP’ B O V * ’ • to t_hBlp_ h ere ■ 8u t I h a v e t o u s e an a d d i t i o n a l DATA co««and O a ta : z s n v a lu e t y p e n a r a - e a t n r . ENDENHANCEMENT •S 'S -E n d ( 2 ) ................................................................................................ d a t a : end o f t _ h e l p _ v a i u e d a ta :
b e g in o f v a lu e s o c c u rs 0 . s t r 1 n g > 5 8 ) . en d o f v a lu e s
F ig u re
4-69
Im p le m e n te d Im p lic it E n h a ncem ent
T h e s a m p l e i m p l e m e n t a t i o n o f a n i m p li c i t e n h a n c e m e n t w a s d e l i b e r a t e l y
S p e cia l a s p e c ts o f
s e l e c t e d f o r a s t r u c t u r e d e f i n i t i o n h e r e . F o r im p li c i t e n h a n c e m e n t s , t h e
stru ctu re s
117
4
|
C h an g e s to ID o cs
o r i g i n a l SAP c o d e a n d y o u r e n h a n c e m e n t c o d e a r e a v a il a b le a s sp ec ific p r o g r a m m i n g o b j e c t s a n d m u s t a ls o b e v a l i d a n d c a n b e a c ti v a te d a s s p e cific p r o g r a m m i n g o b j e c t s . T h e r u n t i m e e n v i r o n m e n t d o e s n ’t i n s e r t t h e m at th e a p p r o p ria te lo c atio n u n til th e m a in p ro g ra m h a s b e e n ex e cu te d . B e c a u s e o f th is , t h e i m p l e m e n t a t i o n r e q u i r e s a s e c o n d D ata s t a t e m e n t . E n h a n c e m e n t in
You c a n v i e w all e n h a n c e m e n t s t h a t b e l o n g t o t h e n e w e n h a n c e m e n t t e c h
th e ru n tim e
n o l o g y in T r a n s a c t i o n S E 8 0 . F ig u r e 4 . 7 0 d i s p l a y s o u r i m p l i c i t e n h a n c e
e n v iro n m e n t
m e n t , ZSM1_IMPL_ERW, w i t h r e f e r e n c e t o t h e r e p o r t n a m e o r t h e i n c l u d e n a m e in t h e P r o g r a m c o l u m n a n d t h e l o c a t i o n o f t h e e n h a n c e m e n t s in t h e c o d e ( in t h e E n h a n c e m e n t P o i n t / S e c t i o n c o l u m n ) . S ta tic e n h a n c e m e n t s r e f e r t o c o d e f o r t h e d a t a d e c l a r a t i o n ; all o t h e r e n h a n c e m e n t s a r e d yn a m ic.
E n h a n c e m e n t I m p le m e n t a t io n Z S M 1 D i s p l a y
> < y
•
K-
o u 2811
€
11*1 Ettl
A\m '« w U K (*
EWOWIN
|B jE r "y e n t (MARC) M a s te r a a t e r l a l u n i t s o f m easure (HARM) H a s te r a a t e r l a l a a t e r l a l v a l u a t io n (HBEW) H a s te r a a t e r l a l a a t e r i a l d a t a p e r w a re h o u s e n u ib e r n a s t e r a a t e r l a l s a le s d a t a (HVKE) H a s te r a a t e r l a l t a x c l a s s i f i c a t i o n (H U H ) H a s te r a a t e r l a l lo n g t e x t hea der
(HL 6H)
----------E IU P S IIN K
F ig u re
R e le a s in g an enhancem ent
4.79
C o m p le te E nhancem ent
You m u s t a ls o r e l e a s e t h e e n h a n c e m e n t . F o r t h i s p u r p o s e , f o l l o w t h e E d i t • Se t
release
m e n u p a t h (s e e F ig u r e 4 . 8 0 ) . You c a n n o l o n g e r m o d
ify y o u r e n h a n c e m e n t a f t e r t h e r e le a s e .
12 8
A d a p tin g E x istin g ID o c T yp e s
|
4-2
D evelop IDoc Types: Initial Screen □
? i
^
0
&
a°
Obi N a m e
C h an g e R equests (Organcer)
zsh h apa
Sabines Enhanced Material Developm ent oDiect
c ’ R elease/cancei release
0
/
Extension types cannot be changed alter being released R e le a s e extension? Yes
F ig u re
4.80
~ I*
H
No
Cancel
|
R e le a s in g t h e E n h a n c e m e n t
N o w , y o u h a v e t o a s s ig n t h e r e l e a s e d e n h a n c e m e n t to t h e m e s s a g e ty p e
A s s ig n m e n t to
a n d t h e ID o c t y p e b e c a u s e y o u c a n o n l y u s e i t w i t h t h i s c o m b i n a t i o n .
m essage ty p e and
F ig u r e 4 . 8 1 s h o w s h o w t h i s is d o n e f o r t h e s a m p l e e n h a n c e m e n t , M ARA,
ID o c typ e ZSM-
in T ran sactio n W E 8 2 .
New E ntries: O verview o f A dded E ntries
M M M M 1 Output Types and Assignm ent to ID oc Types M essage Type
[Basic type
(Extension
HATHAS
HAIH AS05
jZSRHARA
i
F ig u re
4.81
jR e lea se j70O
A s s ig n in g t h e E n h a n c e m e n t t o t h e M e s s a g e Type
I f y o u ’re n o t s u r e w h e t h e r y o u ' v e c o n s i d e r e d all n e c e s s a r y a s p e c t s , y o u c a n c h e c k y o u r e n h a n c e m e n t . S u c h c h e c k f u n c t i o n s a r e a l s o p r o v i d e d fo r s e g m e n t ty p e s , b u t i t m a k e s m o r e s e n s e t o c a r r y o u t t h e c h e c k a f t e r e v e r y th in g h as b e e n im p le m e n te d so th a t th e c h ild e le m e n ts are a lso checked. To c h e c k t h e e n h a n c e m e n t , u s e t h e
En
h a n c e m e n t
• C
h eck
m e n u o r th e
sca le s ic o n , w h i c h y o u c a n s e e in F ig u r e 4 . 8 0 , s h o w n ea rlie r. F ig u r e 4 . 8 2 s h o w s w h a t is c h e c k e d a n d h o w t h i s is d i s p l a y e d in t h e c a se o f s u c c e s s . I f a n e r r o r o c c u r r e d , y o u c a n c o r r e c t i t u s i n g t h i s log. A f t e r h a v i n g c o m p l e t e d t h e e n h a n c e m e n t , y o u n e e d t o fill t h e s e g m e n t s a n d t h e n a m e o f t h e e n h a n c e m e n t in t h e c o n t r o l r e c o r d i f y o u s e n d th e I D o c a n d r e a d t h e r e s p e c t i v e s e g m e n t s i f y o u u p d a t e t h e ID o c.
129
C h e c k in g th e enhancem ent
4
|
C h an g e s to ID o cs
L o g d is p la y N te lfllfc
a
®
0 j
< £ r Long Text
Check e x t e n s io n ZSMHARA E x te n s io n ZSMHARA e x i s t s E x te n s io n ZSMHARA 1s r e l e a s e d
9
E x te n s io n ZSMHARA 1s l i n k e d » l t h l o g i c a l a e s s a g e MATMAS Ho p r e d e c e s s o r s e x i s t E x te n s io n z s m m a r a i s a s s ig n e d t o b a s ic t y p e m a t m a $05 C heck seg m e n t Z 1MARA S e g a e n t Z 1HARA c o n s is t e n t
*.82
F ig u re
C h e c k in g th e E n h a n ce m e n t
F illin g S e g m e n t s You n o w s e l e c t a n a p p r o p r i a t e e x i t in t h e o u t b o u n d f u n c t i o n m o d u l e o f t h e ID o c a n d i m p l e m e n t y o u r c h a n g e s (L istin g 4 . 2 ) . T h e f u n c t i o n m o d u l e f r o m t h e e n h a n c e m e n t s s e r v e s a s a n e x a m p l e h e r e . T h e p r o c e d u r e is i d e n t i c a l f o r all e n h a n c e m e n t t e c h n o l o g i e s , b u t t h e n a m e s o f t h e t r a n s f e r v a r ia b l e s in t h e s a m p l e c o d e c o r r e s p o n d t o t h o s e o f t h e exit.
LMV0 1 _ 0 0 2 F illin g th e s e g m e n ts w i t h an
* ............................... . . . . . . . . . . .................................................................... i *
IN C LU D E
ZXMGVU03
* ............................................................................................... *
a p p r o p r i a t e e xit
♦ F i l l case
e n te rp ris e -in te rn a l
m e s s a g e _ ty p e
C h e c k in g fo r
*
Change
m essage o r ID oc
*
m essage.
typ e s *
i f
th is
when
'M A T M A S ’
o n ly
th e n
case Check is
*
c u s to m e r
o f
when
a p p e n d in g the
when
th o s e
to
th e
be
in s e rts .
is .
I f
it
enhanced,
.
fill_ z lm a ra
.
.
g e n e ra te d
id o c _ d a ta
o th e rs .
re q u ire d
. i t
is
* E1 MARAM-
exi t
th e
* ZSMMARA’
segm ent
ta b le s
13 0
-
segm ent
p e rfo rm
segment
MATMAS.
.
se g m e n t_ n a m e
*
G e n e ra tin g and
one
r e a lly
im p le m e n t
w h ic h
fo r
. is
id o c _ c im ty p e
*
s e g m e n ts
.
a
and
c o rre s p o n d in g appended.
E X IT _ S A P -
A d a p tin g E x istin g ID o c T yp e s
endcase when
endcase
.
. .
4 2
L is tin g
4-2
.
o th e rs
e x it
|
E n h a n c in g th e " E X IT _ S A P L M V 0 1 _ 0 0 2 "
I n L istin g 4 . 3 , y o u c a n s e e t h e f
fo rm ,w h ic h
i l l_ z lm a ra
is c a ll e d in th e
e x it m e n t i o n e d p re v io u s ly . O f c o u r s e ad iv i s io n i n t o s u b r o u t i n e s
i n th e
E x a m p le o f th e c a lle d fo rm
c o d e i s n 't n e c e s s a r y b u t m a k e s it e a s i e r t o r e a d p r o g r a m s . * _______________________ __ ____ ________________ ___________________ __ _____________ _____________ __________ _________________________________*
* * * IN C LU D E
ZXMGVF01
.
* _____________________________________________________________________________________________________________ *
*&
F orm
fill_ z lm a ra
*&.................................................................................................................................................... * FORM f i l l _ z l m a r a ta b le s : d a ta :
*
m a tn r
ty p e
rea d
ta b le
re a d
p o s s ib le ,
e lm a ra m m a tn r
-
=
s e le c t
m a ra -m a tn r
e lm a ra m -m a tn r
s y -su b rc
eq
0
eq
L is tin g
4 .3
segnam
segm ent
=
'E
1 MARAM'
.
o c c u rs
o n ly
once,
.
ZZSMFELD2 fie ld s
fro m o f
e lm a ra m -m a tn r
M ara
z lm a ra .
.
id o c _ d a ta - s d a ta append
.
.
c o rre s p o n d in g m a tn r
e d id d
.
key
th e
ZZSMFELD1
s in g le
id o c _ d a ta -s e g n a m
ENDFORM
w ith
because
s tru c tu re
.
id o c _ d a ta - s d a ta
in to
end i f
id o c _ d a ta
z lm a ra
id o c _ d a ta
w h e re i f
ta b le s
e lm a ra m ,
id o c _ d a ta
= =
' Z IM A R A ' z lm a ra
.
.
.
. .
-
f i 1 l_ z lm a ra
C o d e fo r t h e “ fill_ z 1 m a ra ” Form
You h a v e to le t t h e s y s t e m k n o w i f y o u w o r k w i t h a c u s t o m e r - s p e c i f i c
P a rtn er p ro file w ith
e n h a n c e m e n t ; o t h e r w i s e , t h e s y s t e m i d e n t i f i e s c u s t o m s e g m e n t s as
enhancem ent
i n c o r r e c t . F o r t h i s p u r p o s e , n a v i g a t e to t h e O u t b o u n d O p t i o n s t a b a n d t h e I D o c T y p e s u b t a b in t h e p a r t n e r p r o f il e o f t h e s e n d i n g s y s t e m (s e e F ig u r e 4 . 8 3 ) . H e r e , t h e ID o c is d e s i g n e d w i t h t h e c o r r e s p o n d i n g c o n t r o l r e c o r d , a n d t h e s e n d i n g s y s t e m c h e c k s f o r all s e g m e n t s w h e t h e r t h e y a re a l l o w e d in t h i s c o m b i n a t i o n o f I D o c t y p e a n d e n h a n c e m e n t .
13 1
4
|
C h an g e s to ID o c s
P a rtn e r p ro file s : O u tb o u n d p a ra m e te rs
P iitn e .N o
2SHTAR6EI
SaBines Target System
Partn.Type
PI
L o g *a l system
Partnei Role
g
WATfUS
M essaged
Message code Messagefonefcon
□Test
Message Control Recet/er port
P o tt Processing Permitted Agent
Teie
SUBSTSTEB6
O tfc u l Mode ® Transfer C o c Immed
O Start subsystem
O Collect lOocs
® Oo not tta r t subsystem
F ig u re
4-83
Output Mode
P artner P ro file w i t h E n h a n c e m e n t
C o n tro l reco rd fo r
T h e ID o c a d d i t i o n a l l y c o n t a i n s t h e n a m e o f t h e e n h a n c e m e n t in t h e c o n
th e enhancem ent
trol r e c o r d ; in o u r e x a m p l e , t h e e n h a n c e m e n t is ZSMMARA in t h e E x t e n s i o n field. Fin ally , y o u c a n g e n e r a t e t h e e n h a n c e d ID o c t h a t w ill b e s e n t (see F ig u re 4 .8 4 ) .
lOoc Display □
lO c c 0 0 0 0 0 0 0 0 0 0 7 6 8 7 6 8 Q
^
C o n tro l R ec
C U D a ta re c o rd s
Total num ber 000006
•=> D E 1 « R * M
Seamen! 000001
03
OuCDOl
B asK tfpe
im t im s m
rrm
Ertenston
ZSitn«»«
E'MARA!
Message tipe
HATIUS
0
E 'M A K T M
Segment 000004
Partner No
2SMTARGET
□
E 'M A K T M
Segment 000005
□
E1M ARM M
Segment 000006
2 1 M ARA
□
^D~03
Data passed to port OK
Q lO ot written to til# 30 □
IDoc ready (Or dispatch (ALE sei> Receiver fo u n d . No fillers
Q ot
F ig u re
1
Current slatus
Segment 000002 Segment 000003
0
C D S ta s is re c o rd s
□
Direclon
4 84
Partn Type
LS
Port
S18SYSTE"
C o m e n otselected segment
Fid name
Fid c o rt
ZSnFElDl
i EHOI
Z2SHFEID?
'EM .
E n h a n c e d ID o c t o Be Sent
Y o u 'v e n o w c o m p l e t e d all n e c e s s a r y ta s k s o n t h e s e n d e r s i d e . T h e n e x t s e c t i o n d e a ls w i t h u p d a t i n g a n e n h a n c e d IDoc.
13 2
A d a p tin g E x istin g ID o c T yp e s
|
4 .2
P o stin g S e g m e n ts To u s e a n e n h a n c e m e n t in i n b o u n d p r o c e s s i n g , y o u m u s t f ir s t a s s ig n t h e
A s s ig n in g an
c o r r e s p o n d i n g i n b o u n d f u n c t i o n m o d u l e t h a t c o n s i s t s o f m e s s a g e ty p e ,
in b o u n d fu n c tio n
ID o c t y p e , a n d e n h a n c e m e n t . You d o t h i s i n T r a n s a c t i o n W E 5 7 ( s e e Fig
m o d u le
u r e 4 . 8 5 ) . D o n ' t g e t c o n f u s e d b y t h e n a m e o f t h e IDOC_INPUT_MATMAS01 f u n c t i o n m o d u l e ; it c a n p r o c e s s all m a t e r i a l m a s t e r ID o c s ( t h e n a m e w a s a s s i g n e d f o r h i s t o r i c a l r e a s o n b e c a u s e it w a s d e v e l o p e d w h e n o n l y t h e matmaSOI
ID o c t y p e w a s av a ila b le ).
C h a n g e V ie w " ID o c : A s s ig n m e n t o f F M to L o g . M e s s a g e a n d ID o c T y p e " :
Function module
IDOC.INPUTJIATMASOI
Function type
F Function m odule
8aslc type
HATMAS05
Extension
ZSHNARA
M e s s a g e Type
HATHAS
□
M e s s a g e Variant M ess, tancton O bject Type
D irection
BUS1001006
_ [ 2 inbound
D e scrip tio n
M atenal m aster
N am e
Standard material
F ig u re
4.85
3
A s s ig n in g t h e In b o u n d F u n c tio n M o d u l e fo r th e E n h a n c e m e n t
T h e p r o g r a m m i n g w o r k c o n s i s t s o f t w o p a r t s . First, y o u m u s t e n s u r e in t h e a p p l i c a t i o n t h a t t h e c o r r e s p o n d i n g u p d a t e m o d u l e s a ls o t r a n s f e r th e c u s t o m e r - s p e c i f i c fie ld s to t h e d a t a b a s e . U s u a lly , y o u ' r e n o t r e s p o n s i b l e f o r t h i s p a r t o f t h e d e v e l o p m e n t w o r k , a n d i t ’s t o o m o d u l e - s p e c i f i c to b e e x p l a i n e d in d e ta il h e r e . T h e s e c o n d p a r t o f t h e p r o g r a m m i n g w o r k is to e n s u r e t h a t t h e d a t a t h a t h a s b e e n a d d i t i o n a l l y t r a n s f e r r e d in t h e ID o c is r e a d a n d t r a n s f e r r e d to t h e t r a n s f e r p a r a m e t e r s o f t h e u p d a t e m o d u l e , w h ich m u st b e d o n e b y y o u . A g a in , t h e m a t e r i a l m a s t e r is u s e d a s a n e x a m p l e h e r e . L is tin g 4 . 4 s h o w s
U s in g d a t a fro m
t h e s a m p l e c o d e f o r t h e f ie ld s f r o m t h e c u s t o m e r - s p e c i f i c s e g m e n t ,
th e ID o c
ZIMARA.
133
4
|
C h an g e s to ID o cs
d a ta : i f
w a _ z lm a ra
m e s s a g e _ ty p e i f
ty p e eq
z lm a ra
‘ MATMAS’
f_ c u s t_ s e g m e n t-s e g n a m w a _ z lm a ra
-
end i f
. eq
' Z 1MARA'
f_ c u s t_ s e g m e n t- s d a ta
m o v e -c o rre s p o n d in g
end i f
.
w a _ z lm a ra
to
.
. f_ m a ra _ u e b
.
.
.
L is tin g 4 4
T ra n s fe rrin g t h e D a ta fr o m t h e " Z 1 M A R A " C u s to m e r S e g m e n t
T h e t r a n s f e r s t r u c t u r e is d e l i v e r e d b y SA P s o t h a t i t a l r e a d y i n c l u d e s p o t e n t i a l a p p e n d s to t h e
MARA
t a b l e a u t o m a t i c a l l y . T h i s is u s u a l l y t h e
case. If n o t, y o u ca n also a d d a n a p p e n d to th e tra n s fe r s tru c tu re that c o n t a i n s t h e s a m e fie ld s a s y o u r a p p e n d t o t h e d a t a ta b le .
W h e n d o ALE se rvices run ?
C o m b in a t io n o f A L E S e rv ic e s a n d E x its SA P g e n e ra lly p ro v id e s th e o p tio n
to
im p le m e n t changes t o
ID o c s v ia th e
s e ttin g s in C u s to m iz in g . T h e m a n ip u la tio n s , h o w e v e r, a re im p le m e n t e d a fte r y o u r ID o c has b e e n g e n e r a te d . Y o u r e x its , in c o n tr a s t, a re e x e c u te d w h i l e th e I D o c is g e n e r a t e d . T h i s m e a n s t h a t p o s s i b l e f i l t e r i n g p r o c e s s e s o r r u l e s m a y n o t b e d e p l o y e d w h e n y o u r e x i t is e x e c u t e d . Y o u s h o u l d c o n s i d e r t h i s f o r t h e im p le m e n ta tio n . F or e x a m p le , if y o u o n ly w a n t t o p ro ce ss a p la n t s e g m e n t fo r a s p e c ific p a rtn e r, y o u m u s t a s s u m e t h a t y o u r e x it
w o r k s w h i l e a ll p la n t s e g
m e n ts a re s till in c lu d e d . C o n s e q u e n tly , y o u m u s t m a k e s u re t h a t y o u r ch a n g e s a re m a d e t o t h e c o rr e c t p la n t s e g m e n t.
4 .2 .4
S p e c ia l R e q u ir e m e n ts f o r M a s t e r D a ta
You a l r e a d y k n o w t h a t t h e S M D p r o v i d e s s p e c i a l f u n c t i o n s f o r m a s t e r d a t a . S o m e t i m e s , h o w e v e r , t h e a v a ila b le s p e c ia l f u n c t i o n s a r e n 't w a n t e d . T he fo llo w in g sec tio n s d escrib e h o w y o u can m o d ify th em .
S e n d in g A ll D a ta A fte r C hanges W h e n u s i n g S h a r e d M a s t e r D a t a T o o ls a n d t h e c o r r e s p o n d i n g c h a n g e p o i n t e r s , SAP a s s u m e s t h a t I D o c s s h o u l d b e k e p t a s s m a l l a s p o s s i b le f o r p e r f o r m a n c e r e a s o n s . T h i s a ls o u s u a l l y c o r r e s p o n d s t o re a lity . But s o m e tim e s y o u c o llab o rate w ith p a rtn e rs w h o can o n ly p rocess co m p lete d a t a r e c o r d s . To still b e a b l e to u s e c h a n g e p o i n t e r s , y o u c a n i m p l e m e n t m in o r m o d ificatio n s fo r m a te ria l m asters.
134
A d a p tin g E x istin g ID o c T yp e s
|
4-2
T h e s e t t i n g t h a t o n l y t h e c o m p l e t e m a t e r i a l is s u p p o s e d to b e s e n t is
"S end co m p le te "
a l r e a d y a v a ila b le f o r t h e m a t e r i a l m a s t e r , f o r e x a m p l e , i f t h e c r o s s - p l a n t
m o d ificatio n
s t a t u s o f a v a l u e “w i t h d i s t r i b u t i o n lo c k " h a s b e e n c h a n g e d to a v a lu e " w i t h o u t d i s t r i b u t i o n lo c k ." F o r t h i s p u r p o s e , t h e
I D0C_CRE-
fu n c tio n m o d u le m a n a g e s a n in te rn a l tab le,
ATE_SMD_MATMAS p le x _ m a tn r,
MASTER
a _ t_ c o m -
w i t h t h e M A N D T , M A T N R , a n d M S G F N field s. I f y o u n o w
a p p e n d y o u r m a t e r i a l s t h a t a r e t o b e s e n t c o m p l e t e l y a s w e ll a n d s e t t h e M S G F N field to " 0 0 5 " f o r " m e s s a g e r e p la c e s p r e v i o u s m e s s a g e s ," t h e s y s t e m s e n d s t h e c o m p l e t e m a t e r i a l . T h e c o r r e s p o n d i n g s a m p l e c o d e c o u ld b e s t r u c t u r e d a s s h o w n in L is tin g 4 . 5 . *
T h is
*
a re
*
The
*
is
change a lw a y s
th e
key
fo r
MESTYPE
LOOP A T s e le c t
in to MESTYPE
ty p e
s p e c ific
m essage
d e c is io n
m essages
ty p e
h e re ,
B D C PS-M ESTYPE
G e ttin g t h e c h an g e
.
p o in te r
.
MESTYPE
MESTYPE eq
th a t
re d u ce d
th e
A_T_CHGPTRS s in g le
e ffe c t
c o m p le te ly .
s e lf-d e v e lo p e d th e
d a ta :
i f
has sent
fro m
w h e re
‘ ZSMMAT*
BDCPS C P ID E N T
eq
A _ T _ C H G P T R S -C P ID E N T
.
T .M A R A K E Y -M A N D T -
S Y -M A N D T
T _M AR A KE Y-M A TN R =
A _ T _ C H G P T R S -C D O B JID
COLLECT
.
T_MARAKEY
A _ T _ C O M P LE X _M A T N R -M A N D T
=
.
S Y -M A N D T
.
.
A _T_C O M P LE X _M A T N R -M A T N R =
A _ T _ C H G P T R S -C D O B JID
A _T _ C O M P LE X _ M A T N R -M S G F N
C_MSGFN_R
COLLECT c le a r END I F ENDLO O P
=
A _ T _ C 0 MPLEX_M ATNR
MESTYPE
.
.
.
A p p e n d i n g t o SAP
.
tab le
.
. .
S e n d in g t h e C o m p le te M a te rial A fter M o d ific a tio n s
L is tin g 4 .5
T h is c o d e m u s t b e a d d e d b e fo re th e s y s te m f u r th e r p ro c esses th e d ata. B ecause th e m o d u le m ay c h a n g e , y o u s h o u ld se a rc h for the fo llo w in g co m m en t: D E S C R IB E C HE CK
TABLE h lin e s
t.m a ra k e y GT
0
L IN E S
h lin e s
.
.
T h e n , i n s e r t t h e c o d e d i r e c t l y b e f o r e t h i s in y o u r f u n c t i o n m o d u l e . N e x t,
L o catio n o f th e
i n s t e a d o f t h e f u n c t i o n m o d u l e p r o v i d e d b y SAP, a s s i g n y o u r o w n f u n c
m o d ificatio n
ti o n m o d u l e in T r a n s a c t i o n B D 6 0 . Be s u r e t o i d e n t i f y t h e c h a n g e s in th e
135
4
|
C h an g e s to ID o c s
o r i g i n a l m o d u l e f o r e a c h r e l e a s e c h a n g e a n d r e p r o d u c e t h e m in y o u r f u n c t i o n m o d u l e i f r e q u i r e d . A l t e r n a t iv e ly , y o u c a n c o p y t h e SAP m o d u l e a fte r th e re le ase c h a n g e a n d in te g ra te y o u r m o d ificatio n s. U n fo rtu n ately , a n a p p r o p r i a t e e x i t i s n 't y e t a v a ila b le a t t h e l o c a t i o n w h e r e t h e m o d i f i c a tio n n e e d s to b e im p le m e n te d .
R educed ID o cs in C o m b in a tio n w it h C u s to m S eg m e n ts I f y o u ’v e a d d e d c u s t o m s e g m e n t s to t h e m a s t e r d a t a ID ocs, y o u m a y w a n t to w o rk w ith red u ctio n s — fo r reasons o f p e rfo rm a n c e o r b ecau se y o u r p a r t n e r d o e s n ’t w a n t to re ceiv e p a r ti c u la r d a ta . B e c a u s e y o u r e n h a n c e m e n t is a n ID o c ty p e b u t y o u r r e d u c t i o n a m e s s a g e ty p e , y o u c a n ' t s i m p ly use o n e o f t h e m a s t h e b a sis f o r t h e o t h e r o n e . I n s t e a d , y o u h a v e to g e n e r a t e a r e d u c e d ID o c t h a t d o e s n ' t k n o w y o u r c u s to m e r- s p e c ific s e g m e n t s a n d in w h i c h y o u c a n d e l e t e e v e r y t h i n g f r o m t h e s t a n d a r d v e r s io n t h a t y o u d o n ' t w a n t to s e n d . I n a d d i t i o n , y o u m u s t a ls o g e n e r a t e a n e n h a n c e m e n t t y p e th at c o n ta in s y o u r a d d itio n a l se g m e n ts w ith o u t k n o w in g th e red u ctio n . E n h a n c in g a n d
W h e n c re a tin g th e r e d u c e d m e ssa g e ty p e, T ra n sactio n W E 8 2 a u to m a ti
re d u c in g
c a lly g e n e r a t e s a n e n t r y in w h i c h t h e b a s i c t y p e is a s s i g n e d t o t h e n e w l y c r e a t e d r e d u c e d m e s s a g e t y p e . T h i s is d o n e a u t o m a t i c a l l y w h e n y o u s a v e t h e r e d u c e d m e s s a g e t y p e s o t h a t y o u c a n u s e i t i m m e d i a t e l y . To n o w u s e t h e c o m b in a tio n fro m y o u r re d u c tio n a n d y o u r e n h a n c e m e n t, c o p y th e b a s i c t y p e , a n d i n s e r t t h e e n h a n c e m e n t in t h e c o p i e d e n t r y . F ig u r e 4 . 8 6 s h o w s th is fo r th e
Z SM 1
r e d u c t i o n (s e e C h a p t e r 2, S e c t i o n 2 . 1 . 1 , S h a r e d
M a s t e r D a ta Tool) a n d t h e
ZSMMARA
e n h a n c e m e n t f r o m t h i s s e c ti o n .
C h a n g e V ie w " O u tp u t T y p e s a n d A s s ig n m e n t to ID o c T y p e s ":
Output T n m ano A ssignm ent to IDoc Types
ZSH1
HATHAS05
ZStlMARA
64«
E
0
F ig u re 4 -8 6
A s s ig n in g t h e E n h a n c e m e n t t o t h e R e d u c e d M e s s a g e T ype
A p p ro p ria te
In t h e p a r t n e r p ro file , t h e e n h a n c e m e n t is c o m b i n e d w i t h t h e b a s i c ty p e ,
p a rtn e r p ro file
a n d t h e s t a n d a r d m o d u l e c a r r i e s o u t t h e r e d u c t i o n w h i l e y o u r e x i t fills t h e c u s t o m e r - s p e c i f i c field s. F ig u re 4 . 8 7 d i s p l a y s t h e a p p r o p r i a t e p a r t n e r p ro f ile in t h e o u t b o u n d p r o c e s s i n g f o r t h e r e d u c e d m e s s a g e t y p e ,
ZSM 1,
w i t h " M A T M A S 0 5 " s p e c if ie d in t h e B asic T y p e fie ld a n d “Z S M M A R A "
13 6
A d a p tin g Ex istin g ID o c T yp e s
in t h e E x t e n s i o n field. T h e i n b o u n d p r o c e s s i n g m u s t t a k e w h a t it g ets; h o w e v e r, e n h a n c e m e n ts a n d re d u c tio n s m u s t a lso be k n o w n there.
P a r tn e r p r o file s : O u tb o u n d p a r a m e te r s
P a rtn e r N o
SA LES
S a le s s y s t e m (c lie n t 8 1 0 )
P a rtn T y p e
LS
L o g ic a l s y s t e m
P a r t n e r R o le
jg
M e ssag e Type
Z S fli
S a b i n e s R e d u c e d M a t e r ia l
M e ssag e code M e s s a g e fu n c t io n
□
M e s s a g e C o n tro l
R e c e iv e r p o rt
T e st
p o s t p r o c e s s in g
T ra n s a c tio n a l R FC
SA L E S
P e r m itt e d A g e n t
T e le
L S S a le s
jo o
P a c k S iz e □ Q u e u e P ro c o ssm g O u tp u t M o d e / " O T r a n s f e r ID o c im m e d
O u tp u t M o d e
4
© C o lle c t ID o cs
ID O C T y p e
B a s i c ty p e
H A TW AS05
E n h a n c e m e n t D i s t r i b u t io n o f S
E rte n sio n
z s h h a r a
S a b i n e s E n h a n c e d M a te n a i
V ie w E
C a n c e l P ro c e s s in g
S e g r e l e a s e i n ID o c w o
F ig u re 4 .8 7
□
S e g m e n t A f ip i. R e !
P a r t n e r P r o f ile w i t h R e d u c t i o n a n d E n h a n c e m e n t
To t e s t t h e s e s e t t i n g s , g e n e r a t e y o u r ID o c ( s e e F ig u r e 4 .8 8 ) .
IDoc display V
□
IDOC 0000000000768770 □
^
□
D a ta r e c o r d s
03
O utbox
CCM
B a s i c ty p e
H A in « S 0 5
E x te n s io n
ZSniMRA
O E1HARA1
S egm ent 000003
M e s s a g e ty p e
ZSnt
O
e im a k t u
S e g m e n t 000004
P a rtn e r N o
SALES
□
E t MAKTM
S egm ent 000005
S ta tu s re c o rd s
^
Q 03 0 D
T o ta l n u m b e r 0 0 0 0 0 5
Z1M »R»
□
^
1
C u rre n t s t a t u s
segmem 0 0 0 0 0 2
□
^
D ire c tio n
Control Rec
Data passed to port OK IDoc sent lo
SALES
IDoc read* for dispatch (ALE service)
Content o*selected segment
Receiver fo u n d . No H e r * . No conversion .Version
D Ot
F ig u re 4 88
LS
P o rt
SAP system or external program
30 Q
P a r t n T ype
lOoc generated
n r r — -----------ZZSH FElO l
HEH01
E
ZZSHFELD2
•EM02
0
S am p le ID o c
137
4-2
4
|
C h an g e s to ID o cs
4 .3
C u sto m F u n ctio n M o d u le s fo r File G e n e ra tio n in F ile Ports
F o r file p o r t s , y o u n e e d to s p e c if y t o w h i c h file t h e c o r r e s p o n d i n g ID o c is s u p p o s e d t o b e w r i t t e n i f t h i s p o r t is u s e d . You d o t h i s in T r a n s a c t i o n W E 2 1 , t h e p o r t m a n a g e m e n t (s e e F ig u re 4 .8 9 ) . H e r e , y o u c a n a l w a y s w r i t e t h e ID o c t o a d e f i n i t e file b y s p e c i f y i n g t h e n a m e o f t h e c o r r e s p o n d i n g file in t h e O u t b o u n d File field in t h e t a b w i t h t h e s a m e n a m e .
C r e a tin g a file p o r t
g if ] I I 0 P£ Q i v
C D Ports
P c ft
2S H 1 _ 0 » T E I
D e s c rip tio n
S a b i n e s F ile P ort
I 1 d l T ra n s a c tio n a l R F C
__ 7 e E U P E x P P o rt K a s s e n s im u la tlo n
SMFILE SUBSYSTEM
S a b i n e s T e s t p o d fo r F ile s P o rttU f e n E D I -S u b s y s te m v ia O a ie is c h n m s te ile
TICKETS
P o rlfu fV erk a u fsh ilfsm ffiel
v is io n
~7~
S y s te m Sctnr>g
O B o c rec hpes SAP Release 2 0/2 1
p ] Unicode formal
O C o c recftpes SAP Release 3.013 1
□ Continue despite comerslon err or
® lOoc record t»pes SAP Release
OCPt-C
*>
O u t b o u n d Tripper
C D ABAP.PI
Replacement ctiar
i n b o u n d file
S ta tu s m e
I1 O X M L F I I * □
O Logical directory
X M L HTTP
A c cess T est
® p f c r t * a l director*
Oirectory
Function module Descnpoon
E) Satnnes cr»-n Function Module
Outbound file
BBI F ig u re 4 .8 9
F ile P o r t w i t h C u s t o m F u n c t i o n M o d u l e
M o d u l e f o r file
M o r e f r e q u e n t l y , h o w e v e r , file n a m e s a re s u p p o s e d t o b e a s s i g n e d d y n a m
n a m e s in file p o rts
ically. I n t h e s e ca s e s , u s e a f u n c t i o n m o d u l e t h a t c o m p r i s e s t h e n a m e o f t h e file f r o m t h e ID o c d a t a , f o r e x a m p l e , f r o m t h e ID o c n u m b e r , t h e c u r re n t tim e , o r s im ila r in fo rm a tio n . T h is way, y o u a v o id t h a t th e sy stem o v e r w r i t e s a n e x i s t i n g file, a n d y o u c a n a ls o f i n d t h e d a t a m o r e easily. F ig u r e 4 . 8 9 s h o w s t h e u s e o f a n a d d i t i o n a l f u n c t i o n m o d u l e t h a t is c r e a ted w ith in the c u s to m e r n a m e s p a c e
(Z _ S M _ P A T H _ C R E A T E _ D A T E _ T IM E ).
M a in te n a n c e
It i s n 't s u ffic ie n t t o s i m p l y i m p l e m e n t t h e r e q u i r e d f u n c t i o n m o d u l e . To
t r a n s a c t io n f o r file
h a v e t h e s y s t e m d i s p l a y it in t h e s e l e c t io n list in t h e file p o r t , y o u m u s t
fu n c tio n m o d u le s
a d d i t i o n a l l y r e g i s t e r it f o r t h e file p o r t s a n d le t t h e s y s t e m k n o w w h e t h e r
13 8
C u sto m Fu n ctio n M o d u le s fo r F ile G e n e ra tio n in F ile P o rts
it u s e s logical o r p h y s ic a l p a t h s . In T r a n s a c t i o n W E 5 5 , y o u i m p l e m e n t th is a s s i g n m e n t b y a d d i n g a n e w e n t i y (see F ig u r e 4 . 9 0 ) . F u n c t i o n m o d u l e s m a r k e d w i t h "L" u s e logical p a t h s ; all o t h e r m o d u l e s u s e p h y s ic a l p a th s .
C h a n g e V ie w "ID o c : F u n c tio n M o d u le s f o r F ile N a m e s": O v e rv ie w ^
E x p a n d < -» C o ll a p s e
j
N e w E n trie i
2
0
D e lim it
Q
v a r ia b le U s t
£}
F o rm
ID o c : F u n c tio n M o d u le s ( o r F ile N a m e s ^ a m e o f fu n c tio n m o d u le
>aTh
>X PATH CREATE
ile n a m e d e t e r m in a t io n fo r th e D X W o r k b e n c h
M t f f l MOUERT -
A s c r ip tio n
3)
. o g i c a l d ire c to ry , file n a m e in f o r m a t T c lie n t d o c n u r r t E
E P I- L P A IH CREATE .USERHAHE
. o g i c a l d i r e c t o r y , f i l e n a m e i n S Y -U N A M E f o r m a t
E D I PATH CREATE C L IE N T DOCNUM
D ir e c t o r y * f i l e n a m e i n f o r m a t T _ C l i e n t _ D o c n u m
E P I PATH CREATE f»ATE TIME
D ir e c t o r y * f i l e n a m e i n f o r m a t T _ C C Y Y M M D D _ H H M M :
E P I PATH CREATE LENGTH LE 8
D ir e c t o r y • f i l e n a m e i n f o r m a t N T H H M M S S T
E P I PATH CREATE "ESTYP
D ir e c t o r y • - m e s s a g e t * p e » _ « l a s t 8 c h a r a c t e r s o f D O
E D I PATH CREATE POS U N IX DOS
D ir e c t o r y * f i l e n a m e ( n a m e l a s t 8 c h a r a c t e r s o f O O C f
E D I PATH CREATE R E T A IL .STORE
D ir e c t o r y * f i l e n a m e i n f o r m a t T _ S t o r e _ « D O C N U M 1 6
H L-P -4TH CREATE USERKM E
D ir e c t o r y • t i l e n a m e i n f o r m a t S Y -U N A M E
;p l
D ir e c t o r y * f i l e n a m e i n f o r m a t T _ S Y -U N A M E _ C C Y Y M I>
path
CREATE USER n a m e pT th
-
M
3 E M -P A E x p o r t F i l e N a m e s
EAP 6EJ. Q U .If.U l p 1LEH&HE
S a b i n e s o w n F u n c tio n M o d u le
[-
E < ] [► ][
F ig u re 4 . 9 0
F u n c t i o n M o d u l e s f o r File N a m e s
T h e s i g n a t u r e o f a f u n c t i o n m o d u l e t h a t w o r k s w i t h logical p a t h s loo k s
S i g n a t u r e for
lik e t h e o n e s h o w n i n L is tin g 4 .6 .
log ical p a t h s
* “ *"L o ca l
in te rfa c e : IM P O R T IN G
* ••
*••
V A LU E (D A T A T Y P E )
L IK E
E D IP O -A C T R IG
V A L U E (D IR E C T O R Y )
L IK E
E D IP O -O U T P U T D IR
V A L U E (F IL E N A M E )
L IK E
E D IP O -O U T P U T F IL E
VA LU E(C O N TR O L)
L IK E
E D ID C
L IK E
E D I_ P A T H -P T H N A M
STRUCTURE
E D I DC
E X P O R T IN G VA LU E (P A T H N A M E ) E X C E P T IO N S LOG I C A L _ P A T H _ E RROR
L is tin g 4 .6
S i g n a t u r e o f a F u n c t i o n M o d u l e U s i n g L o g ic a l P a t h s
139
|
4-3
4
|
C h an g e s to ID o cs
T r a n s a c t i o n FILE
F u r t h e r m o r e , y o u m u s t a ls o d e t e r m i n e t h e p h y s ic a l p a t h , w h i c h h a s b e e n a s s i g n e d in C u s t o m i z i n g in T r a n s a c t i o n FILE. F o r t h i s p u r p o s e , SA P p r o v i d e s a s p e c if ic f u n c t i o n m o d u l e . T h e f o l l o w i n g s a m p l e c o d e (L istin g 4 .7 ) i n d i c a t e s its u se. DATA:
L O G IC A L .P A T H
LO G IC A L _ P A T H CALL
F U N C T IO N
-
L IK E
F IL E P A T H -P A T H IN T E R N .
D IR E C T O R Y .
' F IL E _ G E T _ N A M E _ U S IN G _ P A T H '
E X P O R T IN G *
C L IE N T
- S Y -M A N D T
L O G IC A L _ P A T H
=
L O G IC A L _ P A T H
*
O P E R A T IN G _S Y S T E M
- S Y -O P S Y S
*
PARAMETERS
= ‘
*
P A R A M E T E R .?
- *
USE_BUFFER
= ‘
F IL E _ N A M E
- S Y -U N AM E
U S E _ P R E S E N T A T IO N _S E R V E R
= *
IM P O R T IN G F IL E _ N A M E _ W IT H _ P A T H
=
PA TH NAME
E X C E P T IO N S P A T H _ N 0 T _ F 0 UND
- 1
M IS S IN G _ P A R A M E T E R
=
O P E R A T I N G _ S Y S T E M _ N 0 T _ F 0 UND -
L is tin g 4 .7
2 3
F IL E _ S Y S T E M _ N O T _F O U N D
= 4
OTHERS
= 5
.
S A P F u n c t i o n M o d u l e T h a t D e t e r m i n e s t h e P h y s ic a l F ile N a m e f o r a
L o g ic a l F ile N a m e
S ig n a tu r e for physical p a th s
I f y o u g e n e r a t e a f u n c ti o n m o d u l e t h a t w o r k s w i t h p h y sic a l p a t h s r ig h t fro m t h e b e g i n n i n g , y o u m u s t u s e t h e fo llo w in g s i g n a t u r e (see Listing 4.8 ).
* ” * ” Local *"
in te r fa c e : IM P O R T IN G
* ”
VALUE( DATATYPE)
L IK E
E D IP 0 -A C T R IG
* "
V A L U E (D IR E C T O R Y )
L IK E
E D IP O -O U T P U T D IR
* "
V A L U E (F IL E N A M E )
L IK E
E D IP O -O U T P U T F IL E
VA LU E(C O N TR O L)
L IK E
E D IO C
L IK E
E D IP A T H -P T H N A M
STRUCTURE
E X P O R T IN G V A LU E(PATH N A M E )
L is tin g 4 .8
14 0
S i g n a t u r e o f a F u n c t i o n M o d u l e U s i n g P h y s ic a l File P a t h s
E D I DC
C u sto m ID o c s
4 .4
C u sto m ID o cs
T h e p r e r e q u i s i t e f o r u s i n g c u s t o m ID o c s a r e c u s t o m t a b l e s f r o m w h i c h d a t a is r e t r i e v e d f o r s e n d i n g t h e ID o c s a n d s t o r e d in i n b o u n d p r o c e s s i n g . As a n e x a m p l e , t h e d e s c r i p t i o n s in t h e f o l l o w i n g s e c t i o n s u s e a s i m p le ca se w i t h o n l y a f e w fie ld s , w h i c h n e v e r t h e l e s s c o v e r s all a s p e c t s t h a t a re r e l e v a n t t o ID ocs. T h i s e x a m p l e u s e s a h ea d e r ta b le a n d a n ite m ta b le. T h e i t e m t a b l e c o n
D a ta fo r the
t a i n s s e v e r a l i d e n t i c a l fie ld s t h a t t h e ID o c p r o c e s s e s u s i n g a q u a l i f y i n g
c u s to m ID o c
s e g m e n t . D u e to t h e d iffic u lt r e u s a b ility , SA P d o e s n ' t r e c o m m e n d t h e u s e o f q u a lif ie r s . I n t h e s t a n d a r d v e r s i o n , h o w e v e r , q u i t e a lo t o f q u a lifie r s still e x is t s o t h a t y o u m a y n o t b e a b l e to a v o i d u s i n g t h e m . F ig u r e 4 . 9 1 d i s p l a y s t h e s t r u c t u r e o f a h e a d e r t a b l e . A n i n t e r f a c e p r o j e c t
H e a d e r ta b le
u s u a l l y a l r e a d y i n c l u d e s t h e s e t a b l e s s o t h a t y o u c a n u s e t h e m in y o u r ID o c . To i l lu s t r a te t h e r e l a t i o n s h i p b e t w e e n ID o c a n d d a t a r e c o r d , t h e a p p l i c a t i o n t a b l e s w e r e c r e a t e d a s w e ll a n d n o t c o n s i d e r e d a s e x is tin g .
Dictionary: Maintain Table fg
Rj
£0
I
T ra n s p T a b le
ZSHH
S h o rt D e scrip tio n
( s m H eader
A ttribute s
O r
00
n
ANDT j_ n
D e liv e ry a n a M aintenance
—
0
0
Entry h e lp /c h e c k
D a ta elem e nt
D a ta T y
HAND!
C IN T
■jr
CHAR
n
CHAR4Q
CHAR
□
□
: har- q
fH A P
□
□
0 □
:ELP2
F ig u re 4.91
1
S rc h H e lp Key mm
CL 0 1
T e c h n ic a l S e ttin g s
In d e x e s .
A p pend Structure
| Active
X p s iB iE jg Field
ftg if f l
0 '
vnon
C urrencyJQ uantity F ields
11 P re d e fin e d T ype |
Length D e c im
[S h o rtO e s c rip to n
0 C lien t
|
3 30
0 P a rtia l key o» SAP object
| {
40
O C haracter fie ld o f le n g th 40
u
m 1
iaio M 1aenn u^narauerrC ie L glh ui-— i1fut
S a m p l e H e a d e r Tab le
T he ite m tab le th a t b e lo n g s to th e h e a d e r ta b le c o n ta in s a n ite m n u m b e r as a n a d d i t i o n a l k e y field, t h r e e s i m i l a r fie ld s f o r t h e q u a l i f i c a ti o n , a n d a q u a n t i t y field w i t h a u n i t o f m e a s u r e m e n t f o r a s p e c ia l i m p l e m e n t a t i o n f o r s o m e u n i t s o f m e a s u r e m e n t . F ig u r e 4 . 9 2 d i s p l a y s t h e d e f i n i t i o n o f t h e i t e m ta b le in T r a n s a c t i o n SE11.
14 1
Ite m ta b le
|
4 -4
4
|
C h an g e s to I D ocs
D ic tio n a ry : M a in ta in T a b le C8
I 4&
;
< *
T ra n s p Table
ZSHP
S h o rt D escription
SM Position
A ltnbutes
A
a
Q jl
3 ^ !9
Entry help/check
E B B |K e y [in iii
Srch H e p
|p a ta elem ent
lPala Ty-
E B JMHOT 0. B * E Y FEID 0 E
1ANDT
KET1 J&NR
PELDA EIL&S
□
0 Client key o f SAP object
1e m n u m b e r o f the S O docum ent
CHAR
6
CHAR
6
0 C h a ra c te rfie ld o n e n g th 6
CHAR
6
0 C h a ra c te r fie ld o f le n g th 8
t5
JD
jHEKfilS
OUAN
1E1NA
□ '"E1NA -C- n
UNIT
□
30
NUtlC
,CH»B6
T^
Predefined
Length |D ecim [SM ort D escription
CHAR
1EN6E
F ig u re 4 .9 2
A p pend Stiucture
CurrencyfO uantity Fields
C IN T
□ □ CUM □ □ ia*£i
F£LP&
In d e ie s
A c tf*
D e l w r y and Maintenance
Field
Technical Settings
3;
0 Character fie ld o f le n g th 6
3 Quantity field, 15 characters
0 u n it o f m easure
S a m p l e I t e m T a b le
Q u a n t i t y fie ld s
F o r t h e M e n g e fie ld , y o u n e e d to s p e c i f y w h i c h r e f e r e n c e u n i t o f m e a
in t h e D a ta
s u r e is s u p p o s e d to b e u s e d . F ig u r e 4 . 9 3 d i s p l a y s it i n t h e R e f e r e n c e Table
D ic tio n a ry
a n d R e f e r e n c e F ie ld c o l u m n s .
D ic tio n a r y : M a in ta in T a b le Id
. - 5-
«a
0-0 :
*
Transp Table
zsup
S nort Description
$M Position
a
4
11
J ii [Ifl
Technical SetDngs
Fields
Fn'ryhPlp/rhcfk 1 / 8
Search Help ] _ Field
|D ata elem ent
iD ataT y [Reference table
HANOI
HANDT
C IN I
KEY.FELO
CHAR
POSNR ELDA -
hunc
(CWAR6 ___________
1
CHAR6
CHAR
ELDC
CHARS
CHAR
HEN815
QUAN
KE1NA
UNIT
EINA
F ig u re 4 .9 3
|R e f field
IShoct Description Client Partial keyotS A P obiect
■[ 1
ELDB
IIENGE
in p u t h e lp
POSNR
1
Append Structure
Active
Attributes
EY1
lnde»es
1— ........1. ■■■1■ ... ■!
nem num ber o f the SD document
1■ ■----- Character fie ld o f length 6 Character fie ld o f length 6
ZSHP
HE1NA
Quantity field. 15 characters Unit o f measure
R e f e r e n c e U n i t o f M e a s u r e i n t h e I t e m T a b le
You s h o u l d p r o v i d e a n i n p u t h e l p o r c h e c k t a b l e w h e r e v e r p o s s i b l e (see F ig u re 4 . 9 4 ) . In t h e
Z SMP
s a m p le table, th e in p u t h e lp s are e n a b le d for
t h e KEY1 fie ld , w h i c h s h o u l d r e f e r t o t h e h e a d e r ta b le , a n d f o r t h e u n i t o f m e a s u r e field (M E IN A ), w h i c h is c o p i e d f r o m C u s t o m i z i n g . In a d d i-
14 2
C u sto m ID o c s
|
t i o n , SAP d e l i v e r s a c h e c k t a b l e f o r t h e c l i e n t ( M A N D T field). T h i s ta b le is u s e d h e r e .
D ic tio n a ry : M a in ta in T a b le &
*9
0
«*r
T ra n s p T a b le
Z S "P
S h o d D e s c rip tio n
SM P o s itio n
A ttrib u te s
v fK
A
'|g
* £ [ S o a r c h H e lp
1 /
D a ta e l e m e n t
D a ta T y
HANDT
HANDT
vlN T
SELECT
*
IN T O
FROM z s m p C O R R E S PO N D IN G
WHERE LOOP
E 1 ZSMP
AT
keyl
=
it_ z s m p
F IE L D S
o b jk e y -k e y l IN T O
OF
wa_zsm p
M O V E -C O R R E S P O N D IN G w a . z s m p L i s t i n g 4.14
TABLE
it_ z s m p
. . TO w a . z l z s m p
G e n e ra tin g th e Ite m S e g m e n t -
.
A p p lic a tio n D ata
T h i s is t h e f ir s t field w i t h d i g its t h a t a r e s u p p o s e d t o b e t r a n s f e r r e d as a lp h a n u m e ric ch a rac te rs. A C O NDE NSE
Condense
w a _ z lz s m p -m e n g e
is e x e c u t e d :
.
A ls o a field e x i s t s t h a t is s u p p o s e d t o b e s e n t in t h e ISO c o d e a n d n o t in
C o n v e rtin g u n its of
t h e SAP u n i t (s e e L is tin g 4 . 1 5 ) . It's t h e u n i t o f m e a s u r e . T h e SA P f u n c
m easurem ent
ti o n m o d u l e f o r t h e c o n v e r s i o n d i r e c t i o n f r o m SAP u n i t t o ISO c o d e is U N I T _ O F _ M E A S U R E _ S A P _ T O _ I SO. CALL
F U N C T IO N
‘ U N IT _ O F _ M E A S U R E _ S A P _ T O _ IS O ’
EX PO R T IN G sap_code
=
w a _ z lz s m p -m e in a
=
w a _ z lz s m p -m e in a
n o t_ fo u n d
=
01
n o _ is o _ c o d e
-
02
IM P O R T IN G is o _ c o d e E X C E P TIO N S
CLEAR
t_ id o c _ d a ta
.
.
t_ id o c _ d a ta - s e g n a m
-
‘ Z1ZSM P'
t_ id o c _ d a ta -s d a ta
=
w a _ z lz s m p
L i s t i n g 4 .1 5
. .
D e t e r m i n i n g t h e ISO U n its o f M e a s u r e
H e re , t h e r e d u c t i o n is m i s s i n g , w h i c h is a l r e a d y c o n t a i n e d in t h e c o d e f o r t h e h e a d e r s e g m e n t in L is tin g 4 . 1 3 . T h e a p p e n d i m m e d i a t e l y fo llo w s : APPEND
t_ id o c _ d a ta .
In a d d i t i o n , a n o p t i o n a l q u a l i f y i n g s e g m e n t is p r o v i d e d t h a t is d e r i v e d
Q u a lify in g
f r o m t h e s a m e d a t a r e c o r d (see L is tin g 4 . 1 6 ) . T h e s y s t e m c h e c k s t h e t h r e e
segment
p o s s i b l e c a se s , FELDA, FELDB, o r FELDC, a n d g e n e r a t e s t h e s e g m e n t s i f t h e c o r r e s p o n d i n g d a t a is a v a ila b le .
157
4
|
C h an g e s to I D ocs
IF
NOT w a _ z s m p - f e l d a
IS
INITIAL
wa_zlzsm q-qual
-
w a_zlzsm q-feld
= wa_zsm p-felda
CLEAR
‘A ’
.
.
t_idoc_data.
t_idoc_data-segnam
= 'Z1ZSMQ'
t_ id o c_ d a ta -sdata
-
APPEND ENDIF IF
t_idoc_data
.
wa_zlzsmq
. IS
INITIAL
wa_zlzsm q-qual
= *C*
w a_zlzsm q-feld
-
CLEAR t _ id o c _ d a t a
.
.
w a_zsm p-feldc -
t_idoc_data-sdata
= wa_zlzsmq
APPEND ENDIF
.
.
t_idoc_data-segnam t_idoc_data
'Z1ZSMQ'
. .
.
.
NOT w a _ z s m p - f e l d b wa_zlzsm q-qual t_idoc_data
IS -
w a_zlzsm q-feld CLEAR
INITIAL
*B'
= wa_zsm p-feldb = *Z1ZSMQ* -
t_idoc_data
ENDIF
.
ENDLOOP
.
.
.
t_idoc_data-sdata APPEND
.
.
t_idoc_data-segnam
L i s t i n g 4 .1 6
.
.
NOT w a _ z s m p - f e l d c
IF
.
.
wa_zlzsmq
.
.
G e n e ra tin g th e O p t io n a l Q u a lify in g S egm ents
C o n tro l reco rd —
N e x t, y o u n e e d y o u r c o n t r o l r e c o r d ; h o w e v e r , t h e r e a r e o n l y a f e w fields
r e q u ir e d fie ld s
t h a t y o u n e e d t o fill in y o u r s e l f . In o u r e x a m p l e (s e e L is tin g 4 . 1 7 ) , t h e s e m a n d a t o i y f ie ld s a r c filled f o r s e n d e r i n f o r m a t i o n , r e c e i v e r i n f o r m a tio n , a n d p o s s i b l y r e q u i r e d s e r i a l i z a t i o n i n f o r m a t i o n . T h e s y s t e m a u t o m a t i c a l l y s p e c if ie s t h e t i m e s t a m p , t h e c r e a t i n g o r m o d i f y i n g p e r s o n , a n d t h e like. * Design CLEAR
control
record.
f_idoc_header
f_ i doc_header-mestyp
. = ‘ ZSMNACH'
f_idoc_header-idoctp
= 'ZSMTYPOr
f_1doc_header-sndpfc
= sndpfc
.
f_idoc_header-sndprn
-
sndprn
.
f_1doc_header-sndprt
= sndprt
.
15 8
. .
C u sto m ID o c s
f_idoc_header-rcvpfc
= rcvpfc -
rcvprn
.
f_idoc_header-rcvprt
= rcvprt
.
f_idoc_header-serial
-
L i s t i n g 4 .1 7
.
F i l l i n g t h e M a n d a t o r y F ie l d s i n t h e C o n t r o l R e c o r d
T h e s y s t e m t r a n s f e r s t h e fin a lly c o m p l e t e m a s t e r ID o c to t h e c o m m u n i
T ra n sfe r t o th e
c a t i o n l a y e r ( s e e L is tin g 4 . 1 8 ) . D u r i n g t h i s p r o c e s s , t h e h i e r a r c h y f o r th e
c o m m u n ic a tio n la y e r
i n d i v i d u a l s e g m e n t s is s e t u p a c c o r d i n g t o t h e ID o c t y p e d e f i n i t i o n . * Transfer CALL
4 -4
.
f_idoc_header-rcvprn
space
|
IDoc
FUNCTION
to
com m unication
layer
'MASTER_IDOC_DISTRIBUTE'
EXPORTING m aster_idoc_control
-
f_idoc_header
TABLES com m unication_idoc_control
- t_idoc_com m _control
m aster_idoc_data
= t_idoc_data
EXCEPTIONS error_in_idoc_control
= 01
error_w riting_idoc_status
= 02
error_in_idoc_data
- 03
sending_logical_system _unknown DESCRIBE
TABLE
= 04
.
t_idoc_com m _control
LINES c o m m _ c o n tro l_ lin e s . created_com m _idocs
- com m _control_lines
te _ id o c _ c o n tro l[]
= t_idoc_com m _control[]
ENDFUNCTION L i s t i n g 4 .1 8
. .
.
S e n d in g t h e G e n e ra te d ID o c s
N o t e t h a t, f o r b e t t e r r e a d a b ility , t h i s c o d e d o e s n ’t i n c l u d e s o m e r e c u r r i n g asp e cts w ith w h ic h d e v e lo p e r s a r e u su ally fam iliar. F o r e x a m p le , y o u m a y w a n t to u s e m o r e v a r ia b l e s w h e r e h a r d c o d e w a s u s e d in t h i s e x a m p le . T h i s e x a m p l e a l s o d o e s n ' t c h e c k i f t h e s e g m e n t s a r e filled b e f o r e th e y are a p p e n d e d , w h ic h y o u s h o u ld alw ays do. Y o u’v e n o w c r e a t e d t h e d a t a r e c o r d s f o r y o u r t a b le s . T h e q u i c k v i e w in
C o m p le te cu s to m
F ig u r e 4 . 1 0 9 d i s p l a y s t h e d a t a o b j e c t t h a t is s u p p o s e d to b e s e n t a s an
ID o c
ex a m p le here.
15 9
4
|
C h an g e s to I D ocs
M
a b i n e s O b jec t List Partial le v C h a r
|F E L D 1 |F E L D 2
4711
F E L D ! FEL:>2
|471 4 711
10 0 0 0 1 O F E L Q A | F E L 0 8
|FE L D C
0 0 0 0 2 0 FE LDA 1 F E L D 91 F E L D C l
10
PC
PC I
ICO
°C
PC
Data Object to Be Sent
F ig u re 4 1 0 9
individual display
Item | R e serve | R e serve Reserve t Quantity| U o m ; U o m |
2 S M H -F E L 0 2 Partial keyi
4711
T r a n s a c t i o n B D 8 7 lists t h e ID o c t h a t h a s b e e n g e n e r a t e d f r o m t h e d a ta o b j e c t ( s e e F ig u re 4 . 1 1 0 ) .
ID o c d is p la y ^
□
Q “
I
T e c h n ic a l s h o rt in fo 7
C o n tro l R e c
C D D a ta reco rd s
T o ta l n u m b e r. 0
^
D irectio n
1
C u rr e n t status
03
B a s ic type
ZSMTYP01
D
Z1ZSM H
S e g m en t 00000
^
D z iz s M P
S e g m en t 00000
E x te n s io n
^
P
i
ID o c 0 0 0 0 0 0 0 0 0 0 7 6 8 7 9 6
□
O utb ox CCO
0
Z1ZSM Q A
S e g m en t 00000
M e s s a g e type
ZSMNACH
D
Z1ZSM O C
S e g m en t 00000
P a rtn e r No.
PRODUCTION
D
Z1ZSM Q 0
S e g m en t 00000
P a rtn .T y p e
LS
P o rt
A 000000003
Z1ZSM P
S e g m en t 00000
□
Z1ZSM O A
S e g m en t 00000
□
Z1ZSM O C
S e g m en t 00000
D
Z1ZSM Q B
S e g m en t 00000
C o n te n t o f s e le c te d s e g m e n t
C i S ta tu s re c o rd s F id n a m e
F id cont
POSNR
D 00010
1EN6E^ 1 E IN A
F i g u r e 4.110
Control record
PCE
Sample IDoc in Transaction BD87
T h e c o n t r o l r e c o r d (s e e F i g u r e 4 . 1 1 1 ) i n d i c a t e s t h a t y o u r ID o c t y p e (h e re : S a b i n e s IDoc Type) a n d y o u r m e s s a g e t y p e ( h e r e : ZSMNACH) w e r e a c tu a lly used.
E D lD C
| Control R e co rd
D IR E C T
D irection
1 : O utbound
DOCREL
R e le a s e
700
O UTM OD
O u to u tM o d e
2
STATUS
Status
3 0 ID oc reactyfor disp atch (ALE service)
DOCTYP
B a sic Type
3 0 S a b in e s ID oc Typ
CIM TYP
Enhancem ent
30:
M ESTYP
M e s s a g e Type
ZSMNACH
F ig u re 4 .111
16 0
S e ctio n Taken from th e C o n tro l Record
C u sto m ID o c s
T h e d a t a o f t h e i n d i v i d u a l s e g m e n t s n o w a ls o c le a rly s h o w s t h e c o n v e r s i o n o f t h e d a t a f r o m “PC," as t h e i n t e r n a l u n i t o f m e a s u r e p ie c e , t o "PCE" as t h e c o r r e s p o n d i n g ISO u n i t o f m e a s u r e in t h e M E I N A field (s e e F ig u re 4 . 1 1 2 ) . T h e lis t a d d i t i o n a l l y i n c l u d e s t h e q u a l i f y i n g s e g m e n t , Z1ZSMQ, w h ic h h as b e e n created as an exam p le.
T ec h n ic a l N a m e
D e scrip tion
v a lu e
SEONUM
Segm ent Num ber
000001
SEGNAM
Segm ent Nam e
Z1ZSM H
KEY1
P a rtia l key o f SA P oblect
471 1
FE LD 1
C h a ra c te r field o f len g th 40
FE LD 1
FELD2
C h a ra c te r F ie ld L en g th = 10
FELD2
SEGNUM
Segm ent Num ber
000002
SEGNAM
Segm ent Nam e
Z1ZSM P
POSNR
Ite m n u m b e r o f th e S D do c u m en t
000010
M ENGE
1 7 -C h a r F ield
1 0 000
M E IN A
U n it o f m e a s u re
PCE
SEGNUM
Segm ent Num ber
000003
SEGNAM
Segm ent Nam e
Z1ZSM Q
QUAL
ZSMQUAL
A
FELD
C h a ra c te r field o f len g th 6
FELDA
SEGNUM
Segm ent Num ber
000004
9GONAM
Segm ent Nam e
Z1ZSM 0
GUAL
ZSMQUAL
C : B e lo n g s to F E L D C
: ELD
C h a ra c te r field o f len g th 6
FELDC
SEGNUM
Segm ent Num ber
000005
C -J -L
ZSMQUAL
B
FELD
C h a ra c te r field o f len g th 6
FELDB
B e lo n g s to F E L D A
B e lo n g s to F E L D B
SEGNUM
Segm ent Num ber
000006
SEGNAM
Segm ent Nam e
Z1ZSM P
POSNR
Ite m n u m b e r o f th e S D do c u m en t
000020
M ENGE
1 7 -C h a r F ield
1 0 0 .0 0 0
M E IN A
U n it o f m e a s u re
PCE
SEGNUM
Segm ent Num ber
000007
SEGNAM
Segm ent Nam e
Z1ZSM Q
GUAL
ZSMQUAL
A
=E L D
C h a ra c te r field o f len g th 6
FE LDA 1
3EG N JV
Segm ent Num ber
: 0 1 0 os
SEGNAM
Segm ent Nam e
Z1ZSM Q
C-U.-l
ZSM Q UA L
C
FELD
C h a ra c te r field o f len g th 6
'E L D C 1
F i g u r e 4.112
4 .4 .3
B e lo n g s to FE LDA
B e lo n g s 10 F E L D C
D a ta R ecords
U p d a t in g a n ID o c
T h e i n b o u n d p r o c e s s i n g is n o w s u p p o s e d t o p r o c e s s t h e m e s s a g e a n d ID o c ty p e s . F o r t h i s p u r p o s e , y o u n e e d t h e a p p r o p r i a t e f u n c ti o n m o d u l e again.
16 1
|
4 -4
4
|
C h an g e s to I D ocs
T h e s a m p l e m o d u l e o n l y c o n t a i n s t h e d a t a t h a t is n e c e s s a r y f o r I D o c p r o c e s s i n g . U s u a l l y , t h e s y s t e m is s u p p o s e d t o e v a l u a t e a l l r e t u r n c o d e s , c h e c k th e u s e r a u th o r iz a tio n s , a n d s e t lo c k e n trie s . F u r th e rm o re , th e e x a m p le uses o n ly o n e ID o c p e r c a ll (th e o r e tic a lly , m u l t i p l e
ID o c s a r e fe a s ib le ) a n d n o n e
o f t h e A L E s e r v i c e s is d e p l o y e d . C o m p r e h e n s i v e c h e c k s f o r t h e c o m p l e t e n e s s a n d c o r r e c tn e s s o f t h e d a t a a r e m is s in g as w e l l . B e c a u s e th e s e c h e c k s are a p p lic a tio n - s p e c ific , y o u m u s t c o n s u lt t h e p e rs o n r e s p o n s ib le f o r t h e m o d u le a n d in te g ra te t h e m y o u rs e lf. Y o u c a n o b t a in th e v a ria b le s t h a t r e c u r in th is s a m p le m o d u le b y m a k in g th e f o llo w in g e n tr y in t h e T O P in c lu d e o f y o u r f u n c t io n g ro u p : in c lu d e
m b d c o n w f.
"R e p o rt
c o n ta in in g
th e
ALE
c o n s ta n ts .
A m o n g o t h e r t h in g s , t h e m b d c o n w f in c l u d e c o n t a i n s t h e c o n s t a n t s t h a t are l i s t e d i n T a b l e 4 . 2 a n d u s e d l a t e r . T h i s is m e r e l y a s u b s e t o f t h e v a r i a b l e s f r o m m b d c o n w f.
F ix e d v a l u e s i n t h e SAP in c lu d e
V a ria b le
F ix e d V a lu e
C_W F_RESULT_ERROR
99999
C _ W F _ R E S U L T _ D E L E T E _ ID O C
99998
C _ W F _ R E S U L T _ W I_ C O M P L E T E
99997
C_W F_RESULT_OK
0
C _ W F _R E S U L T _ R E T R Y _ ID O C
1
C _ W F _ R E S U L T _ C O N T IN U E _ ID O C
2
C _ ID O C _ S T A T U S _ O K
53
C _ ID O C _ S T A T U S _ E R R O R
51
T a b le 4.2
in b o u n d fu n c tio n m o d u le : S ig n a tu re
W h ile
F ix e d V a l u e s f r o m t h e “ m b d c o n w f I n c l u d e
th e fu n c tio n
o u tb o u n d
\
m o d u le s a re n ’ t s u b je c t to fu r t h e r re s tric tio n s in th e
p ro c e s s in g , in b o u n d
fu n c tio n m o d u le s m u s t h a v e a u n ifo r m
s ig n a tu r e b e c a u s e t h e y a re a u t o m a t ic a lly c a lle d b y th e A L E c o m m u n ic a tio n
la y e r. F ig u r e 4 .1 1 3 s h o w s th e n e c e s s a ry p a r a m e te r s a n d
th e ir ty p
in g . P a ra m e te rs o f th e T a b l es ty p e a rc n o lo n g e r c o m m o n in m o r e re c e n t
16 2
C u sto m ID o c s
|
4 -4
r e le a s e s ; h o w e v e r , h e r e t h e y h a v e to b e u s e d t o m e e t t h e r e q u i r e m e n t s o f t h e ALE c o m m u n i c a t i o n lay er. I f r e q u i r e d , y o u c a n c o p y o n e o f th e e x i s t i n g ID o c i n b o u n d f u n c t i o n m o d u l e s .
FUNGI ION Z_IOOC_INPUT_ZSHNACH • • • • L o c a l In te r f a c e : ■• IMPORTING V A LUE (INP UT.HE THO D) L IK E BDVFAP_PAR-INPUTHETHD VALUE(HASS_PROCESSIN$) L IK E BDWFAP.PAR-flASS.PROC VA LU E (N O .APPLICA TIO N L 0 6 ) L IK E SV-DATAR OPTIONAL VALUE(MASSSAVEINFOS) L IK E HASSSAVINF STRUCTURE MASSSAVINF OPTIONAL •EXPORTING VALUE(YORKFLOW_RESULT) L IK E BDWF_PARAM-RESULT VA LU E (A P P LIC A TI0N JV A R IA 8LE ) L IK E 8DWF_PARAH-APPL_VAR VALUE( IN_UPDATE_TASK) L IK E BDWFAP_PAR- UPDATETASK VALUE(CALL_TRANSACTION_OONE) L IK E BD¥FAP_PAR-CALLTRANS '■ TABLES IDOC.CONTRL STRUCTURE EOIDC IDOC_DATA STRUCTURE E 0 I0 D IOOC.STATUS STRUCTURE BDIDOCSTAT RETURN_VARIABLES STRUCTURE BDWFRETVAR S E R IA L IZ A T IO N INFO STRUCTURE B D I.S E R EXCEPTIONS k)RONG_FUNCTION_CALLEO — ------------------------------------------------------------------------------------------------------------------------------------------
F i g u r e 4-113
S ig n a tu re o f an I n b o u n d F u n c tio n M o d u l e
To n o t u s e r e s o u r c e s u n n e c e s s a r i l y , y o u m u s t first c h e c k i f t h e f u n c ti o n
C h e c k in g th e
m o d u l e c o r r e s p o n d s t o t h e ID o c t h a t is s u p p o s e d to b e p r o c e s s e d . F o r
v a lid ity o f th e
t h i s p u r p o s e , y o u c a n c h e c k t h e m e s s a g e t y p e i f t h e m e s s a g e t y p e s a re n o n - r e d u c i b l e (s e e L is tin g 4 .1 9 ) . IF
idoc_contrl-m estyp
‘ Z S M N A C H ’
RAISE w r o n g _ fu n c t io n _ c a lle d ENDIF
.
.
L i s t i n g 4 .1 9
C h e c k in g t h e M e s s a g e Type
F o r r e d u c i b l e ID o c s , a d i f f e r e n t m e s s a g e t y p e c a n b e u s e d s o t h a t y o u h a v e to c h e c k t h e ID o c ty p e (s ) t h a t a r e p e r m i t t e d f o r t h e r e d u c i b l e m e s s a g e t y p e i n t h i s c a s e (s e e L is tin g 4 .2 0 ). IF
idoc_contrl-idoctp
' Z S M T Y P O r
RAISE w r o n g _ fu n c t io n _ c a lle d
.
.
ENDIF. L is tin g 4 .2 0
C h e c k in g th e ID o c Type
16 3
fu n c tio n m o d u le s
4
|
C h an g e s to I D ocs
T h is is f o l l o w e d b y t h e v a r i a b l e d e f i n i t i o n s (s e e L isting 4 .2 1 ) . DATA:
subrc
* Structure DATA:
LIKE
for
wa_zsmh
* Variables DATA:
.
header
data
TYPE zsmh
for
the
it_zsm p
L i s t i n g 4-21
sy-subrc
the
.
items
TYPE
T A B L E OF z s m p
.
D e c la r a tio n o f t h e R e q u ire d V a ria b le s
S ta rtin g the
T h en , th e s y s te m read s th e ID oc a n d c o p ies th e d a ta to tra n s fe r th e stru c
s u b ro u tin e
t u r e s (s e e L istin g 4 .2 2 ) . I n t h i s e x a m p l e , t h e f u n c t i o n m o d u l e c a n p r o c e s s o n e I D o c o n ly , s o t h e t r a n s f e r r e d t a b l e , w h i c h c o n t a i n s m e r e l y o n e d a ta r e c o r d , is a l w a y s r e a d u s i n g I n d e x 1 . I f y o u w a n t t o u s e a m a s s - c o m p a t ib lc m o d u l e , t h e p r o c e s s i n g t a k e s p l a c e in a lo o p . READ T A B L E PERFORM
idoc_contrl
INDEX
1 .
idoc_process_zsm nach
idoc_status USING
TABLES
idoc_data
it_zsm p
idoc_contrl
CHANGING s u b r c L i s t i n g 4.22
wa_zsmh
.
R e a d in g th e C o n tr o l Record
T h e c o n t e n t o f t h e f o r m is s t r u c t u r e d a s il lu s t r a te d i n L istin g 4 . 2 3 . To p ro v id e an e x a m p le th a t c o n sid e rs th e n e w tech n o lo g ies fo r th e tab le dec la ra tio n , w h i c h a r e a v a ila b le a s o f R e le a se 4 . 0 , t h e ta b le ty p e is i n c l u d e d here. T ra n s fe rrin g th e ID o c d a ta
FORM
idoc_process_zsm nach
TABLES
t_idoc_data
STRUCTURE e d id d
t_idoc_status i t_zsmp
structure
STRUCTURE
bdidocstat
zsmp
USING f _ i d o c _ c o n t r l
STRUCTURE e d i d c
CHANGING
sy-subrc
subrc
V a ria b le s f o r th e
wa_zsmh
a p p lic a tio n d a ta
* Structure DATA:
like
zsmh. for
keyl
* Variables
LIKE the
TYPE for
header
the
wa_zsmp TYPE zsmp
DATA:
posi
DATA:
tabix
16 4
TYPE
.
items
DATA:
TYPE
data
zsmh-keyl .
zsmp-posnr sy-tabix
. .
C u sto m I D o cs
*
*
D a ta
fo r
th e
ID o c
w a _ z lz s m h
TYPEz lz s m h .
DATA:
w a _ z lz s m p
TYPEz l z s m p .
DATA:
w a _ z lz s m q
TYPEz lz s m q .
LOOP
AT
CASE
ID o c
R e trie v in g d a ta
t_ id o c _ d a ta
‘ Z 1 ZSMH*
CLEAR
s e g m e n ts
d a ta WHERE d o c n u m
t_ id o c _ d a ta - s e g n a m
WHEN
-
keyl
=
. =
t_ id o c _ d a ta -s d a ta
w a _ zsm h -ke yl
' Z1 ZSMP‘
CLEAR
posi
w a _ z lz s m p
. TO w a _ z s m h
.
.
. .
-
t_ id o c _ d a ta -s d a ta
M O V E -C O R R E S P O N D IN G w a . z l z s m p w a _ zsm p -ke yl L i s t i n g 4 .23
.
.
M O V E -C O R R E S P O N D IN G w a _ z l z s m h
WHEN
f_ id o c _ c o n trl-d o c n u m
fr o m th e ID o c
.
key 1
w a _ z lz s m h
4 -4
V a ria b le s f o r t h e
s e g m e n ts :
DATA:
T ra n s fe r
|
=
keyl
. TO w a _ z s m p
.
.
T ra n s fe rrin g t h e U s e r D a ta f r o m t h e ID o c S e g m e nts
I n t h i s e a s e , t h e u n i t o f m e a s u r e is a ls o c o n v e r t e d , t h i s t i m e f r o m t h e ISO c o d e t o t h e SAP u n i t . Im p o r tin g p a r a m e te r u n iq u e, w h i c h i s n 't e v a l u a t e d h e r e , is r e t u r n e d to X i f e x a c t l y o n e a p p r o p r i a t e v a l u e h a s b e e n f o u n d
C o n v e rtin g the u n it o f m easure fr o m IS O t o SAP
( s e e L is tin g 4 .2 4 ). CALL
F U N C T IO N
‘ U N IT _ O F _ M E A S U R E _ IS 0 _ T 0_ S A P ’
E X P O R T IN G is o _ c o d e
-
w a _ z s m p -m e in a
-
w a _ z s m p -m e in a
IM P O R T IN G SAP_C0DE *
U N IQ U E E X C E P T IO N S N O T .F O U N D
=
OTHERS
=
APPEND w a _ z s m p posi L is tin g 4 .2 4
1 2
.
TO
it_ z s m p
.
=
w a _ zsm p -p o sn r
.
C o n v e rtin g fr o m IS O U n its o f M e a s u r e t o I n te rn a l U n its o f M e a s u r e
T h i s is f o l l o w e d b y t h e e v a l u a t i o n o f t h e n e x t s e g m e n t , t h e q u a l i f i e d s e g
Q u a lifie d s e g m e n t
m e n t (s e e L is tin g 4 .2 5 ) .
in in b o u n d p ro c e s s in g
16 5
4
|
C h an g e s to ID o cs
- Z 1 ZSMQ-
WHEN
w a _ z lz s m q READ T A B L E
.
-
t_ id o c _ d a ta - s d a ta
it.z s m p
posnr
-
posi
ta b ix
=
s y - ta b ix
W IT H
IN T O
w a _ z lz s m q -q u a l
WHEN
‘ A*
-B ’
*C *
EN DLO O P ENDFORM
.
=
w a _ z lz s m q -fe ld
.
=
w a _ z lz s m q -fe ld
.
=
w a _ z lz s m q -fe ld
.
. it_ z s m p
CLEAR w a _ z s m p E N D C ASE
.
.
w a _ z s m p -fe ld c
M O D IFY
keyl
.
w a _ z s m p -fe ld b
EN D C ASE
=
.
w a _ z s m p -fe ld a
WHEN
wa_zsm p
.
keyl
.
CASE
WHEN
KEY
FROM w a _ z s m p
IN D E X
ta b ix
.
.
.
.
.
“ ID O C _P R O C E S S _Z S M N A C H
Listing 4.25 Processing of the Qualifying Segment, "Z1ZSAAQ" If th e d a ta c o n ta in s e rro rs , fo r e x a m p le , i f m a n d a to r y s e g m e n ts a r e m iss in g o r d a t a n e e d s t o b e c h e c k e d a g a i n s t C u s t o m i z i n g a n d d o e s n ’t m a t c h , m o d ify
t o t r i g g e r a n e r r o r i n t h e c a llin g m o d u l e .
s u b rc
Posting using the
A f t e r w a r d , i f t h e r e t u r n v a l u e is c o r r e c t , t h e s y s t e m t r a n s f e r s t h e d a t a
application module
t0 t |i e a c l u a ] u p d a t e m o d u l e , w h i c h is a l w a y s c a lle d in t h e u p d a t e m o d e (see L is tin g 4 . 2 6 ) . T h e ALE c o m m u n i c a t i o n l a y e r t h e n t r ig g e r s t h e mi t
W o rk
a n d e n s u r e s th a t th e ID oc statu s a n d th e ap p lic a tio n o b je c t are
u p d a te d o r d is c a rd e d sim u ltan e o u sly . *
E v e rth in g IF
s u b rc CALL
ok =
0
so
fa r?
Then
post
.
F U N C T IO N
* Z_ZSM _CREATE’
E X P O R T IN G header
=
wa_zsm h
p o s is
-
it_ z s m p
E X C E P TIO N S OTHERS
L is t in g 4 .2 6
16 6
Com-
-
1
.
C a llin g th e U p d a te AAodule o f th e A p p lic a tio n
C u sto m ID o c s
|
4 -4
N o w , t h e s y s t e m e v a l u a t e s t h e r e t u r n c o d e o f t h e u p d a t e m o d u l e a n d s e ts t h e s t a t u s v a l u e o f t h e ID o c a c c o r d i n g l y ( s e e L is tin g 4 . 2 7 ) . T h e e r r o r a n d s u c c e s s m e s s a g e s o f t h i s e x a m p l e a r e r a t h e r b a s ic , o f c o u r s e . You s h o u l d u s e a n i c e m e s s a g e c lass a n d a l s o t r a n s f e r t h e
and
t_ id o c _ s ta tu s -m s g id
v a l u e s , w h i c h a r e i n d i c a t e d b y a s te r is k s , a s c r e a t e d
t_ id o c _ s ta tu s -m s g n o
in y o u r m e s s a g e class. IF
sy-su b rc s u b rc
*
E rro r?
-
Then
U S IN G sy
copy
*
O k?
to
s ta tu s
S e ttin g the
te x t
e rro r sta tu s
s t a t u s _ f i1l_ s y _ e rr o r id o c _ s ta tu s
id o c .d a ta
'E r r o r ’
ELSE
.
.
PERFORM TABLES
0
1
*M y
m o d u le ’
.
.
Then
success
S e ttin g the
s ta tu s
id o c _ s ta tu s -d o c n u m
=
id o c _ c o n trl-d o c n u m
id o c _ s ta tu s -s ta tu s
-
c _ id o c _ s ta tu s _ o k
id o c _ s ta tu s -m s g ty
=
‘ S’
.
.
*
t_ id o c _ s ta tu s * m s g id -
y o u r_ m s g id .
*
t_ id o c _ s ta tu s -m s g n o =
m s g n o _ s u c c e s s . " G 1o b a l
id o c _ s ta tu s -m s g v l APPEND E N D IF E N D IF *
F ill
.
-
id o c .s ta tu s “ i f
sy-su b rc
success sta tu s
.
‘o k ’
"G lo b a lv a r ia b le . v a ria b le .
.
.
0
.
. th e
L is tin g 4 .2 7
ALE
e x p o rt
p a ra m e te rs
C h e c k in g t h e S tatus o f t h e ID o c U p d a te a n d M e s s a g e A s s ig n m e n t
If successful, y o u m u s t n o w e n s u r e — i f a c o n n e c tio n to th e w o rk flo w is g i v e n — t h a t a n e v e n t u a l l y e x i s t i n g e r r o r w o r k f l o w is c a n c e l e d ; i f an e r r o r o c c u r s , t h e c o r r e s p o n d i n g w o r k f l o w n e e d s t o b e t r i g g e r e d . T h is is d o n e b y t h e ALE c o m m u n i c a t i o n lay er, w h i c h u s e s t h e v a l u e s t h a t a re t r a n s f e r r e d h e r e (s e e L is tin g 4 . 2 8 ) a n d t h e C u s t o m i z i n g s e t t i n g s t h a t a re d e s c r i b e d in S e c t i o n 4 . 4 . 5 , E r r o r W o r k f l o w f o r C u s t o m ID ocs. CLEAR
in _ u p d a te _ ta s k
.
CLEAR c a l l _ t r a n s a c t i o n _ d o n e IF
s u b rc
0
.
“ E rro r
.
" C a ll
not
used
.
o c c u rre d
w o rk flo w _ re s u lt
=
r e tu rn _ v a ria b le s -w f_ p a ra m
-
re tu rn _ v a ria b le s -d o c _ n u m b e r APPEND
T ra n s a c tio n
r e tu r n _ v a r ia b le s
c _ w f_ re s u lt_ e rro r
.
c _ w f_ p a r_ e rro r_ id o c s =
id o c _ c o n trl-d o c n u m
. .
.
16 7
W o r k f lo w h a n d lin g
4
|
C h an g e s to I D ocs
ELSE
.
“ IDoc
processed
successfully
w orkflow _result
-
c_w f_result_ok
return_variables-w f_param
=
c_wf_par_processed_idocs
return_variables-doc_num ber APPEND r e t u r n _ v a r i a b l e s
ENDIF
return_variables
idoc_contrl-docnum
.
.
.
return_variables-w f_param APPEND
.
-
c_w f_par_appl_objects
.
.
.
L is tin g 4 .2 8
T ra n s fe rrin g t h e D a ta t o t h e Error W o r k f lo w
You u s u a l l y d o n ' t h a v e to p r o g r a m t h e a c tu a l u p d a t e m o d u l e y o u r s e l f b e c a u se th e a p p lica tio n m u s t alre a d y h a v e d e v e lo p e d s o m e th in g th a t cre a t e s t h e s a m e d a t a v ia d ia lo g t r a n s a c t i o n . To e n s u r e t h a t t h e d a t a re s u ltin g f r o m u p d a t i n g a n ID o c a n d t h e d a t a t h a t a u s e r h a s m a n u a l l y c r e a t e d is i d e n tic a l, y o u s h o u l d a l w a y s h a v e b o t h p r o c e d u r e s a c c e s s t h e s a m e f u n c t i o n m o d u l e . H e r e , t h e c h e c k s , lo c k s, a n d a u t h o r i z a t i o n q u e r i e s d e f i n e d b y t h e a p p l i c a t i o n a r e a ls o c o d e d . A s s ig n m e n t to the
I n o u t b o u n d p r o c e s s i n g , y o u o n l y h a v e t o a s s ig n f u n c t i o n m o d u l e s to
p ro c e s s co d e
p ro c e s s c o d e i f y o u u s e o u t p u t d e t e r m i n a t i o n . In i n b o u n d p r o c e s s i n g , this a s s i g n m e n t is a lw a y s r e q u i r e d . F u r t h e r a c tiv itie s t h e r e f o r e i n v o l v e s p e c if y in g t h e c h a ra c te ris tic s o f t h e f u n c t i o n m o d u l e in T ra n s a c tio n B D 5 1 . F ig ure 4 . 1 1 4 d i s p l a y s t h e s e l e c t io n o f t h e c h a r a c te r is tic s . O p t i o n 2 ( I n d iv id u a l I n p u t w i t h ID o c Lock in Call T r a n s a c tio n ) is r a r e l y s e l e c t e d d u e to p e r f o r m a n c e r e a s o n s . O u r s a m p l e f u n c t i o n m o d u l e u s e s o p t i o n 1, I n d i v i d u a l I n p u t . T h e c o d e e x a m p l e s a l r e a d y i n d i c a t e d t h e r e q u i r e m e n t s f o r u s in g M a s s P ro c e s s i n g ( o p t i o n 0). Basically, i t's all a b o u t i n t e g r a t i n g e v e i y t h i n g t h a t h a s b e e n i m p l e m e n t e d o n l y o n c e i n t o a l o o p v ia a c o m p l e t e ta b le .
N e w E n trie s : O v e rv ie w o f A d d e d E n trie s
C h a r a c t e n s t i c s o f in b o u n d F u n c tio n
unctjon module ( nbcund)
□
IDOC INPUI ZSfK'CH
C & C od t: H o w a r* IDoc package* p r o c t ts t d ? (3) 3 E n tti* s * o ( 2 0 /
^ ■ iw Inpul ly
• •
1
i n d M O u a l in p u t
2
i n d M d u a l i n p u t w ith I D o c l o c k i n C A L L T R A N S A C T I O N
F ig u re 4 .1 1 4
16 8
'
S h w iD c s c n *.
P ro ce ssin g T y p e o f th e AAodule
C u sto m ID o c s
|
4 -4
A f t e r w a r d , y o u a s s ig n t h e f u n c t i o n m o d u l e t o its m e s s a g e t y p e a n d all
A s s ig n m e n t t o th e
p o s s i b l e I D o c t y p e s u s i n g T r a n s a c t i o n W E 5 7 (s e e F ig u r e 4 . 1 1 5 ) . I n t h e
a p p lic a tio n
O b j e c t T y p e field, e n t e r a n o b j e c t t y p e f r o m t h e B u s in e s s O b j e c t R e p o s i t o r y (BOR), f o r e x a m p l e , BUS 1001006 f o r t h e m a t e r i a l . It's t h i s a s s i g n m e n t t h a t e n a b l e s t h e s y s t e m t o w r i t e lin k s b e t w e e n t h e ID o c a n d th e b u s i n e s s o b j e c t t h a t h a s b e e n c r e a t e d a n d d i s p l a y t h e m in T r a n s a c t i o n BD 87. D escrib ing th e d e v e lo p m e n t o f b u sin e s s o b je c t ty p e s fo r ap p lica ti o n o b j e c t s is b e y o n d t h e s c o p e o f t h i s b o o k , h o w e v e r .
N e w E n t r i e s : D e t a ils o f A d d e d E n t r i e s
a a FuncSon rrwdjle
ZJ0CCJKPUT_2S»1N«CM
Functon m >o
F Functor rroflule
BMKtn>*
ZS1TTP01
a'
E«iens»on Me s s a g e Type
UlMACH
Me s s a g e vanar* M e s s furxBon CDWlTyp# 100c A s s - ; w ? . t o i i “ t>lo9 M e s s w
'vpe
3
Direction Oostrplon Nime
F i g u r e 4-115
A d d it io n a l C h a ra c te ris tic s o f t h e In b o u n d F u n c tio n M o d u l e
A f t e r a s s i g n i n g t h e f u n c t i o n m o d u l e , y o u c r e a t e t h e p r o c e s s c o d e in
C re a tin g process
T r a n s a c t i o n W E 4 2 . I n t h e O p t i o n ALE t a b , y o u c a n c h o o s e i f y o u w a n t to
code
w o r k w i t h o r w i t h o u t ALE s e r v ic e s , a n d t h e P r o c e s s i n g T y p e t a b e n a b le s y o u t o s e l e c t t h e p r o c e d u r e f o r t h e p r o c e s s c o d e (s e c F ig u r e 4 . 1 1 6 ) .
N e w E n t r i e s : D e t a ils o f A d d e d E n t r i e s [n ^
C S i t'i D o u r * ) p r o c e s s < 0 ®
P ro ce ss co s*
Z S11
D O S fr ® lo n
P o s t ID o i ZSM N A C H
lO e n b fc a b o n
3
O p lo n A iE
• Process^ -
w
,w ^
s
.
m c
.
Ptocessif>gwioa l e servtce Processing h e *
Processing b* task
O Processing crtprocess S'
r-n
^
F c * e n o y . a c c e s s T i x k O o o m o d u l e 'o r A i E - F W inbound processing1
F i g u r e 4.1 16
P ro c e s s C o d e i n I n b o u n d P r o c e s s in g
16 9
4
|
C h an g e s to I D ocs
C h a ra c te ris tic s o f
W h e n c re a tin g a n e w p ro cess c o d e , th e s y s te m a u to m a tic a lly nav ig ates
th e m o d u le
y o u to t h e i n p u t s c r e e n f o r a d d i t i o n a l c h a r a c te r i s t ic s i f y o u s e l e c t t h e P ro c e s s in g b y F u n c t i o n M o d u l e o n the #
o p t io n
. L a te r, y o u c a n g o t h e r e b y c lic k in g
ic o n . F ig u re 4 . 1 1 7 s h o w s t h e s e a d d i t i o n a l c h a ra c te ris tic s . H e re ,
y o u a ls o s p e c i f y t h e o b j e c t s a n d e v e n t s f o r h a n d l i n g e r r o r s v ia w o r k f l o w . In o u r e x a m p l e , n o t h i n g is d e f i n e d h e r e , s o e r r o r s c a n c u r r e n t l y o n l y b e p r o c e s s e d v ia T r a n s a c t i o n B D 8 7 . M a x i m u m N u m b e r o f R e p e a t s sp e c ifie s t h e m a x i m u m n u m b e r o f a t t e m p t s f o r s u c c e s s f u l l y p o s t i n g a n ID o c to a n a p p l i c a t i o n . I f t h i s i s n ’t s u c c e s s f u l w i t h i n t h i s n u m b e r o f a t t e m p t s , m a n u a l e r r o r h a n d l i n g is r e q u i r e d .
N e w E n trie s : D e ta ils o f A d d e d E n trie s P r o c e s s code M o d u le (inb ound) Function M odule M a x im u m N u m b e r o f R e p e a ls ID o c p a c k e t / 7 O b je c t Type E n d Event ID oc O b jec t Type S tart Event E n d event S u c c e s s Event
A p p lic a tio n O b je c t O b je c t Type S tart event
F i g u r e 4.117
A s s ig n in g t h e In b o u n d F u n c tio n M o d u le
A s s ig n in g the
Finally, y o u c a n a s s ig n y o u r m e s s a g e t y p e t o a lo g ic a l m e s s a g e i n T r a n s
m essage ty p e t o a
a c t i o n W E 4 1 (s e e F ig u r e 4 . 1 1 8 ) , w h i c h c o n c l u d e s y o u r d e v e l o p m e n t
lo g ic a l m essage
w ork.
17 0
C u sto m ID o c s
|
4 -4
N ew E n trie s : D e ta ils o f A d d e d E n trie s
D ia lo g Structure
P ro c e s s c o d e
ZSH1
CD In b o u n d p ro c e s s co d e A s s ig n m e n t to logical m e s s a g e / / r— (•> M e s s a g e type
ZSHNACH
O All types
© M e s s a g e code O A ll co d es
® M e s s a g e function O A ll functio ns
F ig u re 4 1 1 8
A s s ig n in g t h e M e s s a g e Type
A ll y o u n e e d n o w is t h e a p p r o p r i a t e p a r t n e r p r o f il e i n T r a n s a c t i o n W E 2 0
P a rtn er p ro file w ith
t h a t u s e s y o u r p r o c e s s c o d e t o e n a b l e y o u t o r e c e i v e a n d u p d a t e ID o cs
c u s to m process code
( s e e F ig u r e 4 . 1 1 9 ) .
P artn e r p ro file s: Inbound param eters
P artner No.
PRODUCT I OH
P artn Type
LS
P roductive s y s te m (c lie n t 811 )
P artner Role
g
ZSHNACH
M e ssa g e type
M e ssa g e code
□ Test
M e ssa g e function
P o s tp ro c e s s in g pe rm itte d a g e n t
Process code 0
Telepho ny
E$m
Cancel Processing Alter Syntax Error
P ro c e s s in g By F u n c tio n M odule O Trigger by background program © T r ig g e r Im m ediately
F i g u r e 4.1 19
P a rtn e r P ro file — I n b o u n d Param eters
171
4
|
C h an g e s to ID o cs
S a m p le
IDocs
F ig u r e 4 . 1 2 0 s h o w s s o m e s u c c e s s f u l l y p o s t e d ID o c s w i t h a p r o p e r s u c ce ss m e s s a g e .
Doc Selection IDoc number Slat
|statusTe«t
1Partner No.
|BasicT»pe
Segm e
53 [ZSM NACH
|S: 0 0 0 ok
P R O D U C T IO ZS M TY P0I
9
768801
53
[ZSMNACH
S: 0 0 0 O k
P R O D U C T IO ZSMTYP01
9
76880?
53
[ZSMNACH
IS 0 0 0 ok
P R O D U C T IO ZSMTYP0I
9
768803
53
ZSMNACH
|S: 0 0 0 ok
P R O D U C T IO ZSMTYP0I
9
768804
53
ZSMNACH
S 0 0 0 ok
P R O D U C T IO ZSMTYP0I
9
F ig u re 4 1 2 0
F a u lty ID o c s
|M e s s a g e Type
768800
S u c c e s s f u lly U p d a t e d I D o c s
F ig u r e 4 . 1 2 1 , in t u r n , s h o w s f a u lt y ID o c s . T h e s t a t u s t e x t, h o w e v e r , is s o m e w h a t b asic. You s h o u l d s p e c if y e r r o r s a s d e t a i l e d a s p o s s i b l e to facil i t a t e t h e w o r k f o r p e r s o n s w h o m o n i t o r t h e I D o c s i f e r r o r s o ccur.
Doc Selection id o c
num ber Slat [M essage Type
768805
51
Statu sTexl
ZSMNACH
M essages for input and oulbound processing — -
F i g u r e 4.121
4 .4 . 4
| Partner n o PR OD UC TIO N
BasicType ZSMTYP01
S egm e 9
I D o c s w i t h A p p l i c a t i o n Errors
G e n e r a tin g ID o c F u n c t io n M o d u le s
G e n e ra tin g
T h e r e a r e t w o o p t i o n s to h a v e t h e s y s t e m a u t o m a t i c a l l y g e n e r a t e m o d
s u ita b le ALE
u l e s f o r c r e a t i n g a n d u p d a t i n g a n ID oc. T h e f ir s t o p t i o n is t o g e n e r a t e
in te rfa c e s
s u i t a b l e ID o c i n t e r f a c e s t o BAPIs. In t h i s p r o c e s s , t h e m e s s a g e t y p e a n d t h e ID o c t y p e a r e g e n e r a t e d . T h e s e c o n d o p t i o n is b a s e d o n a f u n c t i o n m o d u l e . B o th m e t h o d s a r c d e s c r i b e d in t h e f o l l o w i n g s e c ti o n s .
H a v in g t h e S y s t e m G e n e r a t e ID o c A A o d u le s f r o m B A P I Segm ent
T he se g m e n ts are b u ilt fro m im p o rt a n d c h a n g e p a ra m e te rs o f th e sig n a
g e n e r a t i o n in
tu r e . (T h e e x p o r t p a r a m e t e r s a r e n ' t r e q u i r e d h e r e b e c a u s e ID o c s n e v e r
T ra n s a c tio n B D B G
r e s u l t in a r e s p o n s e . ) F o r t h i s p u r p o s e , a s m a n y i n d i v i d u a l v a r i a b l e s as p o ssib le b e c o m e a s e g m e n t, stru c tu re s are p ro v id e d w ith a se p a ra te seg m e n t th a t o n ly occurs o n ce , a n d ta b le ty p e s o b ta in a se p a ra te s e g m e n t
17 2
C u sto m ID o c s
|
4 -4
t h a t o c c u r s m u l t i p l e t i m e s . T h e n , a m o d u l e is g e n e r a t e d r e s p e c t i v e l y fo r g e n e r a t i n g a s w e ll a s f o r u p d a t i n g t h e c o r r e s p o n d i n g ID o c. T r a n s a c t i o n BD B G g e n e r a t e s t h e c o r r e s p o n d i n g ID o c i n t e r f a c e to a BAPI, a n d in F ig u r e 4 . 1 2 2 , y o u c a n v i e w a n ALE i n t e r f a c e t h a t h a s a l r e a d y b e e n d e l i v e r e d b y SAP in t h e F u n c t i o n d is p la y .
G e n e ra te a l e I n te r f a c e f o r b a p i
Kessage ty p e ACC_EnPLOIEE_EXP ACC_E"PLOYEE_EXP a lre a d y e x i s t s IDoc ty p e ACC_E«PL0IEE_EXP02 ACC_E"PL0 YEE_EXP0 2 a lre a d y e x i s t s S e g ie n t E18PACHE84 E1BPACHE04 a lre a d y e x is t s E16PAC6L04 E1BPAC6L04 a lre a d y o x io ts EieP»CTX 6 l E IBPACIIO I a lre a d y e x is t s E18PACCR04 E1BPACCR04 a lre a d y e x is t s E1BPACTR00 E 1 BPACTROO a lre a d y e x is t s E18PACCRP0 E1 BPACCRP0 a lre a d y e x is t s E1BPEXTC E 1 BPEXTC a lre a d y e x i s t s F u n c tio n n o d u le f o r O utbound ALE K i t h O a ta F i l t e r i n g *IE_«CC_E"P10»EE_E XP_P0ST ALE_ACC_EHPIOYEE_EXP_POST a lre a d y e x i s t s F u n c tio n n o d u le f o r Inbound ALE W ith P a c k e t P ro c e s s in g ID 0 C_INPUI_ACC_EnPlOYEE_E XP IDOC_IKPl)I_ACC_EMPLOYEE_EXP a lre a d y e x is t s
F i g u r e 4.122
Display of an Already Existing Interface
T h e u p d a t e v i a a g e n e r a t e d m o d u l e is a l w a y s c a r r i e d o u t w i t h t h e s a m e p r o c e s s c o d e : BAPI f o r i n d i v i d u a l p r o c e s s i n g a n d BAPP f o r m u l t i p r o c e s s i n g . S o, y o u d o n ' t n e e d a c u s t o m p r o c e s s c o d e .
H a v in g th e S ystem G en e ra te ID o c M o d u le s fro m F u n c tio n M o d u le s T h e s e c o n d o p t i o n t o a u t o m a t i c a l l y g e n e r a t e I D o c m o d u l e s is b a s e d o n a
ALE in te rfa c e fo r
f u n c t i o n m o d u l e t h a t h a s n ' t b e e n i m p l e m e n t e d a s a BAPI. M o r e r e s t r i c
fu n c tio n m o d u le s
tio n s a p p ly h ere. T he fu n c tio n m o d u le m u s t c o n ta in o n ly o n e im p o rt a n d o n e e x p o r t p a ra m e te r. H ow ever, th e im p o rt p a r a m e te r m a y be a c o m p l e x v a r ia b l e . T h e e x p o r t p a r a m e t e r m u s t b e o f t h e B A P I R E T M t y p e i f
173
4
|
C h an g e s to ID o c s
y o u h a v e a s i m p l e i m p o r t v a r ia b le , a n d i t m u s t b e o f t h e B A P I R E T S t y p e i f y o u h a v e a c o m p l e x t r a n s f e r v a r ia b l e . T r a n s a c t i o n B D F G is r e q u i r e d f o r t h i s p u r p o s e , a n d a l t h o u g h i t i s n ’t a BAPI, t h e r e f e r e n c e to a b u s i n e s s o b j e c t t y p e f r o m t h e B O R is m a n d a t o i y . T h e n y o u c a n s p e c i f y t h e n a m e s , p a c k a g e s , a n d p r o p e r t i e s o f y o u r o b j e c t s u s i n g T r a n s a c t i o n BDFG (see F ig u r e 4 . 1 2 3 ) .
A L E In te r fa c e s f o r F u n c tio n M o d u le
Function Module that Processes Business Object Z.SH1 B usiness Obiect Type
BUS1001 006
a / IDoc interface M essag e Type
Z_sm
IDOC Type
Z.SH181 Z_SM*
Packet
zsni
ALE Outbound Processing Function Module
ZA IE__Shi
Function Group
ale
inbound Processing
Function Module
ZID0C_1NPUT_SH1
Function Group
ZSH1
✓
0
m u p d a te Task
□
M ass Processing AJlowed
X
F i g u r e 4*123
E n trie s in T ra n sa ctio n BDFG
T h e s y s t e m t h e n u s e s t h e s e s p e c i f i c a t i o n s to g e n e r a t e e v e r y t h i n g t h a t is r e q u i r e d a s i l l u s t r a t e d in F ig u re 4 . 1 2 4 . So i t c a n p a y o f f t o d e v e l o p a f u n c t i o n m o d u l e w i t h t h e r e q u i r e d p r o p e r t i e s a r o u n d t h e a p p l i c a t i o n ’s m o d u le a n d to s p a re th e rest o f th e w o rk .
174
C u sto m ID o c s
|
R e s u lts
^
C l) ALE Interface ^
O
M essage Type Ti Process Codes for Error Processing CodejType ■denote aeon I
H
| E»pressjinact.ve|
TS745Q3411
utbound. irxompi
i conversion
:
0008068
ibound, “ rroi mes
ism with
EOILJ2
0008373
EOtc| ECU
0000020
EDIM|2 ECIM :
IDoc
>age Without IDoc
TS C303 0”
- document (outbound vrfo IDoc)
E W 0 I2
0007989
lulDOur
error handling wrthlDoc
EOtP|2
TS 0001307
lutbour
error m essage with IDoc packet
£O IS [3
ED .SIAPRC
ECK :
TS C303070
EC IV .'
C003074
ftl a M fla l
hM '
’ I T a ld J M a M a i
Process Codes for Status Inbound ::itiri: i t on Description of prccese
\2 2
|
7 S 7 0 0 0 3 ' ?S IDOC OWNSrOpOrtwilhOOC»:>) T«rm«iaang events
O SAPphone
x m M |
Standard events H » .Binding
■ r a
II
I
a
M l
Object Category
lObjectType
BO 808 O b je c t ly p e 3 ZOOCSittuCH ?
Name
[NPUURROROCCIMRED
ZSMNACH Applica#on Error
a|
F ig u re 4131
Binding
Event
S ta rt E v e n t
A w o r k f l o w ta s k r e q u i r e s a b i n d i n g t h a t y o u c a n u s e t o t r a n s f e r t h e d a ta o f t h e o b j e c t to t h e d a t a o f t h e ta s k . T h e s y s t e m c a n c r e a t e t h i s b i n d i n g a u t o m a t i c a l l y . F o r t h i s p u r p o s e , y o u m u s t c lic k o n t h e b i n d i n g v ie w . T h e b i n d i n g o f t h i s e x a m p l e e n s u r e s t h a t t h e w o r k f l o w is p r o v i d e d w i t h i n f o r m a t i o n f r o m t h e ID o c . E v c i y t h i n g is o k a y i f y o u r b i n d i n g a p p e a r s as s h o w n in F ig u r e 4 . 1 3 2 .
l [ ? C har>ai~Bin3ir ; For Task
17
V□
System Fields
JD _A0 hoc_Ob«cts
»j» Ni Hoc Objects ofW orH ow Instar
^ G t
Container © _EVT_OBJECT
J 8 _Macn_Ob)ects
k»
ZSMNACH
© _Wi_Group_ID © _W orklem
h»
0 _EVT_OBJKEY
Event o f a n Object _EVT_OBJKEY
© _Rule_Resu« □ Excepaon
IJ» R esult o f Agent Determination kj W ortfiowEicepdon
o
Agent
© _wi_ObjectJO
»□» C o e fo r Sabine
o _EVT_OBJTYPE
_EVT_CREATOR
Attachments o f Workflow instance
Grouping Characteristic for Workf »j > Slep Inslance
_EVT_RECENSRJC _EVT_RECEfV* R JD _EVT_CREATlON_D Current D a * o f A p p l ication Server _EVT_CR€ATiON_n Current lim e o f Appiicaion Server Result Exception
Finalva lu e o f Mettiod Workflow Eccepoon
MessageType
Message tfp e ( E .i.w . )
MessageNumber Messagevanamei
Message number Message variable 1
D 001
la a a B i
£1
IPIW PJ .p ja ja jp l
a a -
Binding Event •Application Error*-* Task
Task
6EXCEPT10N6
6 _V*_OBJECTJDR
&_EVT OBJECTi
F ig u re 4 .132
18 0
B in d in g for Start Even t
100
C u sto m ID o c s
T h e s u c c e s s fu l u p d a t e o f t h e ID o c is a l w a y s t h e e n d e v e n t , i r r e s p e c t i v e
|
4 -4
Terminating event
o f w h e t h e r i t c o m e s f r o m t h e e r r o r h a n d l i n g o f T r a n s a c t i o n D B 8 7 o r is c a r r i e d o u t v ia a p r o g r a m t h a t is s c h e d u l e d in t h e b a c k g r o u n d . INPUTFINI SHED is t h e n a m e o f t h e e n d e v e n t , w h i c h is t r i g g e r e d in t h e p r e v i o u s l y c r e a t e d p r o g r a m s f o r p r o c e s s i n g t h e ZSMNACH m e s s a g e t y p e (s e e Listing 4 . 2 8 in S e c t i o n 4 . 4 . 3 , U p d a t i n g a n ID o c ). As y o u c a n s e e in F ig u r e 4 . 1 3 3 , a b i n d i n g is n o t a v a il a b le f o r t h e T e r m i n a t i n g e v e n t .
S ta n d a rd T a s k : C h a n g e
S!*nc ate task
97100179
Nam*
Z S M N A C H In p u t e » ro r
Paetage
ZSM 1
Z S M N A C .t r r o r
*i>plksto Co»nponer4
dBas*.
T il
*L D e fa u lt ru le s
Q
S ta n d a rd e v e rt!
F i g u r e 4.1 33
T e rm in a tin g Event
F in a lly , y o u m u s t s p e c i f y w h o m a y c a r r y o u t t h i s ta s k f r o m t h e e r r o r w o r k f l o w . T h i s d e p e n d s o n h o w y o u r e n t e r p r i s e h a n d l e s w o r k f l o w s in g e n e r a l ; in t h e s t a n d a r d v e r s i o n , t h i s i n v o l v e s a G e n e r a l Task t h a t m a y b e p e r f o r m e d b y a n y e m p l o y e e (s e e F ig u r e 4 . 1 3 4 ) . T h e s e t t i n g s in T r a n s a c t i o n W E 2 0 in t h e i n b o u n d p a r t n e r p ro f ile f o r t h e a g e n t w i t h p o s t p r o c e s s i n g a u t h o r i z a t i o n s d e t e r m i n e t o w h o m t h e w o r k f l o w is a c t u a l l y s e n t .
S ta n d a rd ta s k : M a in ta in A g e n t A s s ig n m e n t
ȣ *
fv ** BJ Oig assignment ® a?
ZSMNACH input error
IS 97100179
E ly
P B -'a s k : ® 0 * n * a ' T a t k ........
O General forwarding allowed O General forwarding not allowed O
r orwar» n g nOutbo» «■ c 9 P e s u b m i s s i o n
P
Private t o w s
Description
I- ( 9 S h a r e d *oldets
P
P le a s e S o t o P ro b le m
O b j e c t s dill a t t a c h m e n t s
. zsywcH-QQttmxm?6eft)5
in ID o c
c j* ' Wders suDscnoeo » 9
T rash
T J S h a re d tra s h
F i g u r e 4 *136
F a u lty ID o cs in t h e In b o x
D is p la y S ta tu s R e c o rd S3
P ro ce ss
M
D elete tlacj
4 1 I T ] I m I I ID oc D is p la y
ID o c n u m b e r
0000000000768805
D irectio n
2
S t a t u s _________________ M essage
4 = inboun d [51
A pplication d o c u m e n t n o t p o s te d
M e s s a g e s for in p u t a n d o u tb o u n d pro ce ssin g
S ts d e ta ils
Logging_________________________________
T im e o f log en tiy D a te
0 8 /1 9 /2 0 0 8
T im e
1 1 : 13 : S1
T im e o f d a ta b a s e c h a n g e ~7 D a te
0 8 /1 9 /2 0 0 8
T im e
1 1 :1 3 5 1
F i g u r e 4-137
V iew A fter Assuming the W orkflow Task
A g e n t A s s ig n m e n t
of
E rro r Tasks
Y o u a s s ig n a g e n ts t o e r r o r ta s k s in t h e p a r t n e r p r o f ile s . In i t ia l ly , y o u s e a rc h f o r t h e a c tu a l m e s s a g e in t h e i n d i v i d u a l d is p la y ; i f y o u c a n ’t fin d a n y t h i n g t h e r e , t h e s e tt in g s f o r t h e e n t ir e p a r t n e r a re s c a n n e d , a n d i f y o u c a n 't f i n d a n y t h in g t h e r e e it h e r , t h e e r r o r is s e n t to t h e ID o c
18 3
Agent assignment
4
|
C h an g e s to ID o cs
a d m i n i s t r a t o r . T h e s y s t e m c h e c k s w h e t h e r a s p e c if ic u s e r is d e f i n e d o r b e l o n g s t o t h e o r g a n i z a t i o n a l u n i t t h a t is s p e c if ie d t h e r e a n d w h e t h e r t h e u s e r is a l l o w e d t o e x e c u t e t h e ta s k . E v e i y u s e r m a y c a r r y o u t a ta s k o f t h e g e n e ra l ta s k t y p e o r a t a s k t h a t w a s a s s i g n e d to t h e u s e r v i a t h e o r g a n i z a t i o n a l m a n a g e m e n t in SAP ERP H C M . T h e ta s k s a r e e i t h e r s p e c if ie d in t h e j o b d e s c r i p t i o n o r a s s i g n e d d ire c tly . C o o r d i n a t e t h e s e t t i n g s in th e o rg a n iz atio n al m a n a g e m e n t w ith th e e m p lo y e e s re s p o n sib le because t h e s e s e t t i n g s c a n a l s o i n f l u e n c e o t h e r e l e m e n t s in t h e SAP s y s t e m . IDoc administrator
U s e T r a n s a c t i o n O Y EA t o m a i n t a i n t h e ID o c a d m i n i s t r a t o r a n d s o m e o t h e r g e n e r a l s e t t i n g s . H e r e , y o u c a n a ls o e n t e r d e f a u l t s e t t i n g s f o r f r e q u e n t l y r e q u e s t e d a s p e c t s , s u c h as t h e m a x i m u m n u m b e r o f s y n t a x e r r o r s p e r I D o c (s e e F ig u r e 4 . 1 3 8 ) .
G lo b a l P a ra m e te rs f o r ID o c In te rfa c e
B A W .H I-m W IJ M
U s e r Info____________________________________________
ID o c Administrator O ^ e t t Type'
0
Identification
□
50010120
Organizational unit E D I Department
G eneral ID oc Interface M ax Num ber of Syntax Errors
1
IDoc Inbound Processing using tRFC Server Group fo r ID oc inbound
Outbound IDocs U s ing tR F C ,
I
□
U s e Last C ode Page Found
IDoc inbound from File/ C l S y n chro nous P roc e s s in g E W arnings for Status Processing C o m m it M e r
Figure
4 .4 . 6
0
D ata Records
4138 Global Settings U s e fu l F u n c t io n A A o d u le s
Som e o f th e n ecessaiy fu n c tio n m o d u le s fo r p ro cessin g c u s to m -p ro g r a m m e d ID o c s h a v e a l r e a d y b e e n i l l u s t r a t e d in t h e p r o g r a m m i n g e x a m -
18 4
C u sto m ID o c s
|
4 -4
p ie s . T a b le 4 . 3 lists t h e m o s t i m p o r t a n t f u n c t i o n m o d u l e s a g a i n f o r y o u r r e f e r e n c e . T h is lis t a ls o i n c l u d e s t h o s e c o n v e r s i o n m o d u l e s t h a t a r e n 't c o n t a i n e d in t h e e x a m p l e s .
F u n c tio n M o d u le
F u n c tio n
A L E _ M O D E L _ D E T E R M IN E _ IF _ T O _
C h e c k w h e t h e r a s p e c ific m e s s a g e m a y b e g e n e ra te d
SEND
a c c o rd in g t o th e d is tr ib u tio n m o d e l.
A L E _ S E R IA L _ K E Y 2 C H A N N E L
D e t e r m in e / s e t o b je c t c h a n n e l f o r s e ria liz a tio n .
C L O L C O N V E R S IO N _ P E R F O R M
C o n v e rs io n f r o m in te rn a l t o e x te rn a l fo rm a ts .
C L O I_ P U T _ S IG N _ IN _ F R O N T
P u t m in u s s ig n in f r o n t.
C U R R E N C Y _ A M O U N T _ ID O C _ T O _ S A P
C o n v e rt cu rre n c y a m o u n ts to SAP fo rm a t.
C U R R E N C Y _ A M O U N T _ S A P _ T O _ ID O C
C o n v e rt c u rre n c y a m o u n ts to e x te rn a l fo rm a t.
C U R R E N C Y _ C O D E _ IS O _ T O _ S A P
C o n v e r t c u rr e n c ie s f r o m IS O c o d e t o S A P fo r m a t.
C U R R E N C Y _ C O D E _ S A P _ T O _ IS O
C o n v e r t c u rr e n c ie s f r o m S A P f o r m a t t o IS O c o d e .
ID O C _ D A T E _ T IM E _ G E T
G e t s ta tu s i n f o r m a t i o n f r o m t h e re c e iv e r.
ID O C _ R E D U C T IO N _ F IE L D _ R E D U C E
D e t e r m in e a c tiv e fie ld s in t h e re d u c e d m e s s a g e ty p e .
ID O C _ S E R IA L IZ A T IO N _ C H E C K
C h e c k t im e s t a m p in t h e s e ria liz a tio n fie ld o f t h e ID o c header.
ID O C _ S E R IA L _ P O S T
U p d a te t h e s e ria liz a tio n ta b le .
ID O C _ S T A T U S _ W R IT E _ T O _ D A T A B A S E
C h a n g e I D o c s ta tu s .
L A N G U A G E _ C O D E _ IS O _ T O _ S A P
C o n v e r t la n g u a g e c o d e f r o m IS O c o d e t o S A P f o r m a t .
L A N G U A G E _ C O D E _ S A P _ T O _ IS O
C o n v e r t la n g u a g e c o d e f r o m S A P f o r m a t t o IS O c o d e .
M A S T E R J D O C .D IS T R IB U T E
T r a n s f e r I D o c t o t h e c o m m u n i c a t i o n la y e r .
M M O D E L _ IN T _ V A L ID _ G E T
D e t e r m in e in t h e d is t r ib u t io n m o d e l w h o s e n d s w h ic h m essage to w h o m .
O W N _ L O G IC A L _ S Y S T E M _ G E T
F in d th e c u s to m lo g ic a l s y s te m n a m e .
R F C _ D A T A _ D E T E R M IN E _ F O R _ C H E C K S
D e t e r m in e an RFC d e s t in a t io n o f a p a rtn e r.
U N I T _ 0 F _ M EA S U R E _ l S O _ T 0 _ S A P
C o n v e rt u n it o f m e a s u re f r o m IS O c o d e t o S A P fo r m a t.
U N IT _ O F _ M E A S U R E _ S A P _ T O _ IS O
C o n v e r t u n it o f m e a s u r e f r o m S A P f o r m a t t o IS O c o d e .
T a b le 4 .3
F u n c t i o n M o d u l e s f o r I D o c P r o c e s s in g
18 5
4
|
C h an g e s to ID o cs
4 .5
S u m m a ry
N o w y o u ' v e s e e n all t h e d e v e l o p m e n t ta s k s f o r m a n a g i n g c o m p a n y s p e cialties in ID o c s . W e s t a r t e d w i t h t h e a d a p t i o n o f s t a n d a r d ID o c s w i t h C u s t o m i z i n g tasks, b e c a u s e t h i s is t h e e a s ie s t w a y . T h e n e x t s t e p is t h e d e v e l o p m e n t o f c h a n g e s to s t a n d a r d ID o c s w i t h t h e h e l p o f e n h a n c e m e n t t e c h n i q u e s . To d o so , w e r e v i e w e d t h e t e c h n i q u e s a v a il a b le f o r t h e n o n i n t e r a c t i v e ID o c p r o c e s s i n g . At th e e n d w e w e n t th ro u g h th e c o m p le te p rocess o f d e v e lo p in g cus t o m e r ID ocs s ta rtin g w ith th e a p p lic a tio n tables a n d e n d in g w ith th e c o m p l e x p r o c e s s o f ID o c e r r o r h a n d l i n g .
18 6
ID o c c o m m u n ic a tio n is e s s e n tia lly a s y n c h ro n o u s — th e s e n d in g s y s te m d o e s n 't receive in fo r m a tio n a b o u t h o w th e ID o c is p r o cessed in th e rec eivin g s y s te m . B u t, t h i s in fo r m a tio n c a n b e tr a n s f e r r e d f r o m th e receiver to th e sender. T his c h a p te r w ill o u tlin e th e v a rio u s o p tio n s a v a ila b le here.
5
Confirmations
I D o c c o m m u n i c a t i o n is f u n d a m e n t a l l y a s y n c h r o n o u s . In o t h e r w o r d s , th e s e n d e r d o e s n 't receiv e a n y in fo rm a tio n a b o u t h o w th e re c e iv e r p r o c e s s e s t h e ID o c . H o w e v e r , i f r e q u i r e d , t h e r e c e i v e r c a n a c ti v e ly s e n d th is i n f o r m a t i o n b a c k to t h e s e n d e r .
5.1
"A LE A U D " I D ocs
ALEAUD ID o c s a r e g e n e r a l l y d e p l o y e d w h e n t w o SAP s y s t e m s a r e in u se. T h i s s c e n a r i o (a s e n d e r s e n d s a n a p p l i c a t i o n ID o c a n d a r e c e i v e r s e n d s b a c k a n ALEAUD ID oc) is k n o w n a s A L E a u d it. In SAP N c t W e a v e r P ro c e s s I n t e g r a t i o n (SAP N e t W e a v e r PI), t h e ID o c a d a p t e r a ls o p r o c e s s e s t h e ALE AUD ID o c a s a n a p p lica tio n a ckn o w led g m en t. To u s e a n ALEAUD ID oc, y o u n e e d a s u i t a b l e d i s t r i b u t i o n m o d e l (s e e Fig
D is trib u tio n m odel
u r e 5 .1 ) t h a t i n s t r u c t s t h e r e c e i v e r o f t h e o r i g i n a l ID o c to s e n d a n ALEAUD
fo r ALE a u d it
I D o c to t h e s e n d e r o f t h e o r i g i n a l ID oc.
*
g g .Z S M I ^
^
^
...
ZSM 1
0 X D O c lie n t 800 0
T90CLN T090
P rod uctive s y s te m (c lie n t 8 1 1 )
P R O D U C T IO N
f a ZSMNACH
S a b in e s M e s s a g e Type
@
Productive s y s te m (c lie n t 8 1 1 )
P R O D U C T IO N
^
0
XD O c lie n t 800
T90CLN T090
^
f a ALEAUD
A L E : C o n firm a tio n s for in b o u n d ID ocs
N o filter set
F i g u r e 5.1
P a rtn er M o d e l f o r th e " A L E A U D " ID oc
187
5
C o n firm a tio n s
I n it ia l s t a tu s va lu e s
The
ID o c c o n f i r m s t h e s t a t u s o f t h e ID o c in t h e t a r g e t s y s t e m .
ALEAUD
F ig u r e 5 .2 s h o w s s o m e p o s s i b l e s t a t u s v a lu e s . F o r e x a m p l e , a n ID o c is a s s i g n e d s t a t u s 5 3 i f i t's p o s t e d su c c e s s fu lly . I n a d d i t i o n , a d e l e t i o n flag c a n b e s e t t o p e r m a n e n t l y e x c l u d e a n ID o c f r o m p r o c e s s i n g ( s t a t u s 68) o r a n ID o c c a n h a v e a n i n t e r m e d i a t e p r o c e s s i n g s t a t u s (e .g ., s t a t u s 64: W a itin g a n d 5 1 : Incorrect processing).
^
1 3 Productive s y s te m (client 811)
P
G $ ID o c s in outb o u n d pro ce ssin g
^
[ £ | ID oc in in b o u n d pro ce ssin g l>
24 13
11
O A p p lic a tio n do cu m e n t n o t posted
61
3
53
^
Q E r r o r- n o fu r in e r pro ce ssin g
68
2 2
l>
&
64
4
I1 0
A p p lic a tio n do cu m e n t posted
ID oc re a d y to be tra n s fe rre d to app lica tion
F ig u r e 5.2
ID o c S tatus V a lu e s in R e c e iv in g S ystem
W e 'l l n o w u s e t h e r e p o r t
RDBSTATE
t o s e n d o u r c o n f i r m a t i o n s . T h is r e p o r t
m u s t b e s c h e d u l e d o n a r e g u l a r b a s i s . F ig u r e 5 .3 s h o w s t h e r e q u i r e d e n t r i e s , t h a t is, f o r w h i c h y o u w a n t
ALEAUD
ID o c s to b e g e n e r a t e d , f o r
w h i c h m e s s a g e t y p e , a n d f o r w h i c h p e r io d .
D a le ID o c c h a n g e d
F ig u re 5 .3
“ A L E A U D " ID oc
The
____________________18 8 / 0 1 / 2 8 8 8 |
to_____ [ 0 8 / 0 1 / 2 0 0 9
"R BD S TA TE" R e p o rt
ALEAUD
ID oc co n tain s a h e a d e r s e g m e n t, w h ic h p ro v id e s in fo rm a tio n
a b o u t t h e s e l e c t i o n m a d e b y t h e u s e r . I n o u r e x a m p l e , i t s t a t e s t h a t w e 'l l s e n d c o n firm a tio n s for th e m e ssag e ty p e
ZSMNACH
( s e e F ig u r e 5 .4 ). This
is f o l l o w e d b y o n e s e g m e n t f o r e a c h ID o c in t h e s e l e c t i o n p e r i o d , w h i c h p r o v i d e s i n f o r m a t i o n a b o u t t h e s t a t u s o f t h e ID o c in t h e r e c e i v i n g s y s t e m a s w e ll a s t h e ID o c n u m b e r i n b o t h s y s t e m s .
18 8
" A L E A U D " ID o c s
SEGNUM
S e g m en t Num ber
SEGNAM
v^p v uni m i i vpi rt i i iNam m i 1 ip v
c lADHD*
MESTYP_LNG i im w CAvmiiv n
M essag e Type
ZSMNACH
o c y i i i c i u iNum v u i i ihor uci
nn n n n i
SEGNAM
Se g m en t N am e
E1STATE
DOCNUM
ID oc number
C0 0 0 0 0 0 0 0 0 7 6 8 8 J7
STATUS
Status o f IDoc
S3
STACOD
Stalus code
STAPAI
000001
SAP0CC
[P aram eter 1
ok
STATVP
Type of system error m es s a g e (
S : Su ccess m essage
STAMQU
Stalus m e s s a g e qualifier
SAP
C T B H fJn
niirrthPr
nnn
STAPAI JJV O
Param eter i
86G N U M
S e g m en t Num ber
000003
SEGNAM
Se g m en t N am e
E1PRTOB
DOCNUM
ID oc number
0000000000135191
P FVfiN WW I I
W v U l l l v l l i lNi Uu ImI I hU Pv fl
000004
SEGNAM
Se g m en t N am e
E1STATE
DOCNUM
IDoc number
000 00 0 0 0 0 0 7 6 8 8 0 8
STATUS
Status o f IDoc
68
STACOD
Status code
SA P3CC
STAMOU
Stalus m e s s a g e qualifier
SAP
QTAMMO
oStatue w iu ®
SEGNUM
Se g m en t Num ber
SEGNAM
S e g m en t N am e
E1P=?"CB
iC C N U M
ID oc number
000 00 0 0 0 0 0 1 3 5 1 9 2
!M
F ig u r e 5.4
|
rn a c c a n o ini iim u i mh uo c ir
0k
inn 000005
S a m p le " A L E A U D " ID o c
T h e r e s u lt s h o w n in t h e s e n d i n g s y s t e m c o m p r i s e s t h r e e n e w s t a t u s v a l
S t a t u s v a l u e s in
u e s (3 9 , 4 0 , a n d 4 1 ), a s s h o w n i n F ig u r e 5 . 5 . S ta t u s v a l u e 4 0 : A p p lica tio n
s e n d in g syste m
d o c u m e n t n o t created in ta rg e t system is r e d b e c a u s e e v e n i f t h e s e n d e r n o lo n g e r n e e d s to ta k e ac tio n h ere, it s h o u ld b e c le a r th a t th e p a r tn e r d i d n 't p o s t t h e s e ID o c s b u t a s s i g n e d t h e m s t a t u s 68: E rror - no f u r t h e r process in g i n s t e a d . T h e f o l l o w i n g t w o s t a t u s v a l u e s a r e g r e e n : 4 7 , w h i c h , in th e se n d in g sy stem , m e a n s th a t th e receiving sy stem successfully pro cessed t h e ID o c ( a n d t h e r e f o r e o b t a i n e d s t a t u s 5 3 ), a n d s t a t u s 3 9 , w h i c h m e a n s t h a t t h i s ID o c is still in a n i n t e r m e d i a t e s t a g e . A ll ID o c s t h a t h a v e a v a l u e o t h e r t h a n 5 3 o r 6 8 in a p a r t n e r s y s t e m a r e a s s i g n e d s t a t u s 3 9 b e c a u s e it's a s s u m e d t h a t t h e p a r t n e r w ill c o n t i n u e t o p r o c e s s all ID o c s t h a t d o n ’t hav e statu s 53 o r 6 8 u n til th e y o b ta in statu s 53 o r 68.
~
@ X D 0 client 800
10
^
10
ID ocs in outbound processing ^
© Application docum ent n o t created in target system l>
^
□
40
ID oc is m the target sys tem (ALE service)
39
l> f a ZSMNACH ^
□ Application docum ent created in target system
P
F ig u re 5 .5
b
1 1
zsm nach
7 7
41
ZSMNACH
2 2
Status V a lu e s in S e n d in g System A fte r A L E A u d it
18 9
5-1
5
|
C o n firm a tio n s
ID o cs w it h a u d it m essages
I f t h e s t a t u s o f a n ID o c c h a n g e s in a p a r t n e r s y s t e m , a n d i f t h e r e p o r t RBDSTATE
5.2 W hen
is c x c c u t e d a g a in , a n e w e n t i y is s e n t w i t h i n a n
ALEAUD
ID oc.
“STA TU S" ID o cs ALEAUD
ID o c s a r e u s e d to s e n d c o n f i r m a t i o n s , all t h r e e s t a t u s v a l
u e s r e s u l t i n t h e s e n d e r n o l o n g e r b e i n g a b l e to p r o c e s s o r r e s e n d t h e ID o c . H e r e , i t ’s g e n e r a l l y a s s u m e d t h a t t h e r e c e i v e r w i l l r e s o l v e a n y e r r o r s t h a t o c c u r . H o w e v e r , i n t h e c a s e o f EDI s u b s y s t e m s , in p a r tic u la r, y o u m a y s e e a d d i t i o n a l s t a t u s v a l u e s i n t h e EDI s u b s y s t e m , o r y o u m a y w a n t t o r e s e n d a n ID o c b e c a u s e a n e r r o r o c c u r r e d in t h e EDI s u b s y s t e m . Y o u 'r e a l r e a d y f a m i l i a r w i t h s t a t u s p r o c e s s i n g f r o m C h a p t e r 3, S e c tio n 3 .3 , P ro c e s s i n g S ta t u s F iles. H e re , a n ID o c is u s e d to c r e a t e a n e w s t a t u s v a l u e f o r t h e o r i g i n a l ID oc. P ro c e ssin g by w o rk flo w task
F ig u r e 5 . 6 s h o w s p r o c e s s c o d e
STA1,
w h i c h is u s e d t o p o s t t h e
STATUS
ID o c. A s y o u c a n s e e , p r o c e s s i n g b y ( w o r k f l o w ) ta s k is s p e c if ie d u n d e r P ro c e s s i n g T y p e i f y o u r s y s t e m h a s n o t c h a n g e d s i n c e it w a s d e l i v e r e d b y SAP. F o r t h i s r e a s o n , y o u s h o u l d o n l y u s e
STATUS
ID o c s i f y o u re a lly n e e d
t h e o t h e r s t a t u s v a l u e . W o r k f l o w p r o c e s s i n g is m o r e p e r f o r m a n c e - i n t e n s iv e t h a n p r o c e s s i n g b y f u n c t i o n m o d u l e . W h e r e p o s s i b l e , y o u s h o u l d w o r k w ith th e
ALEAUD
s c e n a r i o . You s h o u l d a ls o o n l y w o r k w i t h
ID o c s i f y o u w a n t t o p r o c e s s ID o c s a g a in .
19 0
STATUS
'S T A T U S " ID o c s
|
5-2
T h e STATUS I D o c d o e s n ' t t r a n s f e r t h e s t a t u s o f t h e ID o c in t h e r e c e i v
“STATUS" m essage
i n g s y s t e m . I n s t e a d , y o u s p e c i f y t h e n e w s t a t u s t h a t y o u w a n t t h e ID o c
typ e
to o b t a i n in t h e s e n d i n g s y s t e m , a l o n g w i t h a s u i t a b l e p i e c e o f t e x t . In o u r e x a m p l e , t h i s t e x t is a l w a y s h a r d - c o d e d i n t h e ID o c. You c a n a ls o r e f e r e n c e a m e s s a g e i n a m e s s a g e class, b u t t h i s m u s t e x i s t i n t h e o r i g i n al s e n d i n g s y s t e m . T h e l a t t e r o p t i o n fa c i l it a t e s t h e u s e o f m o r e u s e r fr ie n d ly , la n g u a g e - s p e c if i c m e s s a g e s . F ig u r e 5 . 7 s h o w s t h e m a i n fie ld s in t h e STATUS ID o c , t h e r e f e r e n c e t o t h e ID o c t h a t is t o r e c e i v e a n e w s t a t u s v a l u e , t h e n e w s t a t u s v a l u e itself, a n d t h e c o m m e n t text.
ID oc disp lay “
T ec h n ic a l sh o rt info 7
C J IDOC 0 0 0 0 0 0 0 0 0 0 7 6 8 8 3 2 H ) C ontrol R e c.
^ fProc
P
MATMAS
T90CLN T090
100
□
CLFMAS
T90CLNTQ9O
50
R F C serve r group
□
P r o c e s s in g i n t h e R e c e i v i n g S y s te m
In t h e s e n d i n g s y s t e m , y o u t h e n u s e t h e r e p o r t RBDSER01 o r T r a n s a c t i o n
C re a tin g ID o c s fo r
B D 4 0 to c r e a t e I D o c s f o r a p a r t i c u l a r g r o u p . H e r e , y o u o n l y n e e d to
a g ro u p
s p e c if y t h e s e r i a l i z a t i o n g r o u p (s e c F ig u r e 6 .3 ). T h is is a ls o t h e c a se f o r t h e r e p o r t s d e s c r i b e d n e x t.
G e n e ra te ID o c s f o r S e ria liz a tio n G ro u p F ro m C h a n g e P o in te rs
I s Serializatio n G ro u p
F ig u re 6 .3
ZSf11|
©
C re a tin g ID o cs f o r a G ro u p
First, t h e s y s t e m g e n e r a t e s all o f t h e MATMAS ID o c s (s e e F ig u r e 6.4 ).
| [ & Info rm ation
E 3 /
3 m a s te r ID o c s .s ^
F ig u re 6 . 4
F irs t M e s s a g e T y p e C r e a t e d
T h e n , it g e n e r a t e s t h e classification ID o cs (see F igu re 6.5 ). In b o t h cases, th e c u s t o m e r d i s t r i b u t i o n m o d e l is r e le v a n t f o r d e t e r m i n i n g w h i c h p a r t n e r will re c e iv e t h e ID ocs. F o r e a c h c h a n g e , y o u c a n a ls o c r e a t e s e v e ra l ID ocs fo r v a r io u s d i f f e r e n t p a r tn e r s , i f t h e u s e o f m u l ti p l e re c e iv e rs is p e r m i t t e d .
19 5
6
|
S e ria liz in g ID o c s
l [ g
In fo rm a tio n
[* J/
ip .? ? ? .
H R to [ .m
s a g e ty p e C L FM A S
a s ___________________________________________ F ig u re
6 .5
S e c o n d M e s s a g e T y p e C r e a te d
S e ria liz a tio n g ro u p
In t h e s e n d i n g s y s t e m , all o f t h e s e n e w ID o c s o b t a i n s t a t u s SO: R ead y f o r
in o u t b o u n d
dispatch, a s s h o w n in F ig u r e 6 . 6 . To r e ta i n t h e s e q u e n c e , it's i m p o r t a n t
p ro c e s s in g
t h a t t h e s e ID o c s a r e n o t i n c l u d e d in c o n v e n t i o n a l d i s p a t c h j o b s ( r e p o r t R S E O U T O O ) . T h e v a r ia n t s h e r e m u s t b e s e l e c t e d s o t h a t t h e s e m e s s a g e s are
e x c lu d e d .
”
0 X D O client 800
5
GiJ IDocs in ouffiound processing ^
iS IDoc read y fa r dispatch (ALE serwee) ^
^
5 2 2
S .S .& .S
§3 MATMAS l> C D 0 1 (0 0 6 )
6 .6
30
CLFMAS r> H J 0 K O O 6 )
F ig u re
5
3 S.
3
C re atin g ID ocs B u t N o t D is p a tc h in g T h e m Yet
D is p a tc h in g
You c a n n o w s ta r t t h e r e p o r t R B D S E R 0 2 o r T r a n s a c tio n B D 41 to d is p a tc h
th e g roup
t h e ID o c s. You ca n u s e t h e flag A lw a y s S e n d C o n tro l M e s s a g e to d e t e r m i n e w h e t h e r o r n o t t o s e n d t h e c o n t r o l m e s s a g e d i r e c t ly (s e e F ig u r e 6.7).
D is p a tc h o f ID o c s o f S e ria liz a tio n G ro u p I
F ig u re
6 .8
(c lie n t 8 1 1 )
5 5
ID oc read y to b e transferred to application
64
5
CLFM A S
2
§3 MATMAS
3
U n p ro c e s s e d ID o c s in T arg e t S ystem
To p o s t t h e ID o c s in a u s e f u l m a n n e r , y o u c a n s t a r t p r o c e s s i n g w h e n th e last ID o c in t h i s g r o u p a n d c h a n g e p o i n t e r e v a l u a t i o n h a s a r r i v e d . You, as th e s e n d e r, can u se th e re p o rt R B D S E R 0 3 o r T ran sactio n B D 42 to in stru ct t h e r e c e i v e r t h a t p o s t i n g c a n n o w c o m m e n c e . T h is i n f o r m a t i o n , w h i c h h a s its o w n m e s s a g e t y p e S E R D A T , is t h e n t r a n s f e r r e d to t h e s e n d e r i f y o u h a v e n ’t a l r e a d y u s e d t h e r e p o r t R B D S E R 0 2 t o g e n e r a t e a c o n t r o l m e s s a g e . T h e s e r i a l i z a t i o n i n f o r m a t i o n is t r a n s f e r r e d w i t h i n t h e S E R D A T ID o c. You g e t a l i n e i t e m s e g m e n t f o r e a c h m e s s a g e t y p e in t h e s e r i a l i z a t i o n g r o u p (s e e F ig u r e 6.9 ).
E C ID D
D a ta Records
SE G N U M
S e g m e n t N u m b er
000 001
SEGNAM
Segm ent Nam e
E1TB D 40
SERGROUP
Senalization group fo r sen al
ZSM1
SEQNUMBER
Application ID se q u e n c e nu m b e r
0001
M ESTVP
M e s s a g e Type
MATMAS
SE G N U M
S e g m e n t N u m b er
000002
S E G N -M
Segm ent Nam e
E1TB D 40
SERGROUP
Senalization group fo r senal
ZSM1
SEQNUMBER
Application ID se q u e n c e nu m b e r
000 2
M ESTYP
M e s s a g e Type
CLFMAS
F ig u re
6 .9
S E R D A T I D o c , W h i c h S t a r t s P o s t in g
You c a n a ls o s t a r t p o s t i n g w i t h o u t s e n d i n g a S E R D A T ID o c. To d o th is , u s e t h e r e p o r t R B D S E R 0 4 o r T r a n s a c t i o n B D 4 3 in t h e r e c e i v i n g s y s t e m .
197
|
p a rtn e r syste m
6.1
6
|
S e ria liz in g I D o cs
6.2
S e ria liz a tio n U sin g T im e sta m p s
S e r i a l i z a t i o n u s i n g t i m e s t a m p s , a l s o k n o w n a s " s e r i a l i z a t i o n a t ID o c level," e n s u r e s t h a t i f t w o ID o c s q u e u e - j u m p a n d c o n t a i n d i f f e r e n t d a ta f o r t h e s a m e o b j e c t , t h e o l d e r ID o c t h a t q u e u e - j u m p e d c a n n o l o n g e r be p o sted . S e ria liz a tio n w it h
F o r t h i s p u r p o s e , t h e la s t t i m e s t a m p p o s t e d is e n t e r e d f o r e a c h o b j e c t
ta b le “ BDSER"
in t h e t a b l e B D S E R . A n ID o c f o r t h e s a m e o b j e c t c h e c k s its t i m e s t a m p f r o m t h e SERIAL c o n t r o l r e c o r d field a g a i n s t t h e t i m e s t a m p in t h e a b o v e m e n t i o n e d t a b l e BDSER, a n d i t ’s o n l y p o s t e d i f its t i m e s t a m p is later. O t h e r w i s e , t h e ID o c o b t a i n s s t a t u s 5 1 , a n d it c a n b e fla g g e d f o r d e l e t i o n . T h is o n l y c o n c e r n s s e r i a l i z a t i o n in t h e r e c e i v i n g s y s t e m . ID o c s c r e a t e d u s i n g t h e g e n e r a t e d BAPI i n t e r f a c e d o n ’t s u p p o r t t h i s f u n c t i o n b e c a u s e th e g e n e ra tio n p ro g ra m d o e s n 't im p le m e n t th e c o r re s p o n d in g fu n c tio n m odules.
C u s to m iz in g fo r
I n T r a n s a c t i o n B D 9 5 , y o u a s s i g n ID o c fie ld s t o c e r t a i n fie ld s in t h e d a t a
tim e s ta m p
b a s e ( s e e F ig u r e 4 . 9 i n C h a p t e r 4 , S e c t i o n 4 . 1 . 3 , F i l t e r i n g S e g m e n t s ) .
s e ria liz a tio n
T h e s e f ie ld s a r e a l s o t h e b a s i s f o r d e t e r m i n i n g o b j e c t a s s i g n m e n t f o r t i m e s t a m p s e r ia li z a t io n . T ra n sa c tio n B D 57, s h o w n in F ig u re 6 .1 0 , c o n ta in s th e m e s s a g e ty p es d e l i v e r e d b y SAP, w h i c h s u p p o r t s e r i a l i z a t i o n u s i n g t i m e s t a m p s . T h is t r a n s a c t i o n a l s o s h o w s w h i c h fie ld is i m p o r t a n t f o r t h e s e q u e n c e . O n e e x a m p l e o f s u c h a fie ld is t h e d o c u m e n t n u m b e r E B E l . N in t h e m e s s a g e ty p e ORDCHG.
T i m e s t a m p in ta b le “ BDSER"
T a b le B D S E R (s e e F ig u r e 6 . 1 1 ) c o n t a i n s t h e a s s o c i a t e d e n t r i e s w i t h t h e ID o c s t h a t w e r e p o s t e d f o r a n o b j e c t a s w e ll a s t h e t i m e s t a m p i n d i c a t i n g w h e n p o s t i n g t o o k p la c e . T h e SERIAL fie ld h e r e c o n t a i n s t h e t i m e s t a m p f r o m t h e SERIAL field in t h e c o n t r o l r e c o r d f o r t h e last s u c c e s s fu lly p o s t e d ID o c . ID o c s t h a t a r c b a s e d o n t h e s a m e o b j e c t b u t h a v e a n e a r l i e r tim e s ta m p m u s t n o t b e po sted .
19 8
S e ria liz a tio n U sin g T im e sta m p s
C h a n g e V ie w " L in k T y p e a n d S e ria liz a tio n T y p e o f M e s s a g e T y p e " : l ^ l l New E ntries I ^ I B H ^ E I I B I I B I L in k Type a n d S e ria liz a tio n Type o f M e s s a g e Type M e s s a g e T yp e
[S e ria liza tio n o b je c t type
S b je c tty p e lin k
lAtriA'S
ATNR
-|
MATMAS_VHS
ATNR
t
MK_MYSTD
ATNR
MY MATHAS
ATNR
OILDEB
UNNR
OILORD
8ELN
0 1 LOTS
BELN
ORDCHG
: b eln
BELN BELN
ORDERS ORDRSP
BELN
PFS_HATHAS01
ATNR
PICKSD
BELN RCTR
PRCMAS QSMT
CMTB
F i g u r e 6 .1 0
ID o c s T h a t S u p p o r t T im e s ta m p S eria liza tio n
HANDT SNDPRT SNDPRN 800 800 - ■8 0 0
)
KU KU KU
F i g u r e 6.11
0000030099 0000030099 AG 0000030099 A 6
R fV P R T RCVPRN
LI LI LI
RCVPFC
0 0 0 0 0 10 0 9 9 LF 0 0 0 0 0 10 0 9 9 LF 0 0 0 0 0 10 0 9 9 LF
0B JVA IU E
EBELN EBELN EBELN
4 5 0 0 0 00 2 3 5 4 5 0 0 0 00 2 3 6 4 5 0 0 0 00 2 3 8
T a b l e ‘'B D S E R ”
You c a n u s e t h e r e p o r t R B D S R C L R to r e m o v e o b s o l e t e t i m e s t a m p s f r o m t h e T a b le BDSER.
Function Modules for Serialization SAP d e l i v e r s t w o f u n c t i o n m o d u l e s f o r t i m e s t a m p s e r i a l i z a t i o n : I D 0 C _ S E R I A L I Z A T I O N _ C H E C K fo r c h e ck in g tim e s ta m p s a n d I D O C _ S E R I A L _ P O S T
f o r u p d a t i n g t h e s e r ia li z a t io n ta b le a f t e r a n e w I D o c h a s b e e n s u c c e s s fu lly p o s t e d . I f y o u w a n t to u s e t h i s m e t h o d t o s e r i a l i z e ID o c s , g o to T r a n s a c ti o n B D 5 7 , m a i n t a i n t h e field t o b e u s e d , a n d t h e n u s e t h e e n h a n c e m e n t tech n o lo g y to im p le m e n t th e tw o fu n c tio n m o d u le s in th e in b o u n d fu n c tio n m o d u le.
19 9
|
6 .2
6
|
S e ria liz in g ID o c s
6.3
S e ria liz a tio n U sin g B u s in e s s O b je c ts
F or seria liz atio n u s in g b u s in e s s o b je c ts, o n e c o m m o n c h a n n e l n u m b e r is a s s i g n e d t o all ID o c s f o r t h e s a m e o b j e c t t y p e . A ch a n n e l n u m b e r is a m essage a ttrib u te g e n e ra te d using th e fu n c tio n m o d u le
ALE_SERI AL_KEY -
2 C H A N N E L o r a s s i g n e d in t h e a p p l i c a t i o n p r o g r a m . O b je c t channel
T h is t y p e o f s e r i a l i z a t i o n is s o m e t i m e s a ls o k n o w n a s o b ject ch a n n e l serial
s e ria liz a tio n
iza tio n . H e r e , s e r i a l i z a t i o n o c c u r s a t t h e o b j e c t t y p e le v e l (e .g ., b a s e d o n all B O M ID ocs). T h e b u s i n e s s o b j e c t t y p e f o r t h i s p u r p o s e is I DOCBOMMAT. B e c a u s e SA P d o e s n ' t d e l i v e r a n y o b j e c t c h a n n e l s e r i a l i z a t i o n f o r m a t e rial m a s t e r s , w e ’ll u s e B O M s in o u r e x a m p l e h e r e . F i g u r e 6 . 1 2 s h o w s T r a n s a c t i o n B D 1 0 5 , w h i c h c o n t a i n s all o b j e c t s f o r w h i c h S A P d e l i v e r s s e r i a l i z a t i o n u s i n g b u s i n e s s o b j e c t s . You c a n m a i n t a i n t h i s t a b l e y o u r s e l f , b u t y o u m u s t u s e e x its t o b u i l d t h e a s s o c i a t e d i m p l e m e n t a t i o n i n t o t h e pro cessin g ro u tin es.
C h a n g e V ie w " A L E :O b je c t C h a n n e l S e r ia liz : S u p p o r t e d B u s in e s s O b je c t N e w E n trie s
CQ
EAlz& © © D
A L E O b ie c t C h a n n e l S e ria liz S u p p o rte d B u s in e s s O b ie d Types —
O biectType
(D e s c rip t
BUS2012
P u rc h a s e O rde r
BUS2013
P u rc h .s c h e d u lm g a g re e m e n t
BUS2015
in b o u n d delrvery
BUS2022
C le a rin g C a s e
BUS2032
S a le s O rde r
*
BUS2035
C u s to m e r s c h e d u lin g a g re e m e n t
BUS2054
W o r k b re a k d o w n structure
BUS2102
R e tu rn s
L
BUS6050
D e liv e ry P ro c e s s in g
r
ECH
E n g in e e rin g C h a n g e M a n a g e m e n t: C h a n g e m a s te r
ID0CB0H00C IDOCBOHHAJ ID O C fo r m a te ria l BOMs
Figure 6.12
O b je c ts C o n n e c te d t o O b je c t C h a n n e l S eria liza tio n
A s s ig n m e n t to
A m e s s a g e t y p e t h a t c a n b e s e r i a l i z e d is t h e n a s s i g n e d t o e a c h o f th e s e
m essage typ e
o b j e c t s . You u s e T r a n s a c t i o n B D 1 0 4 to a c c e s s t h i s a s s i g n m e n t . F o r o u r s a m p l e B O M , t h e m e s s a g e t y p e is
200
BO M M AT,
a s s h o w n in F ig u r e 6 .1 3 .
S e ria liz a tio n U sin g B u sin ess O b je c ts
C h a n g e V ie w "A L E : O b je c t C h a n n e l S e ria liz a tio n : £
N e w E n ln e s
-
&
^
S
3
0
ALE: O b ie c l C h a n n e l S e nalizatio n: M e s s a g e Typ e o f B u s . O b) Typ e
(M e s s a g e Typ e
B U S216 2
o|
tCUST0f1ERRETURN_C0NFIRnDELIVERY
"1 *
BUS6050
OELIVERYPROCESSIN 6 EXECUTE
*
ECU
ECHHAS
IDOCBOMDOC 80MD0C id o c b o h m a t b o h h a t
IOOCBOHORD 80M0RD IDOCDSPMAS OSPHAS IDOCPALHAT PALHAT io o c s t t m a t s t t h a t
L IK P
SDPACK
L IK P
SO PICK
L IK P
SHP_OBDLV_CONFIRH_DECENTRAL
L IK P
SHP_OBDLV_SPLIT_DECENTRAL
F ig u re
6.13
O b je c ts a n d T h e ir ID ocs
T h e f u n c t i o n s f o r a c ti v a ti n g o b j e c t c h a n n e l s e r i a l i z a t i o n a r e o n l y a v a il
A c tiv a tin g
a b le in ALE C u s t o m i z i n g . S u r p r is in g ly , t h e y a r e l o c a t e d u n d e r t h e M a s
s e ria liz a tio n
t e r D a t a D i s t r i b u t i o n m e n u o p t i o n e v e n t h o u g h s e r i a l i z a t i o n is w h o l l y in d e p e n d e n t o f th e ty p e o f d ata used a n d has n o th in g to d o w ith th e S h a r e d M a s t e r D a ta t o o l (S M D ). F ig u r e 6 . 1 4 s h o w s a n e x t r a c t f r o m ALE C u s to m i z i n g .
Stiucture ID o c .In te rfa c e /A p p lic a tio n .L in k E n a b lin g (A L E ) t>
B a s ic Settin gs
1
C o m m u n ic a tio n M o d ellin g a n d Im p le m e n tin g B u s in e s s P ro c e s s e s !
G lo b a l O rg an iza tio n al Units
1^
\ X G > M a in ta in D istribu tion M o d el a n d D istrib u te V ie w s 1
C o n fig u re P re d e fin e d A L E B u s in e s s P ro c e s s e s a 1' [ J »
M a s te r D a ta Distribution R e p lic a tio n o f M o d ified D a ta
J f v
S erializatio n fo r S e n d in g a n d R e c e iv in g D a ta Q r
S erializatio n U s in g M e s s a g e Types [_£
D e fin e S erializatio n G ro u p s
[£
M ain tain D istn b u tio n M odel D e fin e In b o u n d P ro c e s s in g
l> B ^
L£
S erializatio n U s in g B u s in e s s O bjects B
F ig u re 6 .14
S e ria liz e d D istribu tion U s in g M e s s a g e Types
( £ » A c tu a te O u tb o u n d B u s in e s s O b lec ts
B
Actw ate Inboun d B u s in e s s O b jec ts
Q
C h e c k C o n s is te n c y S y ste m -W id e
Path to S e ria liz a tio n S ettin g s in A L E C u sto m iz in g
201
|
6 .3
6
|
S e ria liz in g ID o c s
To a c t i v a t e s e r ia li z a t io n , t h e s e r i a l i z a t i o n (lag SFLAG is s e t in t h e s e n d i n g s y s t e m f o r t h e r e c e i v e r (h e re : SALES) a n d t h e b u s i n e s s o b j e c t IDOCBOM MAT, as s h o w n in F ig u re 6 . 1 5 .
C h a n g e V ie w "A L E : O b je c t ty p e s e ria liz a tio n : O u tb o u n d c o n tro l' N e w E n trie s
f ; (jJ . c f
A L E : O b jec t type serializatio n
Recewpartn ?ec ’an S A IF S
©
0
O u tb o u n d control
O b) Type
Ser
DOCBOHHAT
LS
flag 0
H EJ 0
F ig u r e 6 .1 5
S e ttin g s in S e n d in g S ystem
T h e s e t t i n g s m u s t b e c o n f i g u r e d in t h e s a m e w a y in t h e r e c e i v i n g s y s t e m . I n o u r e x a m p l e , t h e s e n d e r is T90CINT090 (s e e F ig u re 6 .1 6 ) .
C h a n g e V ie w "A L E : O b je c t ty p e s e ria liz a tio n : In b o u n d c o n tr o l" : N e w E n tr .e s
A L E : O b je c t type s e r ia liz a tio n : In b o u n d control S e n d p a n no
Pan v
T90 C L N T 0 9 0
LS
Part
O b ) Type
Ser l a g
IDOCBONMAT
0
[M E F I
F ig u r e 6 .1 6
S e ttin g s in R e c e iv in g S ystem
Checking the
A f t e r y o u ' v e f i n i s h e d c o n f i g u r i n g t h e s e t t i n g s in b o t h s y s t e m s , y o u
settings
c a n p e r f o r m a c o n s i s t e n c y c h e c k in T r a n s a c t i o n B D 1 0 1 . H e re , y o u s e e w h e t h e r s e r i a l i z a t i o n u s i n g o b j e c t t y p e s is a c t i v a t e d . T h e s t a t u s traffic lig h ts in t h e Local S ta t u s a n d P a r t n e r S ta t u s fie ld s a ls o i n d i c a t e w h e t h e r C u s t o m i z i n g is o k a y a n d c o n s i s t e n t . T h e tra ffic l i g h t in t h e D i f f e r e n c e fie ld t h e n s h o w s w h e t h e r s o m e ID o c s q u e u e - j u m p e d . T h i s is t h e c a s e in o u r e x a m p l e in F ig u r e 6 . 1 7 . I f all o f t h e I D o c s i n b o t h s y s t e m s h a v e b e e n p o s t e d in t h e c o r r e c t s e q u e n c e , t h e v a l u e s in t h e C o u n t e r field s h o u l d a ls o c o r r e s p o n d h e r e . You c a n u s e T r a n s a c t i o n B D 1 0 0 to s p e c if ic a l l y v i e w o n l y t h o s e ID ocs th a t w ill b e p ro c e s s e d u s in g o b je c t c h a n n e l s eria liz atio n . F ig u re 6 .1 8 s h o w s t h e t h r e e ID o c s t h a t h a v e a l r e a d y b e e n d i s p a t c h e d in o u r p a r t i c u la r ex a m p le .
202
S e ria liz a tio n U sin g B u sin ess O b je c ts
S e ria liz a tio n U sin g O b je c t T y p e s : C o n s is te n c y C h e c k
&V
Q
7
3
b lO o cs
Outbound and Inbound Serialization in This System
D ire c tio n
' Partner
In b o u n d
SALES
P
O u tb o u n d
F ig u re
6 .17
P
O D ie c t Type
L o c a l S ta tu s
P a r tn e r S ta tu s
LS
IO O C B O M MAT
cco
cco
LS
IOOCBOMMAT
cco
cco
C hannel
D iffe re n c e
Loc C
! P a rtn
M essages
cco 6278
cco
C h e c k F u n c tio n fo r O b je c t C h a n n e l S eria liza tio n
S e ria liz a tio n U sin g O b je c t T y p e s : D isp la y S e ria liz e d ID o cs
a 9
© 3
W&3I2*
ID o c s S e ria liz e d U s in g O b je c t T y p e s : iD o c n u m b e r | O b je c t Type
[C N
jC o u n te r jP
7 6 8 7 8 5 1IO O C B O M M A T
62781
768786 I O O C B O M M A T
6278
2 LS
7 6 8 7 8 7 IO O C B O M M A T
6278
3 LS
F ig u re
6.18
P a rtn no
[F
|P
I P a rtn n o .
R
| D S. ;M e s s a g e Type
1 lS |T 9 0 C L N T 0 9 0 I
|l|o 3 |B O M M A T
SA1.ES
L S T 9 0 C 1 .N T 0 5 0
1 0 3 BOMM.AT
S ALE S
L S tT 9 0C L N T 090
1 03 BOMMAT
1 L S jSALES~
ID o c s w i t h O b j e c t C h a n n e l S eria liza tio n
I n t h e r e c e i v i n g s y s t e m , i n d i v i d u a l p r o c e s s i n g o f s p e c if ic I D o c s e n s u r e s
W a it sta tu s
t h a t o u r s e c o n d I D o c is p o s t e d first. T h e s y s t e m " n o t i c e s " t h a t i t ’s n o t y e t
fo r ID o cs th a t q u e u e -ju m p
its o w n n u m b e r ’s t u r n in t h e r e l e v a n t c h a n n e l , s o i t c h a n g e s its s t a t u s to w a i t i n g s t a t u s 6 6 ( s e e F ig u r e 6 .1 9 ) . I f t h e f ir s t I D o c a r r i v e s a n d is s u c c e s s fu lly p r o c e s s e d , i t c a n b e r e s c h e d u l e d a n d p r o c e s s e d a g a in .
Z
0
S a le s sys tem (client 810 )
9
^
[ £ ID ocs in outbound processing
1
^
| 0 ID oc in inbound processing
I-
□
D a ta p a s s e d to port OK
03
1
I-
0
Application docum ent not posted
51
1
1-
0
iD oc with en o rs added
56
1
^
A
ID oc is w aitin g for p redecessor lOoc (serialization)
66
^
l b BO M KA T ^
1 1
( B 0 1 ( 1 5 9 ) : ID oc m u s t b e pro ce ssed later. S . ID oc no & required
1
G D I D o c m u s t b e p r o c e s s e d la t e r . 0 0 0 0 0 2 . I D o c n o 0 0 0 0 0 3 r e q u ir e d
F ig u re
6.19
1
W a i t S tatus fo r ID o c T h a t Q u e u e - J u m p e d
O n c e a g a in , t h e SERIAL field in t h e ID o c c o n t r o l r e c o r d d e t e r m i n e s th e
" S e r i a l " f i e l d in
s e q u e n c e h e r e . H o w e v e r , t h i s field d o e s n ’t c o n t a i n a t i m e s t a m p , w h i c h
c o n t r o l record
is u s u a l l y t h e c a s e , b u t r a t h e r a c o m b i n a t i o n o f t h e o b j e c t n a m e , o b j e c t
203
6 .3
6
|
S e ria liz in g ID o c s
c h a n n e l n u m b e r ( o f t h e c h a n n e l u s e d f o r t h e tr a n s f e r ) , a n d t h e t r a n s f e r n u m b e r . T h i s is t h e v a l u e in t h e C o u n t e r field, w h i c h y o u c a n a ls o s e e in t h e I D o c d i s p l a y s c r e e n in T r a n s a c t i o n B D 1 0 0 . F ig u r e 6 . 2 0 s h o w s t h e c o n t r o l r e c o r d o f t h e s a m p l e ID o c t h a t q u e u e - j u m p e d a n d h a s t h e c o u n t e r ''3." T h e ID o c s w i t h t h e c o u n t e r " I ” a n d " 2 " h a v e n ' t a r r i v e d y e t , so o u r ID o c h a s b e e n a s s i g n e d s t a t u s
66, w h i c h y o u c a n a ls o s e e h e r e .
D isplay C o n trol Record lOoc Oisplay Doc number
70014
Direction
2
Status
66
T v n in fn
4*
Inbound
02 0
ID oc is waiting for predecessor IDoc (serialization)
P a rtn e r
A rtro e sin Jn
O M aU t
info about I D o c / 700
SAP R e lea se Output Mode
[D 0C B 0H IU T6278000003
Serialization
Tim e of c r e a t i o n / Date
18 0 8 2008
Tim e
15 11 22
Last database update / 18 0 8 200 8
Date
[1 5 :1 1 :2 2
Tim e
F ig u re
Data channel registry
6 .20
C o n t r o l R e c o r d f o r a S e r ia liz e d I D o c
To g e t a n o v e r v i e w o f t h e s t a t u s e s o f t h e s e r ia li z e d ID o c s , y o u c a n v i e w t ji e
^ £ 4 ch a n n e l reg istry ( i n o u t b o u n d p r o c e s s i n g , y o u d o t h i s in T r a n s
a c t i o n B D 10 2 ). T h e r e s u l t is d i s p l a y e d in F ig u r e
6 . 2 1 . T h r e e ID o c s h a v e
a lre a d y b e e n sen t.
C hange V iew "A L E : O u tb o u n d C h a nn e l R e g is try ": O vervie w y
N e w E n tn e s
l . O
l S
B
U
H
A L E O utbound C h annel Registry ObiectType ID0C60HHAT
F ig u re 6 .2 1
204
(C h a n
|P art ty
R e c e iv p a rtn
LS
SALES
R e c p a rt
Date
T im e
IcounteH
0 8 /1 8 /2 0 0 8
H 5:11:22
|3
V ie w o f R eg istry in S e n d in g System
S e ria liz a tio n U sin g q R F C
|
6 .4
You c a n u s e T r a n s a c t i o n B D 1 0 3 to v i e w t h e s a m e p r o c e s s in t h e re c e iv in g s y s t e m a n d s e e t h a t , s o far, j u s t o n e ID o c h a s a r r i v e d (s e e F ig u r e 6 .2 2 ) . I t 's e x a c t l y t h i s s i t u a t i o n t h a t p r o d u c e s t h i s s t a n d b y p o s i t i o n in ID o c p r o c e s s i n g , in o t h e r w o r d s , d i f f e r e n t v a l u e s i n t h e C o u n t e r field in th e receiv ing a n d s e n d in g sy stem s.
C hange V ie w "A L E : In b o u n d C h a nn e l R e g is try ": O vervie w
HIMM
f f i l N e w Entries ALE: inbound C h a n n e l Registry 0 b ,e d T y p e
jC han n
ID0CB0HHAI [6278
F ig u re
6 .4
6.22
Part ty
S e n d part no. S e n d P a
LS
T90CLNTO9O
(D ate 1 8 .0 8 200 8
T im e
Counter]
1 4 :5 0 :4 6
1
V i e w o f R e g i s t r y i n R e c e i v i n g S y s te m
S e ria liz a tio n U sin g q R F C
S e r i a l i z a ti o n u s i n g q R F C (Q u e u ed RFC), in w h i c h t h e s e q u e n c e o f t h e ID o c s is a ls o r e t a i n e d , h a s o n l y b e e n a v a i l a b l e s i n c e SA P N e t W e a v e r 6 . 4 0 . I n s t e a d o f t h e f u n c t i o n m o d u l e ID0C_INB0UND_ASYNCHR0N0US, th e f u n c t i o n m o d u l e ID0C_INB0UND_IN_QUEUE is c a ll e d in t h e t a r g e t s y s t e m . T h i s t y p e o f s e r i a l i z a t i o n is p o s s i b l e f o r all ID o c s . I n SAP N e t W e a v e r PI, it c a n a ls o b e u s e d to i m p l e m e n t t h e Q u a lity o f Service E O I O (E q u a lly O nce In O rder) in t h e ID o c a d a p te r . You c o n f i g u r e s e r i a l i z a t i o n u s i n g qR FC in t h e o u t b o u n d p a r t n e r p ro file
S e ria liz a tio n u s in g
b y s e t t i n g t h e Q u e u e P r o c e s s i n g flag o n t h e O u t b o u n d O p t i o n s t a b p a g e
qRFC
( s e e F ig u r e 6 .2 3 ) . T h is o p e n s a n e w fie ld i n w h i c h y o u s p e c if y h o w y o u w a n t t h e q u e u e n a m e to b e c r e a t e d u s i n g r u le s t h a t r e f e r e n c e a f u n c ti o n m o d u l e . F ig u r e 6 . 2 3 s h o w s t h r e e o f t h e r u l e s d e l i v e r e d b y SA P ( b o t t o m rig h t). T h e r u l e I DOC_QUEUE_SUS_MM r e q u i r e s t h e u s e o f a n ID o c o f t h e t y p e ORDERS o r ORDRSP. T h e f u n c t i o n m o d u l e s f o r c r e a t i n g q u e u e n a m e s c a n b e a s s i g n e d a ru le
R u le s f o r q u e u e
n a m e i n T r a n s a c t i o n W E 8 5 . F ig u r e 6 . 2 4 s h o w s t h i s a s s i g n m e n t f o r t h e
names
t h r e e r u le s s h o w n in F ig u r e 6 . 2 3 : CONSTANT:EDIQUEUE, FIRST_16_0F_MESTYP, a n d IDOC_QUEUE_SUS_MM.
205
6
|
S e ria liz in g ID o c s
P artn e r p ro file s: O utbound param eters Wi SALES
Partner NO.___________
S a le s system (d ie m 810 )
_[18]
PartnType
Logical system
Partner Role
g
M essag e Type
"A T M S
M atenal master
M essage code M essage fijnction
□ Test
M essag e Control
Receiver port
0
Transacftonai RFC
r
P a ck Size
P o stprocessing Perm itted Agent
R u le N a m e
Queue Processing Output Mode
Tele
LS Sales
F .L « & U .6 J !0 L S IV P ■ O r R ule N a m e ( 4 )
3 Entries found
® Transfer IDoc Im m ed. C Collect IDocs
nnO C 3EIEEEl|lH
IDoc Type /
Rule
HATHAS03
Basic tfpe
[CO NSTAN T EDIO UEUE
Extension
FIRST_16_O F_M ESTVP
vie w
IOO C_O UEUE_SUS_M M 0
C a n c e l P r o c e s s i n g A fte r S y n ta x E rro r
F ig u re
6.23
P a r t n e r P r o f i l e w i t h Q u e u e P r o c e s s in g
Change V iew "ID oc: Rules fo r C reating Queue Names fo r qRFC IDoc": N e w Entries J l Q Q r fy H jl
Q
IDoc Ru les for Creating Q u eu e N a m e s for qRFC lOoc _ R ule N am e_________________________ [Function Module______________________ ( 3 ]lDOC_QUEUE_CONST_EDI QUEUE
B |
: IRST_16_0F_HESTYP
M
T f t lM
!00C_0UEUE_NAHE_HESTYP
B
I DOC_QUEUE_SUS_HH
!00C_QUEUE_SUSJ1H
F ig u re
6 .2 4
g E j
G e n e ra tin g Q u e u e N a m es
I f y o u 'r e w o rk in g w ith y o u r o w n fu n c tio n m o d u le s, th e se re q u ire a su it a b le m o d u l e s i g n a t u r e (s e e F ig u re 6 .2 5 ) . Q ue ue m o n ito r
F ig u re 6 . 2 6 s h o w s o u r e x a m p l e (a t t h e v e r y b o t t o m ) : T h e q u e u e h a s b e e n g i v e n a fix e d n a m e (SAP_ALE_ED I QUEUE), t h e RFC d e s t i n a t i o n a d d r e s s e d b y t h i s q u e u e is c a lle d SALES, a n d t h e t r a n s a c t i o n t h a t y o u c a n u s e to m o n i t o r t h e o u t b o u n d q u e u e is c a lle d W E O U T Q U E U E .
206
S e ria liz a tio n U sin g q R F C
FU NC TIO N
6 .4
IDQC_QUEUE_NAHE_HESTYP
• • lo k a le S c h n it t s t e lle : IMPORTING REFERENCE(CONTROL) L IK E E D ID C STRUCTURE EXPORTING VALUE(NAM E) TYPE C H A R I6 TABLES DATA STRUCTURE ED ID 4
F ig u re
|
6 .25
EOIOC
S ig n a tu re o f a F u n c tio n M o d u l e f o r C re a tin g Q u e u e s
qRFC M o n ito r (O u tb o u n d Q ueue) N u m b e r o f L U W Entries
Q u eu e
In fo ra a tio n e n 441
N u n b e r o f E n t r i e s D is p la y e d N u n b e r o f Q ueues D is p la y e d
10
1
=
■
800
FB 4C LN T800
am
DTZ_800
8 0 0 R3AD L E D E L IV 8UU R3AD H A T E R IA Z S M 0 0 8 0 0 R3AD HATERIAZSM 101
D TZ_800 t3 6 td c 0 0
T 3 6 50
1
t3 6 td c 0 0
T 3 6 50
1
800
t3 6 td c 0 0 _ T 3 6 _ 5 0
R3AD
MATER1AZSN102
496 1
794
1
8 0 0 R3A D .SA LES D 01001
D TZ_800
24
8 0 0 R 3AD_SALESD 01002
D TZ_800
24
8 0 0 R 3AD_SALESD 01033
D TZ_800
48
8 0 0 R3AD SA LESD01174
D TZ 800 D TZ 800
48 24
8UU R3AD SA LESD01460
DTZ_800 D TZ 800
8 0 0 SAP_ALE_EDIQUEUE
SALES
8 0 0 R3AD SA LES D 01175 8 0 0 R3AD_SALESD 01300
F ig u re
6 .26
48 24 3
O u t b o u n d SALES Q u e u e
So, i f y o u h a v e c r e a t e d t h e q u e u e , a n d , f o r e x a m p l e , a n ID o c in t h e
S to p p e d q u e u e in
re ceiv in g s y s te m n o w e n c o u n te r s a n e rro r, s u b s e q u e n t ID ocs ca n no
sta tu s m o n ito r
l o n g e r b e p o s t e d a n d e a c h o b t a i n s t a t u s 7 5 : ID oc is in in b o u n d q u e u e (see F ig u r e 6 .2 7 ).
^
11
[ 2 'D oc in inboun d processing !■
O A p plicatio n d o c u m e n t not posted
51
2
1'
O
56
1
I1
£ > ID oc is w a itin g (or p re d e c e s s o r lOoc (serialization)
66
1
I1
□
A p plicatio n d o c u m e n t posted
53
6
A
ID o c is in in b o u n d queue
75
1
^
ID oc w ith errors added
^
F ig u re 6 .2 7
MATMAS
1
CD E A (0 7 5 ) : ID oc received via q R F C
1
ID o c s in Target System
207
6
|
S e ria liz in g ID o c s
T h e e r r o r s c e n a r i o is a ls o s h o w n in t h e i n b o u n d q u e u e , w h i c h is m o n i t o r e d u s i n g T r a n s a c t i o n W E I N B Q U E U E (s e e F ig u re 6 .2 8 ) .
ID o c In b o u n d Q ue u e
in b o u n d ID o c Q u e u e D is p la y
•7 U
(D esc rip tio n
ID o c In b o u n d Q u e u e
^
CD T90C LN T090
Sender
^
Q u eu e
□
SA P_A LE_M A TM A S
v f e e0 0.0 0 0 0 0 0 0 0 0 7 0 0 1 8 1 MATMAS
ID o c N o . IM e s s a g e Type
S ta tu s 51 M e s s a g e s h a v e b e e n is s u e d
F ig u re
C u rre n t S ta tu s w ith C u rre n t M e s s a g e
f a 0 0 0 0 0 0 0 0 0 0 0 7 0 0 1 9 1 MATMAS
ID oc N o . IM e s s a g e Type
f a 0 0 0 0 0 0 0 0 0 0 0 7 0 0 2 0 1 MATMAS
ID oc N o . IM e s s a g e Type
f a 0 0 0 0 0 0 0 0 0 0 0 7 0 0 2 1 | MATMAS
ID oc N o . IM e s s a g e Type
6.28
D is p la y in g ID o c s in a Q u e u e
E r r o r h a n d l i n g in
You c a n p o s t p r o c e s s t h e I D o c h e r e , i d e a l l y in s u c h a w a y t h a t i t c a n be
an in b o u n d queue
p o s t e d su c c e s s fu lly . H o w e v e r , y o u c a n a ls o u s e t h e " tr a s h c a n " ic o n to flag t h e ID o c b l o c k i n g t h e q u e u e f o r d e l e t i o n ( s t a t u s 6 8 ) (s e e F ig u r e 6 .2 9 ).
ID o c In b o u n d Q u e u e : fa B O
a
in b o u n d ID oc Q u e u e D isp lay ~
| D e scrip tion
C H ID oc In b o u n d Q u e u e Sender Q u e u e _______________________________ ID o c N o . IM e s s a g e Type S1atus:51 M e s s a g e s h a v e b e e n is s u e d
C u rre n t S ta tu s w ith C u rre n t M e s s a g e
(Q 0 0 0 0 0 0 0 0 0 0 0 7 0 0 1 9 | MATMAS
ID o c N o . IM e s s a g e Type
f a 0 0 0 0 0 0 0 0 0 0 0 7 0 0 2 0 | MATMAS
ID o c N o . IM e s s a g e Type
f a 0 0 0 0 0 0 0 0 0 0 0 7 0 0 2 1 I MATMAS
ID o c N o . IM e s s a g e Type
0
D o y o u w a n t to give ID o c '0 0 0 0 0 0 0 0 0 0 0 7 0 0 1 8 ' an e rro r statu s?
Ye s
F ig u re 6 .2 9
208
No
D e le tin g ID o c s from a Q u e u e
JJL
C ancel
S u m m a ry
A f t e r y o u ’v e p r o c e s s e d o r r e m o v e d t h e I D o c t h a t c o n t a i n s e r r o r s (see F ig u r e 6 .3 0 ) , y o u c a n r e s t a r t t h e q u e u e . All o t h e r ID o c s a r e n o w p o s t e d (F ig u re 6 .3 1 ).
ID o c In b o u n d Q ue u e tn
fa O 3
-
In b o u n d ID o c Q u e u e D isp lay ^
U
ID oc In b o u n d Q u e u e
^
(_J T 9 0 C L N T 0 9 0 ^7 U ^
O escnption
Sender
SAP_AJ_E_MATMAS
Q ueue
CO > i ID o c w « s e t
7 6 8 7 6 S jp 3
T 9 0 C IN T 0 9 0
LS
W M AZ
768 7 6 6 *5 1
SA LES
.8
H A tH * S
P
M o « *9 < » T y D . K A T IW S
I DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 6 1 DOC 0 0 0 0 0 0 0 0 0 0 7 6 8 7 6 2
0 0 (0 0 0 0 0 0 0 7 6 3 7 6 5 DOC 000
N e w S '.t y ii • » ID o c « M New b O O O M N e w SSIO Jt X * ID o c - « n e w
0001X 10765766 I . ' - S M
IS
D O C 0 0 ( 0 3 0 0 0 0 0 7 6 3 7 6 ' 1 ie w
T9C C LN T090
LS
D O C 0 0 ( J D 0 0 C < l 0 7 e 3 7 6 8 t . ? ~ S '.W j i
768771
12
T9C C L I « " J 9 0
7 6 8 77?*03
T90C LN T090
• la ;;* ,
J
a
.m H I
iD c c w j s i d i? C < w a s 5 f 1
LS
S - . r t j t ' * lD o < W M i r l
✓
*
V A T IA »S
D O C 0 0 0 0 0 0 0 0 0 0 7 6 8 7 7 ? N « w S J * j & S * ID o c w a s s * 1
✓
LS
V A 'W -i. H STH 4S
1 "VTV
ln o / rW . fUlfWlf W V W W V I v v r
f^
I’T "
i£. '*»?
> 3 VI
j
‘w
ID o c w w » * 1
✓
K )0 < w a * S (4
✓
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 7 6 N « w S U fc t DOC 0 0 0 0 0 0 0 0 0 0 7 6 8 7 7 3
New New
768773 II?
T 9 0 C U JT 0 9 0
LS
12
T 9 C C L IJT D 9 0
LS
768 7 8 1 *0 3
I9 0 C L N T 0 9 0
LS
M ATMAS
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 8 1 N * * 8 tlfe S fe (IO 0 < W M M 4
7 6 8 78?*03
T90C LN T090
s
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 7 5
SU U S
S a f e s S # ID o c w w
✓
M ATMAS
D O C 0 0 0 0 0 0 0 0 0 0 7 6 8 7 8 2 N iw S t tfe S IM D O C W M M I
T 9 0 C IM T 3 9 0
L S ______________
M ATMAS
DOC 0 0 (0 0 0 0 0 0 0 7 6 3 7 8 3
768784 03
T90C LN T090
LS
M »TM »S
DOC 0 0 0 0 0 00000763784
a
N e w S a f e s S * lD o < w a -. New S U fe S D tO K ttM N e w S ' . r t j i * » r ID o c w i t
li
1 9 C C IH T 3 9 0
LS
M ATMAS
DOC 0 0 (0 0 0 0 0 0 0 7 6 3 7 8 8
7 6 8 7 8 9 '0 3
T90C LM T090
LS
M ATMAS
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 8 9 N *w S !« J 5
> 6 8 .‘“ J
DOC 0 0 0 0 0 0 0 0 0 0 7 6 8 7 9 0
New New
I j
T 9 C C L N ?i9 0
LS
7 6 8 7 9 1 '0 3
T90C L M TQ 90
LS
M ATMAS
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 9 1
7 6 9 7 1* ? O
T 9 C < L K -T 3 9 0
LS
V .T U .,:
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 9 2 N ew
F ig u re 7.18
✓ ✓
DOC 0 0 (0 0 0 0 0 0 0 7 6 8 7 7 1
7697?$
* r ,3 r ? i
o '
w ~ y ~
W IK A 5
T•V «("■" W U 1 «»V T 90C LM T090
C . f ijt . * M ‘V
✓ ✓
IU D K IIM
T 9C C L N "J9 0
*7 6V V 0 71 7r 1■ v
M
*■ » i d o < - w
7 6 8 7 6 8 C3
New
5 *1
*x
✓ ✓
M sH
✓
>D 0< " « i t - t
✓
S a f e s W i 0 0 ( - S I 1M
tel 8 l a f e s t o * ID o c w i i i r t
S a fe s
✓
ID o c w a s
✓ ✓ o '
R esu lts L ist A fter Status V a lu e C o n v e rsio n
233
R e s u lts lis t
|
7 .5
7
|
A d m in istra tio n
In T r a n s a c t i o n B D 8 7 , i f t h e b a s i c v i e w is o p e n , y o u c a n s e e t h e g e n e r i c e r r o r t e x t w i t h p l a c e h o l d e r s (s e e F ig u r e 7 .1 9 ).
^
45
[ 2 IDoc in inbound processing I 1 O Application docum ent not posted
51
6
!■ 0 : IDOC Witn errors added
56
3
1
□ Application docum ent posted
53
7
^
□
E r ro r-n o further processing
68
29
^
53 MATMAS ^
29
U ] ZSM(OOO) IDoc Status w a s changed from S to S
29
( D IDoc Slatus w a s changed from M A SE LSA to 68
F ig u re
C o n v e rte d ID o c
7 19
29
M e s s a g e T e x t i n t h e B a s ic L is t
I n t h e i n d i v i d u a l v i e w o f a n ID o c , y o u c a n s e e e x a c t l y w h o m a d e t h e c o n v e r s i o n (s e c F ig u r e 7 .2 0 ) .
IDoc Selection I .......... ■ ■■■■■ IDoc num ber | Stat
M e s s a g e T y p e l StatusText
Partner No
768747
68
MATMAS
IDoc Status w a s changed from MAJSELSA to 68
ZSM2
BasicType________ | Extension MATMAS33
768752
68
MATMAS
IDoc Status w a s changed from MAJSELSA to 68
ZSM2
j MATMAS03
768762
68
MATMAS
IDoc status w a s changed from MAJSELSA to 68
SALES
MATMAS05
ZSMMAPA
768763
68
MATMAS
IDoc Slatus w as changed from MAiSELSAIo 68
SALES
MATMAS05
ZSMMAPA
768761
F ig u re
M e s s a g e c la s s
720
M e s s a g e T ext in t h e ID o c I n d iv id u a l V ie w
F o r t h e e x a m p l e p r o g r a m u s e d h e r e , a m e s s a g e c la s s w i t h t h e m o s t i m p o r t a n t m e s s a g e s h a s t o b e s e t u p . F ig u r e 7 .2 1 s h o w s t h e t e x t u s e d for this p u rp o s e .
M essage M a in tenance: C hange M essages *2 ? #
Selected entnes
M essag e c la s s
ZSn
^
aaa g
3
Long Text
N ext free nu m b e r
N e iiu s e d
<
Activ
Attributes
u
a
u
*
30 n
F l M e s s a g e M essag e short text |
|0 0 0
F ig u re
| l Doc
7.21
|Seif-explanaty 0
M e s s a g e C la ss o f t h e S a m p l e P r o g r a m
L isting 7.1 c o n t a i n s t h e b a s ic c o d e r e q u i r e d f o r t h e e x a m p l e s d e s c r i b e d in t h i s c h a p te r . A g a in , n o t e t h a t o n l y t h e c o d e t h a t is r e l e v a n t t o ID o c s is
234
Status C o n v e rs io n
|
g iv e n h e r e , a n d i h e c o d e s h o u l d n ’t b e u s e d in u n m o d i f i e d f o r m ; a u t h o r i z a ti o n c h e c k s , f o r e x a m p l e , s h o u l d b e a d d e d . A lso, t h e p r o g r a m c o n t a i n s te x t e l e m e n t s t h a t y o u ' l l h a v e to a d d , s u c h as
te x t-b O l
f o r o n e o f t h e b locks
o n t h e s e l e c t io n s c r e e n . W h e r e t h e s e d o n ’t a p p e a r o n t h e s e l e c t io n s creen , t h e y a r e i n d i c a t e d in t h e c o d e in e a c h c a se — f o r e x a m p l e , not
be
‘ ID o c c o u ld
( 0 0 1 ) - a n d s o n o fu r th e r scre en sh o ts are used here.
lo c k e d *
*&.............................................................................................................................................* *8
R e p o rt
Z S M ID O C S T A T U S
* & ..............................................................................................................................................................................................* REPORT
Z S M ID O C S T A T U S
IN C LU D E
< ic o n >
TABLES:
e d id c
.
. .
TABLES: e d id s .
tb d 0 5
.
DA T A
w a _ tb d 5 2
TYPE
tb d 5 2
.
DA T A
wa_edp21
TYPE
edp21
.
DA T A
p a rtn e r
TYPE
e d id c -s n d p rn .
n r l i nes
TYPE
s y -ta b ix
D a ta
a lv
TYPE
REF
TO
c l_ s a lv _ . t a b le
DA T A
1r_ s e le c tio n s
TYPE
REF
TO
c l_ s a lv _ . s e le c t io n s
DA T A
i_ S e le c te d _ ro w s
ty p e
s a lv _ t_ ro w
DA T A
w a _ ro w
ty p e
lin e
D a ta
exc
TYPE
REF
DA T A
msg
TYPE
s tr in g
Types:
B E G IN
OF
o f TO
. . .
.
s a lv _ t_ .ro w c x _ ro o t
.
,
. Type d e fin itio n s
r_ e d id c ,
docnum
L IK E
e d id c -d o c n u m .
s ta tu s
L IK E
e d id c -s ta tu s .
sn d p rn
L IK E
e d id c -s n d p rn .
sn d p rt
L IK E
e d id c -s n d p rt.
s n d p fc
L IK E
e d id c -s n d p fc .
m e s ty p
L IK E
e d id c -m e s ty p .
m escod
L IK E
e d id c -m e s c o d .
m e s fc t
L IK E
e d id c -m e s fc t.
te s t
L IK E
e d id c -te s t.
s ta m id
L IK E
e d id s -s ta m id .
s ta m n o
L IK E
e d id s -s ta m n o ,
s ta tx t
L IK E
e d id s -s ta tx t.
m sg(80) , i con(4 ). b o x(1 ). END OF
r_ e d i dc
.
235
7 .5
7
|
A d m in istra tio n
DATA:
i_ e d id c
ty p e
ta b le
d a ta :
w a _ e d id c
ty p e
r_ e d id c
DATA:
id o c _ s ta tu s
DATA:
c _ e v e n t_ o b je c t_ ty p e _ id o c a p p l
L IK E
.
.
VALUE
O CCURS
0
W IT H
HEADER
L IN E
.
L IK E
’ ID O C A P P L '
.
c _ e v e n t_ e rr_ p ro c e s s _ c o m p le te d L IK E
CONSTANTS: VALUE
r_ e d id c
b d id o c s ta t
s w e ty p e c o u -o b jty p e DATA:
o f
s w e ty p e c o u -e v e n t
VALUE
' ERRORPROCESSCOMPLETD’
c _ w f_ re s u lt_ d e le te _ id o c
L IK E
b d w f_ p a ra m -re s u lt
L IK E
b d w f_ p a ra m -re s u lt
.
•9 9 9 9 8 ’ . c _ w f_ re s u lt_ w i_ c o m p le te VALUE
D a ta :
•9 9 9 9 7 ’
g _ re p id
.
L IK E
s y -re p id ,
g_save( 1)
TYPE
c
g _ v a ria n t
L IK E
d is v a ria n t
VALUE
* A \ .
DATA: $ id o c _ g e s (6 )
TYPE n .
$ id o c _ o k ( 6 )
* S e le c tio n screen stru ctu re
TYPE n .
$ id o c _ fe h le r (
6 ) TYPE
S e le c t
to
ID o c s
S E L E C T IO N -S C R E E N S E L E C T -O P T IO N S :
S E L E C T -O P T IO N S :
.
m o d ifie d
B E G IN
OF
docnum
S E L E C T IO N -S C R E E N
d a tu m
be
n
S K IP
w ith
p re -s e le c tio n
0 1 W IT H
BLOCK
FRAME
FOR e d i d c - d o c n u m 1
T IT L E
te x t-b O l
.
.
cre d a t
FOR e d i d c - c r e d a t
DEFAULT
c re tim
FOR e d i d c - c r e t i m
DEFAULT
s y -d a tu m
TO
000000’
TO
sy-
.
S E L E C T -O P T IO N S :
’
’ 235959' S E L E C T -O P T IO N S :
m e s t y p FOR
e d id c -m e s ty p .
S E L E C T -O P T IO N S :
m e s c o d FOR
e d id c -m e s c o d .
S E L E C T -O P T IO N S :
m e s f c t FOR
e d id c -m e s fc t .
S E L E C T -O P T IO N S :
d i r e c t FOR
e d id c d ire c t .
S E L E C T -O P T IO N S :
s n d p o r FOR
tb d 0 5 - s n d s y s te m
S E L E C T -O P T IO N S :
s n d p r t FOR e d i d c - s n d p r t
S E L E C T -O P T IO N S :
s n d p r n FOR
S E L E C T -O P T IO N S :
s n d p f c FOR e d i d c - s n d p f c
S E L E C T -O P T IO N S :
r c v p r t FOR
e d id c -rc v p rt .
S E L E C T -O P T IO N S :
r c v p r n FOR
e d id c -rc v p rn .
S E L E C T -O P T IO N S :
r c v p f c FOR
e d id c -rc v p fc .
S E L E C T -O P T IO N S :
s t a t u s FOR
e d i d c - s t a t u s DEFAULT
S E L E C T IO N -S C R E E N
END O F
S E L E C T IO N -S C R E E N
B E G IN
BLOCK OF
01
BLOCK
s _ s ta m id
FOR e d i d s - s t a m i d ,
s _ s ta m n o
FOR
e d id s -s ta m n o
.
.
.
e d id c -s n d p rn .
S E L E C T -O P T IO N S :
236
.
.
.
’
68’
.
. 02
W IT H
FRAME
T IT L E
te x t-b 0 2
.
Status C o n v e rsio n
S E L E C T I O N - S C RE E N END S E L E C T IO N -S C R E E N PARAMETERS:
S K IP
n e w s ta t
S T A R T -O F -S E L E C T IO N SELECT:
OF 1
02
.
.
L IK E
e d id c -s ta tu s
-68*
DEFAULT
.
.
docnum
s ta tu s
m e s fc t
te s t
IN T O
BLOCK
|
s n d p rn
c o rre s p o n d in g
fie ld s
WHERE
FROM e d i d c
s n d p rt
s n d p fc
ta b le
of
m e s ty p
D a ta se le c tio n
m escod
i_ e d id c
docnum
IN
docnum
AND
upddat
IN
c re d a t
AND
u p d tim
IN
c re tim
AND
m e s ty p
IN
m e s ty p
AND
m escod
IN
m escod
AND
m e s fc t
IN
m e s fc t
AND
sndpor
IN
sndpor
AND
s n d p rt
IN
sn d p rt
AND
s n d p rn
IN
sn d p rn
AND
s n d p fc
IN
s n d p fc
AND
di re ct
IN
d ir e c t
AND
rcv p rt
IN
d ir e c t
AND
rc v p fc
IN
d ir e c t
AND
rcvp rn
IN
d ir e c t
AND
s ta tu s
IN
s ta tu s
.
PERFORM g e t _ e d i d s E N D -O F -S E L E C T IO N PERFORM
*
Change
a lv
.
.
s ta tu s
* ............................ FORM s t a t u s _ c h a n g e i_ s e le c te d _ r o w s
*
lo o p
a t
rea d
ta b le
. =
L R _ S e l e c t i o n s-> G E T _ S E LE C T E D _ R O W S (
i_ s e le c te d _ r o w s i_ e d id c
ID O C
p ro c e s s in g
CALL
F U N C T IO N
in to
in to
w a _ ro w
w a _ e d id c
C hange sta tu s
)
.
in d e x
w a _ ro w
.
Set lock
* E N O U E U E _E S _E D ID O C E '
E X P O R T IN G m o d e _ e d id c
•E ’
m andt
sy-m a n d t
docnum
w a _ e d id c -d o c n u m
E X C E P T IO N S
1
fo re ig n _ lo c k s y s te m _ fa i1 u re O THERS
=
2
3 .
237
7 .5
7
|
A d m in istra tio n
IF
s y-su b rc
0
CONCATENATE
.
'ID O C '(0 0 3 )
w a _ e d id c -d o c n u m
*ID o c
not
IN T O w a _ e d id c -ic o n ELSE
=
c o u ld
be
w a _ e d id c -m s g ic o n _ fa ilu re
lo c k e d ’
(0 0 1 )
SEPARATED
BY
space
.
.
CLEAR:
id o c _ s ta tu s
REFRESH:
.
id o c _ s ta tu s
MOVE w a _ e d i d c - d o c n u m
TO
id o c _ s ta tu s - d o c n u m
MOVE n e w s t a t
TO
id o c _ s ta tu s -s ta tu s
MOVE
‘S’
TO
id o c _ s ta tu s -m s g ty
.
MOVE
' ZSM’
TO
id o c _ s ta tu s -m s g id
.
MOVE
•0 0 0 ’
TO
id o c _ s ta tu s - m s g n o
.
MOVE
sy-un a m e
TO
id o c _ s ta tu s - m s g v l
.
MOVE n e w s t a t
TO
id o c _ s ta tu s -m s g v 2
.
MOVE
sy-un a m e
TO
id o c _ s ta tu s -u n a m e
.
MOVE
s y - re p id
TO
id o c _ s ta tu s - re p id
.
APPEND CALL
id o c .s ta tu s
F U N C T IO N
.
‘ ID O C _ S T A T U S _ W R IT E _ T O _ D A T A B A S E ’
E X P O R T IN G y ;a _ e d id c -d o c n u m
id o c _ n u m b e r TABLES
id o c _ s ta tu s
i d o c _ s ta tu s E X C E P TIO N S
IF
id o c _ fo r e ig n _ lo c k
1
i d o c _ n o t_ fo u n d
2
i d o c _ s ta tu s _ re c o rd s _ e m p ty
3
id o c _ s ta tu s _ in v a l id
4
d b _ e rro r
5
sy-su b rc
EO 0
CONCATENATE
* I DOC’ < 0 0 3 )
‘ New
s ta tu s
IN T O
w a _ e d id c -m s g
w a _ e d id c -ic o n ELSE
‘ S ta tu s
=
fo r
ID o c *(0 0 2 )
SEPARATED
ic o n _ c h e c k e d
IN T O
* ID O C * < 0 0 3 ) c o n v e rs io n
w a _ e d id c -m s g
w a _ e d id c -ic o n M O D IFY
i_ e d id c
C O N T IN U E
238
se t
w a _ e d id c -d o c n u m
BY
space
.
.
.
CONCATENATE
E N D IF
.
.
.
-
w a _ e d id c -d o c n u m
e rro r*(0 0 4 ) SEPARATED
ic o n _ fa ilu re fro m
w a _ e d id c
BY
space
.
. in d e x
w a _ ro w
.
Status C o n v e rsio n
CASE n e w s ta t WHEN *
IDoc was
*68'
set
* p ro c e ssin g ; * error
|
7 .5
. .
to
a status
th e refore,
that
does not
trig g e r
event
p e rm it
that
fu rther
ends
the
w o rk flo w .
SELECT SINGLE
* FROM e d p 2 1
INTO w a _ e d p 2 1
WHERE s n d p r n = w a _ e d i d c - s n d p r n AND s n d p r t = w a _ e d i d c - s n d p r t AND s n d p f c -
w a _ e d id c-sn d p fc
AND m e s t y p = w a _ e d id c - m e s t y p AND m e s c o d -
w a_ ed id c-m e sco d
AND m e s f c t = w a _ e d i d c - m e s f c t AND t e s t IF
sy-subrc
CONCATENATE
0
-
w a _ e d id c-te st
'ID O C '(003)
w a _ e d id c - docnum
’ f o r ' (005)
'm e s s a g e '(008)
e d id c -sn d p rt 'n o
entry
e d id c -sn d p fc
found
in
INTO w a _ e d id c - m s g ELSE
*
FROM t b d 5 2
WHERE e v c o d e sy-subrc
0
CONCATENATE ’process
-
e d id c-m e sty p
EDP21."(006 ) S E P A R A T E D BY s p a c e
.
INTO w a _ tb d 5 2
w a_edp21-evcode
.
.
' IDOC- (0 0 3 ) w a .e d id c-d o cn u m c o d e '(0 0 9 )
‘ no e n t r y
found
in
INTO w a _ e d id c - m s g ELSE
e d id c -sn d p rn
.
SELECT SINGLE IF
.
.
'fo r'(0 0 5 )
w a_edp21-evcode TBD52.'(0 0 7 )
SEPARATED BY s p a c e
.
.
PERFORM
sta rt_ e v e n t(sa p lb d 2 0 ) w a_tbd52- event_end
USING w a _ e d id c - d o c n u m
S ta rt w o r k flo w s ,
w a_tbd52- i docobj typ
c _ w f_ re s u lt_ d e le te _ id o c
if re q u ire d
.
C O M M I T WORK . PERFORM
sta rt_ e v e n t(sa p lb d 2 0 ) w a_tbd52-event_end
USING w a _ e d id c -d o c n u m
w a _ tb d 5 2 -id o c o b jty p
c _ w f_ re s u lt_ w i_ co m p le te
.
C O M M I T WORK . ENDIF
.
ENDIF
. WHEN
*31'
.
End w o rk flo w
PERFORM e v e n t _ f o r _ t a s k _ e n d _ c r e a t e ( s a p ! b d l 6 ) USING w a _ e d id c-d o c n u m C O M M I T WORK WHEN O T H E R S
.
.
.
239
7
|
A d m in istra tio n
EN D C ASE CALL
.
F U N C T IO N
‘ D E O U E U E _ E S _ E D ID O C E ’
E X P O R T IN G
E N D IF M O D IFY
IF
‘ E’
=
sy-m a n d t
docnum
=
w a _ e d id c -d o c n u m
i_ e d id c
sy-su b rc
fro m
0
in d e x
w a _ ro w
.
.
i_ e d id c
1 TO .
LOOP
i_ e d id c
AT
ADD
1 TO
END LO O P
and
p ro c e s s e d
$ id o c _ e rr o r
.
T R A N S P O R T IN G
NO
WHERE
ic o n _ c h e c k e d
$ id o c _ o k
END LO O P
E N D IF
w a _ e d id c
s e le c te d
S id o c _ o k .
AT
ADD
=
w e re
CLEAR:
ENDFORM
.
.
E n trie s
LOOP
-
.
EN DLO O P
*
m o d e _ e d id c m andt
ic o n
=
F IE L D S .
.
T R A N S P O R T IN G
NO
WHERE
ic o n _ fa ilu re
ic o n
$ id o c _ e rro r
-
F IE L D S .
.
.
. .
* ____________________________________________________________ *
R e trie v e
d a ta
*__________ ____________ . . . . ______________ . . . . . ______________ FORM g e t _ e d i d s DATA:
it_ e d id s
TYPE
w a _ e d id s
L IK E
e d id s
IS
IN IT IA L
.
w a _ e d id c
.
NO T AT
s _ s ta m n o
i_ e d id c
REFRESH G e t s t a tu s va lu e s
SELECT
IF
.
h _ s tr ( 1 5 0 ).
CH E C K LOOP
*
OF
e d id s .
.
A P P E N D IN G
TABLE =
w a _ e d id c -d o c n u m
AND
s ta tu s
=
w a _ e d id c -s ta tu s
AND
s ta m id
AND
s ta m n o
.
.
. i t_ e d id s
BY
it.e d id s
WHERE d o c n u m
0 .
i_ e d id c
C O N T IN U E E N D IF
NE
TABLE
.
FROM e d i d s
s y-su b rc
S O RT
in to
it.e d id s
DELETE
docnum lo g d a t
240
....
D E S C E N D IN G
IN IN
s _ s ta m id
s _ s ta m n o
.
Status C o n v e rsio n
DELETE
ADJACENT
it_ e d id s
D E S C E N D IN G
docnum
.
it_ e d id s
IN T O
w a _ e d id s
=
w a _ e d id s -s ta m id
.
=
w a _ e d id s -s ta m n o
.
h _ s tr
= •& ’
h _ s tr
REPLACE
REPLACE
h _ s tr *& *
C O NDE NSE REPLACE C O NDE NSE
EN D LO O P ENDFORM
h _ s tr
.
w a _ e d id s -s ta p a
2
IN T O
h _ s tr
.
w a _ e d id s -s ta p a 3
IN T O
h _ s tr
.
w a _ e d id s - s ta p a 4
IN T O
h _ s tr
.
.
h _ s tr
.
W IT H
h _ s tr
.
w a _ e d id c -s ta tx t M O D IFY
IN T O
W IT H
*& ’
.
1
.
W IT H
C O NDE NSE
w a _ e d id s -s ta tx t
Set te x ts
.
w a _ e d id s - s t a p a
W IT H
7 .5
.
1
IN D E X
FROM
w a _ e d id c -s ta m n o
C O NDE NSE
*
c o u n tr
w a _ e d id c -s ta m id
REPLACE
*
D E S C E N D IN G
D U P LIC A T E S
C O M PARING READ T A B L E
lo g tim
|
i_ e d id c
=
h _ s tr
fro m
.
w a _ e d id c
.
.
.
_________________________________________________________________ T itle
T itle ALV
ALV
* _______________________________________________________________ FORM
t it le
D ATA
U S IN G
s e ttin g s
s e ttin g s
=
t it le TYPE
TYPE REF
lv c . t it le
TO
c l_ s a lv _ d is p la y _ s e ttin g s
a lv -> g e t_ d is p la y _ s e ttin g s (
s e ttin g s * > s e t_ lis t_ h e a d e r( ENDFORM *
*
.
t it e l
)
)
.
.
.
.
................................................................................................................................... ALV
s e le c tio n
A L V se le c tio n o p tio n s
o p tio n s
* ....................................................................................................................................... FORM *
s e t_ s e le c tio n s
get
th e
S E L E C T IO N S
1 r _ s e le c tio n s *
set
th e
-
U S IN G
p _ a lv
TYPE
REF
o b je c t
p _ a lv -> g e t_ s e le c tio n s (
s e le c tio n
TO c 1_ s a 1 v _ t a b l e
)
.
m ode
1 r _ s e le c tio n s -> s e t_ s e le c tio n _ m o d e ( v a lu e ENDFORM
.
=
if_ s a lv _ c _ s e le c tio n _ m o d e = > c e l "
1
)
.
s e t_ s e le c tio n s
* _______________________________________________________________ *
ALV
o u tp u t
* ________________________________________________________________ FORM a l v TRY
.
G e t A L V reference
.
241
7
|
A d m in istra tio n
c l_ s a lv _ ta b le = > fa c to r y ( IM P O R T IN G r_ s a lv _ ta b le
=
a lv
=
i_ e d id c
C H A N G IN G t_ ta b le CATCH
c x _ s a lv _ m s g
m sg
=
M ESS AG E E N D TR Y
IN T O
e x c -> g e t_ te x t( msg
TYPE
*A ‘
PERFORM
t it le
s e t_ s e le c tio n s
1 v - > d is p 1 a y (
p e rfo rm
L is tin g
7 .6
7.1
U S IN G
)
.
.
.
)
'S e le c te d U S IN G
a lv
ID o c s
1
.
.
.
s ta tu s _ c h a n g e
a1 v - > d is p la y ( ENDFORM
)
.
.
p e rfo rm a
exc
)
.
.
. S ta tu s C o n v e rs io n o f S e le c te d ID ocs
S u m m a ry
T h i s c h a p t e r g a v e y o u a n o v e r v i e w o f a d m i n i s t r a t i v e ta s k s t h a t a re r e l a t e d to ID o c s . D e p e n d i n g o n t h e s t r u c t u r e o f y o u r c o m p a n y , s o m e o f th is w o r k m ig h t b e d o n e b y a sp ec ia l d e p a r tm e n t, b u t y o u s h o u ld k n o w w h i c h w o r k h a s t o b e d o n e . W e 'v e a l s o i n c l u d e d s o m e h i n t s f o r d a ily w o r k a n d e r r o r h a n d lin g .
242
T his c h a p te r p r o v id e s so m e tip s o n u s in g S A P N e tW e a v e r Process In te g r a tio n to s e n d o r receive ID ocs.
8
IDocs in Conjunction with SAP NetW eaver Process Integration
C o m m u n i c a t i o n in SAP N e t W e a v e r P r o c e s s I n t e g r a t i o n (SAP N e t W e a v e r PI) u s i n g ID o c s is i m p l e m e n t e d v i a t h e ID o c a d a p t e r . T h e r e q u i r e m e n t in t h e c r e a t i o n o f t h e ID o c a d a p t e r i n SAP N e t W e a v e r PI w a s t h a t n o d iffe ren c e m a y a rise fo r t h e b a c k e n d s y s te m s i f th e y c o m m u n ic a te w ith S AP N e t W e a v e r PI i n s t e a d o f w i t h a n o t h e r b a c k e n d s y s t e m . F o r ID o c d e v e l o p e r s , t h i s m e a n s t h a t a c tu a l ly n o t h i n g n e e d s t o b e d o n e — n ic e , r i g h t ? B u t it's i m p o r t a n t to k n o w w h a t h a p p e n s in SA P N e t W e a v e r PI so th is ru le c a n b e fo llo w ed . A s y o u ' v e l e a r n e d in t h e c o u r s e o f t h i s b o o k , ID o c s w o r k w i t h logical
B u s in e s s s y s te m s
s y s t e m s o r w i t h p a r t n e r r o l e s . In SAP N e t W e a v e r PI, y o u w o r k w i t h
in SAP N e t W e a v e r
b u sin ess sy ste m s th a t a p p ro x im a te ly hav e th e s a m e m e a n in g . O n e d if
PI
f e r e n c e , h o w e v e r , is t h a t w h i l e p a r t n e r s a n d lo g ic a l s y s t e m s a r e lim i t e d to 1 0 c h a r a c t e r s , b u s i n e s s s y s t e m s c a n h a v e a l e n g t h o f 2 5 6 c h a r a c te r s . I n SAP N e t W e a v e r PI, a c o n v e r s i o n f r o m t h e lo g ic a l s y s t e m t o t h e b u s i n e s s s y s t e m a n d v ic e v e r s a o c c u r s . T h e f o l l o w i n g s e c t i o n s d e s c r i b e th e c o n v e rsio n o p tio n s.
8.1
C o n v e rsio n o f Lo g ical S yste m s to B u sin e ss S yste m s
In t h e S N D P O R field o f t h e c o n t r o l r e c o r d o f a n ID oc, SAP s y s t e m s a lw a y s
" S N D P O R " f ie ld in
s e n d t h e c o m b i n a t i o n o f SAP, f o r e x a m p l e , SAPJOO f o r a n SA P s y s
SAP syste m s
t e m t h a t is c a ll e d J 0 0 . In t h e M A N D T field, y o u t h e n h a v e t h e c l i e n t f r o m w h i c h t h e ID o c w a s g e n e r a t e d .
243
8
|
ID o c s in C o n ju n c tio n w ith S A P N e tW e a v e r P ro cess In te g ratio n
SLD
In t h e SLD (System L andscape D irectory) o f SAP N e t W e a v e r PI, y o u in itially r e g i s t e r t h e SAP s y s t e m s a s a t e c h n i c a l s y s t e m w i t h t h e i r s y s t e m ID , o r t h e y a r e c r e a t e d m a n u a l l y . All a v a il a b le c l i e n t s a r e k n o w n t h e n , a n d t h e l o g ic a l s y s t e m n a m e f r o m t h e c l i e n t m a n a g e m e n t is a d o p t e d o r m a i n t a i n e d f o r a ll c lie n ts .
R eference t o th e
W h e n y o u cre a te a b u s in e s s s y s te m , y o u t h e n re fe re n c e ex a ctly o n e
lo g ic a l s y s te m
c l i e n t s o t h a t t h e logical s y s t e m n a m e is a u t o m a t i c a l l y d e t e r m i n e d f o r e a c h b u s i n e s s s y s t e m . I f a n I D o c is r e c e i v e d , y o u u s e t h e s y s t e m ID f r o m S N D P O R t o d e t e r m i n e t h e SAP s y s t e m a n d t h e c l i e n t t o d e t e r m i n e t h e b u s i n e s s s y s t e m . T h i s c l i e n t is t h e n u s e d a s t h e s e n d e r f o r f u r t h e r p rocessing . T h e S N D P R N field f o r t h e n a m e o f t h e logical s y s t e m , w h i c h a ls o e x is ts i n t h e s e n d i n g s y s t e m , i s n 't c o n s i d e r e d . I f t h e s e n d i n g s y s t e m i s n ’t a n SAP s y s t e m , t h e v a l u e is r e a d f r o m t h e S N D P O R fie ld , t o o . In t h i s c a s e , a n a m e t h a t m a t c h e s S N D P O R is s e a r c h e d a m o n g t h e logical s y s t e m n a m e s t h a t a r c a s s i g n e d to t h e b u s i n e s s s y s t e m s , a n d t h e n t h e a s s o c i a t e d b u s i n e s s s y s t e m is u s e d . T h i s m e a n s t h a t n o n - S A P p a r t n e r s m u s t p o s s i b l y p r e p a r e y o u r ID ocs d i f f e r e n t l y i f t h e y a r e p r o c e s s e d v ia SAP N e t W e a v e r PI. I f t h e s e n d i n g is d i r e c t l y to a n SAP s y s t e m , t h e S N D P R N field w o u l d b e r e le v a n t . Ideally, y o u r p a r t n e r s e n d s t h e s a m e n a m e in b o t h field s. F o r ID o c s t h a t le a v e SAP N e t W e a v e r PI, t h e S N D P R N field is p o p u l a t e d a c c o r d i n g to t h e p a r t n e r 's re q u ire m e n ts .
8.2
C o n v e rsio n of ID o c P artn e r Roles
P a rtie s in SAP
I f y o u d o n ' t c o m m u n i c a t e w i t h a logical s y s t e m b u t w i t h a p a r t y o u t s i d e
N e t W e a v e r PI
y o u r e n te rp rise, fo r ex a m p le, w ith a c u sto m e r o r a v en d o r, th e s e n d e r a n d r e c e i v e r d a t a in t h e ID o c is a l s o c o n v e r t e d i n t o t h e p a r t i e s o f SAP N e t W e a v e r PI. T h i s is d o n e u s i n g t h e P a rty o b j e c t t h a t is a v a il a b le t h e r e (see F ig u r e 8.1 ).
P a rtn e r c o n v e rs io n
T h e a g e n c y is s p e c i f i e d a s h ttp : //s a p .c o m /x i/X I f o r t h e a c tu a l n a m e in SAP N e t W e a v e r PI. F o r E D I c o n v e r s i o n s i t ’s s p e c i f i e d w i t h t h e v a l u e s " 0 1 6 " a n d " 0 0 9 " a n d can b e se lec ted as su ch . F o r o t h e r v alues, y o u can
244
H e a d e r M a p p in g
|
a s s ig n t h e a g e n c y itself. I f a n ID o c is r e c e i v e d , t h e v a l u e f o r t h e s c h e m e is A L E # < p a r t n e r t y p e > # p a r t n e r r o l e > .
Edit P a rty Party
Status
In Process
Sabine
Description Comm unication Com ponents
as
Com m unication Channels
Agency *
Schem e*
Nam e'
rttpH sapcorrVciM
XIParty
Sabine 012345678901
>09
OLN
016
DUNS
123 456789
ALE
A LE*LS
LOGSYS
EDI
ALE#LI#LF
Vendornum
F ig u re
8.1
P a r t ie s i n S A P N e t W e a v e r PI
So f o r a lo g ic a l s y s t e m as t h e s e n d e r , "ALEtfLS" is s p e c if ie d in t h e S c h e m e field b e c a u s e n o p a r t n e r r o l e s a r e k n o w n t h e r e , a n d t h e N a m e field i n c l u d e s t h e lo g ic a l s y s t e m n a m e . I f y o u h a v e a v e n d o r in t h e r o l e o f t h e v e n d o r , "A LE#LI#LF" is e n t e r e d in t h e S c h e m e field, a n d t h e SAP v e n d o r n u m b e r f r o m T r a n s a c t i o n W E 2 0 is i n t h e N a m e fie ld . SA P N e t W e a v e r PI t h e n c o n v e r t s i t i n t o t h e SA P N e t W e a v e r P i-sp ecific p a r t n e r n u m b e r , in t h i s c a s e , "SABINE."
8.3
H e a d e r M a p p in g
In t h e o u t b o u n d p r o c e s s i n g , t h e ID o c a d a p t e r r e q u i r e s a c o m m u n i c a t i o n
C o m m u n ic a tio n
c h a n n e l , w h i c h is c a ll e d a receiver co m m u n ica tio n channel. T h e n a m i n g is
channel
f r o m t h e b u s i n e s s s y s t e m p e r s p e c t i v e a n d n o t f r o m t h e SAP N e t W e a v e r PI p e r s p e c t i v e w i t h r e g a r d to t h e d i r e c t i o n s . T h e c o m m u n i c a t i o n c h a n n e l k n o w s h o w i t c a n r e a c h t h e r e c e i v e r o f t h e ID oc. A r e c e i v e r a g r e e m e n t s p e c if ie s w h i c h c o m m u n i c a t i o n c h a n n e l is s u p p o s e d to b e u s e d f o r w h ic h m e ssa g e ty p e. In th e re ceiv er a g re e m e n t, y o u n o w hav e the o p tio n to h a v e th e system
R e ce ive r
p e r f o r m a header m a p p in g . F o r th i s p u r p o s e , a v a l u e f r o m SAP N e t W e a v e r
a g re e m e nt
PI is s p e c if ie d f o r t h e s e n d e r o r r e c e i v e r c o m p o n e n t s o r f o r p a r t n e r o r c o m m u n i c a t i o n c o m p o n e n t s . I n t h i s e x a m p l e (s e e F ig u r e 8 .2 ), t h i s w a s c o n v e r t e d f o r t h e t w o c o m m u n i c a t i o n c o m p o n e n t s . SAP N e t W e a v e r PI
245
8 .3
8
|
ID o c s in C o n ju n c tio n w ith S A P N e tW e a v e r P ro cess In te g ratio n
t h e n s e a r c h e s t h e a p p r o p r i a t e logical s y s t e m i n s t e a d o f t h e a c tu a l s e n d e r o r r e c e i v e r a n d w r i t e s i t t o t h e c o n t r o l r e c o r d o f t h e ID oc.
H e a d e r M apping D
S e n d e r C o m m u n ic a tio n Party
0
S e n d e r C o m m u n ic a tio n C o m p o n e n t
□
R e c e iv e r C o m m u n ic a tio n Party
0
R e c e iv e r C o m m u n ic a tio n C o m p o n e n t
F ig u re
xPath
8.2
O H ntegratio n _S erve r
r > ] [ >
Training
g g
H e a d e r M a p p i n g in t h e R e c e iv e r A g r e e m e n t
W h e n y o u c lick o n A d v a n c e d d u r i n g e d i t i n g , i n s t e a d o f a p r e d e f i n e d s e n d e r f r o m t h e SLD, y o u c a n s p e c i f y a n xP a th t h a t p o i n t s t o a sp ec ific fie ld in t h e p a y l o a d . T h e n , y o u m u s t a ls o s p e c i f y in t h e a s s o c i a t e d c o m m u n i c a t i o n c h a n n e l h o w t h i s fie ld is s u p p o s e d t o b e s e n t . T h e s y n t a x c o r r e s p o n d s to t h e p a r t y d e f i n i t i o n . F ig u r e 8 .3 s h o w s a n e x a m p l e .
' V E d it C o m m u n ic a tio n C h a n n e l C o m m u n ic a tio n C h a n n e l
S ta tu s
In P ro c e s s
d o c .R e c e iv e r
Party C o m m u n ic a tio n C o m p o n e n t
Trainin g
D escrip tion P a ra m e te rs
M o d u le
Sender Agency
ALE
3
Schem a
A L E #LS
ale
5j|
Schem a
A L E #LS
R e c e iv e r Agency
F ig u re
8 .4
8 .3
S u ita b le Id e n tifie r s in t h e x P a th V a ria n t
H a n d lin g th e C o n tro l Record in S A P N e tW e a v e r PI
Control record in
I n SAP N e t W e a v e r PI, y o u c a n p r o c e s s t h e c o n t r o l r e c o r d in t h e m a p -
mapping
p i n g y o u r s e l f o r h a v e i t c r e a t e d b y SAP N e t W e a v e r PI. In m a p p i n g , y o u c a n la b e l t h e c o r r e s p o n d i n g n o d e a s i r r e l e v a n t f o r m a p p i n g (s e c F ig ure 8.4).
246
H a n d lin g th e C o n tro l R eco rd in S A P N e tW e a v e r PI
|
8 .4
E v e n i f t h e c o r r e s p o n d i n g n o d e is a m a n d a t o r y s e g m e n t o r c o n t a i n s
D e a c tiv a tin g nodes
m a n d a t o r y fie ld s , t h e m a p p i n g c a n n o w b e a c t i v a t e d w i t h o u t h a v i n g
in t h e m a p p in g
i m p l e m e n t e d a n a s s i g n m e n t . T h e c r o s s e d - t h r o u g h n o d e is d i s p l a y e d in g r e e n s o t h a t i t ’s a p p a r e n t t h a t e v e r y t h i n g is o k a y h e r e .
Q
ID o c O R D E R S O R D E R S Q 5
tzmi □ Miracs iive Structure
O ccu rren ces
M O R D ER S05
- M io o c
Type
1 .1 1 .1
O R D E R S .O R D E R S O 5
req u ired
* s d siring
N ED LD C 40
1 .1
E D L D C 4 0 O R D E R S .0 R D E R S 0 5
[ •]E 1 E D K 0 1
1 .1
O R D E R S 0 5 E 1 E D K 01
0 .1 2
O RDERS05 E l ED K 14
► M E1ED K 04
0 .1 0
O R D E R S 05 E l ED K04
► (« ]E 1 E D K 0 5
0 ..1 6
O R D E R S 0 5 .E 1E D K 0 6
► W E1EO K A1
0 99
O R D E R S 0 5 E l EDKA1
► M E1ED K 02
0 ..1 0
O R D E R S 0 5 .E 1 E D K 0 2
► M E 1 E D K I7
0 .4
O R DERS05 E l ED K 17
» W E 1 E O K I8
0 3
O R D E R S 05 E1EDK 18
► W E1EO K 35
0 99999
O R D E R S 05 E l ED K35
► M E1ED K 36
0 99
O R D E R S 05 E l ED K36
► I^JE IE O V C TI
0 99
O R D E R S 0 5 E 1E D K T1
► M E IE O P O I
0 .9 9 9 9 9 9
O R D E R S 0 5 E l ED P01
B E G IN
► W E 1 E D K I4
O R D E R S 05 E1ED K 03
► M E1ED K 03
► M E1C U C FO
0 99999
O R D E R S 0 5 .E 1 C U C F O
► (* ] E 1 E O L 3 7
0 999999
O RDERS05 E l ED L37
► W E1EDS01
0 .5
O R D E R S Q 5 E1EDS01
F ig u re
8 .4
Ig n o r in g t h e C o n tr o l R ecord in t h e M a p p i n g
You c a n a ls o m a k e s o m e s e t t i n g s in t h e r e c e i v e r c o m m u n i c a t i o n c h a n n e l
S e ttin g s in
( s e e F ig u r e 8 . 5 ) . F o r e x a m p l e , i f y o u w a n t t o u s e t h e ID o c s e r ia li z a t io n
th e ID o c
v i a qR FC , w h i c h h a s n o t b e e n a v a il a b le u n t i l SA P N e t W e a v e r 6 . 4 0 , y o u c a n s e t t h e Q u e u e P ro c e s s i n g flag. T h e t a r g e t s y s t e m t h e n calls t h e I D0C_ I NB0UND_I N_0UEUE f u n c t i o n m o d u l e i n s t e a d o f t h e IDOC_INBOUND_ASYNCHRONOUS f u n c t i o n m o d u l e .
O
Q u e u e Pro c e s s in g
□
Apply C o n tro l R e c o rd V a lu e s fro m Payload
□
T a k e S e n d e r fro m Payload
□
T a k e R e c e iv e r fro m Payload
□
R e s to re O rig in al P a rlie s fo r A c kn o w led g m en ts
F ig u re
8 .5
ID o c R e ce ive r C o m m u n ic a t io n C hannel
247
c o m m u n ic a tio n channel
8
|
ID o c s in C o n ju n c tio n w ith S A P N e tW e a v e r P ro cess In te g ratio n
C o n tro l record
You s e t t h e A p p l y C o n t r o l R e c o r d V a lu e s f r o m P a y l o a d flag i f y o u p o p u
f r o m p a y lo a d
la te t h e c o n t r o l r e c o r d in m a p p i n g y o u r s e l f . I f y o u d o n ' t p o p u l a t e t h e c o n t r o l r e c o r d in m a p p i n g a t all (as i n t h e p r e v i o u s e x a m p l e w i t h t h e c r o s s e d - t h r o u g h c o n t r o l r e c o r d ) , t h i s flag m u s t n e v e r b e s e t . H o w e v e r , i f y o u w a n t t o u s e p a r t s o f t h e p a y l o a d t o d e t e r m i n e t h e p a r ty , y o u m u s t s e t t h i s flag, a n d t h e c o n t r o l r e c o r d m u s t b e p o p u l a t e d a c c o r d i n g l y in m ap p in g . In stea d o f a c o n v e rs io n o f th e s e n d e r s a n d receiv ers, y o u c a n ta k e th e m d i r e c t l y f r o m p a y l o a d i f t h e c o r r e s p o n d i n g flag s a r c s e t . O f c o u r s e , th is s a v e s t i m e b e c a u s e t h e c o n v e r s i o n o f a n I D o c i n t o X M I. is t i m e - c o n s u m ing. Finally, y o u c a n a ls o r e s t o r e t h e o r i g i n a l p a r ti e s f o r s e n d i n g a c k n o w l e d g m e n t s i n s t e a d o f c o n v e r t i n g t h e m in SAP N e t W e a v e r PI.
8.5
U p d a tin g ID o c s D ire c tly in S A P N e tW e a v e r PI
S A P N e t W e a v e r PI
I f y o u w a n t to s e n d a n ID o c d i r e c t l y to SAP N e t W e a v e r PI a n d i f it's s u p
as t h e a c t u a l
p o s e d to b e u p d a t e d in t h e local d a t a b a s e , t h a t is, i f SAP N e t W e a v e r PI is
ID o c re c e iv e r
t h e a c tu a l d a t a r e c e i v e r a n d d o e s n ' t j u s t a s s u m e t h e ty p ic a l m e d i a t o r role, y o u c a n u s e t h e IDXIDOCINB t a b l e . All ID o c s t h a t a r e e n t e r e d in t h i s tab le a r e u p d a t e d b y SAP N e t W e a v e r PI i t s e l f i n s t e a d o f f o r w a r d i n g t h e m . You c a n i n s e r t ID o c s u s i n g t h e IDX_SELECT_IDOCTYP_WITHOUT_IS r e p o r t . You c a n r e m o v e a l r e a d y - e n t e r e d I D o c s u s i n g IDX_DELETE_IDOCTYP_ WITHOUT_IS.
8 .6
S u m m a ry
T his c h a p te r h a s d e s c r ib e d w h a t y o u h a v e to c o n s id e r w h e n y o u u se ID o c s in SAP N e t W e a v e r PI, a n d w h i c h s e t t i n g s f a c ilita te y o u r w o r k . H a v in g ID o c i n t e r f a c e s a l r e a d y in all SAP R e le a se s a s w e ll as t h e s t r u c t u r e o f ID o c s w h e r e c o n t r o l i n f o r m a t i o n is p a r t o f t h e m e s s a g e i t s e l f l e a d to s o m e s p e c ia l ID o c f u n c t i o n a l i t y i n s i d e o f SAP N e t W e a v e r PI.
The Author S a b i n e M a i s e l h a s w o r k e d a s a n SAP c o n s u l t a n t s i n c e 1 9 9 6 , h a v i n g g a i n e d h e r in itia l SAP R /3 e x p e r i e n c e a s a n e m p l o y e e o f a b e t a c u s t o m e r o f SAP. S h e a ls o h o l d s t r a i n i n g c o u r s e s f o r SAP in S w i tz e r la n d a n d G e r m a n y o n all a s p e c t s o f SA P N e t W e a v e r i n t e r f a c e t e c h n o l o g i e s a n d t h e SAP Basis. In a d d i t io n , S a b i n e h a s u n d e r t a k e n d e v e l o p m e n t w o r k f o r t h e A FS (A p p a r e l a n d F o o tw e a r S o lu tio n ) i n d u s t r y s o l u t i o n a n d s u p p o r t w o r k f o r c u s t o m e r p r o je c ts . H e r s p e c i a l i z a t i o n s a r e i n t e r f a c e t e c h n o l o g i e s , SAP N e t W e a v e r PI/XI, ABAP d e v e lo p m e n t, a n d w a re h o u s e m a n a g e m e n t.
249
Index B A P I, 1 8 , 4 7
A
relea se, 19 A B A P L i s t V i e w e r - * A I.V . 1 3 4
B A P IJ D O C J N P U T l, 4 7
A c k n o w le d g m e n t, 187
B A P IJ D O C J N P U T P , 47
Agency, 244
B A P IR E T M , 174
A g e n t a s s ig n m e n t, 1 8 4
BA P IR E TS , 1 7 4
A L E , 15
B A P I_ T R A N S A C T IO N _ C O M M IT , 19
b u s in e s s p ro c e ss, 1 5 ,
18
B A P I_ T R A N S A C T IO N _ R O U .B A C K , 19
c o m m u n ic a tio n la yer, 3 5
BA PP, 4 7
C u s to m iz in g
B a s ic t y p e , 1 2 6
- >
S A L E , 31
sc e n a rio , 1 5 , 1 8
BD10, 40
service, 4 5 , 7 3 , 8 4 , 1 3 4
BD40, 195
A L E 0 0 0 0 1 ,119
BD41, 196
ALEAUD. 187, 230
BD42, 197
A L E in te rfa c e
BD43, 197
f o r B A P I, 1 7 3
BD44, 194
f o r f u n c t i o n m o d u le s, 1 7 4
BD51, 168
A L E _ M O D E L _ D E T E R M IN E _ IF _ TO _
B D 5 2 , 32
S E N D , 155
BD53, 38, 4 0
ALE _P R O C E S S IN G , 50
B D 5 4 , 25
ALEREQ 01, 42
BD55, 84
A L E _S E R IA L_ K E Y 2 C H A N N E L, 2 0 0
BD56, 77
ALV, 231
BD 57, 198, 199
A N S I ASC X 1 2 . 27
BD58, 89
A P I (A p p lic a tio n P ro g ra m m in g
B D 5 9 , 74
In te rfa ce ). 1 8
B D 6 0 , 3 4, 36 , 6 9 , 7 0 , 1 35, 151
A p p lic a tio n , 43
BD64, 2 6 ,4 1 ,6 7
A p p lic a tio n a c k n o w le d g m e n t, 187
BD65, 37
A p p l i c a t i o n L in k E n a b lin g - » A L E , 15
B D 66 , 3 4
A p p lic a t io n re c o rd , 21
B D 68 , 7 2
A r c h iv in g o b jc c t, 2 2 5
B D 7 9 , 81
A s y n c h r o n o u s in t c r f a c c , 17
BD87
a _ t_ c o m p le x _ m a tn r, 1 3 5
BD95, 73, 198
-*
ID o c -M o n ito r, 24
BD 97, 48 B D 1 0 0 ;B D 9 7 a , 2 0 2 , 2 0 4
B
B D l0 1 ;B D 9 7 b , 202
B A d I , 91
B D 1 0 3 ;B D 9 7 d , 20 5
B D 1 0 2 ;B D 9 7 c. 2 0 4
cla ssic, 1 0 3
B D 1 0 4 ;B D 9 7 e , 2 0 0
im p le m e n tin g cla ss, 1 1 3
B D 1 0 5 ;B D 9 7 f, 2 0 0
in te r fa c e , 9 1 , 1 1 3
BDA4, 176
n ew ,
110
BDBG, 24, 47, 173, 174
251
Index
BDCP, 3 6
C M O D , 94
BDCP2, 36
C O M M IT . 92
B D C P _ B E F O R E _ W R IT E , 121
C o m m u n ic a t io n c h a n n e l, 2 4 5
BDCPS, 3 6
C o m p a n y c o d e , c ro s s -s y s te m , 85
BDFG, 174
CONDENSE, 153. 157
BDSF.R, 1 9 8
C o n d it io n t e c h n iq u e . 43
BF01. 100
C o n v e r s io n e x it, 83
BF05. 1 0 0
C O N V F .R S IO N _ F X IT _ A I.P H A _ O U T P U T .
B in d in g . 181
83
BO M M AT, 200
C o n v e rs io n ro u tin e , 83
BOR. 18. 168
C r o s s - s y s t e m b u s i n e s s a re a , 8 5
B re a k p o in t,
110
C ro ss-syste m c o m p a n y co d e , 8 5
BTE, 9 0
C u s to m e r
d is tr i b u ti o n m o d e l, 2 6 , 6 7
BU S 1001006, 168 B u s i n e s s A d d - I n - ♦ B A d l . 91
m a n a g e m e n t o b je c t, 1 0 1
B u sin e ss A p p l i c a t i o n P r o g r a m m i n g
p r o je c t, 9 5
In te rfa c e
-*
s e g m e n t, 1 2 2
B A P I, 1 8
B u sin e ss O b je c t R e p o s it o r y - » B O R , 1 8
C u s to m e r e x it, 9 0 , 93
B u sin e ss o b je c t ty p e . 18 B u s in e s s -re la te d e rr o r ,
20
B u sin e ss s y s te m . 2 4 3
D
B u sin e ss tr a n s a c tio n e v e n t - » BTE, 9 0 B u sin e ss w o r k f l o w , 18
D a ta c h a n n e l re g is try , 2 0 4 D a ta D ic tio n a iy - * D D IC , 124 D a ta reco rd ,
c
21
D a ta Source, 22 8 D a te fie ld , 15 3
C A LI. C U S T O M E R - F U N C T IO N , 9 3
D D IC , 124
C file . 2 3
D e b u g g in g . 55
Change d o c u m e n t, 30
D e c im a l n u m b e r , 153
C H A N G E D O C U M E N T .C L O S E , 30
D e s c rip tio n
C H A N G E D O C U M E N T . O P E N , 30
s e m a n tic ,
C h a n g e p o i n t e r , 31
te c h n ic a l,
a c tiv a te g e n e r a lly , 3 2
16 16
D ia lo g ca ll, 4 8
f o r m e s s a g e ty p e , 3 2
D i s t r i b u t i o n c la s s t y p e , 7 0
f o r r e d u c e d m e s s a g e ty p e s , 4 0
D o c u m e n t n u m ber, 198
C H A N G E _ P O I N T E R S _ C R E A T E , 31
D T D ( D o c u m e n t T ype D e s c rip tio n ), 23
C H A N G E _ P O IN T E R S _ C R E A T E _ L O N G , 31 Channel n u m ber. 200
E
C IM TY P , 9 3 CL02, 72
E D I, 2 6
Class . 71
E D IF A C T . 2 2 . 2 7 . 1 4 4
C la s s ic B A d l , 1 0 3
E D I.P R O C E S S IN G , 44 , 50
C la s s ific a tio n , 6 9 . 72
E D IS , 6 5 , 17 5
C L .E X IT H A N D L E R , 103
E le c tro n ic D a ta In te rc h a n g e - * E D I, 26
252
Index
E n h a n c e m e n t, 91, 95. 1 0 7
G
ch eck, 1 2 9 d y n a m ic , 1 1 8
GDPdU. 224
e x p lic it, 1 0 7
G e n e r a l m e t h o d c a ll, 4 8
im p le m e n t.
108
G e n e ra l ru le , 83
im p le m e n ta tio n , 1 1 1
G e n e ra l task, 1 8 1 , 1 8 4
im p lic it, 1 1 5
G e n era te c o n tr o l re c o rd , 15 8
p a r t n e r p r o file , 1 3 1
G e rm a n P rin c ip le s o n D a ta Access a n d
p o in t , 1 0 7
the E x a m in a tio n o f D ig ita l D o c u m e n ts ,
p r o je c t, 9 0
224
release,
128
G E T 'B A D I, 110
se c tio n , 1 0 7 , 1 0 8
G M P ( G o o d M a n u f a c t u r i n g P r a c t ic e ) ,
s p o t, 9 1 , 1 0 7 , 1 0 8 , 1 1 0
224
s ta tic , 1 1 8 te c h n o lo g y , 6 7 ty p e , 1 2 5 F .O IO ( E q u a l l y O n c e I n O r d e r ) , 2 0 5 E rror
H e ader m a p p in g , 2 4 5
b u sin e s s -r e la te d ,
20
s ta tu s , 1 6 7 te c h n ic a l,
H H e ader record.
21
H e a d e r ta b le , 141
20
H T M L ( H y p e r t e x t M a r k u p Language),
E rro r w o rk flo w , 175, 176
c o n n e c tio n , 1 6 7
23 H T TP (H y p e r te x t T ra n s fe r P ro to c o l), 23
E x it, 9 0 E X IT .S A P L B D 1 1 .0 0 1 , 119 E x te n s ib le M a r k u p L a n g u a g e -» X M L , 23 E x te n s io n , 126
I ID o c , 18
a d a p te r , 2 4 3 a d m in is tr a to r , 1 8 4
F
m o n ito r , 2 4 , 1 6 0 , 1 6 8 r e q u e s t, 41
F etch ID o c , 41
s ta tu s file , 62
F IB F , 101
su p p r e s s , 6 8 , 7 6
F ID C M T , 8 9
tr a c k in g , 2 4
F ile , 2 3
ty p e , 2 2
F IL E , 1 4 0
ID O C A P P L , 176
F ile p o r t . 5 6 . 1 3 8 F ilte r g ro u p ,
ID O C B O M M A T , 2 0 0
68
F ilte r o b je c t, 6 7 ,
ID O C _ D A T E _ T IM E _ G E T , 24
6 8 , 73
ID O C J N B O U N D _ A S Y N C H R O N O U S , 23
F lo a tin g p o in t n u m b e r, 153
ID O C _ IN B O U N D _ IN _ Q U E U E , 205
F u n c tio n m o d u le
ID O C _ I N P U T _ M A T M A S 0 1 , 1 3 3
e v a lu a tio n o f c h a n g e p o in te r s , 3 4
ID O C _ R E D U C T lO N _ F IE L D _ R E D U C E ,
f i l e n a m e g e n e r a tio n , 1 3 8
156
f o r q u eu e nam es, 2 0 6
ID O C R E L , 2 1 1 , 212
te s t, 5 5
ID O C _ S E R IA L IZ A T IO N _ C H E C K , 1 9 9
253
Index
ID O C _ S E R IA L _ P O S T 19 9
m b d c o n w f,
ID X _ D E L E T E _ ID O C T Y P _ W IT H O U T _ IS ,
M essage
16 2
248
code, 4 4
ID X ID O C IN B , 2 4 8
c o n tr o l, 2 9 , 4 3 d e te r m in a tio n , 4 4
ID X _ S E I.E C T _ ID O C T Y P _ W IT H O U T _ IS , 248 Im p o r tin g p a ra m e te r u n iq u e , 165
fu n c tio n , 44 M essage typ e , 2 2 ,1 5 1
red u c ed , 3 7
I n b o u n d in te rfa c e , 15 In fo structu re , 2 2 7
M e ta in fo rm a tio n , 22
In itia l, 153
M e t h o d c a ll, 4 8
IN P U T E R R O R O C C U R R E D , 179
M G V 0 0 0 0 1 , 95
in p u tF in is h e d , 1 7 8 , 181
M G V 0 0 1 0 0 , 100
IN P U T F O R E G R O U N D , 179
M o d ific a tio n , 90
In te rfa c e
M O V E , 81
a sy n c h r o n o u s , 1 7 s y n c h r o n o u s , 16 In te rm e d ia te D o c u m e n t - > ID o c , 18
N
IS O c o d e , 1 4 4 , 1 5 3 I t e m t a b l e , 1 41
NAC E, 43 N a m in g rule, 148
c u s to m e r o b je c t, 4 7
K
o w n o b je c t, 3 9 N e w B A d I, 110
KEY, 3 3
N O _ D A T A character, 3 0
L
o
L in k , 211
0 1 CL. 70
L o g ic a l m essage, 151
O b je c t c h a n n e l s e ria liz a tio n , 2 0 0 , 201
L o g i c a l s y s t e m ( L S ), 2 5
O b je c t Key, 2 1 4 O b je c t services, 2 1 4 OBJTYPE, 212
M
O P E N _ F I_ P E R F O R M _ X X X X X X X X _ E ';O P E N _ F I_ P E R F O R M _
M a n d a t o r y fie ld , 3 7
XXXXXXXX_E, 99
M a n d a to ry s e g m e n t, 1 2 7 , 148
O R D C H G , 22, 198
M a s te r da ta, 29
ORDERS, 22
M A S T E R ID O C _ C R E A T E _ M A T M A S , 93,
O rg a n iz a tio n a l m a n a g e m e n t, 1 8 4
107
O u t b o u n d in te rfa c e , 15
M A S T E R ID O C_CR E A T E _ S M D _
O u tb o u n d p a rtn e r p ro file , 44
M A T M A S , 135
O u tp u t
M A S T E R J D O C _ D IS T R IB U T E , 159 M A T F E T , 2 6 , 41 M ATM AS. 22, 26
254
ty p e , 4 3 O Y E A ,184
Index
R e m o te F u n c t io n C a ll
P
-*
RFC, 1 6
R e q u e s t, 16 P a rtn er, 2 6
R e q u e s t I D o c s , 41
in b o u n d p r o file , 2 4
R e sponse, 16
o u tb o u n d p r o file , 2 4
RFC, 16
p r o file , 4 5 , 7 9
q u e u e d - * qR FC , 2 0 5
ro le, 4 3 , 1 4 5
syn ch ro n o u s
Part y. 2 4 4
- >
tr a n s a c tio n a l
sR F C , 19
- ♦
tR F C , 19
P FTC JN S , 178
R F M (R F C -e n a bled fu n c t io n m o d u le ),
PI - * S A P N e t W e a v e r PI. 1 8 7
18
P o ri m a n a g e m e n t, 138
R O L E ID , 212
Process c o d e , 1 6 8
ROLLBACK, 92
B A P I, 1 7 4
R o o t s e g m e n t, 78 , 79
BAPP, 1 7 4
RSEOUTOO, 5 9 , 1 9 6
P ro c e s s in g la y e r, 6 3
RSNAST00, 4 4 , 58
Process I n t e g r a t io n - » S A P N e t W e a v e r
RSRLDREL, 215
PI, 1 8 7
R u le , 6 7 , 8 0
g e n e ra l, 8 3
P r o c e s s i n t e r f a c e , 91 P ro p o s a l f o r ru le , 81 P ro x y in te rfa c e , 16 P/S i n t e r f a c e , 9 1
s
P u b l i s h & S u b s c r i b e - > P /S i n t e r f a c e , 91 S A L E , 2 5 , 31 S a m p le file . 5 6
Q
S A P _ A I.E _E D IQ U E U E , 2 0 6
qRFC, 205
SAP N e t W e a v e r PI, 2 0 5 , 2 4 3
Q u a lifie r, 1 4 4 , 1 4 5
S A P _ ID O C _ 0 0 1 , 2 2 7
ag en cy, 2 4 4
Q u a l i t y o f S e rv ic e , 2 0 5
h e a d e r m a p p in g , 2 4 5
Queue, 209
p a r tn e r ,
Q u e u e d RF C - ♦ q R F C , 2 0 5
26
p a r ty , 2 4 4 SARA. 225 SA RI. 2 2 8
R
SBWP, 1 8 3 S E 1 1 .124
R B D M I D O C , 35
SE18. 103
R B D S F .R 0 1 , 1 9 4 , 1 9 5
SE19. 1 0 3 . 110
RBDSnR02, 196
SE80, 111
RBDSER03, 1 9 7
S E 84. 91
RBDSER04, 197
Segm ent
RBDSRCLR, 199 RDBSTATE, 188
d e fin itio n , 1 2 4 filte r , 76
R e c e iv e r, 2 6
q u a lify in g , 1 4 5
R e c e iv e r c o m m u n ic a t io n c h a n n e l, 2 4 5 ,
relea se, 1 2 5
247
ty p e , 2 3 , 1 2 4
R e d u c e d m essage ty p e , 37 R e le a s e s e c u r i t y , 1 5 , 1 9
v e rsio n , 8 4 S ender, 2 6
255
Index
T e c h n ic a l s y s te m , 2 4 4
S e n d e r fie ld
c o n v e rt, 8 3
T e m p la te s , 4 5
copy, 8 2
Test
SERDAT. 1 9 7
f l a g , 54
S E R IA L, 1 9 8 , 20 3
f u n c t i o n m o d u le , 5 5 tr a n s a c tio n , 51
S e ria liz a tio n , 193
b u s in e s s o b je c ts, fla g ,
200
T im e , 153
202
T r a n s a c t i o n a l R F C - » tR E C , 1 9
g ro u p , 193, 194
T ra n s a c tio n data. 2 9
t im e s ta m p , 1 9 8
T ra n s a c tio n s e c u rity , 1 7
S h a r e d M a s t e r D a t a T o o l —> S M D , 2 9
T R A N S ID , 212
S ig n a tu re , 1 5 4
T ra n s m is s io n m e d iu m 6 , 4 3 , 44
in b o u n d f u n c t i o n m o d u le ,
162
T ra n s m is s io n m e d iu m A , 4 3 , 5 0
SLD, 244
T r a n s p o r t ID o c , 23
S M 5 9 , 102
tREC, 1 9
S M D , 29 SNDPOR, 243 SNDPRN, 244
u
SOAP, 16 S p e cia l m e t h o d c a ll, 4 8
U N / E D I F A C T - > E D I FACT, 22
sRFC, 1 9
U n ic o d e . 5 6
SR R E LR O I.E S , 211
U N I T _ 0 F _ M E A S U RE J S 0 _ T 0 _ S A P, 1 6 5
S ta n d a rd in b o u n d p ro c e s s in g , 5 4
U N IT _ O F _ M E A S U R E _ S A P _ T O _ IS O , 157
S ta n d a rd in te rfa c e , 15
U p d a te te c h n iq u e , 19
S ta n d a rd o u t b o u n d p ro c e s s in g , 5 7 S ta n d a r d task. 1 7 8 S tatus 4 2 < n o r m a l > , 5 7 S ta lu s 5 3 < n o r m a l> , 1 8 8
V
S tatus 6 6 , 2 0 4
V e rs io n c o n v e rs io n , 84 , 119
S tatus 6 8 < n o r m a l > , 1 8 8
V ie w . 77
S tatus 7 4 < n o r m a l> . 61 STATUS ID o c , 62, 1 9 0 S tatus r e c o rd , 21 Success s ta tu s, 1 6 7 S W 0 1 , 176 S y n c h ro n o u s in te rfa ce , 1 6 S y n c h r o n o u s R F C —> s R F C , 1 9 SY STAT, 6 2 , 2 3 0 S y s t e m L a n d s c a p e D i r e c t o i y —> S L D , 2 4 4 S y s te m n a m e , lo g ic a l, 2 5 S yste m , te c h n ic a l, 2 4 4
w W E 09 . 228 W F .14 , 5 8 W E 16 , 60 W E 17 , 65 W E 1 8 , 63 W E 1 9 , 5 2 , 65 W E 2 0 , 24, 50, 119, 194 W E 21 , 138 W E 24 . 45
T
W E 27 , 45 W E 3 0 , 126, 148
Task, g e n e r a l, 1 8 1 , 1 8 4
W E 31 . 124
T e c h n ic a l e rr o r , 2 0
W E 32 . 78
256
Index
W E 41, 44
W E IN B Q U E U E , 208
W E42, 169
W EN O U N KS, 214
W E 47 , 63. 224
W EOU TQ UEU E. 206
W E 55, 139
W M T O R D , 46
W F .57 , 1 3 3 . 168 W F .60 , 1 5 0 W F . 6 2 , 81
X
W E 8 1 , 151 W E 8 2 , 1 3 6 , 1 51
X M L , 23
W E 8 5 , 205
xP a th . 2 4 6
W E D I , 51
257
View more...
Comments