ABAP面试问题和答案_第1页
ABAP面试问题和答案_第2页
ABAP面试问题和答案_第3页
ABAP面试问题和答案_第4页
已阅读5页,还剩37页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、ABAP面试问题和答案WhatisanABApdatadictionary?-ABAp4datadictionarydescribesthelogicalstructuresoftheobjectsusedinapplicationdevelopmentandshowshowtheyaremappedtotheunderlyingrelationaldatabaseintables/views.Whataredomainsanddataelement?-Domains:Domainisthecentralobjectfordescribingthetechnicalcharacteristic

2、sofanattributeofanbusinessobjects.Itdescribesthevaluerangeofthefield.DataElement:Itisusedtodescribethesemanticdefinitionofthetablefieldslikedescriptionthefield.Dataelementdescribeshowafieldcanbedisplayedtoend-user.Whatisforeignkeyrelationship?-Arelationshipwhichcanbedefinedbetweentablesandmustbeexpl

3、icitlydefinedatfieldlevel.Foreignkeysareusedtoensuretheconsistencyofdata.Dataenteredshouldbecheckedagainstexistingdatatoensurethattherearenowcontradiction.Whiledefiningforeignkeyrelationshipcardinalityhastobespecified.Cardinalitymentionshowmanydependentrecordsorhowreferencedrecordsarepossible.Descri

4、bedataclasses.-Masterdata:Itisthedatawhichisseldomlychanged.Transactiondata:Itisthedatawhichisoftenchanged.Organizationdata:Itisacustomizingdatawhichisenteredinthesystemwhenthesystemisconfiguredandisthenrarelychanged.Systemdata:ItisthedatawhichR/3systemneedsforitself.Whatareindexes?-Indexesaredescri

5、bedasacopyofadatabasetablereducedtospecificfields.Thisdataexistsinsortedform.Thissortingformeasefastaccesstothefieldofthetables.Inorderthatotherfieldsarealsoread,apointertotheassociatedrecordoftheactualtableareincludedintheindex.Yheindexesareactivatedalongwiththetableandarecreatedautomaticallywithit

6、inthedatabase.Differencebetweentransparenttablesandpooledtables.-Transparenttables:Transparenttablesinthedictionaryhasaone-to-onerelationwiththetableindatabase.Itsstructurecorrespondstosingledatabasefield.Tableinthedatabasehasthesamenameasinthedictionary.Transparenttableholdsapplicationdata.pooledta

7、bles.pooledtablesinthedictionaryhasamany-to-onerelationwiththetableindatabase.Tableinthedatabasehasthedifferentnameasinthedictionary.pooledtablearestoredintablepoolatthedatabaselevel.WhatisanABAp/4Query?-ABAp/4Queryisapowerfultooltogeneratesimplereportswithoutanycoding.ABAp/4Querycangeneratethefollo

8、wing3simplereports:BasicList:Itisthesimplereports.Statistics:ReportswithstatisticalfunctionslikeAverage,percentages.RankedLists:Foranalyticalreports.-ForcreatingaABAp/4Query,programmerhastocreateusergroupandafunctionalgroup.Functionalgroupcanbecreatedusingwithorwithoutlogicaldatabasetable.Finally,as

9、signusergrouptofunctionalgroup.Finally,createaqueryonthefunctionalgroupgenerated.WhatisBDCprogramming?-Transferringoflarge/external/legacydataintoSApsystemusingBatchInputprogramming.BatchinputisaautomaticprocedurereferredtoasBDC(BatchDataCommunications).Thecentralcomponentofthetransferisaqueuefilewh

10、ichreceivesthedatavieabatchinputprogramsandgroupsassociateddatainto“sessions.WhatarethefunctionalmodulesusedinsequenceinBDC?-Thesearethe3functionalmoduleswhichareusedinasequencetoperformadatatransfersuccessfullyusingBDCprogramming:BDC_OpEN_GROUp-parameterslikeNameoftheclient,sessionsandusernamearesp

