For a large utilities concern we implemented Case & Records Management.
One requirement was to have a link from a service order to the respective record in Records- & Case Management (RCM). We created a link (a relation) between these two entities in SAP. The link can be followed in the generic object services (GOS). This is just a simple configuration but I found out in recent presentations on case & records management that this functionality is not well known to many people.
Startpoint: service order screen
Click on one of the links
And see the respective record in Case & Records Management
In this blog I want to show you how you can set up a relation between two entities and make life a little bit easier for the sap users! If you have other uses for this functionality, please let me know.
Step 1: Create roletypes
Go to transaction SOBL_MODEL and create two roletypes. these are just names and descriptions for the entities you want to connect with each other.
Step 2: Assign objecttypes to the roletypes
In this step you assign which objecttypes can connect to the roletype. If you don’t know the objecttypes, just go to transaction SWO1 and check out which objecttypes are available.
Step 3: Create a relationship type (model)
In this step you make a model in which you connect the roletypes with each other. You also set the cardinality in this step. The table for storing the relations can be set to the standard table SROBLBREL.
Step 4: Create a link
In the last step you have to do a (very) little coding for creating a specific link between the two entities (instances). The coding can be placed in a specific user-exit or badi to call the method CREATE_LINK of class CL_BINARY_RELATION.
DATA: ls_l TYPE oblreltype.
ls_a-instid = lv_aufnr.
ls_a-typeid = ‘BUS2007’.
ls_a-catid = ‘BO’.
MOVE ls_obj TO ls_b-instid.
ls_b-typeid = ‘RECORD’.
ls_b-catid = ‘BO’.
ls_l = ‘ZLINKMODEL’.
CALL METHOD cl_binary_relation=>create_link
is_object_a = ls_a
is_object_b = ls_b
ip_reltype = ls_l.
CATCH cx_obl_parameter_error .
CATCH cx_obl_model_error .
CATCH cx_obl_internal_error .
Check in the GOS if the relation is created.