sap enterprise service enhancement guide 2 0

41
7/30/2019 SAP Enterprise Service Enhancement Guide 2 0 http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 1/41 Enterprise Services Enhancement Guide Version 2.0

Upload: pragya-dubey

Post on 04-Apr-2018

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 1/41

E n t e r p r i s e S e r v i c e sE n h a n c e m e n t G u i d e

Vers ion 2 .0

Page 2: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 2/41

Copyright

 © Cop yr igh t 2008 SAP AG. Al l r igh t s reser ved.

No par t o f t h is publ i cat ion may be reproduced or t ransmi t t ed in any form or for any purpose wi thout theexpress perm ission of SAP AG. The inform at ion cont ained herein m ay be changed w i thou t pr ior no t ice.

Som e soft w are produ cts market ed by SAP AG and i ts distr ibuto rs cont ain propriet ary sof t w are com pon ents

of o t her sof tware vendors .

M icrosoft , W indow s, Out loo k, and Pow erPoint are registered tr adem arks of M icrosoft Corporat ion .

IBM , DB2, DB2 Univer sal Database, OS/ 2, Parallel Sysplex, M VS/ ESA, AIX, S/ 390, AS/ 400, OS/ 390, OS/4 00,iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Int el l igent M iner, W ebSphere, N etf init y, Tivol i , Infor m ix, i5/ OS,

POW ER, POWER5, OpenPower and Pow erPC are t r ademarks or registered tradem arks of IBM Corp orat ion .

Adobe, t he Adob e logo, Acrobat , PostScript , and Reader are ei ther t radem arks or registered t rademar ks of

Adobe System s Incorporated in the Uni ted States and/ or oth er countr ies.

Oracle is a register ed tr ademar k of Oracle Corp orat ion .

UNIX, X/Open, OSF/ 1, and M ot i f are registered t rademar ks of t he Open Grou p.

Ci tr ix , ICA, Program Neighborho od, M etaFram e, WinFrame, VideoFram e, and M ul t iW in are t radem arks orregister ed trad emarks o f Ci t r ix System s, Inc.

HTM L, XM L, XHTM L and W 3C are t rad emarks or registered t radem arks of W 3C®, Wor ld W ide W eb

Consort iu m, M assachusett s Inst i tut e of Technology.

Java is a register ed tradem ark o f Sun M icrosystem s, Inc.

JavaScript is a registered tradem ark of Sun M icrosystem s, Inc. , used u nder l icense for techno logy invented

and implem ented by Netscape.

M axDB is a t rademar k of M ySQL AB, Sw eden.

SAP, R/ 3, mySAP, mySAP.com, xAp ps, xApp, SAP NetW eaver, and ot her SAP prod ucts and servicesm ent ion ed here in as w el l as the ir respect ive logos are t radem arks or r egistere d tr adem arks of SAP AG in

German y and in several other coun tr ies al l over th e wor ld. Al l other pro duct and service names m ent ionedare the tr ademarks of thei r respect ive com panies. Data cont ained in this docum ent serves inform at ional

purp oses only. Nat ional pro duct speci f icat ions may vary.

These materials are subject to change wi thout not ice. These materials are provided by SAP AG and i ts

af f i l iated companies ("SAP Group") for informat ional purposes only, wi thout representat ion or warranty of

any k ind, and SAP Group shal l not b e l iable for erro rs or om issions wi t h respect t o th e mat er ials. The only

warrant ies for SAP Group products and services are those that are set forth in the express warranty

statements accompanying such products and services, i f any. Nothing herein should be construed as

const i tut ing an addi t ional warranty.

Page 3: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 3/41

Ta b l e o f Co n t e n t s

1 . In t r o d u ct io n 1

1.1. Why Enh an ce an Ent erpr ise Service? ................................................................................... 1

1.2. How Do You Enha nce a n Ent erprise Service? ....................................................................... 1

1.3. Wh ere to Enha nce an Ent erprise Service wit hin th e M essage Stru cture ............................... 2

2 . D e v e lo p in g in SA P N e t W e a v e r PI 6

2.1. Develop ing in SLD ............................................................................................................... 6

2.1.1. Creat ing a Produ ct, Prod uct Version , Soft w are Un it , SW C and EnSW CV in SLD........... 6

2.1.1 . Cre atin g SW C and EnSW CV in SLD............................................................................. 8

2.2. Defining Dependen cies Betw een SW CV a nd EnSW CV in SLD ................................................ 9

3 . D e v e lo p in g in ESR 1 3

3.1. Impo rt ing an EnSWCV in to ESR ......................................................................................... 13

3.2. Creat ing a Nam espa ce in EnSWCV .................................................................................... 15

3.3. Creat ing a n Enhancem ent Data Type in th e SW CV ............................................................ 16

4 . D e v e lo p in g in t h e Ba ck en d Sy st e m 2 0

4.1. Genera ting an Enhan cement Proxy Stru cture .................................................................... 20

4.2. BAdI Imp lem ent ati on ........................................................................................................ 24

4.3. Enh an cing Syn chro nou s Enter pr ise Servi ces....................................................................... 24

4.3.1. Scenario 1-Enhancing Service Signature and M apping to Exist ing Im plemen tat ion . . . 25

4.3.2. Scenario 2-Service Enhancement Requir ing Appl icat ion Enhanceme nt . . .. . .. . .. . .. . .. . .. . 27

4.4. Enh an cing Asynchro no us Ent erp rise Services..................................................................... 30

4.4.1. Example of Asynchr ono us Enter prise Services......................................................... 30

5 . A p p en d ix 3 2

5.1. Relation ship b etw een Produ cts, Prod uct V ersion , SW Cs, and SWCVs in SLD ....................... 32