11、ecifiedinthisfunctionalmodules.BDC_INSERT-Itisusedtothedataforonetransactionintoasession.BDC_CLOSE_GROUp-Thisisusedtoclosethebatchinputsession.Whatareinternaltables?-Internaltablesareastandarddatatypeobjectwhichexistsonlyduringtheruntimeoftheprogram.Theyareusedtoperformtablecalculationsonsubsetsofda

12、tabasetablesandforre-organisingthecontentsofdatabasetablesaccordingtousersneed.WhatisITS?WhatarethemeritsofITS?-ITSisaInternetTransactionServer.ITSformsaninterfacebetweenHTTpserverandR/3system,whichconvertsscreenprovideddatabytheR/3systemintoHTMLdocumentsandvice-versa.MeritsofITS:Acompletewebtransac

13、tioncanbedevelopedandtestedinR/3system.Alltransactioncomponents,includingthoseusedbytheITSoutsidetheR/3systematruntime,canbestoredintheR/3system.TheadvantageofautomaticlanguageprocessingintheR/3systemcanbeutilizedtolanguage-dependentHTMLdocumentsatruntime.WhatisDynpro?-DynproisaDynamicprogrammingwhi

14、chisacombinationofscreenandtheassociatedflowlogicScreenisalsocalledasDynpro.Whatarescreenpainterandmenupainter?-Screenpainter:Screenpainterisatooltodesignandmaintainscreenanditselements.ItallowsusertocreateGUIscreensforthetransactions.Attributes,layout,filedattributesandflowlogicaretheelementsofScre

15、enpainter.Menupainter:Menupainterisatooltodesigntheinterfacecomponents.Status,menubars,menulists,F-keysettings,functionsandtitlesarethecomponentsofMenupainters.ScreenpainterandmenupainterbotharethegraphicalinterfaceofanABAp/4applications.WhatarethecomponentsofSApscripts?-SApscriptsisawordprocessingt

16、oolofSApwhichhasthefollowingcomponents:Standardtext.Itislikeastandardnormaldocuments.Layoutsets.-Layoutsetconsistsofthefollowingcomponents:Windowsandpages,paragraphformats,Characterformats.CreatingformsintheR/3system.EverylayoutsetconsistsofHeader,paragraph,andcharacterstring.ABAp/4program.WhatisALV

17、programminginABAp?WhenisthisgridusedinABAp?-ALVisApplicationListviewer.SapprovidesasetofALV(ABApLISTVIEWER)functionmoduleswhichcanbeputintousetoembellishtheoutputofareport.ThissetofALVfunctionsisusedtoenhancethereadabilityandfunctionalityofanyreportoutput.Casesariseinsapwhentheoutputofareportcontain

18、scolumnsextendingmorethan255charactersinlength.Insuchcases,thissetofALVfunctionscanhelpchooseselectedcolumnsandarrangethedifferentcolumnsfromareportoutputandalsosavedifferentvariantsforreportdisplay.Thisisaveryefficienttoolfordynamicallysortingandarrangingthecolumnsfromareportoutput.Thereportoutputc

19、ancontainupto90columnsinthedisplaywiththewidearrayofdisplayoptions.WhataretheeventsinABAp/4language?-Initialization,Atselection-screen,Start-of-selection,end-of-selection,top-of,end-of,Atline-selection,Atuser-command,AtpF,Get,AtNew,AtLAST,ATEND,ATFIRST.WhatisCTSandwhatdoyouknowaboutit?-TheChangeandT

20、ransportSystem(CTS)isatoolthathelpsyoutoorganizedevelopmentprojectsintheABApWorkbenchandinCustomizing,andthentransportthechangesbetweentheSApSystemsandclientsinyoursystemlandscape.ThisdocumentationprovidesyouwithanoverviewofhowtomanagechangeswiththeCTSandessentialinformationonsettingupyoursystemandc

