Escolar Documentos
Profissional Documentos
Cultura Documentos
Workingwithconstructors(GlobalClass)
Search
Hom e Tra i ni ngs Qui z Ti ps Tutori a l s Functi ona l Ce rt Q's I nte rvi e w Q's Jobs Te sti m oni a l s Adve rti se Conta ct Us
What's New?
ABAPTestCockpitHOT
SAPABAPPragmas
UnderstandingSE32(ABAPText
ElementMaintenance)
Creating an IDoc File on SAP
ApplicationServer
Understanding Advance with
dialogoptionofSAPWorkflow
SAP
Workflow
Scenario:
Maintenance
Notification
Approval
Enhancements to a standard
class
Working with Floating Field in
AdobeForms
Inserting data from Internal
TableintothestepSendMail
Display GL Account long text
usingenhancementframework
Differences
between
polymorphism in JAVA and
ABAP
Passing multiline parameters
from an ABAP Class event to a
Workflowcontainer
Concept of Reevaluate agents
for active work items in SAP
Workflow
Dynamic creation of component
usageinABAPWebDynpro
Adobe Forms: Display symbols
likecopyrightandothers
Deactivate Hold functionality in
Purchaseorder(ME21N)
QuizonOOABAP
AddfieldsinFBL5NusingBADIs
TutorialonWidecasting
Defining a Range in Module
PoolProgram
Copy
fields
from
one
structure/table into another
structure/table
SidePanelUsageinNWBC
1.ConstructorsarespecialmethodsthatcannotbecalledusingCALLMETHOD.Instead,theyarecalled
automaticallybythesystemtosetthestartingstateofanewobjectorclass.
2.Constructorsaremethodswithapredefinedname.Tousethem,youmustdeclarethemexplicitlyinthe
class.
3.TherearetwotypesofconstructorsInstanceconstructorsandStaticconstructors.
TheInstanceconstructorofaclassisthepredefinedinstancemethodCONSTRUCTOR.
Theconstructor'ssignaturecanhaveonlyimportingparametersorexceptions.
InstanceConstructorisaspecialinstancemethodcanaccesstheInstance Variables and Static
Variables.
Thismethodisusedtosetthedefaultvaluesinaclass.
TheStaticconstructorofaclassisthepredefinedstaticmethodCLASS_CONSTRUCTOR.
Theconstructor'ssignaturecannothaveimportingparametersorexceptions.
Thestaticconstructorisasspecialstaticmethodcanaccessthestaticvariables.
Theseareusedtosetdefaultvaluesfortheglobalattributesirrespectiveofinstances.
MultipleInstanceandStaticConstructorscannotbeusedinoneclass.
CreatingtheInstanceConstructorandStaticConstructorusingSE24(Globalclass)
Step1:GotoSE24CreateGlobalClassZCONSTRUCTOR_SALES
Step2:SelecttheClassandClickonContinue.
Step3:Continuewiththedefaultsettings
Step4:GotoMethodsCreateMethods.
Contribute?
Sample Specs
http://www.saptechnical.com/Tutorials/OOPS/Constructor/Index.htm
1/3
9/23/2015
Workingwithconstructors(GlobalClass)
What's Hot?
WebDynproforABAPTutorials
JointheMailingList
Enternameandemailaddressbelow :
Name:
Email:
Subscribe
GO
Unsubscribe
Step5:ConstructorMethodcanbecreated2ways.
1)GotoMenuEditCreateConstructor
2)ClickonConstructorasshownbelow
Step6:AssoonclickonConstructorConstructorMethodisautomaticallydefaultedintheMethods.
Thismethodisusedoinitialthevaluesfortheobject
Step7:CreateanothermethodSelecttofetchthedatafromtheVBAKtable
Step8:SelecttheConstructorMethodSelecttheParametersandCreatetheParameter
Step9:TheparameterIM_VBELNisusedtoimportingintoConstructorMethod.Usedtoinitializethevalue
Step10:FortheConstructor,parametertypeisalwaysimporting.NootherParametertypecanbeassigned
http://www.saptechnical.com/Tutorials/OOPS/Constructor/Index.htm
2/3
9/23/2015
Workingwithconstructors(GlobalClass)
Step11:GotoTypeTabCreateStructurety_vbakandVisibility(Public)
Step12:ClickonDirectTypeEntry
Step13:TodeclaretheStructure(withrequiredfields)andTable
Clickheretocontinue...
GraphicDes ignbyRoundtheBendWizards
http://www.saptechnical.com/Tutorials/OOPS/Constructor/Index.htm
3/3