Ansicht
Dokumentation
EHPRC_RCS_BADI_013 - BAdI: Consistency Check for Use Data
General Data in Customer Master General Data in Customer MasterThis documentation is copyright by SAP AG.
This Business Add-In (BAdI) is used in the Product Compliance application of the SAP EHS Management(EHS-MGM) component. You can use this BAdI to implement enhanced duplicate and consistency checks for use data. This BAdI is called when use data is displayed, changed, and saved.
In the standard system, the Business Add-In is activated. The default code is executed automatically. If you activate your own implementation, the default code is deactivated automatically. The BAdI is not filter-dependent.
For more information about the standard settings (filters, single or multiple uses), see the Enhancement Spot Element Definitions tab in the BAdI Builder (transaction SE18).
The following methods are provided to check use data and to return messages to the user:
- CK_INIT_USE_WF
- This method is used to check and adjust use data before it is displayed when processing a customer or supplier response. It is called once each time a supplier or customer response arrives. Its purpose is to compare the existing uses in the system to the uses contained in the response document and to prepare a list that contains both the differences and the unchanged uses. The most important aspect of this method is the calculation of the customer or supplier action that helps the user to assess the response:
- If an existing use is contained in the response and not changed, the action is empty.
- If the response document contains a new use, the action is set to inserted.
- If the response document does not contain a use that is already in the system the action is set to removed.
- If the response document changed some attributes of an existing use, the action is set to changed.
- The user can then verify this list and either confirm the data or reject it.
Parameter | Type | Description |
---|---|---|
IR_INTERACTIVE_SET | Importing | Reference to use set with reported uses |
IV_RECN | Importing | Sequential number of data record (substance) |
IV_CUSTOMER | Importing | Customer |
IV_SUPPLIER | Importing | Supplier |
IT_EXPDOC | Importing | Table of uses and their exposure document |
XV_ACTIVITIES | Changing | Activities |
XT_USE_DISPLAY | Changing | Table of uses for display |
XR_USE_SET | Changing | Reference to use set with existing uses |
XV_FLG_ERROR | Changing | Flag indicating an error |
XV_FLG_WARNING | Changing | Flag indicating a warning |
XT_MESSAGES | Changing | Message table |
- CK_USE_DUPLICATE_AND_CONSISTENCY
- This method is used to check whether a use set contains duplicate uses. It is also used to check whether a use set is consistent.
- The check for duplicates is mainly used to check if a given use is already contained in a use set to avoid errors when trying to insert it. It is called for a single use.
- The default implementation of this method considers a use as a duplicate of an existing one if the use descriptions of both uses are identical. Additional checks to verify the consistency of a use set are not implemented by default. Depending on your implementation, you can use this consistency check for one use or a whole use set.
Parameter | Type | Description |
---|---|---|
IS_USE | Importing | Use record |
IR_USE_SET | Importing | Reference to use set |
IV_FLG_DUPLICATE_CHECK | Importing | Flag indicating that duplicate check shall beprocessed |
IV_FLG_CONSISTENCY_CHECK | Importing | Flag indicating that consistency check must be processed |
EV_FLG_ERROR | Exporting | Flag indicating use already exists or uses are inconsistent |
ET_USES | Exporting | Duplicates or inconsistent uses |
ET_MESSAGES | Exporting | Message table |
- CK_INPUT
- This method is used to process the consistency check for one single use record.
- The default implementation of this method considers the following situations:
- The use is not marked as intermediate use: The use record is checked according to the rules that are specified in the Customizing activity Specify Input Check . If the use record does not fulfill the specified rules, the evaluation status is automatically set to Not Relevant. For more information, see the Customizing documentation.
- The use is an intermediate use: the consistency check result returns that the use record is valid independent of the applied use descriptors.
- The following parameters are provided:
Parameter | Type | Description |
---|---|---|
IS_USEAPI | Importing | Use record |
ES_USEAPI | Exporting | Use record with input check result (fields INPUT_CHECK_VALID and INPUT_CHECK_MSGS are filled) and the evaluation status is set if a rule violation is detected |
After you have called the IMG activity, proceed as follows:
- In the following dialog box, enter in the field "Implementation" a name for the BAdI implementation and choose Copy.
- If implementations have already been created for the BAdI, a dialog box with the existing implementations will be displayed. In this dialog box, choose Create.
- In the corresponding field, enter a short text for implementation .
- In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
- Choose the tab Interface.
- The name of the implementing class is generated by the system based on the name of your impmlementation. You can change the name.
- If the BAdI is a menu exit, the tab FCodes also appears.Enter a function here and, if necessary, additional data.
- Save your entries and assign a package.
- Position the cursor on a method. Call up the Class Builder by double-clicking it.
- Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
- Save and activate your coding, and navigate back to the screen Change Implementation.
- Save on the screen Change Implementation.
- Note: You can first create an implementation for the BAdI and then activate this later on. In this case, close the processing function at this time.
- Choose Activate.
- When the application program is executed, the coding you have created will be run.
BAL_S_LOG - Application Log: Log header data ROGBILLS - Synchronize billing plans
This documentation is copyright by SAP AG.
Length: 10194 Date: 20240523 Time: 153317 sap01-206 ( 106 ms )