When there is no way to generate symbols through value assignments, we can fill symbols through our own program to show application
data on labels and SDS.
This can be done by creating parameter symbols to bring data from other applications data like batch master data for material, sales order specific data, material documents data etc… to show on Label/SDS.
To achieve this we have to do following steps.
- Create required fields in a structure.
- Generate symbols for fields from structure created in step#1.
- Create one function module to fill the values at generation of label.
- Assign above FM to symbol
Step#1: Create required fields in a structure.
Create required fields in a structure as shown in below using transaction SE11. Here I am taking simple example with only one field. We can create any number fields.
Step#2: Generation of symbols:
To generate symbols for fields in structure, follow below steps.
- Create one function module as shown in bottom of this document. here i have created YTEST_PARAM_01. we should use same interface for these FMs.
- Create symbol group as shown in below screen
shot from SPRO->EHS->Basic Data and Tools -> Report Definition->Report
Symbols->Specify Report Symbol Groups
- Assign structure as a source to symbol group as shown in below screen shot from SPRO->EHS->Basic Data and Tools -> Report Definition->Report Symbols->Specify tables for Report Symbol Generation. here we should select 3 to get data from application tables.
- Create one symbol for each field in the structure created in first step.
- Symbols can be created in two different ways.
- Manual creation
For manual creation, Create symbol as shown in below screen shot from SPRO->EHS->Basic Data and Tools ->
Report Definition->Report Symbols->check and specify report symbols
Here expansion time is very important.
If expansion time 10 is selected, symbol will be filled when report is created from specification by calling foreign FM
assigned to symbol group.
If expansion time 20 is selected and if it is for MSDS, symbols will be filled at the time of generation.
For testing, these symbols will be displayed from CG50 or CG54. When MSDS generated for sales order, these symbols
will be generated by calling FM before going to CVD1.
If expansion time 20 is selected and if it is for Labels, symbols will be filled when Label is generated from CBGL_MP01.
b. Automatic generation
For automatic generation, run CGCZ and generate symbols. Symbols will be generated starting with GZZNAME (G<Field name in structure>)
8. Observe in CG42, symbols will be shown as in below screen shot under Parameter folder in template design.
9. Test the label or MSDS.
I felt sharing this information would give initial idea for EHS group. I would be feel very happy if you provide some feedback.
if you feel good, like this.