When you start working with SAP VIM Solutions Beyond Invoice — whether it’s Incoming Delivery Notes, Sales Orders, Remittance Advices, Order Confirmations or Quotations — you quickly notice a familiar limitation: the out-of-the-box setup doesn’t provide meaningful role definitions. The delivered BC-Sets rely entirely on SAP’s Organizational Object Assignment, pointing to predefined work centers, rules, jobs, org units, positions, or individual users.
In real projects, these structures are rarely maintained in a way that supports smooth routing. That’s why, in most implementations, one of the very first tasks is building a practical, maintainable role resolution logic — one that matches how the organization actually works.

A very minimal role resolution logic which works without creating a table, maintenance view and more is this one: We tap into the existing table of validation agents maintained in Validation Assignment. This is a very simple and very easy solution as you can set up a list of users per ArchiveLink Document Type and this user will then be assigned both for validation and document processing.

The link between ArchiveLink Document Type and User is stored in table /OTX/PF01_T_VALR.

The only way to achieve any logic for determining users besides SAP’s Organizational Object Assignment is using the setting Role Resolution Logic which requires an ABAP Class being assigned.
Create a new class in SE80 using Superclass /OTX/PF04_CL_ROLE

Redefine method /OTX/PF04_IF_ROLE~ROLE_LOGIC

A minimal version of this method could look like this (simply returning one user with username Alex):
METHOD /otx/pf04_if_role~role_logic.
DATA: ls_actor TYPE swhactor.
ls_actor-otype = 'US'.
ls_actor-objid = 'Alex'.
APPEND ls_actor TO pet_role_result.
ENDMETHOD.In order to add our logic we will retrieve the ArchiveLink Document Type and select the responsible user from table /OTX/PF01_T_VALR.
METHOD /otx/pf04_if_role~role_logic.
DATA: lh_plh TYPE REF TO data,
ls_actor TYPE swhactor,
ls_fallback TYPE /otx/pf04_t_rol, " optional for fallback
lt_valr TYPE TABLE OF /otx/pf01_t_valr.
FIELD-SYMBOLS: TYPE /otx/ps09_t_plh, " [TODO] replace with your PLH table! Format is /otx/ps*_t_plh for out of the box solutions.
TYPE /otx/pf01_t_valr.
* Get data from workitem header
CALL METHOD /otx/pf04_if_role~mh_data->head_data_get( IMPORTING peh_head = lh_plh ).
ASSIGN lh_plh->* TO .
* Use Validation Agents from /otx/pf01_t_valr in case ArchiveLink Document Type is filled.
IF -ar_object IS NOT INITIAL.
SELECT otype, objid
FROM /otx/pf01_t_valr
INTO CORRESPONDING FIELDS OF TABLE @lt_valr
WHERE ar_object = @ -ar_object.
IF sy-subrc EQ 0.
LOOP AT lt_valr ASSIGNING .
CLEAR ls_actor.
ls_actor-otype = -otype.
ls_actor-objid = -objid.
APPEND ls_actor TO pet_role_result.
ENDLOOP.
ENDIF.
ENDIF.
* Fallback (optional)
IF pet_role_result IS INITIAL.
SELECT SINGLE otype, objid
FROM /otx/pf04_t_rol
INTO CORRESPONDING FIELDS OF @ls_fallback
WHERE profile_id = 'PS02_BCF_ORDER' " [TODO]example! to be replaced!
AND role_id = 'SOL_1ST_PROC'. " [TODO] example! to be replaced!
IF sy-subrc EQ 0.
CLEAR ls_actor.
CONCATENATE ls_fallback-otype ls_fallback-objid INTO ls_actor.
APPEND ls_actor TO pet_role_result.
ENDIF.
ENDIF.
ENDMETHOD.Once the class is complete and activated we can assign it in /OTX/PF00_IMG > Process Configuration > Profiles > Profile Configuration > Version Definition > Role Definition. Here you can now switch your Role Type to Role Resolution Logic, add your Role class and add a Fallback user in case the logic does not return any user:

Now you have created a very clean, reliable and super straightforward role determination VIM Beyond invoices. This enables you to fully set up any of the SAP VIM Solutions Beyond Invoice processes. And in case there is no complex requirement for user determination there is a chance that you already reached your goal!
If your requirements extend beyond this or you would like support in reviewing or refining your configuration, you are welcome to get in touch.
This article is for SAP VIM Solutions Beyond Invoice and is not compatible with role determination configuration for invoice processing.
This article is intended for informational purposes only and does not supersede or replace the official documentation provided by OpenText. It serves as supplementary guidance to assist with common challenges. For authoritative instructions and compliance requirements, refer to OpenText’s official documentation and support. Do not use this in production systems.


Schreibe einen Kommentar