cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance Report Generation Variant to more fields

sonja_koehler2
Explorer
0 Kudos

I need to extend the report generation variant (I thought of using the object key field ?). I need to generate specific reports for incident/accident reports. For example: accident category is 'occupational disease', this requires a different report template vs. another category 'injury at work'. At the moment the report generation variants are linked to the different report objects, but I need specific fields from that to have different report templates being used.

Has anyone had similar experience or ideas on how to solve it. The object key in the variant has only got a function help for ial log, others are empty.

please advise. thanks

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sonja,

Generation variant (t-code:cg2b) doesn't serve the purpose of generating different Incident / Accident reports (or for that matter any EHS reports) as far as report content is concerned. It only specifies and hence restrict the report generation functionality with respect to let's say report category (whether it be a accident, MSDS, Tremcard etc) , Validity area (geographical validity). You assign a report template to a generation variant. This template contains symbols which corresponds to definite fields in SAP. Hence, the content of the report which gets generated , depends solely on the symbols which were included in the template.

Now coming to the accident categories. Defining accident categories while generating report for an "injured person" , only serves the purpose of grouping together various accidents based on the decided classification. The most you can do with this classification is that you can have different "Absence types" for different "Accident Categories". It has nothing to do with specific fields in the final report.

As far as "Application Objects" for "Generation Variants" are concerned, by defining it, you define the "Report Applications" and its sequence to appear in any report tree. Report application in-turn allows for the relevant report generation.e.g, if you have defined "Incident/accident log:IALOGHEAD" as the report application, this generation variant can be used to generate report from the Incident / Accident Log header screen only.

So, in short if you wish to have different reports, maintain different report template, and assign it to a generation variant. You may also have different versions of the same report template being created.

Regards

Pavan

Former Member
0 Kudos

We have a similar need.

Ideally we need to pass a parameter from the Report Generation Variant to the WWI template and to use it in the WWI template to select Value Assignment Instances by comparing the value of the parameter to the value of a characterictics in the different instances .

We imagined we could achieve that by means of a Z Report Application object in the Report Generation Variant to hold the parameter value, and a report symbol of type 'specification' + 'expanded in report body' in order to use it to select specification data.

Unfortunately, when creating the report in CG02 (Create Report), we never managed to get the get a value in the symbol in time to use it for selecting the data.

We are now thinking about modifying the code executed on "Create Report" to store the parameter in a dedicated characteristics in the specification itself so that it is for sure available for selecting the VA instances, but it is more tricky.

Thanks in advance for your help.

Patrick.

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

Eventually we achieved to select the value assignement instance by means of a discrete validity area of category DGREGION in the report generation variant, combined with a repeating group <11BRG000(G,T:DGREGION,L:*)> in the template.

Best reagrds,

Patrick.