Skip to Content

Introduction:

I have recently had the opportunity to be on a team that delivered EHSM 2.0 and upgraded to 3.0 both on ramp-up.

Being such a new product I wanted to share my experience from a development perspective, hopefully providing some assistance to others embarking on a similar adventure. This first blog aims to give an overview of the solution with the intention of helping to put it all into perspective. The solution is quite well architected but it can be complex to navigate when trying to add custom requirements. I found that once I had a good grasp on how things worked over-all it was much easier to know where to look and start enhancing to achieve the desired result.  In subsequent posts I would like to elaborate on the approaches to take when enhancing particular components of the solution.

Background:

EHSM is a new solution, extending the original EHS module and has been built from the ground up using the latest and greatest of SAP’s NetWeaver ABAP infrastructure offerings. For more detail on the overall solution you can look at online help in the SAP Library – Component Extension for SAP Environment, Health, and Safety Management

Architecture Overview:

The diagram below provides a conceptual overview of the technical solution. The following sections will go through each of the components and the approaches for enhancing them at a high level:

EHSMhighLevel.png

  • User Interface

EHSM has two main access channels Web Dynpro and Adobe Forms. To find all of the objects check out the package EHHSS_PC_INC_RECORDING.

    • Web Dynpro FPM

FPM is all the rage these days and for good reason, however, when built on top of a domain model such as BOPF it really comes into its own. ESHM leverages this well and most of the generic FPM UIBBs such as forms, lists, tabbed and search components are built on top of BOPF (using EHSM frameworks with FBI [FPM BOPF Integration] ). This exposes the BOPF data layer as well as events, relationships and even UI logic. FPM wires are used to enable generic and configurable connections between components and of course feeder classes are used to provide UI specific behaviour.

    • Adobe Forms

SAP Interactive Forms by Adobe are used for offline data entry and can be submitted via email. This provides a lot of flexibility especially for scenarios where the recording of data may be remote and difficult to access the network (e.g. for use by contractors who may not have access to the system). Each form is generated by a ‘data provider’ class which pre-populates fields and drop-downs. The inbound form is handled by an ‘inbound persister’ class that collects the data and orchestrates the mapping and saving of the data. A nice feature is that these classes are not set as final and the implementation class is specified in configuration allowing for straight-forward enhancement.
Although access via mobile device was not in scope for our project I did notice an iPhone app in the app store for this and there is also a web service layer available for integrating third party solutions of such a nature.

  • EHSM Tools and Configuration

The EHSM solution provides a large suite of domain specific logic in reusable classes, in particular a gateway layer providing accesses to the BOPF configuration and transaction layer. This provides much of the interaction and logic between the user interface layer and the BOPF transactional layer. Other tools include range of helper classes to assist in working with various EHSM concepts. One such example is the EHSM Party which can represent an HR Person, a System User or Business Partner, etc. (refer to class CL_EHFND_PARTY_PROXY). This model (much of it residing in package EHFND_REUSE_COMPS) is quite rich and well worth leveraging where possible. There is even a master data customising generator (transaction EHFND_CUST_GENERATOR) that can generate objects such as master data tables, text tables and search helps for new data types.

  • BOPF

The BOPF layer provides the core business logic and most of the business rules and behaviour is found here. Each logical component is defined as an object so for example an incident is represented in the node EHHSS_INCIDENT. Objects can have usage dependencies with each other and also have inheritance. Actions relating to incidents for example are represented with EHHSS_INCIDENT_ACTION which inherit from EHFND_ACTION and are linked to the EHHSS_INCIDENT object via a relationship definition in the BOPF configuration definition.

Within an object there are nodes that have data and behaviour configured against them. The nodes relate to each other in a hierarchical manner with a root node at the base of the tree. Data is assigned as either persistent (saved to the database) or transient (represented at runtime only) and this is defined by a grouping of data dictionary structures and one table per node where the data for that node is persisted. The BOPF Model and BOPF runtime manage the data structures, relationships and events at runtime. The transaction layer manages the persistence and buffering of the data. The data structures of the nodes can be extended to allow for custom enhancements. Each node also has actions, determinations and relationships (among other things) assigned to it. Actions as the name suggest allow callable behaviour to be executed on the node. A Determination has behaviour that is triggered on particular events in the BOPF event loop. This is where transient field values are calculated and field control occurs.

  • Workflow

Even workflows themselves are represented using business objects from the BOPF. In this way each process is encapsulated in the same framework as the other components of the solution. The business objects are called Process Control Business Objects (PCBOs).

