Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
Showing results for 
Search instead for 
Did you mean: 

1 Abstract

Here you can find information about an possible integration of SAP MDG and SAP Jam. This video "SAP Master Data Governance – Collaboration with SAP Jam" produced along with this blog shortly describes the use case:

The following sections define the use case and talk about its motivation, describe the architecture and its technical realization. More information can be found under and

2 Disclaimer

The integration of SAP MDG and SAP Jam is not shipped in a ready to use product from SAP but it is up to the interested party to use this description as a template to implement it. MDG is to be seen here as just an example of a tight integration of a SAP Backend and SAP Jam. All the implementation artefacts are modification free, only using Standard SAP extensibility mechanisms like POST-method implementations, new customizing entries or local classes. The example shows how even complex integration scenarios are possible.

3 Use case & motivation

Major Master Data Governance (MDG) processes rely on a flow of steps processed in a distinct order by different people and/or systems. MDG maps these process flows into SAP Standard Workflow. SAP Standard Workflow is intended to deal with straight forward and recurring process flows. Meaning, it’s the right tool if one sees that an action in general requires a certain process choreography. Changing the workflow regularly would be possible but is certainly not wanted especially when the majority of the processes are already covered by the workflow, the exceptions occur only occasionally and are not that predictable. If the workflow with its steps and mechanisms is not enough to further execute the process, other mechanisms are needed.

Below is a picture of workflow steps in a material change process in SAP MDG without Integrated Collaboration:

The material has been created/changed by John Product (on the very left) which is handled by a change process within the MDG workflow. Different departments need to approve. Lisa Logistics starts working with the external Paul Trucker outside of the workflow tool as soon she is notified by the same.

For this specific MDG workflow (fitting to “90%” of the processes) the following characteristics are valid:

- MDG workflow is processed sequentially

- Communication with externals is not part of the workflow

SAP Jam integrated with MDG using SAP Standard Workflow is the mechanism which helps to efficiently process as well ad hoc processes or complement the standard workflow processes capturing ‘soft facts’ as e.g. discussions or additional information flows. Below is a picture of the workflow steps in the material change process in SAP MDG with Integrated Collaboration:

The Workflow process is accelerated via parallel information processing supported by a professional collaboration tool (SAP Jam). With SAP Jam integrated the process fulfills the following characteristics:

- Parallel execution or preparation of tasks is possible in a collaborative workspace

- Easy inclusion of external participants (not foreseen in the standard Workflow solution)

