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.
When extracting documents using OpenText Intelligent Capture for SAP Solutions (IC4S) or OpenText Core Capture for SAP Solutions (CC4S), the standard setup determines the company code based on document content.
This is typically done via the staging table /OTX/PS00_T_STG3, which contains company-code–specific master data such as addresses, bank details, and tax IDs.
This approach makes sense when there is a joint inbox for all company codes and in case you want to detect documents sent to the wrong inbox. In that case, content-based determination is both logical and necessary.
VIM Authoirzation can play against this logic as users assigned to company code 1000 might not be able to see an invoice sent to company code 1000 but is actually for another company code.
A cleaner approach: fixed company code per inbox
In a setup where you are using one email address per entity you can remove the determination from the process and assign a fixed company code per ArchiveLink Document Type or E-Mail Address.
In this scenario a invoice sent to the wrong company code would be rejected and sent again to the correct inbox.
How to configure a fixed company code in Capture
Go to T-Code /otx/pf00_img
Navigate to OpenText Vendor Invoice Management Foundation > Inbound Configuration > Capture > Information Extraction Service > Capture Profile Maintenance.
Navigate to Entity Key Assignment, ignore any messages saying that the client is not modifiable:
Add your Capture Profile, the field ‘CompanyCode‘, the Company Code value (e. g. 2000) in Entity Key and other determination factors in the table:
In scenarios where one company code has one ArchiveLink Document Type it is possible to use a wildcard (*) for both email address of sender and recipient.
In many systems, this configuration:
Works without a transport request
Can be maintained directly in QA and Production
(As always: follow your internal governance rules.)
Important: After configuring a fixed company code for document extraction with CC4S or IC4S, thorough testing is required to ensure that the company code determination works correctly across all relevant document types and scenarios before transporting to quality and production systems.
Official Documentation
For official documentation please refer to chapter Maintaining entity key assignment in OpenText Vendor Invoice Management for SAP Solutions: Configuration Guide for Foundation.
Final thought
Content-based company code determination is powerful – but not universally the best path.
If your organizational structure already guarantees the correct legal entity at the inbox level, removing unnecessary “intelligence” can actually make the process more stable, more transparent, and easier to support.
Sometimes the best optimization is knowing when not to optimize.
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.