5.2. Creat ing an Enhan cemen t Stru ctur e in EnSW CV ................................................................ 33

5.2.1. Using a Dat a Type fr om an U nd erlying SWCV .......................................................... 34

5.2.2. Using a Data Type from th e Enh ancem ent Nam espace............................................ 35

5.2.3. U sing a Buil t -In Dat a Type Int egrated in ESR............................................................ 36

5.3. Impact of Updat e or Upgrad e of an Underlying SWCV on an Enhan cement .. .. . .. . .. . .. . .. . .. . .. . 37

5.4. Do cum ent at ion................................................................................................................. 37

5.5. Glossary ........................................................................................................................... 38

Page 4: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 4/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 1

1 . In t roduc t i on

Enter pr ise Services al low yo u t o leverage SAP solut ions to include a w ide range of comp osi te appl icat ions

that are provided by customers and partners to bui ld new, f lexible, and innovat ive solut ions. Enterpr ise

Services are highly- integrated Web services combined wi th business logic and semant ics that can be

accessed and u sed repeat edly t o supp or t a p articular bu siness pr ocess. SAP pu blishes all Ent erpr ise Servicesthat support SAP Business Sui te funct ion al i ty on th e Enterprise Services Workplace in the SAP Developer

N et w o rk (SD N). Fo r m o re in fo rm a tio n, se e t he En t er pr ise Ser vice s f or SAP, ERP 6.0 as list ed in

Documentat ion .

This guide explains how to enhance SAP Enter pr ise Services to accom m odat e your business requirem ents.

N o t e : The screenshots in th is gu ide are f rom the SAP NetW eaver P I 7 .0 p la t form and m ay d i f fer f rom

th e SAP NetW eaver PI 7.1 screen s.

You d efin e a service op erati on en hancem ent in t he Ent erp rise Service Repo sito ry (ESR). Based on t his, you

generate an enhancemen t proxy and im plemen t th e required bu siness logic at your back-end system . You

im plem ent t he business logic in an Ent erp rise Service-specif ic Business Add-In (BAdI). Advanced kno w ledge

of SAP XI 3.0 is necessary to und erstand t his documen t. No te t hat you can use the ESR w hich resides wi t hin

SAP NetWeaver Process Integrat ion (SAP NetWeaver PI 7.0) or wi thin SAP NetWeaver Composi te

Envir onm ent (SAP Net W eaver CE 7.1). This docum ent is wr itt en u sing an ESR of SAP Net W eaver PI 7.0. For

mo re inf orm at ion about SAP Process Integrat ion, see SAP Service M arketplace at

ht tps: / /service.sap.com/xi .

1.1 . W hy Enh ance an Ent erp r ise Serv ice?

There are a num ber of r easons wh y you m ay need to e nhance an Enter pr ise Service:

o The business applicatio n has been exten ded (b y SAP) and t hese exten sions are alsooffer ed in ent erpr ise services

o Custom ers or part ners have enhanced SAP‘s business fun ct ional i ty and w ant t o of f er

addi t io nal element s in exist ing services

o Stan dard service doe s no t expo se al l f ields of a bu siness ob ject and addit ional f ields are

needed in th e service signature.

1.2 . How Do You Enh ance an Enter pr ise Serv ice?

There are three di f ferent ways to enhance an Enterpr ise Service; however only the second and thi rd are

relevant fo r par tners and custom ers. This guide fo cuses on th e second al t ernat ive as i t is the one t hat SAPrecomm ends to you.

1. Extend t he or ig ina l standard service w i th new (opt iona l ) fie lds ; th is al ternat ive is used w i th in SAP,typical ly when an industry-extension is added.

2. Enhance standard serv ice in a new enhancement nam e space; th is a lternat ive i s used by

customers and partners. They def ine their enhancement elements in thei r own namespaces and

th ese enhancem ent element s refer to t he SAP standard Ent erpr ise Service. This is i l lustrated in

a l ternat ive 2 in th e f igure be low .3. Dupl i cate serv ice as a new and speci f i c, and add the requi red f ie lds. The drawback of th is

al ternat ive is that the reference l ink between the customer enhancements and the SAP standard

Enterpr ise Service does not exist anymore. Thus, any enhancements or correct ions provided by

SAP in a fut ure release wi l l not be avai lable for th e custom er’s enhanced service.

Page 5: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 5/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 2

The f igure below i l lustrates th e th ree al ternat ives to enhance an Enterpr ise Service:

F ig u r e 1 : How to Enhance an Ent erpr ise Service

1 .3 . W here t o Enhance an En t e rp r i se Serv ice w i t h in t he M essage

St ruc tu re

I f you use enhancem ents in your b ack-end system that you w ish t o t r ansfer using an Enter pr ise Service, this

chapter explains how to choo se the r ight part o f th e stru cture of t he Ent erpr ise Service to enhance.

A message typical ly contains a message header, a business docum ent an d an at t achment . The business

document conta ins one or mo re n odes that are them selves conta in ing e lement s.

The f igure below i l lustrates th e general stru cture o f a m essage:

F ig u r e 2 : General Stru cture o f a M essage

Page 6: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 6/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 3

You can enhance ei ther th e message data type or one of th e nodes of the bu siness docum ent. W e

recomm end you add your enhancemen t e lement to the node to w hich it semant ical l y be longs. For

example, i f you w ant to add a buyer part y to a service operat io n, you at tach i t to th e exist ing node party. I f

there is no node that is semant ical ly c lose to your enhancement element, you can also create your own

node .

The f igure below i l lustrates ho w Ent erpr ise Services are enhanced, ei ther by enh ancing th e w hole m essagedata t ype (1) or by enhan cing a certain nod e (2):