- Usage of productivity tools in SAP Jam (File Upload; Feed; Blog; Wiki; Calendar; decision making tools; etc.

- Communication and shared information is preserved in SAP Jam (hence not hidden in personal mails and so accessible for all relevant parties)

Detailed step by step description:

1. John changes the material using a change request; when pressing SUBMIT a rule framework is processed which decides to start a “Jam Collaboration” in parallel to the standard Workflow. This enables the contributing parties to prepare and collect further needed Information, so they can execute the consecutive Workflow steps faster and access all preserved related information (decisions / files / information exchange (feed) centrally). As well external contributors can easily be involved. The following actions are executed automatically:

  • a MDG Jam group (in which all affected parties for change requests collaborate; created manually beforehand) is linked to the change request which can be displayed and accessed in the transaction using NetWeaver Business Client (NWBC)

  • a Business Object (here the MDG change request is the BO) related Feed entry is triggered into the MDG Jam group. Like this the change request is linked to the related Jam Objects which allows e.g.:

      • passing real-time data access from MDG backend to SAP Jam, to show MDG data directly in Jam

      • using hashtags to further structure information in SAP Jam (#MaterialChanged and #CRId), allowing to filter, search and organize the created information to support Jam users working on the change request

  • a related Jam Content folder is created to enable to collect all relevant documents

  • @mention is used in the feed post pointing to special SAP Jam Group members to alert them

John Products,

Product Manager,

working in SAP NWBC backend
2. Lisa gets an alert in SAP Jam and can already start to prepare her “Logistics Approve” in the workflow before the process step triggers her participation actively via the workflow; basically she can now use the full power of collaboration to already get prepared. To give some examples:

  • accessing data concerning the changed material in Jam (real-time) without navigating to the backend

  • commenting on the changed material

  • searching for related information via hashtags using the SAP Jam search (in SAP Jam # (hash tagging) is widely used for different kinds of objects like comments, replies, files etc.)

3. Out of the Business Record Viewer (see here) showing the changed material with details read real time from the backend system she creates a task for Paul Trucker (external logistics provider), passing on and requesting the relevant information:

  • a task description asking for the new transportation quote to be uploaded into the designated folder

  • a due date with a set reminder

Lisa Logistic,
Logistics Manager,

working in SAP NWBC backend and SAP Jam
4. Paul (member of the designated SAP Jam Group) gets an alert in SAP Jam (e.g. via E Mail notification)

  • he checks the details

  • he uploads the requested data into the folder and sets the Jam Task to ‘completed’

  • all related comments, changes etc. are directly visible to him in Jam, so he does not need to organize parallel mail threads in his own mail environment.

  • Paul’s contributions like this are directly visible, so there is no further need to forward additional mails

Paul Trucker,

Transportation Officer,

working in SAP Jam only
5. Lisa gets notified about the completed task in Jam and parallel in the MDG transaction (NWBC Side Panel)

  • Lisa reviews the SAP Jam task and comments it, so other colleagues would see this in Jam and in the Side Panel Feed in NWBC

6. After receiving the ‘Finance Approve’ via the MDG Workflow she can activate the Change request right away without further delay

Lisa Logistic,
Logistics Manager, working in SAP NWBC backend and SAP Jam

4 Architecture & Implementation

The prerequisite for this scenario are the following components in the SAP backend:


  • ABAP SMI coming with UI Addon (UI2_FND, UI2_702) SP09

  • SAP_BS_FND 731 and SAP_BASIS >= 7.02 SP13

  • SAP Jam Enterprise licence

The whole process involves different technologies. The following table shows the different tasks that needs to be accomplished (the tasks are not sorted):




Backend System connection/configuration

#1.1 Building up a reverse proxy for externally available OData Services
[System Administration]
OData Services are used when sending the BO Feed entry to SAP Jam. With these, later on, backend objects can be exposed real time in SAP Jam. The reverse proxy changes internal application server information in the OData links with external ones – the external domain used by the company.
#1.2 Setting up trusted connections
[System Administration: Exchange of certificates]
System authorization: A backend system communicating with SAP Jam needs this sort of connection.
#1.3 Configure the backend against SAP Jam for ABAP SMI API and the SAIL API
[System Administration: API configuration & Exchange of certificates]
User authorization: Since the Side Panel uses the “old” SAIL API but the Jam Objects like groups are read with the ABAP SMI API both must be configured.
#1.4 Configure Side Panel in general
[Side Panel Framework Configuration]
In the NWBC a Side Panel must be configured.
#1.5 Configure Side Panel Collaboration Chips
[Side Panel Framework Configuration]
There are different Side Panel Chips: e.g. Master Details, Notes, Attachment…In this case we need the "SAP Jam Group" and the "SAP Jam Feed"-Chip.


#2.1 Configure MDG OData + Annotation Service as External Managed Objects and use the per user authentication for access
[System Administration]
All object types that should be exposed in SAP Jam must be registered. In this case e.g. Material Change Request.
#2.2 Setup the group "Material Change Request" with using the template
[SAP Jam Group preparation]
The Group "Material Change Request" is created exactly for the needs for exchanging MDG information. Each group can be tailored, also choosing from a wide range of business process templates.


#3.1 Backend User with MDG + Side Panel roles
[Backend User Configuration]
The backend roles need to have the authorization for showing the material plus the Side Panel. These roles must be attached to the respective users.
#3.2 Workflow batch user needs an SAP Jam user assigned ("Material Workflow User")
[Backend User Configuration]
Workflows are processed by a batch user, which needs to be known by SAP Jam to let it create/read Jam objects.
#3.3 Jam User for all people involved + assignment to backend users
[Jam User Configuration]

Development objects

#4.1 OData data Service suitable/accessible for the Business Record Viewer
[Application Development: Searching for/Programming and registering of the Service]
The OData Service are needed to expose the backend objects real time in SAP Jam. This is about the data.
#4.2 OData Annotation Service suitable/accessible for the Business Record Viewer
[Application Development: Searching for/
Programming and registering of the Service]
The annotation service defines how the data coming from another OData Service is structured, shown in the Business Record Viewer.

New MDG Change Request Type for Jam integration and a SAP Business Workflow template that is called as a sub-workflow from the main MDG workflow.

[Application Configuration]

Not for every change of the material a Jam Feed Entry is created. There is a special workflow type which is called when the rules in the Business Rules Framework decide a processing in Jam is required.

It is recommended to set up a dedicated MDG Change Request Type for MDG processes with Jam integration. The assigned SAP Business Workflow template adds the calls to Jam where required.
#4.4 Calling SAP Jam from within the workflow
- reading out the Jam Group "Material Change Requests" and its members

- creating a folder

- assign the material change request to the Jam Group
- share the Change Request in the SAP Jam Group
- post BO related Feed entry with hashtags and links to OData/Annotation/Folders…
[Application Development: Programming and registering of the Service]
The special workflow type and its implementation reads and writes into SAP Jam using specific ABAP APIs.
#4.5 Side Panel: Tagging the Change Request Ids to be available in Side Panel bar
[Application Development: Programming]
To connect the application and the shown material/change request on the left with the Jam Group and Feed Chips in the Side Panel on the right the context (key values of the object) must be transferred. With this the Side Panel is context sensitive and shows the corresponding Jam objects related to the backend application object. The tagging is done in local POST-EXIT method implementations.

Additional information to the tasks grouped by categories:

Jam Only:

  • #2.2 Configure MDG OData…– Create and structure a SAP Jam Group to discuss Material Change Requests

  • #3.3 Jam User for all people involved…– Create users for the ones participating in the Material Change Request process and relate them to the backend system (often done in transaction su01 by entering the email-address)

Connect the backend system to SAP Jam (for creating/change Jam objects using the ABAP SMI API):

  • #1.2 Setting up trusted connections… and #1.3 Configure the backend against SAP Jam…– Use this guide Connecting SAP Jam with ABAP SMI to configure the connection. Monitoring and troubleshooting information for above mentioned configuration tasks: SAP Jam Connection

Working with MDG and interact with SAP Jam:

  • #3.1 Backend User with MDG…– For the Material Governance process a user needs the role SAP_MDG* roles. With having these roles and the respective permission one could open “Material Governance -> Change Requests -> Material Processing -> Search Material”.

  • #4.3 New MDG Change Request Type …– Make sure that the new sub workflow is called by the main workflow. In this case the main workflow “WS60800086 MDG_RBW” uses the SAP Business Rules Framework to determine then the sub workflow which calls the “Jam Integration ABAP class” which interacts with SAP Jam. The implementation is similar to How To - Master Data Governance for Material: Send a Mail Notification During the Governance Process. This guide gives an example for triggering an action in SAP Jam from within a workflow. Also, you might have a look at the guide Rule-Based Workflows for Material. The workflow is passing context information to the “Jam Integration ABAP class”. The context contains in this case the change request Id and the attached Jam group number.

  • #4.4 Calling SAP Jam from within the workflow…– For fulfilling this task the ABAP SMI developer documentation is necessary. It explains for example how to read out a Jam Group in an ABAP class. Also the OData v2 documentation and the knowledge about the Jam OData Model <yourLicencedServer>$metadata and the SAP Jam OData API Reference are helpful. With the help of the context transferred from the workflow the interaction with SAP Jam is possible. The following information is the context which is needed by the Jam integration processing:

  "Input parameter/context from the workflow
lv_group_uuid = iv_group_uuid.   
"e.g. 'oSJFpcZw5dCcWjpwVhxY50'
lv_bo_type = iv_bo_type.         
" e.g. 'BUS2250'
lv_bo_id = lv_bo_id.             
" e.g. '4453m'

    • The group is read (using the Jam Group uuid) with its members to set the @mention later on(using ABAP SMI). The workflow holds the SAP Jam Group uuid in its customizing. The folder is created with the same technique (using ABAP SMI) – see the code snippet below (you can use the code snippet and all the following ones as template):

  lo_api ?= cl_odl_api=>s_create(
= if_clb2_constants=>gc_platformtype-jam
= 'DEFAULT' ).
= lo_api->get_request( iv_toplevel_resource = 'Groups' ).
-name = 'Id'.
= '''' && lv_group_uuid && ''''.
ls_key-value = lv_char.

APPEND ls_key TO lt_group_key.
->navigate_by_key( lt_group_key ).
->navigate( 'Folders' ).

CONCATENATE 'CR' iv_cr_id INTO lv_folder_name.
= lo_api->create_input_entity( iv_name = 'Folder' ).
->set_simple_property( iv_name  = 'Name'
= lv_folder_name ).
= lo_input_folder
= if_odl_request=>gc_access_operation-create
= lo_request->get_result_entity( ).

CATCH cx_odl_process INTO lx_error.
CATCH cx_odl_process_dynamic.

    • The Change Request Id and the Jam Group id are needed to assign (in the context of the Side Panel) the newly created Change Request to the Jam Group (using SAIL API, see here the SAIL Programming Guide😞

= cl_stw_api_factory=>s_create( iv_application_id      = 'SAIL'
= '' ).
= lo_application_api->get_activity( iv_activity_id = lv_main_group ).
CONCATENATE iv_cr_id '999999' INTO ls_borident-objkey.
-objtype = 'BUS2250'.
-logsys  = 'QMHCLNT405'.
= ls_borident.
= lo_sw_bo_api->get_bo( iv_bo_id = ld_sw_bo_id ).
= lo_sw_bo->get_id( ).

lo_sw_bo->assign_activity( io_activity = lo_activity ).
CATCH cx_stw_technical INTO lx_root.


    • To have the information from the backend change request in SAP Jam available, the object must be shared in SAP Jam Group. If this is done the post of the feed entry can be made referring to this existing object. The sequence of calls is as follows:

1. POST /api/v1/OData/ExternalObjects - sending the Change Request as External Object in the body. In case this is successful it is responded with “201 Created”. If the objects has already been shared it will just return the existing object.

The result can’t be seen/checked on the Jam UI.

  "======>0 map BO data and getting the API for subsequent calls
= cl_clb2_cust_queries=>s_get_instance( ).
= lo_clb2_cust_queries->get_registry_serv_by_bo_type2(
= 'BUS2250'
= if_clb2_constants=>gc_platformtype-jam
= 'MDG1' ).
= ls_odata_srv_info-request_uri.
= ls_odata_srv_info-annotation_link.
= cl_clb2_url_mapper=>s_get_instance( ).
= lo_int2ext_url_mapper->map2ext( lv_int_service_url ).
= lo_int2ext_url_mapper->map2ext( lv_int_odata_annotations_url ).
  CATCH cx_clb2_exception INTO lo_clb2_exception.
lo_api ?= cl_odl_api
=>s_create( iv_application_id = 'DEFAULT'
= if_clb2_constants=>gc_platformtype-jam
= 'DEFAULT' ).
  "======>1. feature in Jam
  "since the change request is created each time you can directly feature a new external object
  "a prepare the Request
  CLEAR lo_request.
= lo_api->get_request( iv_toplevel_resource = 'ExternalObjects' ).
= lo_api->create_input_entity( iv_name = 'ExternalObject' ).
  CONCATENATE lv_ext_odata_service_url '$metadata#' ls_odata_srv_info-collection_name INTO lv_ext_objt_url.
  CONCATENATE lv_ext_odata_service_url ls_odata_srv_info-collection_name '(' lv_bo_id ')' INTO lv_ext_exid_url.
->set_simple_property( EXPORTING iv_name  = 'Name'
= lv_change_title ).
->set_simple_property( EXPORTING iv_name  = 'Summary'
= 'MDG Summary' ).
->set_simple_property( EXPORTING iv_name  = 'Exid'
= lv_ext_exid_url ).
->set_simple_property( EXPORTING iv_name  = 'Permalink'
= lv_backend_uiurl ).
->set_simple_property( EXPORTING iv_name  = 'ODataAnnotations'
= lv_ext_odata_annotations_url ).
->set_simple_property( EXPORTING iv_name  = 'ODataMetadata'
= lv_ext_objt_url ).
->set_simple_property( EXPORTING iv_name  = 'ODataLink'
= lv_ext_exid_url ).
->set_simple_property( EXPORTING iv_name  = 'ObjectType'
= lv_ext_objt_url ).
  "b Submitting a Request
lo_request->submit( io_entity      = lo_input

= if_clb2_constants=>gc_request_method-post ).
  CATCH cx_odl_process INTO lx_root.
  "c Collecting the Results
= lo_request->get_raw_result( ).
= lo_request->get_result_code( ).
= lo_request->get_result_entity( ).
= lo_featured->get_simple_property( 'Id' ).
= lo_propsimple->get_value( ).

2. POST /api/v1/OData/Groups(Id='lv_group_uuid')/$links/FeaturedExternalObjects – linking the SAP Jam Group to the newly created External Object. The External Object URI is sent with the body. In case this is successful it is responded with “204 No Content”. If not you get e.g. 400 Bad Request and “ChangeRequestCollection(4453m) has already been shared in this group”. The result in Jam is that you see an entry like this in the Group feed updates:

Furthermore the object is then linked to the group and is listed in the external object list from which you can navigate to the external objects rendered by the Business Record Viewer.

  "======>2. share in group
  "the object is not yet shared - share in group
  "a prepare the Request
  CLEAR lo_request.
= lo_api->get_request( iv_toplevel_resource = 'Groups' ).
->navigate_by_simple_key( EXPORTING iv_name    = 'Id'
= '''' && lv_group_uuid && '''' ).
->navigate( iv_name = '$links' ).
->navigate( iv_name = 'FeaturedExternalObjects' ).
  "build xml body
  CONCATENATE 'ExternalObjects(''' lv_tmp ''')' INTO lv_external_object_url.
  CONCATENATE '<uri>' lv_external_object_url '</uri>' INTO lv_xml.
= cl_clb_tools=>string_to_xstring( lv_xml ).
  "b Submitting a Request
lo_request->submit( iv_content      = lv_xstring_xml

= if_clb2_constants=>gc_request_method-post ).
  CATCH cx_odl_process INTO lx_root.
"c Collecting the Results
= lo_request->get_result_code( ).
= lo_request->get_raw_result( ).

3. POST /api/v1/feed/post – sending the feed post to the Jam Group and referring to the External Object. In case this is successful it is responded with “200 OK”. The result in Jam is a feed entry underneath the group:

"======>2 post feed in Jam
-application  = 'DEFAULT'.
-platform_type = if_clb2_constants=>gc_platformtype-jam.
= cl_clb2_lib=>s_get_instance( ls_appl_key ).
= lo_lib->get_configuration( ).
= lo_config->get_application_config( ).
= lo_lib->get_process(  ).
lo_clb2_method ?= lo_clb2_process
->get_method( i_method = 'GENERIC' ).
"a prepare the Request
-request_method = 'POST'.
-endpoint      = '/api/v1/feed/post'.
-auth_context  = 'USER'.
->init( iv_method_name    = 'GENERIC'
= ls_connection_data
= ls_config ).
->add_header_field( iv_name  = 'Content-Type'
= 'application/atom+xml' ).
->add_header_field( iv_name  = 'accept'
= 'application/atom+xml' ).
= sy-uname
= ''
= ls_user_address
return        = lt_return.
= ls_user_address-e_mail.
CATCH cx_stw_user.
= lv_ext_exid_url.             
= lv_ext_objt_url.             
= lv_ext_odata_annotations_url.
= '<?xml version="1.0" encoding="utf-8" ?> ' &&
'<feed xmlns="" xmlns:activity="">' &&
'<entry> ' &&
'<title>' && lv_change_title && '</title> ' &&
'<published>2013-09-11T16:54:23Z</published> ' &&
'<author>' &&
'<email>' && lv_user_email && '</email>' &&
'<name>' && sy-uname && '</name>' &&
'<activity:object-type></activity:object-type> ' &&
'</author>' &&
'<activity:verb></activity:verb>' &&
'<activity:object>  ' &&
'<id> ' && lv_object && '</id>' &&
'<title type="html">' && lv_change_title && '</title>' &&
'<activity:object-type>' && lv_collec && '</activity:object-type> ' &&
'<link rel="alternate" type="text/html" href="https://abc"/>' &&
'<link rel="" href="' && lv_object && '"/>' &&
'<link rel="" href="' && lv_collec && '"/>' &&
'<link rel="" href="' && lv_annota && '"/>' &&
'<source>' &&
'<id>/groups/' && lv_group_uuid && '</id>' &&
'</source>' &&
'</activity:object>' &&
'<content type="html">' && lv_change_text && '</content>' &&
'</entry>' &&
->set_data( lv_xml ).
"b Submitting a Request
->execute( iv_user_id  = lv_user_email
= lo_clb2_method ).
"c Collecting the Results
= lo_clb2_method->get_result_code( ).
= lo_clb2_method->get_raw_data( ).


Make the Side Panel work for MDG:

  • #3.2 Workflow batch user needs an SAP Jam user assigned…– Assign an email-address to the batch user that is known by SAP Jam (sometimes done in transaction su01, more often in separate systems)

  • #1.4 Configure Side Panel in general… and #1.5 Configure Side Panel Collaboration Chips…- Here you can find some information on how to configure Side Panel for Business Suite.

  • Since the Side Panel uses the SAIL API, it must be configured (#1.2 Setting up trusted connections… and #1.3 Configure the backend against SAP Jam for ABAP SMI API and the SAIL API…) using this guide Connecting SAP Jam with SAP ABAP Systems, otherwise there will be an error in SAP Jam Chips visible

  • #4.5 Side Panel: Tagging…– Here you see the successful tagged application:

The “Change Request 3350” is related to the Jam Group “Material Change Requests”. To reach this connection a tagging needs to be done. The above UI is built up with Web Dynpro using this class CL_USMD_CR_GUIBB_GENERAL_DATA. In two methods which represent two different timepoints in which the UI is called, the context is set. Therefore here these PostExit methods need to be implemented in the same way: <IF_FPM_GUIBB_FORM>->GET_DEFINITION and <CL_GUIBB_BOL_BASE>->GET_ENTITY_DATA

TYPE REF TO if_fpm,
TYPE REF TO if_fpm_cnr_ovp,
TYPE usmd_crequest.

lo_fpm = cl_fpm_factory=>get_instance( ).
lo_cnr_ovp ?= lo_fpm
->get_service( cl_fpm_service_manager=>gc_key_cnr_ovp ).
* Set Tagging for JAM CHIP and value for BORTYPE
iv_tag  = '/BSSP/:BORTYPE'

= 'BUS2250').
IMPORTING ev_value = lv_crequest ).
* Set tagging value for CREQUEST
IF lv_crequest IS NOT INITIAL.
iv_tag  = '/BSSP/:USMD_CREQUEST'

= lv_crequest ).
iv_tag  = '/BSSP/:TAB_INDEX'

= '999999' ).


Display data in the Business Record Viewer (below you see an example – the data are retrieved real-time from the backend system)

  • #2.1 Configure MDG OData + Annotation Service as External Managed Objects…– This can first be done, if the services are available. For information about configuration tasks in SAP Jam, see the SAP Jam Admin Guide, the part “Developer Information”, which will lead you also to needed information about “External Application”. Here the needed per user authentication is described (Quicklink). There is also an SCN Guide available describing this per user authentication:
    Plus you might have a look in the “System Administration and Maintenance Information” (on the same page as “Developer Information”).

  • #4.1 OData Service accessible for the Business Record Viewer - If you don’t find a suitable OData Service that contains the information (from your backend object) that you want to display in SAP Jam you need to write your own OData Service. For MDG there was an existing productive OData service which was used. You can use this guide as a starter to the topic about developing your own OData Service The new SAP NetWeaver Gateway Service Builder: Build new OData Services in 3 Quick Steps

  • #4.2 OData Annotation Service suitable/accessible for the Business Record Viewer…- The annotations must be tailored to the OData data Service. Here you find a guideline from SAP Jam on how the annotation must be built up Develop an OData annotations file to display business records. The OData annotation Service can be part of the data OData Service or exposed as a separate service.

  • #1.1 Building up reverse proxy…– Without this you would expose the OData Server links with internal server information <internalServer>.<ODataEndpoints>. But you want to have them externally accessible so that SAP Jam can call them. Therefore you need to have a proxy system in between mapping this information. This admin guide Sending Notifications to SAP Jam explains in chapter “Defining URL Rewriting” how to setup the reverse proxy. Attention does not describe the setup of the MDG scenario.

martin.steinhauser, christoph.ehrhardt and christoph.gollmick from Social Media Collaboration Integration together with

lars.rueter2 from Master Data Governance