Customer Exits in Remodeling

Context

In remodeling, you can use a customer exit to fill added or replaced characteristics and key figures with initial values.

There is an example implementation CL_RSCNV_CUSTOMER_EXIT to show you how such an implementation can look like.

Procedure

  1. To implement a user-specific class, in the SAP Easy Access menu, choose Start of the navigation pathTools Next navigation step ABAP Workbench Next navigation step Development Next navigation step Class BuilderEnd of the navigation path.
  2. Enter a name for your implementation and choose Create.
  3. Select Class as the object type.
  4. Enter a description and select the following options:
    • Instantiation: Public

    • Usual ABAP Class

    • Final

    Save your entries. The Class Builder appears.

  5. Use the IF_RSCNV_EXIT interface. This has the two methods GET_OBJECT and CONVERSION_EXIT. The method GET_OBJECT has the following parameters:

    Parameter

    Description

    I_IPRONM

    Name of InfoProvider to be remodeled

    I_RRNM

    Name of Remodeling Rule

    I_CONVERSION_ID

    ID of the remodeling run/process

    R_R_RSCNV_EXIT

    Instance of your class

    This method is only called once prior to the actual data conversion process. The method CONVERSION_EXIT of the instance returned from this method via parameter R_R_RSCNV_EXIT is called afterwards to convert the data. If no instance is returned the remodeling process is terminated.

    The method CONVERSION_EXIT has the following parameters:

    Parameter

    Description

    I_CONVERSION_ID

    ID of the remodeling run/process

    I_R_NEW_FIELD

    Result of the routine, which is assigned to the new field

    I_R_OLD_DATA_ROW

    Structure of the table before remodeling, current row

    E_T_MSG

    Message container to log messages (optional)

  6. Implement your class and save your entries.

Results

All classes that implement the IF_RSCNV_EXIT interface are available in remodeling. They are listed in the input help for the customer exit.