实施学习资料Word文档格式.docx
《实施学习资料Word文档格式.docx》由会员分享,可在线阅读,更多相关《实施学习资料Word文档格式.docx(31页珍藏版)》请在冰豆网上搜索。
oDefiningDialogPrograms
∙DiscoveringReportComponents
oDiscoveringtheProgramRuntimeObject
oIntroducingProgramNamingConventions
∙CreatingYourFirstProgram
∙ExploringtheSourceCodeEditor
oUsingtheEditor:
InitialScreen
oExploringtheFunctionalityoftheSourceCodeEditor
∙GettingHelp
oObtainingF1Help
oObtainingR3LibraryHelp
∙FindingYourDevelopmentObjects
∙IntroducingtheR/3DataDictionary
oExploringTablesandStructures
oDisplayingaTableorStructureDefinition
oDisplayingDataintheTable
oDeterminingDisplayedFields
∙UnderstandingABAP/4Syntax
oIntroducingtheselectStatement
oUnderstandingTableWorkAreas
oIntroducingthewhereClause
oWorkingwithSystemVariables
oUsingtheChainOperator
oUsingtheselectsingleStatement
oCommentingCodeandFormalDocumentation
∙Summary
∙Q&
A
∙Workshop
oQuiz
oEditorExercises
oProgrammingExercises
Afteryoucompletethischapter,youshouldbeableto:
∙CreateandmodifysimpleABAP/4programs.
∙UsestandardfunctionsintheABAP/4editor.
∙UseF1andR/3Libraryhelpfunctions.
∙FindyourprogramsusingtheObjectBrowserandtheeditor.
∙DisplayatableanditscontentsusingtheDataDictionary.
∙Usethetablesandselectstatements.
∙Chainstatementstogetherusingthechainoperator.
∙Addcommentsanddocumentationtoyourprograms.
BeforeProceeding
Beforeproceeding,youshould:
∙BecomfortablewithaprogramminglanguagesuchasC,COBOL,orVisualBasic.Toobtainthefullbenefitfromthisandallfollowingchapters,youshouldalsohavetwoormoreyearsofpreviousdevelopmentexperience.
∙SetupyourinterfaceasrecommendedinDay1inthesection"
TheInterfaceMenu,"
ifyouhavenotdonesoalready.
∙PerformtheinstallprocedurefortheScreenCamsontheCD-ROM.Theinstallprocedureisdescribedinthereadme.txtfilefoundintherootdirectoryoftheCD-ROM.
ManyoftheproceduresinthisbookaredemonstratedusingScreenCams.ScreenCamsarelikemovies;
theyshowaseriesofscreens,includingkeystrokesandmousemovements,withadescriptivevoiceover.TheycanbefoundontheCD-ROMthatcomeswiththisbook.Seethereadme.txtfilefoundintherootdirectoryoftheCD-ROMformoreinformation.
ExploringtheDevelopmentEnvironment
Adevelopmentobjectisanythingcreatedbyadeveloper.Examplesofdevelopmentobjectsareprograms,screens,tables,views,structures,datamodels,messages,andincludes.
TheR/3systemcontainstoolsforcreatingandtestingdevelopmentobjects.ThesetoolsarelocatedintheR/3DevelopmentWorkbench.Toaccessanydevelopmenttool,yougototheworkbench.
Theworkbenchcontainsthesetoolstohelpyoucreatedevelopmentobjects:
∙TheABAP/4programeditorwhereyoucancreateandmodifyABAP/4sourcecodeandotherprogramcomponents
∙TheDataDictionarywhereyoucancreatetables,structures,andviews
∙TheDatamodelerwhereyoucandocumenttherelationshipsbetweentables
∙TheFunctionlibrarywhereyoucancreateglobalABAP/4functionmodules
∙Thescreenandmenupainterswhereyoucancreateauserinterfaceforyourprograms
Thefollowingtestingandsearchtoolsarealsoavailable:
∙theABAP/4Debugger
∙theSQLtracetoolusedtotuneSQLstatements
∙theruntimeanalyzerforoptimizingyourprogram'
sperformance
∙awhere-usedtoolforimpactanalysis
∙acomputer-aidedtesttoolforregressiontesting
∙arepositorysearchtoolforfindingdevelopmentobjects
∙theWorkbenchOrganizerforrecordingchangestoobjectsandpromotingthemintoproduction
Alldevelopmentobjectsareportable,meaningthatyoucancopythemfromoneR/3systemtoanother.Thisisusuallydonetomoveyourdevelopmentobjectsfromthedevelopmentsystemtotheproductionsystem.Ifthesourceandtargetsystemsareondifferentoperatingsystemsorusedifferentdatabasesystems,yourdevelopmentobjectswillrunas-isandwithoutanymodification.ThisistrueforallplatformssupportedbyR/3.(Foralistofsupportedhardwareandoperatingsystems,refertoTable1.1.)
DiscoveringProgramTypes
TherearetwomaintypesofABAP/4programs:
∙reports
∙dialogprograms
DefiningReports
Thepurposeofareportistoreaddatafromthedatabaseandwriteitout.Itconsistsofonlytwoscreens(seeFigure2.1).
Figure2.1:
Theselectionscreenandtheoutputscreen.
Thefirstscreeniscalledtheselectionscreen.Itcontainsinputfieldsallowingtheusertoentercriteriaforthereport.Forexample,thereportmayproducealistofsalesforagivendaterange,sothedaterangeinputfieldswouldappearonthereport'
sselection