21、lientlandscapeanddecidingonatransportstrategy.Readandfollowthisdocumentationwhenplanningyourdevelopmentproject.Whatarelogicaldatabases?Whataretheadvantages/dis-advantagesoflogicaldatabases?-Toreaddatafromadatabasetablesweuselogicaldatabase.Alogicaldatabaseprovidesread-onlyaccesstoagroupofrelatedtabl

22、estoanABAp/4program.Advantages:i)checkfunctionswhichcheckthatuserinputiscomplete,correct,andplausible.ii)Meaningfuldataselection.iii)centralauthorizationchecksfordatabaseaccesses.iv)goodreadaccessperformancewhileretainingthehierarchicaldataviewdeterminedbytheapplicationlogic.disadvantages:i)Ifyoudon

23、otspecifyalogicaldatabaseintheprogramattributes,theGETeventsneveroccur.ii)ThereisnoENDGETcommand,sothecodeblockassociatedwithaneventendswiththenexteventstatement(suchasanotherGEToranEND-OF-SELECTION).Whatisabatchinputsession?-BATCHINpUTSESSIONisanintermediatestepbetweeninternaltableanddatabasetable.

24、Dataalongwiththeactionisstoredinsessioniedataforscreenfields,towhichscreenitispassed,programnamebehindit,andhownextscreenisprocessed.HowtouploaddatausingCATT?-ThesearethestepstobefollowedtoUploaddatathroughCATT:CreationoftheCATTtestcaserecordingthesledatainput.Downloadofthesourcefiletemplate.Modific

25、ationofthesourcefile.Uploadofthedatafromthesourcefile.WhatisSmartForms?-SmartFormsallowsyoutocreateformsusingagraphicaldesigntoolwithrobustfunctionality,color,andmore.Additionally,allnewformsdevelopedatSApwillbecreatedwiththenewSmartFormsolution.HowcanImakeadifferentiationbetweendependentandindepend

26、entdata?-Clientdependentorindependenttransferrequirementsincludeclientspecificorcrossclientobjectsinthechangerequests.WorkbenchobjectslikeSApscriptsareclientspecific,someentriesincustomizingareclientindependent.Ifyoudisplaytheobjectlistforonechangerequest,andthenforeachobjecttheobjectattributes,youw

27、illfindtheflagclientspecific.Ifoneobjectinthetasklisthasthisflagon,thenthattransportwillbeclientdependent.Whatisthedifferencebetweenmacroandsubroutine?-Macroscanonlybeusedintheprogramthearedefinedinandonlyafterthedefinitionareexpandedatcompilation/generation.Subroutines(FORM)canbecalledfromboththepr

28、ogramthearedefinedinandotherprograms.AMACROismoreorlessanabbreviationforsomelinesofcodethatareusedmorethanonceortwice.AFORMisalocalsubroutine(whichcanbecalledexternal).AFUNCTIONis(moreorless)asubroutinethatiscalledexternal.SincedebuggingaMACROisnotreallypossible,preventtheuseofthem(Iveneverusedthem,

29、butseentheminaction).Ifthesubroutineisusedonlylocal(calledinternal)useaFORM.Ifthesubroutineiscalledexternal(usedbymorethanoneprogram)useaFUNCTION.1.Canwewritethecodebothcalltransactionandsessionmethodinsingleprogram?Ans.Yesitispossibletowritecalltransactionandsessioninoneprogram.2.WhichBDCyouprefer?

30、Ans.Ifwewanttotransferlargeamountofdataandwhenweneedtousemorethanonetransactioncodeweprefersessionmethod.Forsmallorlessamountofdataandforsingletransactionusecalltransaction. (ThisismoregenricanswerbutyoucanaddmoreontothisifyouhaveworkedonBDC)3.WhenupreferLSMW?Ans.WhenweneedtomediumamountofdataweuseL

31、SMW.LSMWisalsousedwhenthepersonlikefunctionalconsultanthaslessprogramminglanguage.5.Differencebetween.includeand.append?Ans.Includestructureallowstoaddoneormorestructureintostructureortable.Alsoplacedpositioninganywhere.Upto6includestructurecanbeusedinatable.Appendstructurecanbeplacedonlyattheendofa