F ig u r e 3 : M odel o f Ent erpr ise Service Enhancem ent

N o t e : The node you are enhancing m ust be typed w i th an expl ici t ESR data type. W e recomm end th at

this data type is used only once in th is service, oth erw ise your enh ancement element w i l l appear in al l

the services using this data type. You can check this using the Where-Used pu shbut to n in ESR.

Communicat ion between the service provider and service consumer takes place based on the messageinterface that is def ined by input and output message types. The message types are def ined by message

data types. Begin by select ing the message data type that has to be enhanced. For example, you might

want to enhance the data type output message. Next, check the structure of this message data type to

determ ine the su itab le node for t he enhancement .

Ent erp rise Services m essage data typ es usually have th e sam e overall stru ctu re, as show n in Figure 2.

N o t e : To avo id prob lem s, we recomm end th at you enh ance on ly those data types that are used wi th in

a s ingle Enterpr ise Service. I f you have to enhance a data type that is used in mul t iple Enterpr ise

Services, you should implement the corresponding BAdIs in al l the af fected Enterpr ise Services to

ensure consisten t behavior.

The f igure be low i l l ust ra tes where to f ind the fun c t ion “w here-used” to check in how m any enterpr ise

services a chosen dat a typ e is used:

Page 7: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 7/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 4

Ex a m p l e

The service operat ion Read Custo mer Cont ract b y ID uses the custom er cont rac t num ber in th e back-end to

read custom er cont rac t in format ion. You send a query conta in ing the ID of the cus tomer cont rac t t o th e

back-end system . In th e back-end, the det ai led infor m at ion abou t th e custom er contract is read and po sted

to t he consum er o f t he serv ice. You w ant to enhance the response wi th in form at ion about t he user who

last changed the custom er contr act .

The structure of the response is represented wi th the message type

CustomerContractERPByIDResponse_sync . The subnode SystemAdministrat iveData ex is ts w i th in the root

node CustomerContract . This subnode contains the elements CreationDate, CreationUserAccountID , and

LastChangeDate . This node is semant ical ly sui table for enhancing the service operat ion wi th the element

that ind icates the last changes that w ere per form ed to the custom er cont rac t . You can n ame th is e lement

( for example, LastChangeUser). Within ESR, f ind the data type that is assigned to the node

SystemAdministrat iveData and enhance i t using the enhancem ent concept . The enhancem ent con sists only

of the e lement LastChangeUser .

Page 8: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 8/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 5

The procedure for creat ing the enhancement and implement ing the BAdI in an appl icat ion system is

depic ted in the fo l lowing f igure:

F ig u r e 4 : Creat ing Enh ancem ent s and Im plem ent ing Business Add -Ins (BAdIs)

For m or e info rm ation abo ut BAdIs, see Business Add-Ins (BAdIs) as l isted in Documentat ion .

Page 9: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 9/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 6

2. Develop ing in SAP NetW eaver PI

Developm ent in th e SAP NetW eaver PI has two phases:

1 . Deve lop ing enhancem ents i n t he ESR

2. Creat ing enhancement prox ies and implement ing BAdIs in the back-end system

2.1. Develo p ing in SLD

The software component version (SWCV) that you create to enhance Enterpr ise Services is cal led an

enhancem ent sof tw are com pon ent version (EnSW CV). You can create an EnSW CV in t he system landscape

director y (SLD) in SAP NetWeaver PI by fol low ing the steps below.

2 .1 .1 . Crea t ing a P rod uc t , P roduc t Version , So f tw are Un i t , SW C and

EnSW CV in SLD

St e p 1 : Cr e a t i n g a P r o d u c t a n d a P r o d u c t V e r s io n

Create a non-SAP product wi th a name that describes the enhancement. For examples and informat ion

about the relat ionship between product, product versions, sof tware component (SWC), and SWCV see

sect ion 5.1. Fol low t he step s below to create a new pro duct and pr odu ct version.

1. On the t oo ls ent ry page (Exchange In f rast ruc ture Tools 7 .0 / Com pos ite Enviornment Tools 7.1),

choose System Landscape Directory.

2. Und er Soft wa re Cata log choose Products.

Page 10: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 10/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 7

3. Choose New Product Version.

4. En t er Nam e, Vendor, an d Version for the product .

N o t e : Ent er a U RL such as www.customer.com in Vendor f ie ld. For m ore infor m at ion, see SAP Exchang e

Infrastructure: Guide for Customer Developments and Modif icat ions in the Integrat ion Reposi tory,

Release SAP XI 3.0 l isted in Documentat ion.

5. Choose Create.

The produ ct and new pro duct version are created in SLD.

St e p 2 : Cr e a t i n g a So f t w a r e U n i t

The fol lowing screen app ears af ter you co m plete St e p 1 . Here, you enter th e Name f o r you r new so f tware

uni t and choose Create.

The new softw are uni t is created in SLD.

Page 11: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 11/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 8

2.1.1. Creat ing SW C and EnSW CV in SLD

I f a product exists, you can create a SWC and an EnSWCV during the maintenance of the product or

independent ly dur ing the maintenance of the SW C. The procedure for c reat ion dur ing the maintenance of

prod ucts is described here.

St e p 3 : C r ea t i n g SW C a n d E n SW CV D u r i n g t h e M a i n t e n a n c e o f P ro d u c t s

1. Create a non-SAP product and i ts version as show n in St e p 1 . Under Software Catalog choose

Software Components.

2. Choose New Softw are Com ponent Version.

3 . Choose the no n-SAP product vers ion and sof tw are un i t for wh ich the EnSWCV mu st be c reated.

