




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
資料范本本資料為word版本,可以直接編輯和打印,感謝您的下載SAP開發(fā)SD相關的增強BADI地點: 時間: 說明:本資料適用于約定雙方經過談判,協(xié)商而共同承認,共同遵守的責任與義務,僅供參考,文檔可直接下載或修改,不需要的部分可直接刪除,使用時請詳細閱讀內容SD相關的BADIsap的用戶出口總共有三代:1、 第一代sap提供一個空代碼的子過程,在這個子過程中用戶可以添加自己的代碼,控制自己的需求。這類增強都需要修改sap的標準代碼。示例:USEREXIT..inSAPMV45A2、 第二代sap提供的是CUSTOMER-FUNCTION,它是通過SMOD和CMOD完成實現(xiàn)。參見我的/CompassButton/archive/2006/08/31/1150258.aspx"/CompassButton/archive/2006/08/31/1150258.aspx"/CompassButton/archive/2006/08/31/1150258.aspx3、 第三代sap提供的第三代的用戶出口就是BADI,他的調用方式是CALLMETHOD(instance),(相關的TCODE是SE18和SE19),你可以通過EXIT_HANDLER這個單詞查找BADI。另外還有一種出口叫BTE相關TCODE:FIBFBusinessTransactionEvents(OpenFI)TheOpenFIenhancementtechniquewasdevelopedintheFinancialAccountingcomponent.OpenFIisbaseduponthefollowingprinciples:Applicationdevelopersmustdefinetheirinterfaceinafunctionmodule,anassignmenttableisreadintheaccompanying(generated)code,andthecustomermodulesassignedarecalleddynamically.Thistechniquedifferentiatesbetweenenhancementsthatareonlyallowedtohaveoneimplementationandenhancementsthatcancallmultipleimplementationsinanysequencedesired.Bothindustryspecificandcountry-specificenhancementsmaybedefined.TheconceptsbehindtheBusinessAdd-InsenhancementtechniqueandOpenFIarebasicallythesame.However,thetwoenhancementtechniquesdodifferfromeachotherinthefollowingpoints:OpenFIcanonlybeusedtomakeprogramenhancements,thatis,youcanonlyenhancesourcecodeusingOpenFI.YoucannotenhanceuserinterfaceelementswithOpenFIlikeyoucanwithBusinessAddIns.OpenFIassumesthatenhancementwillonlytakeplaceonthreelevels(SAP-partners-customers),whereaswithBusinessAdd-Insyoucancreateandimplementenhancementsinasmanysoftwarelayersasyoulike.OpenFIusesfunctionmodulesforprogramenhancements.WithBusinessAdd-Ins,ABAPObjectsisusedtoenhanceprograms./CompassButton/archive/2006/08/31/1150258.aspx"/CompassButton/archive/2006/08/31/1150258.aspx"如何使用SMOD和CMOD進行SD的用戶增強1、關于增強的簡單介紹SMOD包含具體的增強,而CMOD是包含一組SMOD編寫的增強.Userexits(Functionmoduleexits)是sap提供出口,它的命名規(guī)則如下:EXIT_<programname><3digitsuffix>示例:sd的VA01事務,對應的程序是SAPMV45A,你會在程序里查到(用CALLCUSTOMER-FUNCTION字符串)如下代碼:CALLCUSTOMER-FUNCTION'003'exportingxvbak = vbakxvbuk = vbukxkomk = tkomkimportinglvf_subrc=lvf_subrctablesxvbfa=xvbfaxvbap=xvbapxvbup=xvbup.則exitcallsfunctionmodule的名稱就是:EXIT_SAPMV45A_0032、 先試用SMOD建立一個SAP增強2.1、 選擇一個增強,如:SDVFX001,點擊修改,進入sap增強維護屏幕;2.2、 點擊“組件”按鈕,進入組件維護屏;2.3、 將光標移到“功能模塊名”,輸入模塊名,如:EXIT_SAPLV60B_001;2.4、 選擇“代碼修改”按鈕進入函數(shù)模塊;2.5、 雙擊函數(shù)模塊的包含單元,進入包含單元加入自定義代碼并激活保存;3、 使用CMOD建立增強項目3.1、 輸入自定義的項目名,點擊“創(chuàng)建”;3.2、 進入增強項目,選擇“配置增強”,進入增強配置屏幕;3.3、 輸入增強名如:SDVFX0013.4、保存,并退出;4、使用CMOD將增強項目激活,便大工告成。如何查找*判斷是否存在相應增強的定義(SMOD)selectsinglenamefrommodsapaintomod0-namewherename='PPCO0002'.ifsy-subrc=0.endif.selectsingle*fromtadirintops_tadir_dbwherepgmid ='R3TR'andobject ='SMOD'andobj_name= 'PPCO0002'.*判斷是否存在相應增強項目的定義(CMOD)SELECTSINGLEnameFROMMODATTRintomod0-nameWHERENAME='PPCO0002'..*提取增強的定義的組件(可以用此反查增強定義)select*frommodsapwherename='PPCO0002'.*判斷該增強是否移植到BADI實現(xiàn)*Enhancement&hasalreadybeenmigratedinBusinessAdd-Indefinitionselectsinglemigratedbadi_def into(migrated,exit_name)frommodsapawherename=modname.ifsy-subrc=0andmigrated=seex_true.messages621withmodnameexit_name.checkmodene'CHAM'.endif.MODTYP類型:E:功能退出S:屏幕T:表C:GUI代碼sap增強存在MODSAP表內*獲取增強組件的參見函數(shù)MOD_SAP_MEMBER_TEXT*獲得退出功能模塊的信息selectsingle*fromtftitwhere"SPRAS"='1'AND"FUNCNAME"='EXIT_SAPLCORE_001ifsy-subrc=0.endif.*值得學習的函數(shù)MOD_KUN_ACTIVATE(會操作相關報表)/CompassButton/archive/2006/09/16/1231652.aspx"/CompassButton/archive/2006/09/16/1231652.aspx"如何從SAP中查找BADIBADI作為SAP的第三代用戶出口,他的應用也越來越廣泛,但如何找到合適的badi是許多abap程序員的困惑。我這里就介紹一下我個人的應用的經驗,供大家參考。1、badi對象的信息存儲在SXS_INTER,SXC_EXIT,SXC_CLASS和SXC_ATTR這四個表中(參見SECE包);2、 sap程序都會調用cl_exithandler=>get_instance來判斷對象是否存在,并返回實例;其實get_instance就是對上述幾個表和他們的視圖(V_EXT_IMP和V_EXT_ACT)進行查詢和搜索。3、 基于這個機理,我查用ST05來監(jiān)控一個TCODE來跟蹤,然后選擇查找有關上述幾個表和視圖的操作,就可獲得相關BADI。4、 se18查找接口,se19實現(xiàn)接口就可以實現(xiàn)用戶增強。示例:用LE_SHP_DELIVERY_PROC控制跨月CancelMETHODIFEXLESHPDELIVERYPROC~CHANGEDELIVERYHEADER. data:thismonth(2)typec.data:wa_likptypelineofSHP_LIKP_T.data:wa_logtypelineofSHP_BADI_ERROR_LOG_T.clearct_log[],thismonth.thismonth=sy-datum+4(2)." >逼一彳固月的月份loopatit_xlikpintowa_likp.checkIS_V50AGL-WARENAUSG_STORNO='X'.〃--->代表作GIcancelifwa_likp-WADAT_IST+4(2)<thismonth.wa_log-VBELN=cs_likp-vbeln.wa_log-MSGTY='E'.〃金昔森^息wa_log-MSGID='ZDN_ERROR'.〃是一固class要自己建wa_log-MSGNO='001'.appendwa_logtoct_log."ErrorlogWAendif.endloop.ENDMETHOD./CompassButton/archive/2007/03/19/1533453.aspx"/CompassButton/archive/2007/03/19/1533453.aspx"如何實現(xiàn)標準TCODE的屏幕增強(HOWTO:ImplementascreenexittoastandardSAPtransaction)IntroductionSAPprovidesstandardtransactionstoenterdataintodatabase.ButaclientmaywanttomaintainsomeadditionalinformationinSAPotherthanwhatisprovided.Tomakeprovisionsforthis,additionalscreenshavetobeprovidedandadditionalfieldsmustbeaddedintoappropriatedatabasetable.Topavewayforthis,SAPhasprovidedtheoptionforscreenexits.Usually,SAPprovidesthefollowing:Anappendstructureinthedatabasetablewiththenewfields.Asubscreenareaintothestandardscreen-wheretheprogrammercanattachhissubscreenofhisownprogramwiththenewfields.Afunctiongroupunderwhichthenewsubscreenhastobecreatedwiththenewfields.FunctionexitstosynchronizethePBOandPAIofthestandardSAPprogramwiththePBOandPAIofthesubscreen-sothatdatacanflowbackandforthbetweenthestandardSAPprogramandtheprogramwrittenbythedeveloperforthesubscreen.Thesefunctionmodulesalsoexistinthesamefunctiongroupunderwhichthesubscreenwillhavetobedeveloped.Finally,alinkagehastobedonebetweenthesubscreenareaofstandardSAPscreenwiththecustomsubscreenconstructedbythedeveloper.Typically,SAPprovidesanenhancementinwhichthedevelopercancreateanappendstructure,usethefunctionexitstosynchronizethePBOandPAIofthestandardSAPprogramandthecustomsubscreenprogram,andmakethenecessarylinking(asmentionedaboveinstep4.But,again,thisisnotahardandfastrule.Linkinginsomecase,isalsodonebyconfigurations.)SAPalsousuallyprovidesthenameofthefunctiongroupunderwhichthesubscreenhastobedeveloped.NecessaryguidanceaboutimplementingascreenexitdevelopmentisusuallyavailableintheDocumentationsectionoftheenhancement(canbeavailedbytransactionSMOD).Pre-RequisitesThedevelopertoworkonscreenexitshouldhaveessentialknowledgeonthefollowing:DDICconcepts,includingtheknowledgeofappendstructure.ConceptofSAPEnhancementsandimplementingthemusingProjects.Conceptoffunctionexits.KnowledgeonModulePool-includingsubscreens,Tabstripcontrolsetc.StepsGuidelinesSo,adevelopercanfollowtheguidelinesmentionedbelowtoimplementascreenexittoastandardSAPtransaction,asandwhenrequired:FindouttheRequiredEnhancementsGotoSMOD.PressF4intheEnhancementfield.Inthenextpopupwindow,clickpushbutton‘SAPApplications'.Alistwillappearthatcontainsinformationonalltheenhancements,categorizedunderfunctionalareas.Developermustsearchfortheenhancementsrelevanttohisfunctionalareaofinterest-fore.g.,Purchasing,AssetAccounting,etc.Notedowntheenhancements.Then,cometotheinitialscreenofSMODandviewthedocumentationofeachenhancementtofindoutwhichoneisrequiredforyourdevelopment.UtilizetheEnhancementinaProjectAfteryouhavefoundone,d
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 加盟保潔公司合同范本
- 2024年鹽城市濱??h招聘教師考試真題
- 農村房屋共建合同范例
- 2024年梧州市龍圩區(qū)招錄公益性崗位人員考試真題
- 公司之間供貨合同范本
- 動產轉讓合同范本
- 2024年普洱市墨江縣教體系統(tǒng)所屬事業(yè)單位緊缺招聘考試真題
- 2024年綿陽市投資控股有限公司招聘筆試真題
- 第12課 宋元時期的都市和文化(教學設計)七年級歷史下冊同步備課系列(部編版)
- 做代理合同范本
- 廣東省汕頭市潮陽區(qū)2024-2025學年高二上學期期末考試英語試題
- 計算機行業(yè)人工智能系列深度報告:deepseek研究框架-國海證券-20250214
- DB1331T 102-2025雄安新區(qū)應急物資儲備庫建設規(guī)范
- 2025年蘇州經貿職業(yè)技術學院高職單招職業(yè)適應性測試近5年常考版參考題庫含答案解析
- 2025年湖南工程職業(yè)技術學院高職單招數(shù)學歷年(2016-2024)頻考點試題含答案解析
- 北京市豐臺區(qū)2024-2025學年九年級上學期期末道德與法治試題(含答案)
- 醫(yī)院培訓課件:《PET-CT的臨床應用》
- (課件)-幼兒園中班社會教案《新年里的開心事》
- 2025海南省交通投資控股限公司招聘30人高頻重點提升(共500題)附帶答案詳解
- 宋代美學研究
- 行政管理學知識點全套
評論
0/150
提交評論