32、structureortablewhichalsostopsfurtherionoffields.Onlyoneappendstructurecanbeused6.preformancetechniquesAns.1.Thesequenceoffieldsmustbesameasperdatabasetable2.Duringwritingselectquerywriteallfieldsinsequenceasperdatabasetable.3.Neverwriteselectstatementsinsideloop.endloop.4.Usest05SQLtrace,se30runtim

33、eanalysis,codeinspector,slin,etc.5.Useselectsingle*statementinsteadofselect*6.Alwaysuseprimarykey7.Usebinarysearchbutbeforeusingbinarysearchsortthattable.7.Howtodebugsapscripts?Ans.Twowaystodebugsapscript.firstwayisgotoSE71andfrommenubarselectUtilities-activatedebugger.thengotoSE38executetheprintpro

34、gram,itautomaticallygoestodebuggingmode.theotherwayis,runtheprogramRSTXDBUGinse38.executeit.amessagewillshowthatdebuggerisactivated.nowopentheprintprograminse38uvllnoticethattheprintprgmisautomaticallydivertedtodebuggingmode.8.Whatispartnerselection?Ans.ThisconceptismainlyusedinIDOCwhereuselectthepa

35、rtnerprofileusingTcodeWe20.withTcodeSM59youcreateRFC(remotefunctioncall)tocreatecommunicationlinktoaremotesystem.10.Whatisoccursininternaltable?Ans.OccursadditiontotheDeclarationwillgiveinitialsizetothattable.occurstatementallocates8kbofmemorytotheinternaltable.11.Whatispagewindow?Ans:pagewindowisno

36、thingbutacontainerofapage,whichuniquelyidentifiesasetofdataforexlewhilecreatinginvoicewecreatelogowindow,billingdocumentheaderwindow,customerwindow,termsandconditionwindowetc12.Whatisthedifferencebetweenscrollingatablehorizontallyandvertically.?Ans:Intablecontrolwhenyouscrollatableverticallypresenta

37、tionserverneedstocallapplicationservertofetchthenextrecordanddisplayinthetablewhileincaseofhorizontalscrollthereisnoneedtocallapplicationserver.13.WhatareFieldGroups?Ans:Agroupthatcombinesseveralfieldsfewerthanonename,atruntime,theINSERTcommandisusedtodefinewhichdatafieldsareassignedtowhichfieldgrou

38、parecalledFieldGroups.ItshouldalwaysbeaHEADERfieldgroupthatdefineshowtheextracteddatawillbesorted;thefieldsgroupedundertheHEADERfieldgroupsortthedata.14.ListtheeventsinABAp/4Language?Ans:TheeventsinABAp/4areloadofprogram,Initialization,SelectionScreen,StartofSelection,EndofSelection,Topofpage,Linese

39、lection,Usercommand,End,First.15.HowthevalueswillbepassedtoRFCFunctionmodulepassbyValueorpassbyreference?Ans:alwayspassbyValue.RFCisRemoteFunctioncallsoitcantaccessthevalueswithpassbyreference.16.Bufferingconceptusage?Ans:Therearethreetypeofbuffer1singlerecord2genericbuffer3fullbufferBufferingisusef

40、orimproveperformance.itimprovesperformance10to100timesmore17.Selectupto1rowandselectsingledifference?Ans:Selectsinglefetchesfirstmatchingrecord.Ifmorethanonematchingrecordsaretherethenonlythefirstmatchingrecordwillbeconsideredotherrecordswillnotbetakenintoaccount.Whereasselectupto1rowswillfetchallth

41、ematchingrecordsfromthedatabase.(AgainitwillassignonlyOneRecordtotheinternaltable/Workarea)18.Whatarethedifferentbufferingmethods?TherearetwodifferentbufferingmethodsThesystemensuresthatdatatransferbetweentheR/3Systemandthedatabasesystemisasefficientaspossible.Todothis,itusesthefollowingtechniques:T

