In the post below, I’m sharing a short look at an AI-based document extraction approach that runs directly inside the SAP VIM inbound process.
At the core is a purpose-built middleware I developed to bridge SAP VIM with modern AI models — cleanly, safely, and without breaking the existing architecture.
Same VIM architecture. A very different level of intelligence.
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.
/otx/pf00_img > Process Configuration > Profiles
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.
SE16N displaying /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 TOdata, 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 headerCALLMETHOD /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 ISNOTINITIAL.SELECT otype, objidFROM /otx/pf01_t_valrINTOCORRESPONDINGFIELDS OF TABLE @lt_valrWHERE ar_object = @-ar_object. IFsy-subrcEQ0. 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 ISINITIAL.SELECTSINGLE otype, objidFROM /otx/pf04_t_rolINTOCORRESPONDINGFIELDS OF @ls_fallbackWHERE profile_id ='PS02_BCF_ORDER'" [TODO]example! to be replaced!AND role_id ='SOL_1ST_PROC'. " [TODO] example! to be replaced! IFsy-subrcEQ0.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 > ProfileConfiguration > 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.
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 that may arise during installation and upgrades. For authoritative instructions and compliance requirements, refer to OpenText’s official documentation.
Please note that this article is not about the VIM Invoice process but VIM Solutions Beyond Invoice which is, for example, used to process sales orders, quotations, remittance advices, order confirmations or fully custom document processes (including capture & recognition using OpenText Intelligent Capture for SAP Solutions [IC4S]).
VIM Solutions Beyond Invoice is formerly known as Business Center and sometimes referred to as VIM Beyond.
Similar to the invoice process, the document process in SAP VIM Solutions Beyond Invoice is made up of data enrichments, roles, business rules and actions. In today’s article, I will show you how to quickly and easily create and configure an individual business rule. I also provide my template which allows an easy start for your new business rule.
Creating a Business Rule class
Create a new class using superclass /OTX/PF04_CL_MODULE. You can use for example SE24 or SE80 to achieve this.
/OTX/PF04_CL_MODULE
To implement a business rule you must redefine method /OTX/PF04_IF_MODULE~MODULE_EXEC_CHECK.
/OTX/PF04_IF_MODULE~MODULE_EXEC_CHEC
In earlier versions, data was changed with the help of business rules. This is becoming obsolete today and should therefore be avoided. Business rules check data, data enrichments change data. It is easy to convert old business rules into data enrichments.
As a starting point you can use my business rule template:
ABAP
METHOD/otx/pf04_if_module~module_exec_check.DATA: ls_plh TYPE z01ca_otx_bc_plh, " header table lt_pli TYPE TABLE OF z01ca_otx_bc_pli, " line item table lv_pos TYPE cLENGTH10, " line item position for messages ls_msg TYPE SYMSG. " messageFIELD-SYMBOLS: TYPE z01ca_otx_bc_pli. " line item table ls_plh = pis_plh. lt_pli = pit_pli. pe_mod_run_status = /otx/pf04_if_category=>mc_run_stat_success. " set rule to successful initially LOOP AT lt_pli ASSIGNING.CLEAR: lv_pos, ls_msg."[...] logic" pe_mod_run_status = /otx/pf04_if_category=>mc_run_stat_failed. " set rule to failed ls_msg-msgty ='E'. ls_msg-msgid ='Z...'. ls_msg-msgno =123. ls_msg-msgv1 ='This rule always fails..'."[...]APPEND ls_msg TO pet_mod_msg. ENDLOOP.ENDMETHOD.
Customizing for a SAP VIM Solutions Beyond Invoice Business Rule
Now we have created the class for our business rule and have to create the corresponding customising, which can be done very quickly in the transaction /otx/pf00_img.
/otx/pf00_img
Navigate to Process Configuration > Profiles:
Select your Profile Configuration and navigate to the corresponding Version > Characteristic Configuration and select Process Steps. Select the process step where you want to add the business rule, then navigate to Rules.
When creating the rule, it is important that the rule type here is CHK. Change (CHG) rules are obsolete and have been replaced by data enrichments. Your business rule should not change any data.
Don’t forget to activate the active checkbox on the right-hand side of the screen, as this can easily be overlooked depending on the screen resolution.
Basically, the rule is now active and can be tested. In Customizing, however, you still have to decide which role can skip which rules in which step. Depending on the number of steps and roles, this can be quite extensive:
In general, the simulation of each step should be allowed in all steps and the skipping of rules should also be permitted.
Final Thoughts: Less Is More
When crafting business rules for non-invoice scenarios in SAP VIM, it’s tempting to add a high number of rules to check every possible scenario. But complexity can lead to confusion of the end users and slow performance.
Focus on the minimal rules that truly matter—clearly defined conditions, straightforward actions, and well-documented workflows. It can also make sense to group multiple checks into one business rule to declutter the workspace. For example the rule missing material number and invalid material number can be combined into one rule.
By keeping it simple, you’ll speed up maintenance, reduce errors, and allows you to adapt more quickly when requirements change.
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 that may arise during installation and upgrades. For authoritative instructions and compliance requirements, refer to OpenText’s official documentation.
A data enrichment is a logic or learning based data manipulation which can run, for example, at the begin of a process. From a usage point it is very comparable with a logic module in the VIM Invoice process.
Please note that this article is not about the VIM Invoice process but VIM Solutions Beyond Invoice which is, for example, used to process sales orders, quotations, remittance advices, order confirmations or fully custom document processes (including capture & recognition using OpenText Intelligent Capture for SAP Solutions [IC4S]).
To be precise, Solutions Beyond Invoice describes the supplied solution packages, while the Foundation describes the creation of customised solutions, actions, rules and so on. For the sake of simplicity, I will refer to both as Solutions Beyond Invoice.
VIM Solutions Beyond Invoice is formerly known as Business Center and sometimes referred to as VIM Beyond.
In earlier versions, data was changed with the help of business rules. This is becoming obsolete today and should therefore be avoided. Business rules check data, data enrichments change data. It is easy to convert old business rules into data enrichments.
Creating a data enrichment ABAP class
The initial step in this process is to create a new class that is both appropriately named and described, while adhering to the relevant naming conventions. You case use for example SE24 or SE80 to achieve this.
It is essential to add the correct interface for data enrichments. In the version I am working with, this is /OTX/PF04_IF_DATA_ENRICH_EX.
/OTX/PF04_IF_DATA_ENRICH_EX
The implementation is carried out in method /OTX/PF04_IF_DATA_ENRICH_EX~DATA_ENRICH_LOGIC.
/OTX/PF04_IF_DATA_ENRICH_EX~DATA_ENRICH_LOGIC
I use the following minimalist template for my projects. It already declares the structures, table and field symbol which are needed for processing header and line information. In addition, the success marker is set, if you forget this, the data enrichment is not even executed.
As the naming conventions for variables and the tables used change from project to project, I recommend creating this template once for each project.
If the data enrichment is only executed at the start of the process, it will be helpful to use a debug loop. But beware: If only the VIM Solutions Beyond Invoice Invoices solution is used in the system, but not the packages for invoice processing, a custom debug table in the style of /opt/cp_debug must be created.
ABAP
METHOD/otx/pf04_if_data_enrich_ex~data_enrich_logic.* Optional: Debug loopDATA: ls_plh TYPE [...]_plh, " header table lt_pli TYPE TABLE OF [...]_pli, " line item table ls_msg TYPE bapiret2.FIELD-SYMBOLS: TYPE [...]_pli. " line item table lt_pli = pct_item.* ls_plh = pcs_head. pe_success ='X'. LOOP AT lt_pli ASSIGNING. [...] ENDLOOP. IF pe_success ='X'.* pcs_head = ls_plh. " update header information pct_item[] = lt_pli[]. " update item information ENDIF.ENDMETHOD.
Whenever data is changed, I recommend issuing a helpful and transparent message to users so that they know what has been changed and why. Here is an example of what such a message could look like in the code. You can of course also assemble the messages (ls_msg) manually, but I find the option mentioned here easier to read.
ABAP
DATA ls_msg TYPE bapiret2." [...]CALLMETHOD /otx/pf02_cl_error_message=>message_return_buildEXPORTING pi_type ='S'" "S" = Success / "E" = Error / "I" = Info pi_cl ='Z...'" name of your message class pi_number =019" your message number. pi_par1 =" message parameter 1 pi_par2 =" message parameter ..." [...]IMPORTING pes_return = ls_msg.APPEND ls_msg TO pet_return.
Customizing for a SAP VIM Solutions Beyond Invoice Data Enrichment
Now we have created the class for our data enrichment and still have to create the corresponding customising, which can be done very quickly in the transaction /otx/pf00_img.
/otx/pf00_img
Navigate to Process Configuration > Profiles:
Select your Profile Configuration and navigate to the corresponding Version Definition and then Data Enrichment Configuration. Here you can now create a Data Enrichment ID with a speaking name and description.
The enrichment point decides when a data enrichment should be executed. For my example I select ALL to execute it at all enrichment points.
Even if a data enrichment should only run at the beginning of the process, I like to use ALL at the beginning of my implementation because the jump to the debugger is super quick. Simply set a breakpoint in the class, execute the Enrich Data action and you are already in the ABAP Debugger and can analyse if everything is working according to plan.
The last step is often forgotten in data enrichments because it was not necessary in earlier versions. The newly created Data Enrichment ID must still be assigned to the corresponding Characteristics Configuration and given a sequence.
I have created a data enrichment but it is not working
If your data enrichment does not work, please check the following points:
Is the success marker pe_success returned with true (‘X’)?
Is the newly created Data Enrichment Configuration active? There is a checkbox on the far right which can easily be overlooked.
Have you perhaps overlooked the last point Assign Data Enrichments?
Perhaps your debug loop can help you here? If this is not activated, this can also be a finding.
Conclusion
When using SAP VIM Solutions Beyond Invoice, there is no getting round the use of data enrichments. Only with these can the process be properly tidied up and optimised.
Don’t forget to issue transparent and helpful messages for the users and make sure that the data enrichments run in a sensible sequence.