For inf orm at ion o n creat ing a non-SAP prod uct version and soft w are uni t , see St e p 1  an d St e p 2 .

Page 12: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 12/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 9

4. En t er the Vendor , Name, and Version of the product .

N o t e : To impo rt th e EnSW CV into the ESR im m ediately af ter i t s creat ion in th e SLD, use th e pro duct ion

state Released .

5. Choose Create.

The EnSW CV is cre ated in SLD.

2.2 . Def in in g Depen den cies Betw een SW CV and EnSW CV in SLD

SAP NetWeaver PI al lows you to create dependencies between one or more components. I f you enhance

an in ter face ob ject , you m ust c reate a “ based-on” dependency betw een th e EnSW CV and t he un der lying

SW CV, because one com ponent can be a prerequisi te for another compo nent and some objec ts f rom t he

u n d er ly in g SW CV c an b e r e u se d i n t h e o r ig in al SW CV . Fo r e xam p l e , SW CV SA P SCM Ba si s 5 .1 i s t h e

un derl ying com pon ent version for SAP SCM 5.1 b ecause it (SAP SCM 5.1) uses som e SAP SCM Basis classes,

funct io ns, and d ata types.

The process described above is depicted in t he fol low ing f igure:

F ig u r e 5 : Depen dency Betw een SAP SCM Basis 5.1 and SAP SCM 5.1

I f depen dencies exist in ESR, you see an add i t ional com pon ent , Basis Object s, i n the nav igat ion t ree for t he

based-on SWCV. These objects cont ain al l th e nam espaces fro m t he un derl ying SW CV.

Once you create a depend ency betw een t he EnSW CV (as based-on SWCV) and th e SW CV from w hich you

need to enhance the service operat ion (underly ing SWCV), you can reference objects f rom the based-on

SW CV and also f ro m und erly ing SW CV. This allow s you to use the enhanced o bjects f rom nam espaces of

the under ly ing SW CV.

Page 13: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 13/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 10

The dependen cy betw een t he EnSW CV and und erly ing SW CV described abo ve is i l lustrat ed in t he fol low ing

f igure:

F ig u r e 6 : Depen den cy Bet w een Enhancem ent SAP SCM 5.1 and SAP SCM 5.1

St e p 4 : D e f i n i n g D e p e n d e n c i e s B et w e e n a n En S W CV a n d a n U n d e r l y i n g SW CV

1. On t he Exchange Infrastructure Tools page, choose System Landscape Directory Software

Catalog Software Components.

2 . Choose the EnSWCV tha t you c reated i n St e p 3 .

Page 14: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 14/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 11

3. On t he Dependencies tab, choo se Installat ionTime i n t he d ropdown m enu fo r Context .

4. Choose Define Prerequisite Softw are Com ponent Versions.

5 . In the li st that appears, choose the SWCV for which you want to def ine the enhancement .

6 . En t e r t he n am e o f t h e SW C in t h e f ie ld Filter and choose Go to get to t he und erly ing SW CV.

Page 15: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 15/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 12

7. Once the system ret r ieves your value, se lect i t and choose Define Prerequisite Software

Components.

8 . The system d isp lays the d ependencies betw een the p rerequisi te SW CV ( that conta ins the serv ices

to be enh anced) and th e dependen t EnSW CV.

Page 16: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 16/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 13

3. Develop in g in ESR

3.1 . Im po r t ing an EnSW CV in t o ESR

The EnSW CV th at w e def ined previously is ready f or im plem ent at ion in ESR. The fol low ing steps describe

how to imp ort an EnSW CV fr om SLD int o ESR.

St e p 5 : I m p o r t i n g a n E n SW CV f r o m SL D t o t h e E SR

1. On t he Exchange Infrastructure Tools page, choose Integrat ion Repository .

2. Ch oo se t he Objects tab.

3. Choose Tools  Transfer from System Landscape Directory   Import Software Component

Versions.

Page 17: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 17/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 14

4 . Se lec t t he EnSWCV f rom t he li st and choose Import .

5 . Th e sy st e m d i sp lay s a n Import Protocol aft er i t successful ly imp or ts the SWCVs.

Af ter S t e p 5   you see your EnSWCV in the object t ree. You also see the folder Basis Objects w h e r e al l

nam espaces and t heir ob jects f rom the u nderly ing SW CV are located.

Page 18: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 18/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 15

3.2 . Creat ing a Nam espace in EnSW CV

You m ust create a new name space in the ESR to ident i fy t he ob jects in th e SW CV before yo u develop an

enhancement structure in the EnSWCV. To do so, select a unique name such as the URL address of the

company, together w i th some addi t ional in format ion that which ident i f ies the appl i cat ion.

St e p 6 : Cr e a t i n g a N a m e s p a c e i n En S W CV

1. Ch oo se t he Switch Between Display and Edit Modes pushbut ton t o go to the change mo de in the

EnSW CV edit or .

2 . Inse r t t he new nam espace and save it ( i n t he exam p le , ht tp: / /x iTest .com/xi /XI is the newnamespace).

3. In t he Chang e Lists tab, r ight c lick the n amespace and choose Activate.

4. Ch oo se t he Details tab to see the EnSW CV that depend s on the und erly ing SW CV.

You can no w u se the nam espace to create enh ancement s for your Enterpr ise Service.

Page 19: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 19/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 16

3 .3 . Crea t ing an Enhancem ent Da ta Type in t he SW CV

Data types that you can use as a basis for future enhancements can be found in the namespaces in Basis

Objects and in t he local nam espace. You can en hance com plex data types using al l of the nam espaces from