Overview of Enhancement:

The two fundamental technologies used are BOPF and FPM. So for the scope of this blog I will briefly mention the approaches for enhancing these and as stated earlier, will go into detail on how to implement specific scenarios in subsequent blogs.

  • BOPF

The most common and straight forward enhancement is the addition of custom fields. This is done through extending the standard structures in the BOPF.

The BOPF Enhancement Workbench transaction [BOPF_EWB] allows custom extension to the BOPF objects. Although not everything is configurable, much of the functionality can be extended, including the addition of  determinations (useful for adding logic to custom transient fields), actions, queries and even new nodes. The addition of new nodes are especially helpful when adding a new section of data and behaviour to the solution. For example, the addition of a new tab on the user interface. Further information can be found in the BOPF enhancement Workbench document (refer to note 1457235). Another option for enhancement is to use the enhancement framework on the implementation classes for the existing BOPF framework events.

  • FPM

Extending the functionality of FPM over BOPF is very smooth for things like adding a new field to the BOPF, simply adding the field as an enhancement to the component configuration and updating the EHSM field control configuration is all it takes. The framework takes care of all the persistence/transactional headaches for you. Depending on the complexity of your requirements you may need to extend or enhance the standard feeder classes of the various generic UIBB component configurations. Many of the standard EHSM feeder classes are not set as final so extension is often a viable option. The following provide a good references and starting point for these concepts:

Floorplan Manager for Web Dynpro ABAP – Developer’s Guide

How to Create, Enhance and Adapt Floorplan Manager Applications on  SAP NetWeaver 7.0 EhP2

