Enhanc eme ment si nSAP SAPenhancement st oenhancest andar dSAPobj ect susi ng ABAPpr ogr amm mmi ng En ha nc i n gs t a nd ar dSAPa pp l i c a t i o nsu si n gSAPe nh an c eme nt s SAPi saERPs of t war ei nwh i c hal l s t andar dbus i nes sappl i c at i onsar edel i v er ed ,s omet i mes c us t omerma yneedt oaddaddi t i onal f unc t i onal i t yt ot hee xi s t i ngappl i c at i onsbas edoncus t omer b us i n es sr e qu i r e men me t s .
Enhanceme ment sconc ept Th ee nha nc eme nti sac on ce pto fa dd i ngy o uro wnf u nc t i o na l i t yt oSAP' ss t a nd ar db us i n es s appl i c at i onswi t houtha vi ngt omodi f yt heor i gi nal appl i c at i ons .T omodi f yt hes t andar dSAP b eh a v i o ra spe rc u s t o me me rr e qu i r e me me nt s ,wec a nu s ee nh a nc e me me ntf r a me me wo r k .
Typesofenhanceme ment si nSAP Us erEx i t s I ni t i al l ySAPi mpl ement edenhanc ement si nt hef or m ofUs erEx i t sandt hes ear eonl yav ai l abl ei n SDmo du l e ,u se re x i t sar ei mpl e me me nt e di nt h ef o r mo fs ub r o ut i n esan dh en cea r ea l s oc al l e da s FORM EXI TS,Us e re x i t sar ee mp mp t ys ub r o ut i n est h atSAPd ev e l o pe r sha v ep r o v i d edf o ry o u,y o u c a na ddy o uro wns ou r c ec od ei nt h ee mp mp t ys u br o ut i n es . Al l us ere xi t ss t ar t swi t ht hewor dUSEREXI T . Cust omerExi t s Th es ea r eo net y p eo fe nh an c eme nt st h ata r ea v a i l a bl ei ns o mes me p ec i fi cpr o gr a ms ms ,s c r e en sa nd me nu swi t h i ns t a nd ar dSAPAp pl i c a t i o ns .Th es ea r eFu nc t i o nMo du l e swi t hac u s t o me mp mp t y i nc l udepr ogr am,y ouc anaddy ouro wnf unc t i onal i t yi nt hes ei n cl udepr ogr ams . Cu st omerEx i t sar ea v ai l abl ei nal l SAPmodul es ,wher easus ere xi t sar eonl yav ai l abl ei nSD modul e. Al l c u s t o me me re x i t s(F un c t i o nMo du l e s )s t a r t swi t hCAL LCUST OMERwo OM r d .
Us erEx i t si nSAP Enhanc i ngSAPs t andar dappl i c at i onsus i ngus ere x i t s Th es ear ei mp l e me me nt e di nt h ef o r mo fs u br o ut i n esa ndhe nc ear eal s ok no wnas FORM EXI Ts. Th eu se re x i t sar eg en er al l yat t a ch edt ot h es t a nd ar dp r o gr am b yt h eSAP . Us ere x i t sar eat y peo fs y s t e me nh an ce men me tt h atwa so r i g i n al l yde v el op edf o rt h eR/ 3SD( Sa l e s anddi s t r i but i on)modul e. Us er e x i t sar ee mp mp t ysu br o ut i n est h atSAPDe v el o pe r sha v ep r o v i d edf o ry o u . Youc anfi l l t hem wi t hy ouro wns our c ec ode.T ec hn i c al l yt hi si samodi fi c at i on. Al l Us ere xi t ss t ar twi t ht hewor dUSEREX _ I T. . . FORM USEREXI T_XXXX. . . . ENDFORM. Userexi t scanbef oundi nt hef ol l owi wi ngways: Got oOb Ob j e c tNa v i g at o r( SE8 0) ,s e l e c tPa c k ag ea ndpu tVMOD( Ap pl i c a t i o nd ev e l o pme ntR/ 3SD c us t omermodi fi cat i on)andpr es sent er .Youwi l l fi ndal l t hei nc l udesf orus ere xi t si nSD.Youwi l l getUs ere xi t sf orSal esor der ,Del i v er y ,Bi l l i ng,Pr i c i nget c .Mos toft het i medoc ument at i oni s mai nt ai nedf oreac hs ubr out i newhi c hhel psde vel operf orbe t t erunder s t andi ngoft hes ubr out i ne. Sel ec tt hes ubr out i neac c or di ngt ot her equi r ementands t ar tc odi ngwi t hi nt hes ubr out i ne. Examp mpl es: -I nUs ere x i t sMV MV4 5AFZZ( Sal e sOr d erEx i t ) ,weh av esu br o ut i n e USEREXI T_PRI CI NG_PREPARE_TKOMK USEREXI T_PRI CI NG_PREPARE_TKOMP Th i sus ere xi tc anbeus edt omo v eaddi t i onal fi el dsi nt ot hec ommuni c at i ont abl ewhi c hi sus ed f o rp r i c i n g.TKOMKf o rh ea de rfi e l d sa ndTKOMG f o ri t e mfi el d s.Th efi el d swh i c ha r en oti nei t h er o ft h et wot a bl e sKOMKa ndKOMPc a n no tb eu s e di np r i c i n g. I nUs ere xi t sMV MV5 0AFZ1( Del i v er yEx i t ) ,y ouha v es ubr o ut i n e USEREXI T_ SAVE_DOCUME MENT_ PREPARE Th i sus ere x i tc anbeus edf o rc ha ng esorc he ck s ,b ef o r eado cu me me nti ss a v ed .
Cus t omerEx i t si nSAP Us i ngc us t omere x i t st oenhanc es t andar dSAPappl i c at i ons SAPc r e at e sc us t ome re x i t sf o rs pe ci fi cpr o gr ams ,s c r e en s,a ndme nu swi t h i ns t a nd ar d appl i c at i ons .Thes eex i t sdonotc ont ai nanyf unc t i onal i t y .I ns t ead,t hec us t omere xi t sac tas h oo k s.Yo uc anha ngy o uro wna dd o nf u nc t i o na l i t yo nt ot h es eh oo k s. Cu st omere xi t sar eno t hi ngbutai nc l udei nc us t omernames pac ewi l l bepr o v i d edi nt hef unc t i on mo du l ewh i c hs t a r t swi t hCAL LCUST OMER.Y ouc a nfi l l t h em wi t hy o u ro wns o ur c ec o de . T ec hni c al l yt hi si sanenhanc ement .Us ere xi t sgene r al l yr e f ert oSDmodul ewhi l ec us t omere xi t s r ef ert oal l modul esl i k eMM,SD,PP ,FI CO e t c . Advant agesofCust omerExi t s: -Th e ydono ta ff ec ts t a nd ar dSAPs o u r c ec od e. -The ydono ta ffe cts of t wa r eup da t e s. Di sadvant agesofCust omerExi t s: -Cu s t o me re x i t sar en ota v ai l ab l ef o ra l l p r o gr a msan ds c r e en sf o un di nt h eSAPSy s t e m.Yo u c anonl yus ec us t ome re x i t si ft he yal r eadyex i s ti nt heSAPSy s t em.
T y pesofCus t omerEx i t s 1 .F un c t i o nMo du l ee x i t s . 2. Scr eenexi t s. 3. Menue xi t s. 1 .F unc t i onModul ee x i t s . Func t i onmodul ee xi t sar ee x i t sde v el opedb ySAP .Thee xi ti si mpl ement edasac al l t oaf unc t i on modul e.Thecodef ort hef unc t i onmodul ei swr i t t enb yt hedev el oper .Youar eno twr i t i ngt he c odedi r ec t l yi nt hef unc t i onmodul e,buti nt hei nc l udet hati si mpl ement edi nt hef unc t i on modul e. For mat :CALLCUSTOMERFUNCTI ON' 910' Thenami ngst andar doff unct i onmodul esf or f unc t i onmodul eex i t si s : EXIT_
_<3 digit sufx>.
Exampl es:Funct i onModul eExi t s:EXI T_SAPMF02K_001. 2 .Sc r e e nEx i t s : Al l o wc u s t o me rt oa ddfi e l d st oas c r e env i aas u bs c r e eni nanSAPp r o gr a m.Th es u bs c r e eni s c al l edwi t hi nt hes t andar ds c r een' sfl owl ogi c .Fort hi sweneedt oi mpl ementFM Ex i t s / MenuEx i t s t owr i t et hel ogi cf orSc r eenEx i t s.Al l s cr eenex i t swi l l bes ubs cr eens .
3 .Me nue x i t s : Me nue x i t sal l o wy o ut oa ddy o uro wnf u nc t i o nal i t yt ome nu s.Me nue x i t sar ei mp l e me nt edb y SAPa nda r er e se r v e dme nuen t r i e si nt h eGUIi n t er f a ce .Th ed ev e l op erc anad dh i s / h ero wnt e x t a ndl o gi cf o rt h eme nu . Func t i onc odesf ormenue xi t sal l s t ar twi t h" +" .For mat :+CUS( addi t i onal i t em i nGUIs t at us )
Me t hodst ofi ndo utc us t omerEx i t s : Th er ear enu mb er so fwa yb yu s i n gwec anfi ndou tCu s t o me rEx i t s . Enhancement: I ti sagr ouporc ont ai neroft heFM e xi t s / MenuEx i t s / Sc r eenEx i t s. I ti sanSAPObj ec twhi c hc ont ai nsl i s tofEnhan cement s .Apr oj e ctmus tbec r ea t edf or Pr oj e ct : eac hen hanc ements ot hatt hecor r es pondi nge x i t si nanenhanc eme ntwi l l bei nac t i v es t at e . So,Apr oj ecti sgr oupofEnhancement sAnEnhancementcannotbel i nkedt omor et han onepr oj e ct .I tt hr owser r orCMODi st heT codef orc r e at i ngapr oj e ct .
Fi ndi ngcust omerexi twi t hCALLCUSTOMER Wek no we v er yt r ans ac t i oni sl i n kedt oapr ogr am,al l c us t omere xi t s ( Func t i onModul es )i ns i de pr ogr amss t ar t swi t hCALLCUSTOMER,soweca nus eCALLCUSTOMERt ofin dt hem. Exampl eoffindi ngcust omerexi tf orVA01Tcode VA01,i sat c odeus edf o rc r eat i ngs al esor der ,t ofi ndc us t omere x i tf orVA01,got ot c odeVA01, s y st em,s t at us .
Apopupwi l l open,youcanfindt hepr ogr am name,copyt hepr ogr am nameandgot oSE38, di s pl a y(s i mpl ydoubl ec l i c kt ogot opr ogr am s our c e) .
On c ey o ug ot op r o gr a ms o ur c e ,c l i c konfi n di c o n.
Apopupwi l l open,sear chf ort hewor dCALLCUSTOMERi nmai npr ogr am. Y ouwi l l fi n dt h el i s to fF un c t i o nMo du l e swi t ht h ewo r dCAL LCUST OMER.
Doubl ecl i ckonf unct i onmodul eCALLCUSTOMERFUNCTI ON' 911' ,youcanseeai ncl ude ' I NCL UDEZXOI KU4 6' ,t h at ` swh er ey o uc a ni mp l e me nty o uro wnf u nc t i o na l i t y.
Us erex i tr eal t i mebus i nes s ex ampl eSAP Business Requirement: When ever business user creates a deliver order! the standard "#$ application dose not chec% &or storage location '(hether it is space or not )! i& it is space it should raise a error message. VL 01i st h et c od ef o rc r e at i n gad el i v e ro r d er ,t h i sus ess t a nd ar dSAPp r o gr a m SAPMV5 0A,t h e s t andar dpr ogr am don` tc hec kf ors t or agel oc at i onequa lt os pac eorno t . Aspert her equi r ementwenee dt ofi ndasu i t abl eus er e xi tf ort hi sandweneedaddaddi t i onal c odet oc hec ks t or agel oc at i on. T ec hni c ali nf or ma t i on: St or agel oc at i onfi el di sLGORTandi ti sav ai l abl ei nLI PSt abl e. T oi mpl ementt heus er e xi tf o rt hi sweneedt of ol l owt hebel o ws t e ps . St ep1:Fi ndt heus er ex i t . St ep2:Ver i f yt heus er ex i t . St ep1:I mpl ementt heus er e x i t .
Fi ndt heUs ere xi t Got ot r a ns ac t i onVL 01 N,Sy s t emSt a t u s
Ap opu pwi l l o pe na nsd ou bl ec l i c ko np r o gr a mn ame .
Cl i c konFi ndi c on,s el ec tmai npr ogr am,fi nd' us er e xi t ' andpr es sent er .
Yo uwi l l fi ndnu mb ero fp er f o r ms .
Ver i f yt heus er ex i t sf ors ui t abl eex i t Ch oo s es o meex i t sb as e do nd es c r i p t i o ns. You' l l hav et or oughl ydec i dewhi c hi st hec or r ec tus er e xi tr out i net ous ed.So,Formy r equi r ementIus edt hebel o w us ere xi t . USEREXI T_ SAVE_ DOCUMENT_PREPARE: Us et hi sus ere xi tt omak ec er t ai nc hangesor c hec k si mmedi at el ybef or es av i ngadoc ument .I ti st hel as tpos si bi l i t yf orc hangi ngorc hec ki nga d oc umen tb ef o r epo s t i n g. So, Doubl ecl i ckont heuse rex i tFORM USEREXI T_SAVE_DOCUMENT_PREPARE,putbr eak poi nti ns i det hef or m. No w got ot abl eLI PS,di s pl a y ,ge tadel i v ernoandgot oVL02N( T c odef orc hang i ngdel i v er or der ) ,pr ov i dedel i v er yor dernoandent er . Ca hn gea nyv al u ee x :d el i v e r yqu an t i t yan ds a v e.
c l i c konSav e( Ct r l S) ,debuggerwi l l open. . nowt hi si st hes ui t abl ee xi t .
I mpl ementus er e x i t T oi mp l e me ntu s e r e x i twen ee da c c e s sk e yf r o m SAP ,wh e nweg e ta c c e s sk e yf r o m SAP ,wr i t e b el o wc od ei n si d ef r o m. I& lips*lgort + , , . -chec% i& storage location is initial essage ,"torage location is mandator /eld, T0$E ,E,. -error message Endi& .
Sa ve,Ac t i v at eandt es t .
Cus t omerex i tr eal t i mebus i nes s ex ampl eSAP Busi nessRequi r ement : Wheneverwecr eat eacust omer .We
needt oc hec kweat hert hec us t omerbel ongst oCount r y: GERMANYa ndi fRe gi o ni se q ua lt os pa c e. Th en ,Ra i s ea n Er r o rme s s a ge . Fort hi sr equi r ementweneedt oi mpl ementFunct i onModul eexi t .
T ec hni c al r equi r ement s : •
Tcodei s: XD01/XD02/XD03.
•
Co un t r yFi e l di s:L AND1.
•
Re gi o nFi e l di s:REGI O.
•
Tabl enamei s:KNA1.
•
Theabo v et a bl e sandfi el dsar egi v e nb yf unc t i o nal c ons ul t ant s .
T oi mpl ementt heCus t omere xi tf o rt hi sweneedt of ol l o wt hebel o ws t eps . St ep1:Fi ndt hef unc t i onex i t . i f yt hec us t omere xi t . St ep2:Ver St ep1:Cr eat epr oj ec tf orc us t omerex i t . St ep4:I mp l e me ntt h eCu st o me re x i t .
Fi ndt hef unc t i onex i t Got oSE93( mai nt ai nTr ans ac t i on)T c ode,pr o vi deXD01,di s pl a y .
Doubl ecl i ckonPr ogr am nameSAPMF02D. Cl i c konFi n di c on ,ma i npr og r a m,fi n dCAL L CUSTOMER,ent er .
Al i s tofc al l c us t omerf unc t i onswi l l bedi s pl ay ed. Ba s edo nr e qu i r e me nt ,Ch ec kI mp or t / Ex p or tPa r a me t e r sf o re ac hF un c t i o nMo du l eAn dr o ug hl y s e l e c ts o meCu s t o me rF un c t i o nMo d ul e s. Asp ert h i sr e qu i r e me nt ,wene edKNA1T ab l ede t a i l s ,Sowec anus et h eb el o w Cu s t o me r F un c t i o nMo du l ewh i c hh asane x p or t i n gp ar a me t e rI _ KNA1 .
Ver i f yt heCus t omerEx i t Thenv er i f yt hec us t omerex i t( f unc t i onmodul e)wheat heri twi l l f ul l fi l l r equi r emnt . Do ub l ec l i c konF un c t i o nmo du l en amea ndp utt h eb r e akpo i n t. Got oSE1 1KNA1 Di s p l a y ,g e tac u s t o me ra ndg ot oXD0 2 .
Pr ov i deac us t omer ,s av e( Ct r l S) ,wai tf orbr eak poi ntt ot r i gger .
St o pt heDebuggi ngandno wi mpl ementt heFunc t i onal Modul eEx i t .Ast hi sex i ti st r i gg er ed,t hi s i st hes ui t abl eFunc t i onal Modul eEx i tf orourr equi r ement .
Cr eat ePr oj ec ti nCMODt oi mpl emen tc us t omere x i t . Got oT c o deCMOD( Pr o j e c tMa na ge me nt ) ,p r o v i d eapr o j e c tn ame ,c r e at e .
Toi mpl ementweneedt opr ovi deenhancementnamebutwedon` thaveenhancementname,we j us thav ec us t omere x i tname,nowweneedt ofi ndenhanc ementname. Fol l o wt h eb el o ws t e pst ofi nden han ce men tf o rac us t o me re x i t . Al l t h ee nh an ceme nt sf o rc us t ome re x i t swi l l b es t or e di nMODSAPt a bl e ,weca ng et e nh an c e me ntn amebyu s i n go urc u s t o me re x i t . GetFunct i onmodul enamef r om cus t omerexi t ,doubl ecl i ckonCALLCUSTOMERFUNCTI ON ' 001' .
No td o wnt h eF un c t i o nMo du l ena me ,g ot oSE1 1,p r o v i d et a bl ena meMODSAP ,d i s p l a y , cont ent sandpr ovi deenhancement / memberasEXI T_SAPMF02D_001,ex ecut e.
Youwi l l fi ndt heenhanc ementnamef ort hef unc t i onex i t .
Nowgot oCMODandt opr oj ectZXD01_EXandcl i ckonenhancementassi gnment sandadd enhancementasSAPMF02D,ent erandcl i ckoncomponent s. Youwi l l fi ndFunc t i onmodul ename,doubl ec l i c konf un ct i one xi t .
Youwi l l fi ndai nc l udei ns i det hef un ct i onmodul e,doubl ec l i c kt oc r eat eandaddy ouro wnc ode .
Andaddbel owcode.
Cl i c kBACK,a ct i v a t eFu nc t i o nMo du l e . Ag a i nc l i c kBACK,
Ex i ti si mpl ement ed,t es tt heobj ec t . Got oXD02. Ent eraCust omer
ChangeCount r yt oDEandRegi ont ospace.
Wewi l l g etaer r o rme s s ag e.
Di ffer enc ebet weenus erex i tand c us t omerex i ti nSAP UserExi t
Cust omerExi t
Us ere xi ti si mpl ement edi nt hef or m ofa Su br o ut i n ei . e .PERFORM x x x . PERFORM user exi t _sav e_document _pr epar e.
Ac u s t o me re x i tc a nb ei mp l e me nt e da s :
•
Func t i onex i t Sc r e enEx i t
•
MenuExi t
•
UserExi t
Cust omerExi t
•
Fi el dEx i t
Ex a mp l e :CAL LCu s t o me rf u nc t i o n" XXX" I NCL UDEZXXX.. " c r e at ean da ddl o gi c I ncaseofaPERFORM,youhav eaccesst o Youha v eac c es sonl yt ot hei mpor t i n g, al mos tal l t hedat a.Soy ouhav ebet t erc ont r ol ,but e xpor t i ng,c hang i ngandt abl espar ame t erof mo r er i s kofma ki ngt h es y s t e mu ns t a bl e . t h eFu nc t i o nMo dul e .Soy o uh av el i mi t ed a cc es st od at a . Us ere xi ti sc on si der edamodi fi c at i onandno ta n enhancementbecausewear echangi ngt he e xi s t i ngc ode.
Ac us t omere xi ti sc ons i der edan enhancementbecausewear eaddi ng addi t i onal f unc t i onal i t yt ot heex i s t i ngone. . not c ha ng i n ga nyt h i ng .
YouneedAc c es sKe yf orUserEx i t .
Youdonotneedac c es sk e y .
Chan gesar el os ti nc as eof anu pgr ade.
Cus t omerex i t sc amel at erandt he y o v er c omet h es ho r t c omi n gso fUs erEx i t .
Us erEx i twi l l beac t i v at edaut omat i c al l ywhene ver T oac t i v at eaf unc t i one xi t ,y ouneedt oc r eat e y ouac t i v at et heappl i c at i on( pr ogr am) . apr oj ec ti nCMODandac t i v at et hepr oj ec t .