Basis Object s. For m ore infor m at ion abo ut choo sing the r ight dat a types, see sect ion 5.2.

St e p 7 : Cr e a t i n g a n En h a n c e m e n t D a t a T y p e i n t h e SW CV

1. Nav igate in the EnSW CV to the desi red namespace.

Page 20: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 20/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 17

2. On the Objec ts tab, se lect Data Type Enhancemen ts and choose the Create Objec t pushbut ton.

3. En t er the Name an d Description of th e data type enhancement and choose Create.

4. On t he Enhancement Definit ion tab, choose the data type to be enh anced.

Page 21: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 21/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 18

5. Select the re levant data type f rom the l i st t hat appears. It conta ins the data types that are located

in t he n amespaces in the underly ing SW CV.

6. Choose OK.

7. Ch oo se t he Enhancement Definit ion tab and c reate the s t ructure o f the enh ancemen t data type.

For m ore inform at ion about creat ing element s in enhancement d ata types, refer to sect io n 5.2.

8 . Sa ve t h e en h an ce m e n t st r u ct u r e.

9. In t he Chang e Lists tab, r ight c l ick the o bject and choose Activate.

Page 22: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 22/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 19

10. The system displays a conf i rm at ion m essage af ter th e objects have been successful ly act ivated.

Page 23: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 23/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 20

4. Develop ing in t he Backend System

You need to carry out certain steps in the back-end system before you can use the enhanced interface

objects f rom SAP NetW eaver SAP NetWe aver PI.

In the back-end system you generate a proxy structure for the enhancement (see sect ion 4.1). The ABAP

system generates an append structure for the service node that is to be enhanced. The system

auto m atically adds the f ields f rom th e enhancemen t t o t he W eb Services Descript ion Language (W SDL) as

opt ional f ie lds.

4 .1 . Genera t ing an Enhancem en t P roxy St r uc tu re

St e p 8 : G e n e r a t i n g a n E n h a n c e m e n t P r o x y S t r u c t u r e

1. On t he SAP Easy Access screen , ent er t he t ransaction SPROXY.

2 . In t he EnSWCV , nav igate t o t he nam espace tha t you c reated i n St e p 6  and choose the fo lder DataType Enhan cement.

3 . Doub le -c li ck t he enhancem ent nam e and choose Creat e Proxy. Choose Yes on t he d ia log box .

Page 24: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 24/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 21

4. En t er the Package and the Prefix for your enhancemen t .

N o t e : The system needs a pref ix to make the enhancement proxy unique wi thin the appl icat ion. The

enhancement st ruc ture and i ts e lement s conta in t he pref i x as par t o f th e nam e; in th is examp le, we

used the pref i x ZTEST. Fo r m o r e in f o rm a t i on , se e SAP Exchange Infrastructure: Guide for Customer

Developm ents and M odif icat ions i n t h e I nt e gr a ti o n Re po si t o r y, Re le ase SA P XI 3 .0 a s l i st e d i n

Documentat ion .

5 . Ge n er at e t h e e n ha nce m e n t p r o xy .

6 . A f ter the proxy i s generated, the system creates an append st ruc ture to t he enhanced st ruc ture

as show n in the dialog box below.

Page 25: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 25/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 22

7. To check the append s t ructure, double-c li ck the ABAP name under Proxy-Append St ruc ture.

8 . The e l em en t s t ructu re o f t he append enhancem ent p roxy appears as shown be low :

Page 26: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 26/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 23

9. To check the enhanced st ruc ture, double-cl i ck the ABAP name. In th is examp le, you see the

enhancement proxy structure ZTESTZTEST as an append structure to the enhanced structure

 / SAPAPO/ SPPKEY_FIGU RE_VA LUE.

Page 27: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 27/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 24

4 .2. BA d I Imp l e m e n t a t i o n

Af ter St e p 8  you m ust f i l l the f ie lds in the enhancement proxy . We prov ide a BAdI w i th the fo l lowing tw o

m eth ods for every service proxy:

Inboun d Processing

Outb oun d Processing

For more informat ion about implement ing BAdIs, refer to Business Add-Ins (BAdIs) as l is ted in

Documentat ion .

St e p 9 : I m p l e m e n t i n g B A d I s

In IM G Custom izing, navigate to t he BAdI correspon ding to yo ur service. Fi show s th e BAdIs th at belong t o

th e services in Advanced Planning and Opt imization (APO) in SCM .

4.3 . Enh ancing Synch ro no us Ent erp r ise Serv icesW hen enh ancing an enterp r ise service wi th an enh ancement element , there are tw o possible scenarios:

The enhancement element is part of t he standard bu siness logic of the ent erpr ise service but i t isnot exposed in th e service signatur e [see Scenario 1] .

The enhancement element is nei ther part o f th e stand ard business logic nor exposed in the servicesignature [see Scenario 2] .

Synchronous enterpr ise services are al l s tructured the same way and consist of three di f ferent message

types: an input message, an output message, and a faul t message. You can enhance ei ther the input

me ssage or the ou tpu t m essage. Thus, each of t he tw o scenarios has tw o variants, depending w heth er you

enhance the inpu t m essage or the o utp ut m essage.

Page 28: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 28/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 25

4.3 .1 . Scenar io 1-Enh ancing Serv ice Signat ur e and M app ing to Ex ist in g

I m p l e m e n t a t i o n

In this scenario, the enhan cement elemen t is part o f the standard business logic of th e enterp r ise service

but i t is not exposed in th e service interf ace. Thus, you m ust f i rst enh ance the service signature in ESR and

then m ap th is new enhancement e lement f r om ESR to the corresponding element in the standard bus inesslogic. This mapping is done in the enterpr ise service BAdI, ei ther in the inbound processing BAdI i f you

