Ansicht
Dokumentation

RMS_FRML_PREF_RCP_CH - BAdI: Filtering of Formulas in Explosion

RMS_FRML_PREF_RCP_CH - BAdI: Filtering of Formulas in Explosion

General Material Data   Fill RESBD Structure from EBP Component Structure  
This documentation is copyright by SAP AG.
SAP E-Book

You use this BAdI to filter formulas that the system finds for a component in the formula explosion.

The system calls the BAdI in the formula explosion if at least one formula is found for the explosion of a component. The system transfers the component that is to be exploded, the component type ('S' for substance and 'M' for material), and a table that contains the possible formulas with their recipes to the BAdI.

With the BAdI, you can delete formulas from this table and thus control whether and how the component is further exploded as follows:

  • If you delete all formulas from the table apart from one, the system uses this formula for the explosion of the component
  • If you delete all formulas, the system does not explode the component
  • If you do not delete at least two formulas, the system uses the formula in which the Standard Explosion indicator is set for the explosion.

A default implementation with the following functions is supplied:

  • Formulas that are assigned to process building blocks are deleted from the table.
  • Formulas that are assigned to drafts are deleted from the table.
  • Formulas that are assigned to recipes that are invalid on the key date are deleted from the table.
  • If a number of formulas exist that are assigned to recipes in the same version chain and are valid on the key date, the formula is preferred whose assigned recipe has a valid-from date that lies closest to the key date. The other formulas for the recipes in the version chain are deleted from the table.

The inactive implementation FRML_PREF_RCP_CHECK with the following functions is supplied:

  • If only one formula is possible for the explosion of the component, the table remains unchanged
  • If more than one formula is possible for the explosion of the component, all formulas that are not assigned to a recipe for which the Preferred indicator is set are deleted from the table.
Depending on how many entries the table then still contains, the system reacts as follows:
  • If the table contains no entries, the system outputs a message in the application log that no preferred recipe was specified for the component.

  • If the table contains one entry, the system uses this formula for the explosion.

  • If the table contains several entries, the system deletes all of them apart from the first one and outputs the message in the application log that the preferred recipe for the component is not unique.

After you have called the IMG activity, proceed as follows:

  1. 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.
  1. In the corresponding field, enter a short text for implementation .
  2. In the tab Propertiesenter filter properties - if this is a filter-dependent BAdI.
  3. 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.
  1. Save your entries and assign a package.
  2. Position the cursor on a method. Call up the Class Builder by double-clicking it.
  3. Between the statements method <Interface-Name>~<Name of Method>. and endmethod, enter the coding you request for the implementation.
  4. Save and activate your coding, and navigate back to the screen Change Implementation.
  5. 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.
  1. Choose Activate.
When the application program is executed, the coding you have created will be run.

Method

Filter Formulas in Explosion






Fill RESBD Structure from EBP Component Structure   General Material Data  
This documentation is copyright by SAP AG.

Length: 5304 Date: 20240523 Time: 193458     sap01-206 ( 69 ms )