设为首页 收藏本站
查看: 2195|回复: 0

[经验分享] SAP substitution

[复制链接]

尚未签到

发表于 2015-9-21 13:45:40 | 显示全部楼层 |阅读模式
SAP substitution
  http://hi.baidu.com/jgzh3/item/13b3b91f3952d5f964eabf1b
  之前记得看过,后来就忘记了。介绍这篇还不错,转下
  http://help.sap.com/saphelp_erp60_sp/helpdata/en/5b/d2316743c611d182b30000e829fbfe/content.htm
  substitution exit:
  http://help.sap.com/saphelp_erp60_sp/helpdata/en/5b/d231a843c611d182b30000e829fbfe/content.htm
  TCODE: 0B28/GGBO; TABLE:T80D ; Program:RGGBR000/RGGBS000
  ===========Substitution user exits Details==================
  Userexits are user-defined FORM routines that are used to calculate and/or replacevalues within a validation, substitution, or rule.
  Userexits have the following format:
  ·       U (for a user-defined user exit)or S (for a standard userexit)
  ·       The user exit number (threedigits)
  For example, U123 is a user exit.
  Youcan configure the form pool name of the user exits and must store it in thetable for client-dependent user exits (T80D) in Customizing. Table T80D contains theform pool names for the user exits used in validations, substitutions, andrules. Each validation/substitution form pool is client-dependent. (For moreinformation, refer to the Maintain Client-DependentUser Exits activity in the Implementation Guide (IMG) for Special Purpose Ledger.)
  Example form pools RGGBS000 and RGGBR000 for client000 are shipped with the SAP system. You must copy these form pools andconfigure them in T80D. The new form pool name should conform to thecustomer’s naming convention (beginning with the letter Z) so that is not overwritten whenthe next SAP upgrade is installed (for example, ZGGBR000).
  
  Example FORM routine for substitution exit 001(U001).
  TABLES:COBL.
  FORM U001. COBL-KOSTL = COBL-BUKRS.
  ENDFORM.
  Tables and structures should not be declared in theFORM routines so that the contents can be used together with the callingtransaction.
  SAPexits are FORM routines that have been programmed by SAP. The name of the formpool for SAP exits is SAPFGBEB.
  
  If you still store your rules in table T890(interpreted rules), you cannot use user exits in your rule definition. It isrecommended that you use report program RGUGBR10 to convert interpreted rulesinto generated rules so that you can use the Customizing function for maintainingrules. For more information, see Using the Rule ManagerReports.
  Thefollowing table shows the types of user exits that can be used in validations,substitutions, and rules.
  
  User exit type
  Description
  Application
  Example
  1
  Noparameters are defined for the user exit.
  Rules,validations, and substitutions (prerequisite)
  Seeform pool RGGBR000, parameter type C_EXIT_PARAM_NONE
  2
  Sameas user exit type 1, except one parameter (the field to be substituted) isdefined in the user exit. For example, you can create a substitution routinethat analyzes the cost center irrespective of the field used.
  Substitution
  Seeform pool RGGBS000, parameter type C_EXIT_PARAM_FIELD
  3
  Alldata is passed as one parameter; this exit type can only be used in matrixvalidations and substitutions.
  Rules, validations, and substitutions(prerequisite)
  Seeform pool RGGBR000, parameter type C_EXIT_PARAM_CLASS
  
  Validations and rules use exit numbers 1 and 3 fromthe above table.
  Substitutions use all of the exit numbers from theabove table.
  Forsubstitutions, you can also create user exits that accept a field as oneparameter and then return the changed value in this parameter. This allows youto create a user exit that can be used independently of the field and tablename. This type of user exit cannot be used as an entry in the Exit only field in the list of values to be substituted; youcan only use this exit type in conjunction with a field name. An example ofthis user exit type is in form pool RGGBS000.
  
  If you want to define a parameter for your user exitthat is different from the result of a validation (B_RESULT), you must make anentry for your user exit in the FORM routine GET_EXIT_TITLES in the form poolyou defined. It is recommended that you copy the SAP example form poolRGGBR000 for validation exits or RGGBS000 for substitution exits. Theseexample form pools already contain entries in the FORM routine GET_EXIT_TITLESfor the examples delivered by SAP.
  ===============STEPS===============
  1) first I add new form in SE38 > ZGGBR000
form u904 using  b_result. b_result = b_true. endform. "U904
2) then I addnew lines  to form get_exit_titles
exits-name = 'U904'.  exits-param =  c_exit_param_class. exits-title = 'TEST'. append exits.
3) then I  make active ZGGBR0000
4) then I use RGUGBR00 for rebuilding validation  structures
5) and exam that ZGGBR000 exists in GCX2
  ----
  REF: http://forums.sdn.sap.com/thread.jspa?threadID=1585474
  when a user exit doesn´t appear in ob28 user exit list: change  c_exit_param_class to c_exit_param_none and it appears

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-116811-1-1.html 上篇帖子: 所有 SAP 现在开设的标准课程 下篇帖子: SAP增强 和VA01相关增强点介绍
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表