42、ablebuffering:Theprogramaccessesdatafromthebufferoftheapplicationserver.Databaserequestbuffering:IndividualdatabaseentriesarenotreadorpassedtothedatabaseuntilrequiredbyanOpENSQLstatement.19.Differenttypesoflocks?vReadlock(sharedlock)protectsreadaccesstoanobject.Thereadlockallowsothertransactionsread

43、accessbutnotwriteaccesstothelockedareaofthetable.voWritelock(exclusivelock)protectswriteaccesstoanobject.Thewritelockallowsothertransactionsneitherreadnorwriteaccesstothelockedareaofthetable.voEnhancedwritelock(exclusivelockwithoutcumulation)Workslikeawritelockexceptthattheenhancedwritelockalsoprote

44、ctsfromfurtheraccessesfromthesametransaction.20.CHAINENDCHAIN?Ans:ChainandendchainareusedformultiplefieldvalidationinModulepoolprogramming.Itiswritteninsidethescreenflowlogic.21.HowtoDebugRFCFunctionmodule?Ans:SE38-Utilities-Settings-ABApEditor-DebuggingActivatetheexternaldebuggingandchoosetheNewDeb

45、uggeroptioninABApdebugger.Gototheparticularplaceinthecodeandputbreakpoint,popwillappearthenchoosetheHTTpbreakpoint.IfyouaretriggeringtheRFCfromSApportalmakesurethatboththeuserIDshouldbesameIftheusersaredifferentthenprovidetheXI/portalUserIDintheusersfield.22.Whysapscriptsareclientdependentandsmartfo

46、rmsareclientindependent.?Ans-:SmartformscreateitsownfunctionmodulesoitdoesntneedtotransporttherequestthroughSCC1.AsalltheDevelopmentObjectarestoredinclientindependenttables.WhereasScriptdoesntgenerateanyfunctionmodulewhileexecutingsoweneedtotransporttherequestnumberthroughSCC1.Sapscriptisstroedinsid

47、etheclientdependedtableasaTEXT.sosapscriptsareclientdependentandsmartformsareclientindependent.23.DifferencebetweenuserexitandBADIs?Ans:UserexitisforsingleimplementationanditisproceduralapproachwhileBADIsareformultipleimplementationandobjectorientedapproach.MultipleimplementationmeansReusabilitybeca

48、useweuseOOpsConceptsforBADI.24.ControlbreakeventsinABAp:-1.AT-FIRST:Thisisusedwhenwewanttoexecutethestatementsbeforerecordsareprocessed.2.AT-LAST:Thiseventisusedwhenwewanttoexecutethestatementsafterallrecordsareprocessed.3.AT-NEW:Thiseventisusedwhenwewanttoexecutethestatementbeforegroupofrecordsarep

49、rocessed.4.AT-END:Thiseventisusedwhenwewanttoexecutethestatementsafterprocessingofgroupofrecords.25.Iamuploading100recordsoutofwhichsay59threcordhaserrorsowhatwillhappenifiamusingsynchronousorasynchronousmethodofBDC?Canwethedatabaseusinglocalmodehow?26.Supposeiamwritingfollowingcodethenwhatwillbeout

50、put?LOAD-OF-pROGRAM.WRITE:/HELLO.Ans:HELLO(ExplaintheimportanceofLOAD-OF-pROGRAMEvent.IfyoudontknowTelltheinterviewerasthiseventisusedinsuchcaseswhenyouwanttoclearsumbuffersorsomethingBeforecallingthatprogram)27.WhatisTMG?Ans.TMGstandsforTableMaintenancegenerator.Itisatoolavailableinabapbywhichwecan

51、addormultiplerecordsatatimeanditisexecutedortriggeredbythetransactioncodeSM30.28.Differencebetweenselectoptionandranges?Ans.ThemaindifferencebetweenselectoptionandrangesisthatrangesimplicitlyorautomaticallycreatesinternaltablewithfieldslikeOpTION,LOW,HIGH,SIGN,etc.Whereasincaseofselectoptionwehaveto

