adding explicit enhancement to custom program
DESCRIPTION
Adding Explicit Enhancement to Custom ProgramTRANSCRIPT
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Index.htm 1/3
Search
Home Trainings Quiz Tips Tutorials Functional CertQ's InterviewQ's Jobs Testimonials Advertise ContactUs
SAP Virtual/OnsiteTrainings
Document Categories:
ABAPTMAdobeFormsABAPHRALE&IDocsALVBAPIBASISBSPBusinessObjectsBusinessWorkflowCRMNEWLSMWSAPScript/SmartFormsBI/BWeXchangeInfrastructure(XI)EnterprisePortals(EP)eCATTObjectOrientedProgrammingSAPQueryUserexits/BADIsWebDynproforJava/ABAPTMOthers
What's New?
ABAPTestCockpitHOTSAPABAPPragmasUnderstandingSE32(ABAPTextElementMaintenance)CreatinganIDocFileonSAPApplicationServerUnderstandingAdvancewithdialogoptionofSAPWorkflowSAPWorkflowScenario:MaintenanceNotificationApprovalEnhancementstoastandardclassWorkingwithFloatingFieldinAdobeFormsInsertingdatafromInternalTableintothestepSendMailDisplayGLAccountlongtextusingenhancementframeworkDifferencesbetweenpolymorphisminJAVAandABAPPassingmultilineparametersfromanABAPClasseventtoaWorkflowcontainerConceptofReevaluateagentsforactiveworkitemsinSAPWorkflowDynamiccreationofcomponentusageinABAPWebDynproAdobeForms:DisplaysymbolslikecopyrightandothersDeactivateHoldfunctionalityinPurchaseorder(ME21N)QuizonOOABAPAddfieldsinFBL5NusingBADIsTutorialonWidecastingDefiningaRangeinModulePoolProgramCopyfieldsfromonestructure/tableintoanotherstructure/tableSidePanelUsageinNWBC
Contribute?
Sample Specs
What's Hot?
WebDynproforABAPTutorials
JointheMailingList
Enternameandemailaddressbelow:
Adding Explicit Enhancement to custom programByRohitRanka,StraVisITSolutions
Introduction:
EnhancementFramework is the new paradigm to bring all enhancement techniques under one roof. It can also beswitched using Switch Framework. The following are different enhancement technologies available under thisframework.
SourceCodeEnhancement
FunctionGroupEnhancement
ClassEnhancement
KernelBADIEnhancement
SourceCodeenhancement
Whenever enhancement needs to be incorporated directly into the ABAP source code, this technology shall beprovided. Implementing this technology is also calledasSourceCodePlugIn.There are two types ofSourceCodeenhancementspossible.
Implicitenhancementoption
Explicitenhancementoption
Explicitenhancementoption
As implicit enhancements are predefined enhancements provided by SAP in the source code, the explicitenhancementscanbeimplementedbythecustomersorpartners.
TherearetwotypesofExplicitEnhancementoptionsavailable.Forthis,wenowhavetwonewABAPstatements,viz.
1.Enhancementpoint(SyntaxENHANCEMENTPOINT)2.Enhancementsection(SyntaxENHANCEMENTSECTION)
Enhancementsectionisusedtoreplaceasetofcodeorstatementswiththecustomer(customcode).Inthistechniquetheoriginalsourcecodedoesnotgetexecutedbut,thecustomerimplementation(customcode)getsexecuted.
NoteExplicitenhancementsthoughcanbeplacedanywhereinthesourcecodebut,not justanywhereexceptsomeareaswhereSAPwouldallow(programallows).
STEP1:CreateapackageintransactionSE80(Objectnavigator)NameYDEV
StartaNurserySchool
StartEarningFromFirstMonth.LowInvestmentandHigh
Returns.
JEEMainsRankPredictorUseourJEEMainsRankPredictor2015andKnowWhereYouStand.
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Index.htm 2/3
Name:
Email:
Subscribe UnsubscribeGO
STEP2:Navigateto'Enhancements'folderofyourpackage.Package(YDEV)Enhancement.
Rightclickthe'Enhancements''Create''EnhancementSpot'.
Fillinthedetailsinthe'CreateEnhancementSpot'dialog.
Andsaveitintocreatedpackage.Observetheenhancementspotcreatedunderthe'EnhancementSpots'folder.
STEP3:'RightClick'thespotcreatedand'Implement'it(CreateanImplementation).
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Index.htm 3/3
Fillinallthedetailsinthe'CreateEnhancementImplementation'dialog.
STEP4:Now,weneedto'Activate'theenhancementspot.InadditionwiththeEnhancementspotthe'EnhancementImplementation'willgetactivated.
Clickheretocontinue...
Pleasesendusyourfeedback/[email protected]
HomeContributeAboutUsPrivacyTermsOfUseDisclaimerSafeCompanies:AdvertiseonSAPTechnical.COM|PostJobContactUs
SAPTechnical.COM.Allrightsreserved.Allproductnamesaretrademarksoftheirrespectivecompanies.SAPTechnical.COMisinnowayaffiliatedwithSAPAG.
SAP,SAPR/3,R/3software,mySAP,ABAP,BAPI,xApps,SAPNetWeaver,andandanyotherSAPtrademarksareregisteredtrademarksofSAPAGinGermanyandinseveralothercountries.Everyeffortismadetoensurecontentintegrity.Useinformationonthissiteatyourownrisk.
GraphicDesignbyRoundtheBendWizards
LimitedElectronicsSale
ElectriyingOffersUpto50%Off.WideRangeOfProducts.
ShopToday!
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page2.htm 1/3
Search
Home Trainings Quiz Tips Tutorials Functional CertQ's InterviewQ's Jobs Testimonials Advertise ContactUs
SAP Virtual/OnsiteTrainings
Document Categories:
ABAPTMAdobeFormsABAPHRALE&IDocsALVBAPIBASISBSPBusinessObjectsBusinessWorkflowCRMNEWLSMWSAPScript/SmartFormsBI/BWeXchangeInfrastructure(XI)EnterprisePortals(EP)eCATTObjectOrientedProgrammingSAPQueryUserexits/BADIsWebDynproforJava/ABAPTMOthers
What's New?
ABAPTestCockpitHOTSAPABAPPragmasUnderstandingSE32(ABAPTextElementMaintenance)CreatinganIDocFileonSAPApplicationServerUnderstandingAdvancewithdialogoptionofSAPWorkflowSAPWorkflowScenario:MaintenanceNotificationApprovalEnhancementstoastandardclassWorkingwithFloatingFieldinAdobeFormsInsertingdatafromInternalTableintothestepSendMailDisplayGLAccountlongtextusingenhancementframeworkDifferencesbetweenpolymorphisminJAVAandABAPPassingmultilineparametersfromanABAPClasseventtoaWorkflowcontainerConceptofReevaluateagentsforactiveworkitemsinSAPWorkflowDynamiccreationofcomponentusageinABAPWebDynproAdobeForms:DisplaysymbolslikecopyrightandothersDeactivateHoldfunctionalityinPurchaseorder(ME21N)QuizonOOABAPAddfieldsinFBL5NusingBADIsTutorialonWidecastingDefiningaRangeinModulePoolProgramCopyfieldsfromonestructure/tableintoanotherstructure/tableSidePanelUsageinNWBC
Contribute?
Sample Specs
What's Hot?
WebDynproforABAPTutorials
JointheMailingList
Enternameandemailaddressbelow:
Adding Explicit Enhancement to custom program...Previous
STEP 5: Here we are applying enhancements to a CUSTOM program not a standard program to demonstrate thefunctionality. So we create a simple program 'YDEV_CODE' (say) it is retrieving records from the database table'VBAK'(SalesDocumentHeader)anddisplayingafewrecords.
Now, if thecustomerwants to replace thesetof logicwithhisown logic (say) like retrieving records fromdatabasetable'VBAP'(SalesDocumentItem)andthendisplayafewrecords,he/shewillcreateanenhancementsectionwhichgoeslike,
CreateaprogramYDEV_CODE.
OUTPUT
TrainingMaterialsCustomizabletrainingmaterialstoteachsoftskillsworkshops.
1YearOnlineMBARs.7500nibmglobal.com/OnlineMBA
100%1YearOnlineMBA.Approved&AccreditedByIAO&AACBE.JoinNow
TopMNCVacanciesmonsterindia.com
FindtheRightJobwithMonster.SubmitCVtoApply&GetHired!
BareBonesDynamicsAXdynamicsaxcompanions.com
EverythingyouneedtosetupDynamicsAX2012fromscratch
OnlineMongoDBTrainingeasylearning.guru/MongoDBTraining
27+hrsofMongoDBOnlineTraining.RegisterForLiveDemoClasses.
GetFreeMobileRechargemysmartprice.com
FreeRs.20MobileRechargeVoucher.AddMySmartPriceChromeExtension
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page2.htm 2/3
Name:
Email:
Subscribe UnsubscribeGO
STEP6:Rightclicktheareawhichisappropriatetoapplytheenhancement
NoteExplicitenhancementsthoughcanbeplacedanywhereinthesourcecodebut,notjustanywhereexceptsomeareaswhereSAPwouldallow(programallows).
Now, in the 'CreateEnhancementOption' fill in thedetails,herefill thenameunder 'Enhancementsection'only.ThenfillintheEnhancementSpotImplementationNamewhichwecreatedearlier.
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page2.htm 3/3
NowweareabletoseeprogramlineshaveEnhancementSectionEndEnhancementSection.
Note Make sure that the code which has to be replaced is within the 'ENHANCEMENTSECTION...' and 'ENDENHANCEMENTSECTION'.
Clickheretocontinue..
Pleasesendusyourfeedback/[email protected]
HomeContributeAboutUsPrivacyTermsOfUseDisclaimerSafeCompanies:AdvertiseonSAPTechnical.COM|PostJobContactUs
SAPTechnical.COM.Allrightsreserved.Allproductnamesaretrademarksoftheirrespectivecompanies.SAPTechnical.COMisinnowayaffiliatedwithSAPAG.
SAP,SAPR/3,R/3software,mySAP,ABAP,BAPI,xApps,SAPNetWeaver,andandanyotherSAPtrademarksareregisteredtrademarksofSAPAGinGermanyandinseveralothercountries.Everyeffortismadetoensurecontentintegrity.Useinformationonthissiteatyourownrisk.
GraphicDesignbyRoundtheBendWizards
Mobile&TabDhamakaSale
ElectriyingOffersUpto55%OffOnHandsets&Accessories.
ShopToday!
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page3.htm 1/4
Search
Home Trainings Quiz Tips Tutorials Functional CertQ's InterviewQ's Jobs Testimonials Advertise ContactUs
SAP Virtual/OnsiteTrainings
Document Categories:
ABAPTMAdobeFormsABAPHRALE&IDocsALVBAPIBASISBSPBusinessObjectsBusinessWorkflowCRMNEWLSMWSAPScript/SmartFormsBI/BWeXchangeInfrastructure(XI)EnterprisePortals(EP)eCATTObjectOrientedProgrammingSAPQueryUserexits/BADIsWebDynproforJava/ABAPTMOthers
What's New?
ABAPTestCockpitHOTSAPABAPPragmasUnderstandingSE32(ABAPTextElementMaintenance)CreatinganIDocFileonSAPApplicationServerUnderstandingAdvancewithdialogoptionofSAPWorkflowSAPWorkflowScenario:MaintenanceNotificationApprovalEnhancementstoastandardclassWorkingwithFloatingFieldinAdobeFormsInsertingdatafromInternalTableintothestepSendMailDisplayGLAccountlongtextusingenhancementframeworkDifferencesbetweenpolymorphisminJAVAandABAPPassingmultilineparametersfromanABAPClasseventtoaWorkflowcontainerConceptofReevaluateagentsforactiveworkitemsinSAPWorkflowDynamiccreationofcomponentusageinABAPWebDynproAdobeForms:DisplaysymbolslikecopyrightandothersDeactivateHoldfunctionalityinPurchaseorder(ME21N)QuizonOOABAPAddfieldsinFBL5NusingBADIsTutorialonWidecastingDefiningaRangeinModulePoolProgramCopyfieldsfromonestructure/tableintoanotherstructure/tableSidePanelUsageinNWBC
Contribute?
Sample Specs
What's Hot?
WebDynproforABAPTutorials
JointheMailingList
Enternameandemailaddressbelow:
Adding Explicit Enhancement to custom program...Previous
STEP7:Nowtoincludethecustomcodeintheprogramwhichwillreplacetheoriginalcode,enablethe'EnhancementMode'byclickingonthe'Spiral'button.
Place the cursor on the 'Enhancementsection' and navigate to 'Edit' 'Enhancement Operations' 'CreateImplementation'.
Fill in the details for the 'Create Enhancement Implementation' dialog. Click on 'Create' button for the 'Select orCreateEnhancementImplementation'dialog.
LimitedElectronicsSaleshopclues.com/Electronic_Deal
ElectriyingOffersUpto50%Off.WideRangeOfProducts.ShopToday!
Call/SMSBasedFeaturesknowlarity.com/Appdevelopment
EnableCall/SMSBasedFeaturesCustomSolutionsforAndroid/iOS
TrainingMaterialsCustomizabletrainingmaterialstoteachsoftskillsworkshops.
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page3.htm 2/4
Name:
Email:
Subscribe UnsubscribeGO
STEP 8: Now, write the code within the 'ENHANCEMENT' and 'ENDENHANCEMENT' statements as thereplacementcode.
STEP9: Don't forget to 'Activate' the enhancement Switch the 'Enhancement' modeOFF and 'Activate' theentireprogram.
STEP10:Executethetransaction/programtofindoutthedifference.
BeforeEnhancement:
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page3.htm 3/4
AfterEnhancement:
Summary:
1. Here we deals with the enhancement of a 'Z' program it is possible to 'CREATE' an 'ENHANCEMENTSECTION'. But, in case of a 'STANDARD SAP' program there are certain places (provided by SAP) like'ENHANCEMENTPOINT...'and'ENHANCEMENTSECTION...'wherewecancreateimplementationsbasedoncustomersbusinessfunctionality.
2.Therecanbeonlyoneandonlyone'ACTIVE'implementationforan'ENHANCEMENTSECTION'.
SourceCode:
*&**&ReportYDEV_CODE*&*&**&*&*&*
REPORTYDEV_CODE.TABLES:VBAK,VBAP.DATA:IT_VBAKTYPESTANDARDTABLEOFVBAKINITIALSIZE0,WA_VBAKTYPEVBAK,IT_VBAPTYPESTANDARDTABLEOFVBAPINITIALSIZE0,WA_VBAPTYPEVBAP.
INITIALIZATION.REFRESH:IT_VBAK,IT_VBAP.CLEAR:WA_VBAK,WA_VBAP.
STARTOFSELECTION.ENHANCEMENTSECTIONYDEV_ENHANCE_SECTIONSPOTSYDEV_IMPLEMENT_SPOT.SELECT*FROMVBAPINTOTABLEIT_VBAP[]UPTO15ROWS.
WRITE:/02'SalesDocument',20'Date',
-
6/12/2015 AddingExplicitEnhancementtocustomprogram
http://saptechnical.com/Tutorials/ExitsBADIs/Explicit/Page3.htm 4/4
40'Time',65'NameofPerson'.ULINE.IFIT_VBAP[]ISNOTINITIAL.LOOPATIT_VBAPINTOWA_VBAP.WRITE:/02WA_VBAPVBELN,20WA_VBAPPOSNR,40WA_VBAPMATNR,65WA_VBAPMATWA.ENDLOOP.ENDIF.ENDENHANCEMENTSECTION.*$*$Start:YDEV_ENHANCE_SECTION$*$*ENHANCEMENT1YDEV_IMPLEMENT_ENHC_SECTION."activeversionSELECT*FROMVBAPINTOTABLEIT_VBAP[]UPTO10ROWS.
WRITE:/02'SalesDocument',20'SalesItem',40'MaterialNumber',65'Materialentered'.ULINE.IFIT_VBAP[]ISNOTINITIAL.LOOPATIT_VBAPINTOWA_VBAP.WRITE:/02WA_VBAPVBELN,20WA_VBAPPOSNR,40WA_VBAPMATNR,65WA_VBAPMATWA.ENDLOOP.ENDIF.ENDENHANCEMENT.*$*$End:YDEV_ENHANCE_SECTION$*$*
Pleasesendusyourfeedback/[email protected]
HomeContributeAboutUsPrivacyTermsOfUseDisclaimerSafeCompanies:AdvertiseonSAPTechnical.COM|PostJobContactUs
SAPTechnical.COM.Allrightsreserved.Allproductnamesaretrademarksoftheirrespectivecompanies.SAPTechnical.COMisinnowayaffiliatedwithSAPAG.
SAP,SAPR/3,R/3software,mySAP,ABAP,BAPI,xApps,SAPNetWeaver,andandanyotherSAPtrademarksareregisteredtrademarksofSAPAGinGermanyandinseveralothercountries.Everyeffortismadetoensurecontentintegrity.Useinformationonthissiteatyourownrisk.
GraphicDesignbyRoundtheBendWizards
TopMNCVacancies
FindtheRightJobwithMonster.SubmitCVtoApply&GetHired!
Adding Explicit Enhancement to custom program-part1Adding Explicit Enhancement to custom program-part2Adding Explicit Enhancement to custom program-part3