Documente Academic
Documente Profesional
Documente Cultură
Skiptocontent
Home
AboutITPartners
Follow:
RSS
ITPartnersBlog
SAPTips,TricksandeLearning
Tags
abapobjects,automationcontroller,buffer,businessprocessanalysis,call,cl_gui_objects=>free,consulting
company,controlstechnology,event,informationtechnologypartners,method,oomethods,presentation
server,sapconsulting,sapgui,sapr3,sapsystemsintegration,systemperformance,technologyframework,
workflowdevelopment,wrapperclasses
SAPControlsTechnologyPart2
byadminonMay28th,2012
Recommend This Post!
AnthonyCecchiniisthePresidentofInformationTechnologyPartners(ITP),anSAP
consultingcompanyheadquarteredinPennsylvania.ITPofferscomprehensiveplanning,resourceallocation,
implementation,upgrade,andtrainingassistancetocompanies.Anthonyhasover17yearsofexperience
inSAPR/3businessprocessanalysisandSAPsystemsintegration.HisareasofexpertiseincludeSAP
NetWeaverintegrationALEdevelopmentRFC,BAPI,IDoc,Dialog,andWebDynprodevelopmentand
customizedWorkflowdevelopment.Youcanreachhimatajcecchini@itpsap.com.
TheControlsTechnologyFramework,AutomationController,and
AutomationQueue
InthismonthsblogIwillcontinuetotakealookattheSAPControlsTechnologyandhowwecanuseitin
ourdevelopment.
ThereisconstantcommunicationpassedbetweencontrolsontheSAPGUIandtheapplicationthatresides
ontheapplicationserver.TheSAPControlsTechnologyFrameworkandtheAutomationControllerarethe
vehiclesbywhichthesecommunicationstakeplace.
TheControlsTechnologyFrameworkresidesontheapplicationserver(thebackend),andtheAutomation
Controllersitsonthepresentationserver(thefrontend).Theintegralcomponentthatoptimizesthe
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 1/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
communicationbetweenthetwoistheAutomationQueue.
LetstakeacloserlookatthebenefitsthisarchitectureoffersbyexamininghowtheSAPControls
TechnologyFrameworkenablesintegrationanduseofyourcontrolsthroughABAPOOmethods,andhow
theAutomationQueueprovidesa
buffertotheAutomationControllertohelpavoiddecreasedsystemperformance.
TheSAPControlsTechnologyFrameworkABAPOOMethods
TheControlsTechnologyFrameworksupportsallthecontrolsthatareimplementedwithintheSAPGUI.It
encapsulatesallavailablecontrolsinglobalwrapperclassesofABAPObjects,andevenmaintainsalistof
thecontrolinstancesyouhavecreated.Toworkwithcontrolsonyourscreen,yousimplycreateobjectsof
thesewrapperclasses,calltheirmethods,andreactontheirevents.Therefore,whenintegratingacontrolinto
yourprogram,youareactuallyjustcallingdeliveredmethodsoftheControlsTechnologyFramework.
ThecontrolsatthefrontendareutilizedbyusingthemethodsoftheControlsTechnologyFramework
classesCL_GUI_CFW,CL_GUI_OBJECT,andCL_GUI_CONTROL.
TheSAPControlsTechnologyFrameworkoffersyouclassesfor:
Creating,initializing,andpositioningcontrolstobedisplayedonthefrontendorPresentationLayer
Makingacontrolvisibleorinvisible
Checkingwhetheracontrolisstillactiveorhasbeendestroyed
Queryingacontroltoretrieveinformationregardingitsheightorwidth
Enablingthepossibilitytoimplementuserinteractionintheprogrambyusingevents(examplesofevents
areclick,doubleclick,draganddrop,andsoon)
Bufferingcontrolmethodsinaqueueandtransferringthemtothefrontendforexecution
Destroyingcontrolsatthefrontendandfreeingthememorytheyoccupy
Letstakeacloserlookateachoftheseclassesinturn
TheCL_GUI_CFWClass
TheCL_GUI_CFWclasscontainsonlystaticmethods,whichapplycollectivelytoallthecontrolsthatexist
atthefrontend.Thetwomostcommonlyusedmethodsaredispatchandflush:
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 2/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
Thedispatchmethod
Inthecaseofcertainevents(applicationevents)theeventhandlermethodisnotcalledbeforethePAI
(ProcessAfterInput)event.IfyouwishtocalltheeventhandlerwithinthePAIevent,thedispatchmethodis
used:
CALLMETHODcl_gui_cfw=>dispatch
IMPORTING
return_code=return_code.
Thevalueofreturn_codeindicateswhetherornotthecallwassuccessful.Ifyoudonotcallthismethodin
yourprogram(explicit),thesystemcallsthismethodautomaticallyaftertheendofthePAIevent(implicit).
Theflushmethod
ThismethodisusedtoforcesynchronizationoftheAutomationQueue.Allthebufferedmethodsinthe
queuearethentransferredtothefrontendviaRFCforexecution:
CALLMETHODcl_gui_cfw=>flush
EXCEPTIONS
cntl_system_error=1
cntl_error=2.
Ifthereisanyerror,anexceptionistriggered.Ifyoudonotcallthismethodinyourprogram(explicit),the
systemcallsthismethoditselfaftertheendofthePAIevent(implicit).
TheCL_GUI_OBJECTClass
TheCL_GUI_OBJECTclassisthesuperclassofallcontrolwrapperclasses.Thecommonlyusedmethods
areis_validandfree:
Theis_validmethod
Thismethodinformsyouwhetherornotacontrolforanobjectreferencestillexistsatthefrontend.Suppose
youwanttofindoutwhetherornotthevariablemy_controlhastheobjectreferenceofaninstantiated
control.Inthatcase,youusethefollowingcode:
CALLMETHODmy_control>is_valid
IMPORTING
result=result.
Ifthevalueofresultis1,thenthecontrolisactive.Avalueofzeromeansitisinactive.
Thefreemethod
Thismethodisusedtodestroyacontrolatthefrontend.Themethodalsodeletestheentryofthecontrol
fromtheControlsTechnologyFrameworksystemtable.Youshouldalsoinitializetheobjectreferenceafter
thismethodcall:
CALLMETHODmy_control>free
EXCEPTIONS
cntl_error=1
cntl_system_error=2.
Freemy_control.
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 3/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
TheCL_GUI_CONTROLClass
TheCL_GUI_CONTROLclassisinheritedfromthesuperclassCL_GUI_OBJECT.Allcontrolclassesare
theninheritedfromthisclass.Itcontainsthefollowingmethodsforsettingattributesofthecontroland
implementingeventhandling:
Theconstructormethod
ThismethodiscalledbythecontrolwrapperwhenyouinstantiateacontrolbytheCREATEOBJECT
statement.
Theset_registered_eventsmethod
Thismethodisusedtoregistertheeventsofthecontrol(thiswillbecoveredinmoredetailintheupcoming
blog,Part3,oneventhandling):
CALLMETHODmy_control>set_registered_events
EXPORTING
events=it_events
EXCEPTIONS
cntl_error=1
cntl_system_error=2
illegal_event_combination=3.
Thetableit_eventscontainsalistoftheeventsthatyouwanttoregister,andisbasedontheDDICstructure
CNTL_SIMPLE_EVENT.
Theget_registered_eventsmethod
Thismethodreturnsalistofalleventsregisteredforacontrol:
CALLMETHODmy_control>get_registered_events
IMPORTING
events=it_events
EXCEPTIONS
cntl_error=1.
Again,theit_tableeventsshouldbebasedontheDDICstructureCNTL_SIMPLE_EVENT.
Theset_visiblemethod
Usethismethodtomakeacontrolvisibleorinvisible:
CALLMETHODmy_control>set_visible
EXPORTING
visible=visible
EXCEPTIONS
cntl_error=1
cntl_system_error=2.
IfthevalueofthevariablevisibleisequaltoX,thecontrolbecomesvisible.Whenitisequaltospace(
),thenitbecomesinvisible.
Theis_alivemethod
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 4/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
Ifacontrolisalreadydestroyedandyoutrytodestroyitagain,anerrorwilloccur.Toavoidthiswecan
determinethestateofacontrolusingthefollowingcode:
CALLMETHODmy_control>is_alive
RETURNING
state=state.
Ifthecontrolisactiveandvisible,thenthevalueofstatewillbeequaltotheattributestate_aliveofthe
control.
HowtheAutomationQueueprovidesabuffertotheAutomation
Controllertohelpavoiddecreasedsystemperformance.
Eachcontrolclassmethod,ifcalledimmediatelyfromyourABAPprogram,couldopenaseparateRemote
FunctionCall(RFC)connectionbetweentheapplicationserverandthefrontend.ToomanyRFCcallscan
resultinpoorsystemperformanceandexcessiveconsumptionofsystemresources.Toavoidthis,the
ControlsTechnologyFrameworkmethodsarenotexecutedwhentheyarecalled.Theyareinsteadinserted
intoabuffercalledtheAutomationQueuebeforebeingsentforexecutiontotheAutomationController(the
presentationserver)atdefinedsynchronizationpoints.Automaticsynchronizationoccursattheendofthe
PBO(ProcessBeforeOutput)event.Synchronizationcanalsobeforcedbycallingthestaticmethod
CL_GUI_CFW=>FLUSH.
TheAutomationQueuefollowsaFIFO(FirstIn,FirstOut)principle.Atsynchronization,themethodsthat
arecalledfirstareexecutedfirst.Foreveryinternalsession,thereisaseparateAutomationQueuetohandle
itscontrols(seebelow).
Atsynchronization,theAutomationQueuepassesitscontents(methodsm1,m2,andm3,inthatorder)tothe
frontend.Themethodsareexecutedatthefrontendandtheresultsarereturnedtothebackend.
ThatwasabriefoverviewoftheControlsTechnologyFrameworksuseoftheAutomationController,and
AutomationQueue.WealsoexploredtheOOClassstructureandcommonlyusedmethodsinABAP
Likewhatyou'rereading?Subscribeandgetitdeliveredtoyourinboxevery
development.
month
InthenextblogwecanlookcloserattheEventsandErrorHandling.
Name: Email: Subscribe
Toreadpart1ofthisseriesontheAdvancedControlTechnologyFramework,usethefollowinglink.SAP
ControlsTechnologyPart1
IfyouenjoyedthisblogontheControlsTechnology,pleaseclickonthelinkbelowandsignupforour
newsletter.WedeliverrelevantSAPTechnicaltips&tricksandcurrentnewsrighttoyourinbox!
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 5/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
Checkoutarewebchannels
IT Partners
WeRecommendReading... gomobileaboutwripl
UsingTheSALVOOClassAdding
Functionsto >>
FromControlFramework
7Comments ITPartners,Inc
1 Login
Likewhatyou'rereading?Subscribeandgetitdeliveredtoyourinboxevery
month
Recommend Share SortbyBest
Name: Email: Subscribe
Jointhediscussion
nikeairflightscorer3yearsago
whoahthisweblogiswonderfulilikereadingyourposts.
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 6/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
whoahthisweblogiswonderfulilikereadingyourposts.
Keepupthegoodwork!Youknow,lotsofindividualsarelookingroundforthisinformation,youcan
helpthemgreatly.
Reply Share
MarylandrefinanzierenHypothe3yearsago
Prettysectionofcontent.Isimplystumbleduponyoursiteand
inaccessioncapitaltosaythatIacquireactuallylovedaccountyourblogposts.
AnywayI'llbesubscribinginyourfeedsandevenIfulfillmentyougetentrytopersistentlyfast.
Reply Share
realtimefilesyncsoftware3yearsago
DoyoumindifIquoteafewofyourarticlesaslongasIprovidecreditandsourcesbacktoyour
weblog?
Myblogsiteisintheverysameareaofinterestasyoursand
myuserswouldtrulybenefitfromsomeoftheinformationyouprovidehere.
Pleaseletmeknowifthisokaywithyou.Thanksalot!
Reply Share
Please..Quoteaway!
Reply Share
http://submitlinkurl.com/compu3yearsago
Goodday!DoyouuseTwitter?I'dliketofollowyouifthatwouldbeok.I'mundoubtedlyenjoying
yourblogandlookforward
tonewposts.
Reply Share
Reply Share
UsingTheSALVOOClassAdding
Shelby3yearsago Functionsto >>
I'mgonetotellmylittlebrother,thatheshouldalsovisitthisweblogonregularbasistoobtain
updatedfromnewestnews.
Reply Share
ALSOONITPARTNERS,INC
AnintroductiontoWebDynproPart3 WhatsNewinABAP7.02and7.03Part1
Likewhatyou'rereading?Subscribeandgetitdeliveredtoyourinboxevery
13comments3yearsago 1comment3yearsago
month
AvatarJohnVerygoodpostwithdeeperanalysis Avataraess.upc.esKeepthisgoingplease,great
Name: Email: Subscribe
abouttheapplication...likeit. job!
ABAPDatabaseSQLAnalysisUsingThe TheNewEnhancementFrameworkPart2
PerformanceTracePart1 3comments3yearsago
1comment2yearsago Avatarthetaoofbadassscam Thankyouforyour
AvatarBrownmathewGoodpieceofinformation websitepublish.Manleyandialsohavebeen
flowonABAPDatabaseSQLAnalysisUsing savingtogetawholenew
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 7/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
flowonABAPDatabaseSQLAnalysisUsing savingtogetawholenew
ThePerformanceTrace.
Likethisblog?SubscribetoOurNewsletter
andhaveitdeliveredtoyourinboxeach
month!
FirstName.....
EmailAddress.....
Subscribe
WeRespectYourPrivacy!
I.T.Partners,INC
3,740likes
LikePage Share
Bethefirstofyourfriendstolikethis
WeRecommendReading... gomobileaboutwripl
I.T.Partners,INC
1hr UsingTheSALVOOClassAdding
SignUpandYouGetOur Functionsto >>
MonthlyNewsletterDelivered
RighttoYourInbox..ItContains
CuttingEdgeSAPInformationon
Fiori,HANA,ABAP,ANDSAP
CLOUD..PLUSAFREEEBOOK
"ABAPforFunctional
Consultants"...
Likewhatyou'rereading?Subscribeandgetitdeliveredtoyourinboxevery
month
Name: Email: Subscribe
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 8/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
Tweetsby@itpsapinc
ITPartners,INC
@itpsapinc
TDFTransao/TMF/CTR_TECH_INFOParte01scn.sap.com/community/port
15s
ITPartners,INC
Embed ViewonTwitter
SelectCategory UsingTheSALVOOClassAdding
Functionsto >>
Archives
SelectMonth
SuggestionsForYou:
UsingTheSALVOOClassAddingFunctionsto
Likewhatyou'rereading?Subscribeandgetitdeliveredtoyourinboxevery
UsingTheSALVOOClassUserManagedLayouts
month
UsingTheSALVOOClassUpdatingGridColumn
Name: UsingTheSALVOOClassChanginghowtheALV
Email: Subscribe
FastandEasySAPABAPDebuggerScripting
LayerAwareDebugging(SLAD)inSAPDemystifie
ABAPDynamicProgrammingPart5
ABAPDynamicProgrammingPart4
EvaluatingtheQualityofYourABAPwithCode
WhatsNewinABAP7.02and7.03Part
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 9/10
8/23/2016 SAPControlsTechnologyPart2|ITPartnersBlog
About
Since1993,ITPartnershasbeenprovidingreliable,costeffectivesolutionstomeetourcustomer'sgoalsand
objectivesintheSAPMarketplace.
WithITPartnersConsultingasyourvaluedbusinesspartner,yougettheexpertisenecessarytocreateand
realizebusinessvalue,andtorunSAPprojectssuccessfully.Ourconsultantshelpreducetimetovalue,lower
totalcostofownership,andimprovethereturnonyourSAPsoftwareinvestment.
Tags
abapABAP7.4ABAPOOABAPQualityabapskillsalvbusinessprocessanalysisCodeInspector
consultingcompanydebuggerdebuggingdialogDynamicProgrammingenhancementenhancements
ExtendedProgramCheckframeworkguiHANAininformationtechnologypartners
ITPartnersITstaffingMemoryAnalysisMemoryInspectornewOpenSQLRollAreaRuntime
sapsapalvsapconsultingsapguisapidocSAPIntegrationsapnetweaver
AnalysisinABAPSALV
sapr3SAPstaffingsapsystemsintegrationSATSLINtechnology
frameworkwebdynproworkflowdevelopment
Search
Search
Copyright2016InformationTechnologyPartners.TitanThemebyTheThemeFoundry.
WeRecommendReading... gomobileaboutwripl
UsingTheSALVOOClassAdding
Functionsto >>
Likewhatyou'rereading?Subscribeandgetitdeliveredtoyourinboxevery
month
Name: Email: Subscribe
http://www.itpsap.com/blog/2012/05/28/sapcontrolstechnologypart2/ 10/10