在SAP中查询table的18种方法

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

3Noportionofthispublicationmaybereproducedwithoutwrittenconsent.18TechniquesforLocatingtheUnderlyingDataofaScreenField18TechniquesforLocatingtheUnderlyingDataofaScreenFieldDennisBarrettDennisBarrettisanapplicationsconsultantwithSAPAmericawhofocusesonServiceManagement/CustomerServiceandtheServiceProvidersolution.Hehasbeenconsultingincomputersforover15years,alwaysblendingapplicationsandprogramming.HeisacertifiedABAPprogrammer,andisalsotheauthorof“SAPR/3ABAP/4CommandReference.”Picturethis.AnOperationsManagerwantsaspecialreportofherserviceorders.Shegivesyouasketchofwhatshewantsittolooklike(columns,rows,headings,grouping,subtotals,totals,andthelike),andpointstofieldsontheServiceManagementtransactionscreensthathavethedatashewantsyoutoshowinthereport.Whatdoyoudo?Mostlikely,youwouldchecktofindanyexistingreportsdeliveredwiththesystem(oralreadywrittenforthisclient)thatprovidetheinformationtheOperationsManagerwants,orthatcanbecopiedandrevisedtofitherneeds.Ifyoudon’tfindany,youmightthenlookintotheappropriatereportingsystem—inthiscase,thePlantMaintenanceInformationSystem(PMIS)—toseeifyoucanadaptit.Inthiscase,however,youcan’tfindthereport,andyoucan’tcobbleonetogetherfromexistingones.YoumustwriteareportoranABAPQuerytofulfilltherequirements.Now,supposetheOperationsManagerasksifyoucansomehowaddjustonemorelittlefunctiontoherCreateMeasurementDocu-mentstransaction:pastetheassociatedsalesordernumberintotheMDoctextfield.Thisscenariorequiresyoutocreateanenhance-ment.Inboththefirstandsecondscenario,you’llneedaccesstospecificdatafromthedatabasetables.Howdoyoufindthatdatawithjustthescreenfieldsasyourguide?Weallknowtheinformationassociatedwithatransactionisstoredinseveral(sometimesmany)relatedtables.So,whenyouneedseveralfieldsfromatransactionforareportoranenhancement,youmayneedtofindmanyofthetransaction’stablesandestablishthelinksamongthem.Thoselinksareoftennotobvious.(completebioappearsonpage18)SAPProfessionalJournalSeptember/October2000©2000WellesleyInformationServices.Allrightsreserved.4I’vecomeacrosstheseverysituationsonnumer-ousoccasionswhileworkingforseveralclientswiththeSD,MM,IM,WM,andServiceManagement(nowcalledCustomerService)modules.OvertimeIhavegatheredsuggestionsfromcolleaguesanddevelopedsometechniquesmyselftofindthedataIneeded.Iwillsharethesetechniques—18oftheminall—withyounow.TheStartingGateandFinishLineIwillbepresentingawidevarietyoftechniquesforreachingthe“finishline”ofthisexercise—namely,locatingthetableandfieldthatstorestheunderlyingdataofascreenfield.You’reunlikelytoneedallofthem;you’llprobablybesuccessfulwithinthefirstfourtechniques.Iincludetheremainingtechniquesbecausesomefieldscanbeveryhardtochasedown,andanyoneoftheseothertoolsjustmightdothetrick.TheStartingPointThestartingpointforthissetoftechniquesisalwaystheTechnicalInformationscreen,becauseitisherethatyoulearnthescreenfield’sname,andcandis-cernwhetherornottheunderlyingdataobjectisastructure,view,ortable.Iftheunderlyingdataobjectisatable,yoursearchisover.ThefieldnameshownontheTechnicalInformationscreen,plusthistablename,Figure1TheRelease4.0BTechnicalInformationScreenforthe“Sold-toparty”Field5Noportionofthispublicationmaybereproducedwithoutwrittenconsent.18TechniquesforLocatingtheUnderlyingDataofaScreenFieldarmyouwiththedetailsyouneed.Ifthedataobjectisaview,justonemoreclickandyou’vegotthattablename.Ifthedataobjectisastructure,youstillhavetounearththenameofthetable.Technique#1:ChecktheTechnicalInformationScreenIalwaysstartmysearchfortheunderlyingdataobjectbygettingthenamesofthefieldandDataDictionaryobjectfromthetransactionscreen.CalluptheTechnicalInformationscreenbypositioningyourcursorinthetargetscreenfieldandthenpress-ingF1orclickingonthe?button.ThiswillbringuptheinitialHelpscreen.FromwithintheHelpscreen,pressF9orclickontheTechnicalinfobutton.TakealooknowatFigure1.ItshowstheTechnicalInformationscreenfortheSold-topartyfieldintheCreateStandard(Sales)OrderscreenforRelease4.0B.Youseeinthe“Fielddata”blockthattheTablenameisKUAGVandtheFieldnameisKUNNR.1InReleases4.0Bandbelow,thisscreencallstheassociatedobjecta“table,”whetherit’satable,view,orstructure.NoticeinFigure2thatthe4.5Brelease(andabove)informsyouthatKUAGVisactuallyastructure.Figure2TheRelease4.5BTechnicalInformationScreenforthe“Sold-toparty”Field1Theexampleshereinmentionnamesoftables,structures,andfieldsthatIfoundinmysearches.Youmayfindadifferentnameinthesamesearch—particularlyadifferentstructure’sname.Forexample,theSold-topartyfieldintheSalesOrderinitialscreenmaybeKUAGV-KUNNRorRV45S-KUNNR(ormaybesomethingelse).I’llshowonenameinthisarticle;don’tworryifyoufindanother.It’sareflectionofthecontinualenhancementofR/3,not(Ihope)anerrorinthearticle.SAPProfessionalJournalSeptember/October2000©2000WellesleyInformationServices.Allrightsreserved.6InReleases4.0Bandbelow,toascertainwhetherornotanobjectisastructureyoumusttakeonemorestep.DrillintotheTablenamefieldintheTechnicalInformationscreentoseetheDataDictionaryscreenfortheobject.Figure3showsthosescreensforthetableVBAK,theviewVIVEDA,andthestru

1 / 16
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功