Note 48121 - User Exits in Validations/Substitutions
DrkLion
2010. 10. 14. 11:32
무슨말인지 잘 이해가 안되서 일단.... 카피... ㅋ
Symptom
a) You receive the runtime error PERFORM_NOT_FOUND.b) You receive the runtime error PERFORM_CONFLICT_TYPE.c) You have problems creating a user exit or using it in a condition.Additional key words
1. You did not enter the formpool of the user exits in the table provided for this (table T80U up to and including Release 3.0B, table T80D as of Release 3.0C).2. You defined the user exit with incorrect parameters.3. You did not use one of the sample formpools delivered by SAP (RGBBS000 for subsitution exits, RGGBR000 for validation exits) as a reference for your own formpool. Therefore either youa) do not have the necessary FORM routine GET_EXIT_TITLES in your programb) or have the FORM routine GET_EXIT_TITLES, but have forgotten to enter your user exit there, or4. you have used a formpool delivered by SAP as the reference for your own formpool but the SAP formpool is from a Release < 3.0. Due to the extension of the user exit name to 5 characters, the field NAME in the internal table EXITS must also be 5 characters long (in Releases < 3.0 it is 4 characters).5. You carried out a system transport and the formpool for your user exits in your source system had a local private development class. Therefore, it was not transported and is now missing in the target system.6. Due to a program error in Releases 4.0A up to and including 4.5A, you cannot use an exit of type (EXITS-PARAM) C_EXIT_PARAM_NONE in the condition of a matrix validation or matrix substitution.
Also pay attention to the following:
In an exit, popups, warning or information messages or "COMMIT WORK" must not be issued. This would interrupt batch processing. If you find a severe error in the field contents in the exit, you should issue a termination message (A or X) which safely terminates the transaction.
Do not use ABAP statements causing the immediate quit of the exit, such as 'LEAVE (TO) SCREEN ...' or 'SUBMIT <REPORT> ...' or 'CALL TRANSACTION ...'.
An exit used in logical expressions ALWAYS has to assign the value 'T' (B_TRUE) or 'F' (B_FALSE) to the parameter B_RESULT. For instance this also has to happen if the structures used in the exit are empty. Otherwise the system may generate error message GB038 "Exit & does not exist", GB072 "Validation/substitution/rule generation initiated" and/or GB073 "Generation successful, but you must call up the function again" during simulation or posting.
In an exit, only use structure fields belonging to the Boolean class of the calling substitution, validation or rule. At the time of calling the substitution, validation or rule other structure fields are not filled with useful values or not filled at all.
Changes to field contents are only allowed in a substitution exit, and only if the substitution of this field is allowed in the Boolean class. You can display these fields by choosing the "New entries" function in the Substitution Maintenance.
Solution
First read the documentation on the subject User exit in the application FI-SL (Special Purpose Ledger), previously FI-GLX. You can also obtain more information using the F1 help within validation/substitution maintenance by positioning the cursor on a line of a rule and pressing F1.
Should one of the above cases occur, then correct it as follows (sequence as above):
1. Enter the formpool for your user exits in table T80D (or T80U for Releases prior to 3.0C). For this, you can use the menu option <Basic Settings -> User Exits -> Maintain Client-Dependent User Exits> in the Special Purpose Ledger configuration menu. If this menu option is not yet available in your Release, you can also make the entries in the table using the general table maintenance (Transaction SM31).
Note:
Do not create new application areas but enter the required formpool instead of the formpool entered by SAP for the respective application area (GBLR for user exits that are used in a logical expression; GBLS for user exits that are used for the replacement of fields in the substitution).
2. Define your user exit in the FORM routine GET_EXIT_TITLES with the correct exit type (EXITS-PARAM). You can use the available example entries as a reference to do this. There is more information below.3. Use the reference formpools from SAP as a model for your own formpools. For this, copy these formpools and insert the user exits required. Prior to this implement the source code corrections in form routine U102 in the reference formpool RGGBS000 provided you have implemented the correction described in Note 76872.
Note
Enter this formpool in the table mentioned above and specify your user exit in the FORM routine GET_EXIT_TITLES in any case (equivalent to the sample exits).
4. Change the field NAME in the internal table EXITS within the FORM routine GET_EXIT_TITLES as follows:
* NAME(4) TYPE C, "OLD
NAME(5) TYPE C, "NEW
1. Manually transport the formpool in question from your source system into your target system. As of Release 3.1H, the system should generate a warning message when transporting a validation, substitution or rule or if the transport calls a user exit. Owing to a program error in Releases 3.1H up to and including 4.5A, these functions are not contained in the standard system. If you use one of these releases, additionally implement the attached correction for Include MGTRAF02.2. Implement the attached advance correction into Include LGBLOU43.
Exit type definition:
The exit types required in the FORM routine GET_EXIT_TITLES are divided as follows:
C_EXIT_PARAM_NONE No parameter
You do not need any parameters except the return value (B_TRUE or B_FALSE) for the validation. Use this parameter for the subsitution if you do not want to substitute only one field explicitly (selection "Exit only"). However, you then have make the structure in question known by means of a TABLE statement in the formpool (and not in the form itself).
C_EXIT_PARAM_FIELD A field is transferred as parameter
You use this category only in the substitution. Exactly one field is substituted. You enter user exits of this category in the substitution maintenance instead of assigning a constant value.
C_EXIT_PARAM_CLASS An entire category is transferred as parameter
Matrix validations/substitutions "Exit only"). This exit category can only be used with the points in time with complete documents e.g. in FI and LC. You cannot use this exit at all the other points in time. The transferred category contains the entire information of a class. An example is the usage of the document header and all the corresponding line items in the FI application.
Note:
Follow the sequence below when defining a user exit.
1. Define your user exit2. Make the entry for your formpool in table T80D3. Enter the user exit in your validation definition.
Please note: The various advance corrections are included in the Hot Package SAPKH40B10.