52、explicitlycreateinternaltable.Whenudeclaresaselectoptionsitwillimplicitlydeclareaninternaltable(ranges)foryou.WhileusingRANGESsyntaxucandeclareinternaltableexplicitly.Theonlyneedofdeclaringrangesiswhenyournottakinginputfromtheuserbutyouwantmakelimitbasedselectionatthattimeitwillbeusefulle.g.SELECT*f

53、rom*whereMATNRinval_range.hereucanuseselect-optionorranges:val_range.29.isitpossibletobringselectoptioninmodulepoolscreens?Ans.CreateaSELECT-OpTIONSinmodulepoolscreenusingtwomethodsasshown.Method1:a)Createasubscreenareainyourscreenlayoutwhereyouwanttocreatetheselectoptions.b)Inthetopincludeofyourmod

54、ulepoolprogramdeclareaselectionscreenasasubscreene.g.SELECTION-SCREENBEGINOFSCREEN100ASSUBSCREEN.select-optionss_matnrformara-matnr.SELECTION-SCREENENDOFSCREEN.c)InthepBOandpAIofthemainscreenwheretheselectoptionsneedstobecreateddoacallsubscreenoftheabovescreen(100).CALLSUBCREENsub_areaINCLUDINGprogr

55、amscreenThisCALLSUBSCREENstatementisnecessaryfortransportofvaluesbetweenscreenandprogram.Note:Allvalidationsoftheselectionscreenfieldse.g.thes_matnrfieldcreatedaboveshouldbedoneinselectionscreeneventslikeATSELECTION-SCREENetcandnotinpAI.Theseselectionscreenvalidationsetcshouldbedoneinthetopincludeon

56、ly.Method2:a)Create2separatefieldsinyourscreenlayout-oneforthelowvalueandoneforthehighvalue.Insertaniconbesidethehighvaluewhichwillcallthemultipleselectionspopupscreenonusercommand.UsefunctionmoduleCOMpLEX_SELECTIONS_DIALOGtoachievethis.continuedstruc_tab_and_field-fieldname=con_cust.KUNNRstruc_tab_

57、and_field-tablename=con_kna1.KNA1.CALLFUNCTIONCOMpLEX_SELECTIONS_DIALOGEXpORTING*TITLE=text=g_titl1Customerstab_and_field=struc_tab_and_fieldTABLESRANGE=rng_kunnrEXCEpTIONSNO_RANGE_TAB=1CANCELLED=2INTERNAL_ERROR=3INVALID_FIELDNAME=4OTHERS=5.IFNOTrng_kunnrISINITIAL.*Readtheveryfirstentryoftherangetab

58、leandpassit*dynproscreenfield*READTABLErng_kunnrINDEX1.IFsy-subrc=0.g_cust=rng_kunnr-low.ENDIF.ENDIF.Youcanusethereturntablerng_kunnrtopopulateyourowninternalrangetablewiththevaluesenteredbytheuser.Basicallyhereyouarejustsimulatingtheworkofaselect-optionsparameterbymodulepoolscreenelements.30.howwec

59、anretrivedatausingsecondaryindex.explainwithsimpleexleAns:Firstcreatesecondaryindexesonrequiredfieldsofaparticulardatabasetable.Wecancreateoneprimaryindexand15secondaryindexes.Oncetherespectivesecondaryindexesarecreatedwriteselectqueriesandwithinselectqueriesspecifysecondaryindexesfieldnamewithwhere

60、clause.31.HowcanwehandletablecontrolinBDC?Ans.WecanhandletablecontrolusinglineindexLineindexindicateswhichlineofTablecontrolistobeuseforBDCtransactionEx-performbdc_fieldusingRC29K-AUSKZ(01)Indicates1stlineoftablecontrolisgoingtobeusedfortransactionwhichisLineindexofTableControl32.IfiwanttoexecuteaBD

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论