SAP ABAP IMG Activity RMSL_INGREDIENT_DRFT (BAdI: Generate Draft for Ingredient Label)
Hierarchy
EA-APPL (Software Component) SAP Enterprise Extension PLM, SCM, Financials
   PLM-RM (Application Component) Recipe Management
     RMSL (Package) Labeling Application
IMG Activity
ID RMSL_INGREDIENT_DRFT BAdI: Generate Draft for Ingredient Label  
Transaction Code S_E4E_66000070   (empty) 
Created on 20080410    
Customizing Attributes RMSL_INGREDIENT_DRFT   BAdI: Generate Draft for Ingredient Label 
Customizing Activity RMSL_INGREDIENT_DRAF   BAdI: Generate Draft for Ingredient Label 
Document
Document Class SIMG   Hypertext: Object Class - Class to which a document belongs.
Document Name RMSL_INGREDIENT_DRAFT    

Use

This Business Add-In (BAdI) is used in the Labeling (PLM-RM-LBL) component.

You use this BAdI to specify how the draft for the ingredient label list is generated. The BAdI is called when you choose Generate Draft on the Ingredient Label List tab page.

Requirements

Standard settings

In the standard system, the BAdI implementation CL_RMSL_DI_INGREDIENT_DRAFT is activated. The default code is executed automatically.

With this BAdI implementation, the system takes the following points into account when generating the draft:

  • When you choose Generate Draft, the system displays a dialog box from which you can choose the language in which you want to generate the draft.
  • All ingredients and declaration groups for which the Display Item checkbox is selected, are taken into account by the system when it generates the draft.
  • The system determines the name of the ingredient and of the declaration group as follows:
    1. First it uses the phrase in the Description column in the language selected for the generation of the draft.
    2. If the description does not exist in this language, the system uses the phrase key and writes a message to the application log.
    3. If no phrase has been specified, the system uses the description of the ingredient from the Ingredient Description column in the language selected for the generation of the draft.
    4. If no description exists, the system uses the ingredient key and writes a message to the application log.
  • If the Display Proportion checkbox is selected, the system also includes the following data in the draft:
    • Declared value with unit if available.
    • If no declared value exists, the system uses the calculated value.
    • Ingredients of a declaration group (in brackets after the declaration group).
  • The system inserts commas between ingredients and declaration groups on the same level.
  • If a footnote exists for an ingredient or declaration group, the consecutive number of this footnote is inserted in square brackets after the description text (and proportion if shown).

    All footnotes are listed at the end of the draft.

    If the footnote text does not exist in the language in which the draft is being generated, the system uses the phrase key of the footnote and writes a message to the application log.

The BAdI is not designed for multiple use and only the active implementation is called and executed.

The BAdI is not filter-dependent.

Activities

For information about implementing BAdIs as part of the Enhancement Concept, see SAP Library for SAP NetWeaver under BAdIs - Embedding in the Enhancement Framework.

Example

A draft could look like the following:

Wheat flour 31%, chocolate coating 20%, sugar, milk 20% [1], raisins, yeast [2], spices (cardamom, cinnamon, cloves)

Footnotes:

[1] semi-skimmed, [2] fresh

See also

This BAdI uses the interface IF_RMSL_INGREDIENT_DRAFT. For more information, display the interface in the Class Builder.

Business Attributes
ASAP Roadmap ID 257   Create User Exits 
Mandatory / Optional 2   Optional activity 
Critical / Non-Critical 2   Non-critical 
Country-Dependency A   Valid for all countries 
Maintenance Objects
Maintenance object type E   Business Add-In - Definition 
History
Last changed by/on SAP  20080424 
SAP Release Created in 604