FPM BOPF Integration (FBI) – Reusable Objects and Functions for the BOPF Environment (CA-EPT- – S…

Perspectives:

Above I have tried to be as factual and objective as possible, in this section I will taint this  article with my own views from my experience so far.

  • Triumphs

There were many times when my colleagues would find me beaming with the warm satisfaction that an enterprise geek would find in quickly constructing a robust transactional solution to a business requirement. The framework provided a convenient and logical approach to extending the functionality (most of the time). Overall I enjoyed working with the solution.

It was a rare opportunity to be involved in an implementation followed directly by an upgrade. And all the enhancements (from FPM component configuration, to BOPF, to methods) held up considerably well.

The combination of the solution from SAP, and what we were able to enhance, created one of the most user friendly SAP solutions I’ve seen of this nature.

Being on ramp-up was also a good experience and I have to complement the SAP solution team for a well developed product and the great support for us while delivering it.

  • Tribulations

There were many other times when my colleagues found me shaking my fist at the screen shouting (in a workplace sensitive way of course) “curse you BOPF”. The framework is complicated and this means that things were quite a challenge at times. In particular BOPF and FPM events and relationships (both within and between the two) were particularly hard to piece together, especially at the start of the project.

At times the Field Control configuration was very hard to work with. When it worked it was great but when it didn’t it was very hard to determine why and where the issue arose.

Conclusion:

The key to designing and building an enhancement in this solution smoothly is to have a good grasp on the technology components and how they are linked together (both technically and architecturally). Due to these things being relatively new it is hard to draw from experience, which is why I decided to share what I could. As we have gone over the components of the EHSM solution and general approaches on how to enhance it I hope you now have a good place to start as you work with it yourself. I would be keen to hear about your experiences and thoughts on this topic as well.

This is just an overview and if I get the feedback and the time I hope to explore some of the concepts further.

To report this post you need to login first.

34 Comments

You must be Logged on to comment or reply to a post.

  1. Former Member

    Great first post, Ben! You have completely achieved the 1st rule of blogging on SCN – “leave the audience wanting more!”

    It’s gratifying to see what you were able to achieve in terms of extending the solution without experiencing pain via the subsequent upgrade. We have done a lot of tinkering and testing in the “lab” via demo systems and proof of concept activities, and have a great deal of confidence in the solution and architecture to behave this way, but the only real proof is customer usage and success.

    I’m looking forward to learning more about the enhancements you made and what you were able to achieve.

    (0) 
          1. Former Member

            Good time Mr. Ben.

            Do you have SAP courses how to start with EH&S module?

            I’ll so appreciate your help.

            Respectfully,

            Evhen Barzak <email removed by moderator>

            (0) 
        1. Former Member

          Hi Mandar,

               You can add your custom Tab in EHSM-INC through FPM. Steps are as follows

          1. Enhance Component Configuration

          2. Add Tab UIBB Component

          3. Add list UIBB/Form UIBB in Tab UIBB and click on Configure UIBB

          4. Give Feeder class name and in Feeder class parameter give your BO name and Node Name.

          Thanks,

          Sumedh Utpat

          (0) 
          1. Former Member

            I am able to add fields in tab in BO /SCMTMS/FREIGHTAGREEMENT  ….and able to see tab on portal but field on tab not editable….can anyone help me to provide me the solution where i am missing .


            I am using same approach you described above

            (0) 
            1. Former Member

              Hi Massimo,

              Can you please elaborate about the Enhancement Context-Based Adaptations (CBA).

              Will be useful to me 🙂 .

              Thanks & Regards,

              Sanket.

              (0) 
              1. Former Member

                It is slightly complicated to understand, but it has many advantages:

                – It is created like virtual copy of standard, you  not enhancement the standard.

                CBA is technically realized by wrapping the original application inside an embedding component Which is responsible for managing the adaptations. This way it “s possible to enable CBAs without modifying the existing application.

                drawbacks:

                need to change the roles to operate the OBN

                read this:

                http://scn.sap.com/docs/DOC-28799

                https://scn.sap.com/docs/DOC-33072

                CD268_Adapting Floorplan Manager and Web Dynpro_ABAP Based User Interfaces

                regards,

                massimo

                (0) 
  2. Former Member

    Hi  Ben, i need  add custom field ” Other Description” ( long text ,type string ) into node incident as Description of Events ( BASIC_INFO_ALL_DESC ), i can do it?

    With BOPF Enhancement Workbench it is not possible add delegation node!?!

    (0) 
    1. Ben Patterson Post author

      Hello Massimo,

      Firstly, I am sorry I have not replied sooner, I expected an email update on new comments but I didn’t receive one with your comment.

      Unfortunately you are correct, it is not possible to add delegation nodes when enhancing BOPF objects, therefore you are not able to create a delegation to the standard object EHFND_TEXT_COLLECTION and re-use all the standard functionality related to this (such as delta change handling).

      As a work around you should be able to create a node under Basic Info with a simple structure containing a text field of type string (/BOBF/TEXT_CONTENT if you like) and language. There will be a little more work to do it this way as you will need to set up the determination to manage the creations and cardinality of the node, but it should meet your requirements.

      I also hope this enhancement functionality is added in the near future…

      Let me know if that helps at all. This is also a prompt for me to start the next blog explaining more detail on how to enhance the BOPF.

      Regards,

      Ben.

      (0) 
      1. Former Member

        Thanks for answer, luckily i need only 2 language local ed english.
        So i have create for every custom long text  a sub node with:
        –  include /BOBF/TXC_TEXT_TYPE for Administrative data( management with determination for update data )
        – desc local ( string )
        – desc english ( string ).

        Work great!

        I only have one problem: always  need create all custom subnode otherwise
        Connetion OIF webdynpro FPM does not work. (filed is disable ,not editable )
        disadvantage i have a lot of empity node.

         

        I tried to change same parameter: Use deferred create, Create On Demand, Allow Instance Creation, from  Feeder Class CL_EHFND_FBI_GUIBB_FORM , but i have same problem.
        At the monent i have determination to create custom nodes.

        I need another piece of advice … there is a way to assign a default value to a field into EHS customizing?

        (0) 
        1. Ben Patterson Post author

          Hi Massimo,

          it is a requirement that you have to create an instance of your custom node via determination as you have discovered. Another helpful thing to do is to add a transient determination for the standard EHFND field control (re-using class CL_EHHSS_INC_D_FIELD_CONTROL). Then you can use field control configuration for your custom node.

          Regarding default values, this also has to be done manually (this was a feature that we also wished to have). To fill default values you can create a determination for this and check the execution time is after loading, or you can enhance the /BOBF/IF_FRW_NODE~RETRIEVE_DEFAULT_VALUES method of the node class (e.g. CL_EHHSS_INC_BIALL_DEF for basic info all).

          Ben.

          (0) 
      2. Former Member

        Hi Massimo,

        Try creating just a custom field by enhancing and the BASIC_INFO_ALL_DESC using a transient structure. Populate that custom field by an on load determination.

        Regards,

        Sanket.

        (0) 
  3. Former Member

    Hi Ben,

    I believe this content is helpful but little complicated to understand unless u have a knowledge on the architecture of EHSM. Better understood if being explained using simple terminologies as I had to look searching for terms in the blog and their functions.

    Regards

    Dhinesh

    (0) 
    1. Ben Patterson Post author

      Thank you for your feedback Dhinesh.

      Please let me know the specific terminologies you struggled with when reading the blog as I may be able to elaborate on them.

      Kind regards,

      Ben.

      (0) 
      1. Former Member

        Hi ben,

        In my view, one must know well the architecture of using EHSM before going through this stuff. I did not understand the terms like FPM, BOPF, feeder class, UIBB conenctions….its seems too technical for a functional consultant like me. I am fresher in this stuff.I mean to say any person will not be able to understand if a salesman try to explain the mechanism of a engine transmission system of a BMW car. But it is rather simple to tell him it works on a automatic/manual transmission to brief. Im sorry if I misunderstood you or I may be an amateur to this topic. Im working on classic EHS only.

        Kind regards

        Dhinesh

        (0) 
  4. Former Member

    Hi Ben

    I need to automatically determine and add Line Manager(LM) and Safety Coordinator(SC) to the list of involved partners when reporting an incident. Could you please give me an advice on where such logic should be implemented?

    The subsequent workflow needs to send notifications about the incident to the LM and SC. How can this be achieved? By default notifications are sent to the incident managers.

    Regards

    Jon GG

    (0) 
    1. Ben Patterson Post author

      Hello Jon,

      I would look at creating a determination on the incident root node to create these default ‘persons involved’. The logic to determine who these people are should of course be encapsulated in a separate class.

      As far as workflow goes it is best to copy the standard workflow and create your own and change the way that the event manager is determined. Once these people are added to the incident they can be accessed in the incident object (although) indirectly via the process object. Extension of the incident life cycle standard process object will be needed in order to add the required new methods to access this information. The configuration will also need to be updated accordingly to point to the new class and workflow.

      Sounds like a good project.

      Beset of luck.

      Ben.

      (0) 
      1. Former Member

        Dear Ben,

        I have installed EHSM 3.0. Now How do i create a role or a workflow or task. what is the procedure to create/record a incident. What are the pre-requisites to do it.( any configuration required in SAP EHS management in SPRO?. Kindly share some information.

        Regards

        Dhinesh

        (0) 
  5. Former Member

    Hello Ben ,

    Thank you for the Blog..

    We Have a requirement to remove the radio buttons in the incident adim investigation tab

    also change the text for the fields

    Please advice how i can acheive that .

    Thank you ,

    Venkat Ratnam Naidu

    (0) 
      1. Former Member

        Hi Massimo ,

        since the component of investigation tab is dynamically coming form FPM tabbed uibb .

        i could not see the option for this .text and UI are created  dynamically .

        is there are any  place we maintain the texts in the configuration level . anywhere in class we control the ui elements .

        i have some basic idea about FPM and experience in Web dynpro . i could not see any thing in feeder class level .please suggest .

        Thanks in advance  ,

        Venkat Ratnam Naidu

        (0) 
        1. Former Member

          you can start from componet configuration EHHSS_INC_REC_OIF_V3_INVTAB_MD and  Enhancement UIBB you need.


          Text can from data element, if you use KEYWORD in CMOD to change description. fields label update in WD.

          Or text are ORT text, you must copy or overwrite standard text.

          (0) 
  6. Former Member

    Hi Ben and other EHSM experts,

    Could you help me with the following questions?

    1) For EHSM Incident Management Analytic Reports, are they all come from BW/BI, or from EHSM directly? I mean can I have these reports without BW/BI in the landscape?

    2) How the Phrase Library (ex, bodyparts, etc) be used in FPM? Or I have to store them in Z tables?

    Thanks,

    Guorong

    (0) 
  7. Vimal Sharma

    Hi All,

    I have a requirement where i need to change the message text after clicking “Send” button while creating Incident.

    How to find the feeder class and method which is called behind “Send” button ?

    Thanks,

    Vimal

    (0) 
  8. Former Member

    Hi Ben, I´m looking for examples about the implementing a Freestyle GUIBB inside an EHS Incident Report Screen. I´m new in EHS development, and I don´t understand how to implement   /BOFU/CL_FREESTYLE_BOPF_HELPER class to handle the data referred to the incident.

    I recently created a thread: FBI Freestyle Helper Sample Implementation

    The Freestyle GUIBB has been implemented, but I can´t access any data of the BOPF Data Model.

    I appreciate some help, thanks!!!

    (0) 
  9. Prabaharan Asokan

    Hi Ben,

    Good blog and greate piece of content. Do you know where the attachments are stored in EHSM system by default. Is it stored in Open Text server. Please throw some lights.

    Regards

    Prabaharan Asokan

    (0) 

Leave a Reply