enhance the input message, or in t he outbo und p rocessing BAdI i f you enhance the out put message.

In this scenario, you perform th e fol low ing tw o steps (see f igures of Scenarios 1a & 1b):

1 . Enhance the enterpr ise serv ice def in i t ion in ESR.

2. In the Enterpr ise Serv ice BAdI imp lementat ion, map the enhanced e lement d ef ined in ESR wi th thecorresponding element of the standard business logic. Veri fy the error handl ing by checking thatth e value passed by t he consumer is correct , i f not ret urn an err or.

I n p u t M e ss a g e En h a n c e m e n t

You want to enhance the input of a synchronous enterpr ise service. For example, you are using theent erpr ise service A and you want to enhance i t w i th t he e lement x. The standard implemen tat ion o f t he

enterpr ise service A al ready “knows” about th is e lement x, that is , A already wri tes this f ie ld in the

corresponding database. However, the element x is not def ined in t he service signature, w hich means that

this f ie ld is not part o f th e request me ssage data type.

To enhance the inpu t o f a synchrono us enterpr ise service:

1 . Enhance the input message of the service def in i t ion in ESR as descr ibed in t he Figure 6 be low .

2. In the inbound BAdI , map t he f ield x f rom ESR to t he f ie ld xx f rom the s tandard bus iness log ic .

Veri fy the error handl ing by checking that the value passed by the consumer is correct , i f not

re tu rn an e r ro r .

The process described above is depicted in the f ol low ing f igure:

Fi g u r e 7 : Sc e n a r i o 1 a : En h a n c e Se r v i c e I n p u t

Page 29: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 29/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 26

O u t p u t M e ss a g e En h a n c e m e n t

You want to enhance the output of a synchronous enterpr ise service. For example, you are using the

ent erpr ise service Read Customer Basic Data V2 to read the m aster data o f a custom er and you want to

read the addi t iona l element Train Stat ion: th is is the name of the t ra in sta t ion t hat t he custom er uses for

receiv ing rout ine del iver ies but may di f fer f rom the stat ion that the customer uses for express del iver ies.

The standard implementat ion of the enterpr ise service Read Customer Basic Data V2 al ready “knows”

about the e lement Train Station , which m eans that Read Customer Basic Data V2 already reads th is f ie ld

from th e corresponding dat abase (database KNA1, f ield BAHNS). However, t he elemen t Train Station is not

def ined in t he service signature, w hich means that th is f ie ld is not part o f th e outp ut m essage.

To enhance the ou tpu t of a synchronous enterp r ise service:

1 . Enhance the out put m essage in the serv ice def in i t ion in ESR as descr ibed in t he f igure o f

Scenario 1b b elow.

2 . I n t h e o ut b o u n d BA dI, m a p t h e f ie ld Train Station f ro m ESR t o t h e BAH NS f ie ld f r om t h e

standard business logic. Veri fy the error handl ing by checking that the value passed by theconsum er i s cor rect i f n ot re tu rn an er ror .

N o t e : I f there i s an er ror in out bound mapping, it i s a program bug in the prov ider , not a fau l t o f

the consumer.

The process described above is depicted in t he fol low ing f igure:

F ig u r e 8 : Scenario 1 b: Enh ance Service Out put

Page 30: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 30/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 27

4.3 .2 . Scenar io 2 -Serv ice Enh ancem ent Requ i r ing App l icat ion

Enhancement

In this scenario, the enhancement element is nei ther part of the standard business logic of the enterpr ise

service nor exposed in t he service int erface. Thus, enhancing the enter pr ise service requires enhancing th eappl icat ion in addi t ion t o t he steps described in Scenario 1. To enh ance the app l icat ion, you m ust use the

enhancem ent concept t hat the appl icat ion is providing.

In this scenario, you perf orm th e fol low ing three step s (see f igures of Scenarios 2a & 2b):

1 . Enhance the enterpr ise serv ice def in i t ion in ESR.

2. Enhance the bus iness func t iona li ty using the enhancemen t concept o f the cor responding

appl icat ion. (For example, i f the appl icat ion consists of a cal l to a BAPI, you have to use the

extension concept t hat this BAPI is using, such as user-exits or BAdIs. You also need to extend theBAPI’s signat ure .) If necessary, enh ance th e correspo ndin g databases.

3. In the enterpr ise serv ice BAdI implement at ion, map t he enhanced e lement def ined in ESR wi th the

corresponding element that you added into the appl icat ion. Veri fy the error handl ing by checkingth at th e value passed by th e consum er is correct , i f not retu rn an error.

N o t e : As the standard business logic of di f ferent enterpr ise services are implemented di f ferent ly

and/or are us ing d i f ferent ex tens ion concepts , there i s no genera l recommendat ion about how to

enhance the standard business logic. Depending on the cases, you can ei ther enhance the standard

business logic or im plem ent your custom business logic in the enter pr ise service BAdI i tsel f . However,

we d o not recomm end th e second a lternat ive, which should be adopted w i th caut ion as i t can lead to

perfo rm ance issues.

Page 31: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 31/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 28

I n p u t M e ss a g e En h a n c e m e n t

You want to enhance the input of a synchronous enterpr ise service. For example, you are using the

ent erpr ise service A and you want to enhance i t w i th the e lement x. For this purpose, you f i rst have to

enhance the standard business logic of the enterpr ise service A so that i t wr i tes th is f ie ld in the

corresponding dat abase. Then you fol low the sam e pro cedure as for Scenario 1a.

The process described above is il lustrat ed in t he fol low ing f igure:

F ig u r e 9 : Scenario 2 a: Enh ance Service Input and Ap plication

