Professional Documents
Culture Documents
BadiImplementationforBexuserexitvariables|SCN
GettingStarted Newsletters
Hi,Guest
LogOn
JoinUs
Store
SearchtheCommunity
Products
Services&Support
AboutSCN
Downloads
Industries
Training&Education
Partnership
DeveloperCenter
Activity
LinesofBusiness
UniversityAlliances
Events&Webinars
Innovation
Browse
BadiImplementationforBexuserexit
variables
Communications
Actions
Version1
createdbyBlascoSebastianon28Aug201211:27,lastmodifiedbyBlascoSebastianon28Aug201212:19
Share
Tweet
Like
ThisdocumentgivesthestepbystepmethodforimplementingBADIforuserexitvariablesinBex.Thisisan
alternativeapproachtoaddingthecodeinEXIT_SAPLRRS0_001throughCMOD.
WritingcodesforuserexitsinCMODexitmakesitcumbersomeanddifficulttodebug.Besides,ifmultipleuserswant
towritethecodeforuserexitsatthesametime,theycantdoso.Toovercomethis,wecancreateBADI
implementationsinEnhancementspotandwriteacodetocalltheBADIinEXIT_SAPLRRS0_001.
GototransactionSE18andcreateanenhancementSpotasshownbelow
Enterdescriptioninshorttextandhitenter
CreateBADIdefinition
EnteratechnicalnameanddescriptionforBadidefinitionandhitenter
http://scn.sap.com/docs/DOC31271
1/7
06/02/2016
BadiImplementationforBexuserexitvariables|SCN
Selecttheoptionformultipleuseandcreatefilterasshownbelow
Giveatechnicalnameanddescriptionforthefilterandmaintainsettingsasshownbelow
Beforecreatingthefilter,dictionaryobjectZGLOB_VARneedstobedefinedthroughSE11.ZVAR_NAMisadomain
objectwecreatedwithdatatypeascharandlength30whichshouldbesufficienttoholdthetechnicalnameofthe
variable.
http://scn.sap.com/docs/DOC31271
2/7
06/02/2016
BadiImplementationforBexuserexitvariables|SCN
Next,weneedtocreateinterfacebyenteringtechnicalnameandclickingonchange.
SelectlevelasInstanceMethodandgiveanametomethodanddescription
Underpropertiestab,entertypegroupsyouneedandkeeptheothertabsunchanged
Withthis,enhancementspotdefinitioniscomplete.Next,wecreateindividualimplementationforeachuserexit
variable.Ane.gisshownbelow.
Entertechnicalnameanddescriptionandhitenter
http://scn.sap.com/docs/DOC31271
3/7
06/02/2016
BadiImplementationforBexuserexitvariables|SCN
Next,wecreateBadiimplementationandImplementingClassfortheenhancement
Theimplementationiscreated.Then,customerexitvariablenameneedstobeassignedtothefilterandthe
correspondingcodeshouldbeenteredinthemethodofimplementingclass.
Clickonfiltervalandselectnewcombinationasshownbelow
Clickonthecombination1andassignthetechnicalname(ZFDAYinourcase)ofthecustomerexitvariabletothefilter
http://scn.sap.com/docs/DOC31271
4/7
06/02/2016
BadiImplementationforBexuserexitvariables|SCN
ThenweneedtoclickonImplementingClass,selectthemethodontherightsideandsayyes
Enteryourcodeinthespace
Onactivation,wewillhavecompletedourfirstimplementation.Likethis,wecankeepaddingimplementationsasand
whenwecreatecustomerexitvariables.
IntheincludeofEXIT_SAPLRRS0_001ofourenhancementprojectinCMOD,weneedtoaddacodetocall
theBADIasgivenbelow
DATA:badi_globTYPEREFTOZBW_VAR_BADI_EXIT.
GETBADIbadi_glob
FILTERS
zglob_var=i_vnam.
CALLBADIbadi_glob>enhance
EXPORTING
flt_val=i_vnam
i_vnam=i_vnam
i_vartyp=i_vartyp
http://scn.sap.com/docs/DOC31271
5/7
06/02/2016
BadiImplementationforBexuserexitvariables|SCN
i_iobjnm=i_iobjnm
i_s_cob_pro=i_s_cob_pro
i_s_rkb1d=i_s_rkb1d
i_periv=i_periv
i_t_var_range=i_t_var_range
i_step=i_step
CHANGING
e_t_range=e_t_range
e_meeht=e_meeht
e_mefac=e_mefac
e_waers=e_waers
e_whfac=e_whfac
c_s_customer=c_s_customer.
7354Views
Products:sap_business_explorer_(bex)Topics:enterprise_data_warehousing/business_warehouseTags:badi,bex_variables,
user_exit_variable
AverageUserRating
(13ratings)
Share
Tweet
Like
11Comments
VinayLohakare12Nov201210:16
HelloBlasco,
Goodblog.
Verydetailonetoo.
Thanks,
Vinay
Like(0)
NitinBolke12Nov201211:35
HiBlasco,
VeryniceoneaswecancreatemultipleuserExitvariablesunderoneEnhancementImplementation
Spot.
Regards,
Nitin.
Like(0)
HariKrishna14Nov201212:57
Hello....
ExplicitlywrittenandclearedtheairformeonBADI.Couldyoupleasepostadocumenton''Howto
passtwovariableforBADIimplementaion''.....Itsinvariablyappreciated...
Regards,
HariKrishna
Like(0)
PrernaBali19Nov201210:47
GoodoneBlasco!!
Like(1)
GaneshJagdhane03Sep201310:27
Verywelldocumented...
ThanksBlasco!!
http://scn.sap.com/docs/DOC31271
6/7
06/02/2016
BadiImplementationforBexuserexitvariables|SCN
Like(0)
AnilKumar11Sep201308:24
Thanksfortheinformation.
Greatwork.
Regards,
Anil.
Like(0)
KiranNimmagadda12Sep201307:12
ThanksBlasco..Itisreallyinformatiiveanduseful...
Keeppostingthearticleslikethis...
Regards
KiranN
Like(0)
anirbanmukhopadhyay04Jul201423:10
HiBlasco,
Thanksforthis.But,woulditworkinanSAPBW7.0system?
Iamfacinganerroratthei_stepdeclarationpoint.
Anyhelpisappreciated.
Guys,
Anyideaonthis?
Thanks!
Anirban
Like(0)
FranciscoRodrguez04Jul201423:26(inresponsetoanirbanmukhopadhyay)
Verygooddocuments.Thanks.
Like(0)
swatigawade04Aug201516:12
Hi,
WhenI'menteringthiscodeinCMODI'mgettingerror"Method"ENHANCE"isunknownor
PROTECTEDorPRIVATE."Canyoupleasehelp?
Thanks,
Swati.
Like(0)
HarishNS29Sep201507:28
veryusefullstuff.
Thanks
hari
Like(0)
SiteIndex
Privacy
ContactUs
TermsofUse
http://scn.sap.com/docs/DOC31271
SAPHelpPortal
LegalDisclosure
Copyright
FollowSCN
7/7