Show TOC

Enhancing the Data Enrichment Process Locate this document in the navigation structure

 

If the enrichments executed by the sequences in standard Customizing do not fit your specific business needs, you have the following options:

  • Create a new enrichment sequence with customer-specific logic

  • Replace a single step within a sequence of individual steps with a customer-specific function or add a new individual step to calculate a customer-specific new key figure (requires changing the data model)

  • Create a customer-specific ALL_STEPS sequence

Recommendation Recommendation

  • Do not create new purposes. The purposes in standard Customizing should be sufficient.

  • Do not change the function types, functions, sequences in standard Customizing.

  • If you need to adjust the enrichment, create new sequences. If necessary, create new functions and function types.

End of the recommendation.
Creating a New Enrichment Sequence

If the overall logic of the enrichment meets your requirements, but you want to reduce the number of calculated key figures or calculate one or more key figures in a slightly different way, you can create a new enrichment sequence. To reduce the number of key figures, add the enrichment steps you need to your new sequence and skip the ones you do not need. Activate your new sequence in Customizing.

Replacing a Single Step or Adding a New Single Step

If you want to calculate one or more key figures in a slightly different way, check how the standard logic works:

  • If the customer-specific algorithm you need works with the same input/output, do the following:

    1. Add all steps of the standard enrichment sequence that meet your business requirements to your sequence.

    2. Create a stored procedure for the key figure you want to calculate differently and make the system call your procedure instead of the standard one.

    3. Implement the Business Add-In BAdI: Stored Procedures in Data Enrichment and return the name of your stored procedure.

  • If the customer-specific algorithm you need requires a different input, do the following:

    1. Add all of the steps in the standard enrichment sequence that meet your business requirements to your own sequence.

    2. Create a new function for an existing function type.

    3. Create an ABAP class that implements the interface /DDF/IF_FES_ENRICHMENT. Let the class inherit from /DDF/CL_ENR if the helper methods defined there seem beneficial to you. However, you can also call the helper methods without inheriting from this class.

    4. Assign the name of your class to your new function in the Customizing activity Define Functions under Function Class Name.

    5. Create a customer-specific stored procedure that implements the algorithm you need.

    6. In the EXECUTE method of your ABAP class, enter the code to call this stored procedure.

    7. Add your new function to your enrichment sequence at the place where it fits.

    The wrapper class of the sales data enrichment calls the EXECUTE method of your class at the place in the sequence that you have defined in Customizing.

Creating a Customer-Specific ALL_STEPS Sequence

If you need to calculate enriched key figures in a completely different way, you can do the following:

  1. Create a new sequence with one single step.

  2. Create a customer-specific function of function type ALL_STEPS.

  3. Add your function to your sequence.

  4. Create an ABAP class for your function as described above.

  5. Assign the name of your class to your function as described above.

  6. Add the coding logic you need to the EXECUTE method of the ABAP class. You can call one or more customer-specific stored procedures, you can do processing in ABAP, or whatever fits your business requirements.

Recommendation Recommendation

SAP recommends to keep the wrapper class for any of the enrichment purposes (Sales Data Enrichment or Stock Data Enrichment) by a customer-specific class. If you have to create your own wrapper class, create a class that implements interface /DDF/IF_FES_WRAPPER and enter it as wrapper class on purpose level. You are then responsible to set up the complete orchestration of the corresponding enrichment yourself.

End of the recommendation.