Page 32: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 32/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 29

O u t p u t M e ss a g e En h a n c e m e n t

You want to enhance the output of a synchronous enterpr ise service. For example, you are using the

ent erpr ise service ‘A ’ to read some m aster data and you want to read the addi t iona l e lement y . For th is

purpose, you f i rst have to enhance the standard implementat ion of the enterpr ise service ‘A ’ so that i t

reads this f ield f rom the corr esponding database. Then you fol low th e same pr ocedure as for Scenario 1b.

The process described above is il lustrat ed in t he fol low ing f igure:

F ig u r e 1 0 : Scenario 2b : Enhance Service Outp ut and Ap pl icat ion

Page 33: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 33/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 30

4.4 . Enh ancing Asynchro no us Ent erp r ise Serv ices

Enhancing an asynchronous enterpr ise service is s imi lar to enhancing a synchronous one. The only

di f ference is how you test the asynchronous enterpr ise service, as i t cannot be tested using Web Service

Navigator. However, depen ding on t he services, you can test t hem ei ther using NetW eaver PI wi th cou nt er

part services or di rect ly test the generated proxy in the back-end system. Otherwise refer to the two

scenarios in the enhancement implementat ion described previously in the f i rst sect ion (EnhancingSynchronous Services).

4.4 .1 . Exam ple o f Asynchro no us Ent er pr ise Serv ices

You w ant t o enhance th e asynchrono us enterpr ise service Product Activity Notif icat ion . This asynchronous

inbou nd m essage interface transfers the pro duct-related act iv i t ies of a custom er to the supp l iers. You are

enhanc ing the n ode Item Inventory wi th t he enhancement e lement Inventory Quant i ty.

As you can see in the service def ini t ion, no type is assigned to the node in the Enterpr ise Service

Reposi tory ; how ever the parent n ode, I tem , does have a type assigned t o i t . The relat io nship betw een I tem

an d I tem Inventory has the card ina li ty 0 .1 , which means that th ere i s a max imu m of on e inventory peri tem . Thus, you can enhance the nod e I tem wi t h the e lement Inventory Quantity.

Page 34: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 34/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 31

In this example, the enhancement element is nei ther in the service s ignature nor i t is part of the service

stand ard imp lement at ion; and i t do es not exist in any database of th e back-end system . Thus, w e are in the

same si tuat io n as described in Scenario 2a.

In this exam ple, the user m ust perfo rm the fo l lowing fo ur steps (see asynchrono us service):

1 . Enhance the enterpr ise serv ice def in i t ion in ESR.

2 . En h an ce t h e d at ab ase .

3. Enhance the standard implement at ion o f the enterpr ise serv ice. Since th is standard

im plemen tat ion consists of a call to a BAPI, you can enhance t he BAPI w i th t he exist ing BAPI user-exit concept .

4 . In the BAdI implement at ion, map the enhanced e lemen t def ined in ESR wi th th e cor responding

element t hat you added in to the s tandard implement at ion.

The process described above is il lustrat ed in t he fol low ing f igure:

Fi g u r e 1 1 : Example of Asynchrono us Service Enhancemen t

Page 35: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 35/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 32

5 . A p pe n d ix

5.1 . Re la t io nsh ip be t w een Prod uct s, Prod uct Ver s io n, SW Cs, and SW CVs

in SLD

The relat ionship betw een th e prod uct and t he SW C in SLD is i l lustrated in the fo l lowing f igure:

F ig u r e 1 2 : Relatio nship Betw een Produ ct and SW CV in SLD

It can be better u nder stood b y using the fol low ing exam ple: the prod uct SAP Supply Chain M anagement

(SAP SCM ) h as mult iple com po nen t versions such as SAP SCM 5.0 and SAP SCM 5.1.

A SW C is def ined as a reusable module of a product and can be indiv idual ly upgraded. For more

inform at ion, see SAP Exchange Infrastructure: Guide for Custom er Developm ent s and M odi f icat ions in the

Int egrat ion Repo sito ry, Release SAP XI 3.0 l isted in Documentat ion.

A SW CV i s def ined as a par t i cu lar version of a SW C. For exam ple, SAP BW 2.1C and SAP Basis 4 .6C are

ver sion s of SAP BW an d SAP Basis.

A sof t ware unit describes a relat ion ship bet w een a softw are prod uct and a SW C.

Page 36: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 36/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 33

F ig u r e 1 3 : Relationship Betw een SAP SCM and its SW CV (Incom plet e schem a).

Ex a m p l e

I f you plan an enhancem ent f or th e soft w are compo nent version SAP SCM 5.1, you can name t he

pro du ct Enh ancem ent _Produ ct_SAP_SCM and t he SW C Enh ancem ent _SW C_SAP_SCM . If you assign

version num bers to the pr odu ct and to t he SW C, the names for the p rodu ct version and t he SW CV are

auto m at ically assigned by the system .

5.2 . Creat ing an Enh ancem ent Str uct ure in EnSW CV

When you have ident i f ied the data type to be enhanced, you can then dec ide the s t ruc ture o f the

enhancement and choose the data type t o assign to the e lement s in t he enhancement s t ruc ture.

Ex a m p l e

Refer to th e example f rom t he St e p 7 . You decided to enhance the data type SPPKeyFigureValue. This

data type contains four f ie lds to t ransfer di f ferent numbers. For example, the f ield

Crit icalProductNumberValue contains the numbers of products wi th cr i t ical shortage status in the

Service Part Supp ly Plan. In t his service we com m unicate the num bers of pr oducts, for w hich special

t ranspor t regulat ion s exist .

In ESR, create an enh ancement w i th t he nam e z_test to enhance the node SPPKeyFigureValue. Create

