资源描述:
《用户出口教材.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、增强包括3种:1\USER-EXIT用户出口2\BADI用户增强3\替代BADI所用事务码:SE18查看 SE19激活并实现USER-EXIT所用事务码:SMOD查看 CMOD 激活并实现查找用户出口代码:可以用以下程序实现:Findingtheuser-exitsofaSAPtransactioncode**Enterthetransactioncodeinwhichyouarelookingfortheuser-exit*anditwilllistyouthelistofuser-exitsinthetransacti
2、oncode.*AlsoadrilldownispossiblewhichwillhelpyoutobranchtoSMOD.**Writtenby:SAPBasis,ABAPProgrammingandOtherIMGStuff**reportzuserexitnostandardpageheading.tables:tstc,tadir,modsapt,modact,trdir,tfdir,enlfdir.tables:tstct.data:jtabliketadiroccurs0withheaderline.data:field1(30).data:
3、v_devclassliketadir-devclass.parameters:p_tcodeliketstc-tcodeobligatory.selectsingle*fromtstcwheretcodeeqp_tcode.ifsy-subrceq0.selectsingle*fromtadirwherepgmid='R3TR'andobject='PROG'andobj_name=tstc-pgmna.move:tadir-devclasstov_devclass.ifsy-subrcne0.selectsingle*fromtrdirwherenam
4、e=tstc-pgmna.iftrdir-subceq'F'.selectsingle*fromtfdirwherepname=tstc-pgmna.selectsingle*fromenlfdirwherefuncname=tfdir-funcname.selectsingle*fromtadirwherepgmid='R3TR'andobject='FUGR'andobj_nameeqenlfdir-area.move:tadir-devclasstov_devclass.endif.endif.select*fromtadirintotablejta
5、bwherepgmid='R3TR'andobject='SMOD'anddevclass=v_devclass.selectsingle*fromtstctwheresprsleqsy-languandtcodeeqp_tcode.formatcolorcol_positiveintensifiedoff.write:/(19)'TransactionCode-',20(20)p_tcode,45(50)tstct-ttext.skip.ifnotjtab[]isinitial.write:/(95)sy-uline.formatcolorcol_hea
6、dingintensifiedon.write:/1sy-vline,2'ExitName',21sy-vline,22'Description',95sy-vline.write:/(95)sy-uline.loopatjtab.selectsingle*frommodsaptwheresprsl=sy-languandname=jtab-obj_name.formatcolorcol_normalintensifiedoff.write:/1sy-vline,2jtab-obj_namehotspoton,21sy-vline,22modsapt-mo
7、dtext,95sy-vline.endloop.write:/(95)sy-uline.describetablejtab.skip.formatcolorcol_totalintensifiedon.write:/'NoofExits:',sy-tfill.else.formatcolorcol_negativeintensifiedon.write:/(95)'NoUserExitexists'.endif.else.formatcolorcol_negativeintensifiedon.write:/(95)'TransactionCodeDoe
8、sNotExist'.endif.atline-selection