已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
I. Creating, activating and transporting validations and substitutions1. Which transactions are required to use validation or substitution functions? GGB0 Validation MaintenanceGGB1 Substitution MaintenanceGCVZ Rule MaintenanceGGB4 Action selection for validation/substitution, for example, activation of application areas, use of all messages or substituted fieldsGCX2 Definition of the Includes for user exitsOB28 Activation of FI validationsOBBH Activation of FI substitutionsOBBZ Activation of cost of sales accounting substitution (in the FI area)OKC7 Activation of CO validationsOKC9 Activation of CO substitutionsGCT9 Transport: ValidationsGCT0 Transport: Substitutions2. What must I take into account when using the formula editor?a) Validation GGB0If you create the first validation for a callup point, for example financial accounting - document header, you have to define a message class. This is then valid for ALL validations for this callup point.Not all fields can be used for validations on certain callup points, for example Complete document in FI. This is because there are several rows there and it is not clear on which row the check is to be carried out. You can only use numeric fields here. (Note 413956)You should use a user exit if you need more checks on this callup point.b) Substitution GGB1If you create a substitution, for example financial accounting document line item, only certain fields are authorized for the substitution. This is because problems can occur with the documents or inconsistencies can occur between different applications.You can release more fields for substitution but this can be critical as serious problems can occur as a result.This is why you should regard the following change as a modification (Note 170183):The GB01 table contains information about which table fields can or cannot be substituted for which callup point.You can make a field substitutable by changing the BEXCLUDE field to .For example: Complete document callup point in the FIIn accordance with the default, no field is released for substitution on this callup point. You can see this in the following entries:BOOLCLASS CLASSTYPE BCLTAB BCLFIELD BEXCLUDE015 S BKPF * X015 S BSEG * XBOOLCLASS - Specifies the Boolean class. This is determined in the application area and callup point in each case, for example:008 - Document header (FI)009 - Line item (FI)015 - Complete document (FI)016 - Cost of sales accounting100 - Document header (CO)CLASSTYPE Specifies if the field can be used in the case of validations (B), substitutions (S) or bothBCLTAB - Table that is usedBLCFIELD - Field of this tableBEXCLUDE - Can be used or cannot be used X.As mentioned above, you should equate this change with a modification. Problems that occur as a result of this change cannot be handled in the standard support.3. What must I take into account when activating validations or substitutions?You can activate validations and substitutions in two ways.Activation level: 1 - Active2 - Active, except during batch input processingBecause the activation in the financial accounting (FI) is company-code-specific, the validations or substitutions should be activated in both company codes in the case of cross-company code transactions.4. What must I take into account when transporting validations or substitutions?Usually, only table entries are transported when validations or substitutions are transported. The generated source code should not be transported, since this can cause problems. After the import into the target system, the source code is generated automatically when the RGUGBR00 report is started.If you would like to delete a validation/substitution, and do not want to do this in each system individually, proceed as described in Note 840981.II. Using user exits in validations or substitutions1. Where can I maintain user exits for validations and substitutions? The exits for validations and substitutions are stored in an Include of your choice.The following Includes are delivered as examples by default:RGGBR000 Val/Sub: Exits for rulesRGGBS000 Val/Sub: Exits for substitutionsYou should copy these into the customer namespace, for example ZGGBR000.The length of the name you choose should not exceed 8 characters. This is because the name is also generated in the source code, and so a certain line length may be exceeded as a result.You can also create a separate Include per client as this can improve performance.In Transaction GCX2, you should then define where your Include is used. To do this, enter the name of your Include as a form pool in the relevant application area.2. How should I create a user exit?Define your user exit in the FORM Routine GET_EXIT_TITLES with the correct exit category (EXITS-PARAM). You can use the existing sample entries as a model for this.The exit types required in the FORM Routine GET_EXIT_TITLES are organized as follows: C_EXIT_PARAM_NONE No parameterApart from the return value (B_TRUE or B_FALSE), you do not need any parameters for the validation. If you do not want to substitute a field, use this parameter in the substitution (select Only exit).However, you must then use a TABLE statement in the formpool (not in the actual form) to identify the structure concerned. C_EXIT_PARAM_FIELD A Field is transferred as a parameterYou only use this type in the substitution. Exactly one field is substituted. Enter user exits of this type in the substitution maintenance instead of assigning a constant value. C_EXIT_PARAM_CLASS A complete type is transferred as a parameterMatrix validations/substitutions (Only exit). This exit type can only be used in the case of callup points with complete documents, for example in the FI and the LC. You cannot use this exit category on any other callup points. The transferred type contains all information of a class. An example is the use of the document header and all corresponding line items in the FI area.In the FORM routine GET_EXIT_TITLES, change the NAME and TEXT field of the EXITS internal table to the values you want.Use one of the sample routines as a model and copy these to the names you selected. You can now implement the functions you want in this form routine.After you have finished creating the user exit, you can use it in your validations or substitutions.3. What must I take into account when implementing the user exit?No dialog boxes, warning messages, information messages and error messages can be issued in an exit nor can a COMMIT WORK be rejected. This would, for example, interrupt the batch processing or cause problems with the documents to be posted. If you find a serious error in the field contents in the exit, send a termination message (A or X), which will ensure that the transaction is terminated.Do not use any ABAP commands that cause the exit to be left directly, for example LEAVE (TO) SCREEN . or SUBMIT . or CALL TRANSACTION .In an exit, use only structure fields that belong to the Boolean class of the calling substitution, validation or rule. The other structure fields are not filled or are not filled properly on the callup point of the calls of the substitution, validation or rule.Changes to field contents may only be made in a substitution exit if this field can be substituted in the Boolean class. You can display such fields by selecting the Add entry function in the substitution maintenance.In the Includes of the substitution exits, you must not use the commands MODIFY, INSERT or DELETE in the internally used structures such as BSEG or BKPF. These structures are interpreted internally as database tables because they are defined by a TABLES statement. As a result, database records are written, deleted or changed when you use the commands mentioned above. This can cause serious inconsistencies and problems in the document processing.If you want to change field contents in Exit Types C_EXIT_PARAM_CLASS, you should make the changes in the internal table BOOL_DATA (for example BOLL_DATA-BSEG).III. Problem analysis1. What must I take into account before I analyze the problem? Before you analyze a problem with validations/substitutions, make sure that the generated source code is up-to-date. You can use Report RGUGBR00 to do this.Call this report in Transaction SE38. You receive the following selection screen:Application area Application callup point Regenerate main program Generate table file Generate rules Generate validations Generate substitutions Generate sets Generate rule use Generate validation use Generate substitution usage Generate substitution export routines Generate substitution routines in all clients Generate trace program callsNow update the source code for the application area and application callup point in which the validation or substitution was created.To do this, enter the application area, for example FI, and the application callup point (0003/complete document), and set all indicators except for Generate substitution routine in all clients and Generate trace program calls. Then execute the report.The source code is now at its current status.2. How can the validation and substitution trace be used?a) Validation traceYou created and activated a validation.You can now activate the trace, for example in Transaction GGBO. To do this, place the cursor on the validation and select Extras - Activate trace.Example:You created an FI validation on the Line item callup point. To test the validation, execute, for example, Transaction FB01. The trace is displayed as soon as the validation is run. You can now see different things in the trace, for example the values contained in the fields of the various structures. From this, you can deduce whether additional checks are required, or tell what the cause of a problem is.b) Substitution traceActivate the trace in the same way as you activate validations.Example:You created a substitution in the same way as you activated the trace in the case of the validation. The trace for substitutions has an additional function, in that you can view the field contents before the substitution as well as after the substitution. There, problems can be reproduced in the same way.3. How can I use the DEBUGGER to analyze a problem?a) Basic informationAll Includes for validations and substitutions are created in this form: GBTmmaa0.mm stands for two digit client key.You can use the G_CLIENT_ENCODE function module to convert a three-digit client (099) to a two-digit client, for example: client 100 - AAclient 800 - TQAA stands for the application area, for example FI - Financial AccountingCO - Cost AccountingYou will find this abbreviation in the maintenance transaction.Therefore, GBTAAFI0 is the Include in client 100 for FI validations and substitutions.b) Structure of the Includes and form routines for validations and substitutions and tips on how to debugThe above-mentioned Includes are structured in the following way (sample Include in FI, Client 800):INCLUDE GBTTQFIA. RulesINCLUDE GBTTQFIB. SubstitutionsINCLUDE GBTTQFIC. Substitution conditionsINCLUDE GBTTQFID. ValidationsINCLUDE GBTTQFIE. Validation conditionsINCLUDE GBTTQFIF. Validation checksINCLUDE GBTTQFII. Application rulesINCLUDE GBTTQFIJ. Substitution export routinesINCLUDE GBTTQFIM. Trace/simulationINCLUDE GBTTQFIS. Substitution import routinesc) The form routines for validations have the following sample structure (sample validation with the name VAL01):FORM VAL_VAL01.G_BFOUND = B_TRUE.DATA: COND LIKE D_BOOL,CHECK LIKE D_BOOL,NVALSEVEREST LIKE SY-SUBRC VALUE -1.G_STEP = 001.PERFORM VALCOND_1VAL01#001CHANGINGCOND.IF COND = B_TRUE .PERFORM VALCHCK_2VAL01#001CHANGINGCHECK.IF CHECK = B_FALSE .PERFORM MESSAGE_OUTPUTUSING .NachrichtenparameterCHANGINGNVALSEVEREST.ENDIF.ENDIF.ENDFORM. VAL_VAL01Statement G_STEP = 001 indicates the step that is executed.The prerequisite of the step is defined in Form Routine VALCOND_., the form routine VALCHCK_. checks the validation step.To analyze this step, you should create breakpoints on these two PERFORM statements and also on the code line IF CHECK = FALSE. In doing so, you can determine whether your prerequisite or the check is causing the problem you have, for example a field that is to be checked does not contain the value that you expect.d) The form routines for substitutions have the following sample structure (sample substitution with the name SUB01):FORM SUB_SUB01.G_BFOUND = B_TRUE.DATA: COND LIKE D_BOOL.G_CLASSID = 009.G_SUBST_PERFORMED = B_FALSE.IF G_TAB_FLAG-BSEG B_TRUE .PERFORM READ_MASTER_DATAUSINGBSEGG_BFOUND.IF G_BFOUND = B_FALSE .MESSAGE E083 WITH BSEG.ENDIF.ENDIF.G_STEP = 001.PERFORM SUBCON_3SUB01#001CHANGINGCOND.IF COND = B_TRUE .BSEG-SGTXT = This is a Test. TextG_SUBST_PERFORMED = B_TRUE.ENDIF.ENDFORM. SUB_SUB01As mentioned above for validations, G_STEP = 001 indicates the step, and the prerequisite of the substitution is defined in Form Routine SUBCON_. The actual substitution is carried out by the statements in the IF COND = B_TRUE - ENDIF structure. These statements vary depending on the type of substitution created (field allocation, constant value, user exit).In the substitutions, you should also set a breakpoint on the PERFORM on the prerequisite and the statement IF COND = B_TRUE.4. Function modules that call validations and substitutionsValidations - Function module G_VSR_VALIDATION_CALLThe different structures/tables, the name of the validation, callup point and application area are assigned to this function module.Substitutions - Function module G_VSR_SUBSTITUTION_CALLThe parameters transferred to validations are also transferred to this function module. However, structures/tables that contain the changed values are also returned.You could set a breakpoint to analyze both function modules. In doing so, you could see which data was transferred, which data the validation or substitution attains, and which values are returned.5. What must I take into account during the set usage?When sets are used in validations or substitutions, source code is generated from the values in the sets.Performance problems can occur if a set is of a certain size,
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 福建廉洁考试题库及答案
- 东莞语文中考试题及答案
- 非甾体抗炎镇痛药市场深度评估与发展趋势预测报告(定制版)2025
- 项目废橡胶再生利用建设项目可行性研究报告申请立项备案可修改案例
- 高三英语公开课教案大全5
- 黄花菜种植及加工项目可行性研究报告
- 2025年成都百万职工技能大赛(网约配送员)备赛试题库(含答案)
- 2025-2026学年北京市海淀区中关村中学高二(上)期中语文试卷
- 2025年中药学类之中药学(士)练习题(二)及答案
- 淘宝担保协议书 活体
- 幼儿园新教师艺术领域培训
- 南京市2024-2025学年高二上学期期中学情调研测试语文试卷及答案
- 【MOOC期末】《大学物理 II》(热学、振动和波、光学、量子)北京交通大学期末慕课答案
- 2024-2025学年山东省潍坊市高一上学期期中考试数学试题(解析版)
- 医院安全生产隐患排查清单表
- 旧电梯拆除方案范文
- 《诗词里的科学》考试题库300题(含答案)
- 扫地车、洒水车工作职责
- GB/T 15314-2024精密工程测量规范
- 口腔医疗机构分级诊疗管理制度
- 南京信息工程大学《数字图像处理Ⅱ》2023-2024学年期末试卷
评论
0/150
提交评论