the enhancement st ruc ture in the enhancement def in i t ion and inser t the e lement s or a t t r ibut es in the

enhancement st ruc ture ( in the example ZcustomerNumberValue) . Assign a type such as NumberValue

t o t he e lem en t .

Page 37: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 37/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 34

We recommend the fol lowing three ways to assign a data type to an element. They are l is ted in order of

preference:

1. Use a data type f rom an under ly ing SW CV (f rom a ll namespaces in th is SW CV)

2 . Use a data t ype f rom the enhancem ent nam espace (i n t he exam p le ht tp: / /x iTest .com/xi /XI)

3 . Use a bu il t - in da ta t ype i n teg rated i n ESR

5.2 .1 . Using a Dat a Typ e f ro m an Un der ly ing SW CV

To f ind data types in the namespace where the service operat ion was or iginal ly located, navigate to

EnSWCV Basis Object s Namespace Data Types. He re you see a l ist o f a ll t he da ta t ypes t ha t a re

used in this service operat ion. For example, to assign a type to the element ZcustomerNumberValue, yo u

can u se the data type NumberValue or any ot her sui table data type t hat you f in d in the un derly ing SW CV.

Page 38: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 38/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 35

5 .2 .2 . Using a Da ta Type f ro m the Enhancem ent Nam espace

1. To create the data type in the namespace in EnSW CV, nav igate to EnSWCV Namespace

Interface Objects Data Types. On the m enu bar, choose Creat e Objects.

2. En t er t he Name an d Description of t he data type and choo se Create. Doub le-cl ick Details and enter

the length o f the data type f rom 0 to 999999999.

3 . A f te r savi ng, act i va te t he da ta t ype w i t h i n t he Changes Lists tab.

Page 39: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 39/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 36

4. Af ter ac t i vat ion, the e lement (z_customer_numbervalue) appears as a data type in the

enhancement namespace.

5.2 .3 . Using a Bu i l t - In Data Type In t egra t ed in ESR

The elements of the enhancements structure can also be assigned a type using a bui l t - in data type. TheWo r ld W ide W eb Consor t ium has def ined 19 bu i l t - in data types (h t t p : / / w w w . w 3 . o r g); SAP has also d efin ed

som e data t ypes such as xsd:integer an d xsd:short (Figur e 2).

Use the search help in t he Type column to o pen t he l ist of d ata types from al l th e name spaces of EnSW CV

and the underly ing SWCV. In the example, to use the element ZcustomerNumberValue, we use the

reference dat a type from the n amespace of t he und erly ing SW CV. The dat a type NumberValue, f r om one o f

the nam espaces in t he u nderly ing SW CV, is selected for ZcustomerNumberValue. The pref i x ‘p1 ’ indicates

that the data type is se lec ted f rom a namespace other than the namespace where the enhancement i s

developed.

Page 40: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 40/41

Ent erp rise Services Enh ancem ent Guide

En t erp r ise Services Enhancem ent Gu ide Ver sion 2.0 37

Af ter you have c reated the enhancement s t ruc ture, save the enhancement and ac t i vate i t w i th in the

Cha ng es List tab.

5 .3 . Im pac t o f U pda t e o r Up grade o f an Un der l y ing SW CV on an

Enhancement

EnSW CVs remain un affected b y upd ates of under ly ing SWCVs. Thus, the enhancem ent s developed in SAP

NetW eaver PI remain stable af ter u pdates.

5 .4 . Do cu m e n ta t i o n

1. Enterpr ise Serv ices for SAP, ERP 6.0

http: / /help.sap.com/esoa_docu_print /erp/2005/Docu_ES_ERP_2005_2_EN.pdf

2. SAP Exchange In f rast ruc ture: Guide for Custom er Developments and M odi f i cat ions in the

Int egrat ion Repo sit ory, Release SAP XI 3.0

ht tps : / /www.sdn.sap.com/ i r j / sdn/go/por ta l /pr t root /docs / l ib rary /uu id /00cc32a1-d311-2a10- f39b-

aa1cfab7bd78

3 . B usiness Add-Ins (BA d Is)

ht tp : / /he lp .sap.com/saphelp_nw70/he lpdata/en/99/9cdc40132a8531e10000000a1550b0/ f rames

et .h tm

4 . Serv ice Prov isi on ing Handbook

ht tps : / /www.sdn.sap.com/ i r j / sdn/go/por ta l /pr t root /docs / l ib rary /uu id /6d19c8ee-0c01-0010-

619d-92af980436d7

5. Custom er enhancem ent and m odi f icat ion of BAPIs

ht tp : / /he lp .sap.com/saphelp_nw70/he lpdata/EN/7e/5e141a4a1611d1894c0000e829fbbd/ f rameset .h tm

Page 41: SAP Enterprise Service Enhancement Guide 2 0

7/30/2019 SAP Enterprise Service Enhancement Guide 2 0

http://slidepdf.com/reader/full/sap-enterprise-service-enhancement-guide-2-0 41/41

Ent erp rise Services Enh ancem ent Guide

5.5. Glossary

BAdI Business Add-In

BAPI Busin ess Ap pl icat io n Pr o gram m ing In t er face

DDIC Dat a Dict ionary

ESR Ent erp r ise Service Reposit o r y

EnSW CV Enhancem ent Sof t ware Com ponen t Version

IM G Im plem en t at ion Guide

PI SAP Process In t egr at ion

SCM Supp ly Chain M anagem ent

SLD Syst em Landscape Direct ory

SW C Sof t w are Com ponen t

SW CV Sof t w are Com ponen t Version

XI SAP Exchange In f rast ruct u re