A colleague from the tax team messaged me the week after a supplier load. The file had finished and the partners were active, but a sample of them had no tax number, and their vendor account group was not one purchasing uses for external suppliers. If you type the same rows into the supplier change request and press Check, they stop. The load never offered anyone that button.
On the project we had treated a finished import as proof that the suppliers were governed. It was not. Our checks are tied to change-request steps, and the file never went through those steps.
The checks live on a step
I start in MDGIMG, under General Settings, Process Modeling, Change Requests, Configure Properties of Change Request Step. I pick the change-request type that sits on the UI menu, the one a requester uses to create a supplier, and not the type we created for loads.
On the step where the grouping and the tax number are both on the request, I open Enhancements and Checks per Change Request Step. Our tax-number and grouping checks come from two places. The BRF+ validation rules are maintained under General Settings, Data Quality and Search, Validations and Enrichments, Define Validation and Derivation Rules. The coded part is an implementation of the BAdI USMD_RULE_SERVICE, registered under Data Quality and Search, Business Add-Ins, and the method that rejects the row is CHECK_ENTITY. In the step settings these show up as two separate checks, and each one has its own Relevant flag.
If a check is not Relevant on a step, pressing Check on that step tells you nothing about a missing tax number. A dialog step that a file never opens will not protect you either, so what I really care about is whether the checks are Relevant on the steps a load actually passes through, including the step that activates.
A breakpoint in CHECK_ENTITY stops when I press Check in the UI. That is useful, but it only proves the UI path.
What the first file did
The first file went in through the data import framework, transaction DTIMPORT, with governance switched off.
When you import without governance, no change request is created. The objects go straight into the active area, and you choose a post-processing type that only decides where rows with errors end up. With no change request there is no step, so neither the BRF+ rules nor USMD_RULE_SERVICE have anything to run on.
The partner was in BUT000, with the grouping from the file in BUT000-BU_GROUP, and there was no row for it in DFKKBPTAXNUM. CVI had already created the vendor, CVI_VEND_LINK pointed at it, and LFA1-KTOKK held the account group that grouping maps to. The import log said success, and nothing on that path had asked our checks anything.
What the second file did
The next file used USMD_FILE_UPLOAD. File upload does write to the staging area and does create a change request, and it still missed the checks.
File upload takes one entity type per file and uses the change-request type you enter. We entered our load type, not the type on the menu, because the menu type is a single-object type and a multi-record upload needs one that is not. On the load type our checks were not Relevant. Activation on that type was a background step, so nobody opened the request and there was no Check to press. The request simply moved staging into the active area. The upload log in SLG1 (object FMDM, subobject UPLOAD) showed a completed upload and no message from our checks.
There was a second gap. The header and the tax numbers were two separate files, so they were two separate uploads. In the UI both sit on one request, and Check sees them together before anything is active. The header upload does not wait for anything. By the time the tax-number file went in, the partner was already active without one.
How I proved the checks were skipped
I took one partner from the first file. In transaction BP the tax number was empty and the grouping was one the supplier change request rejects. DFKKBPTAXNUM had no row for it, LFA1-KTOKK held the account group CVI derived from the file, and CVI_VEND_LINK already linked the partner to that vendor. In USMD1213 there was no change request for that partner at all, because the import never opened one.
For a partner from the file upload, USMD1213 did link a request to the business partner on entity BP_HEADER. In USMD120C that request had our load type, and the log showed a completed upload with none of our check messages.
Then I set a breakpoint in CHECK_ENTITY and sent one bad row through DTIMPORT again, still with governance off. The breakpoint was not hit. I entered the same row on the menu type and pressed Check, and the breakpoint was hit and the request could not be submitted.
The rule had been right all along. The load just never called it.
What we changed
Supplier loads no longer write straight to the active area. DTIMPORT now runs with governance on, so every row lands in a change request in staging. With governance on, rows with errors stay in staging where we can correct them, instead of going live and being repaired on the vendor afterwards.
We kept a load type, because file upload needs a type that is not single-object, but it now carries the same BRF+ rules and the same USMD_RULE_SERVICE check as the menu type, and both are Relevant on every step it passes through, including activation. We no longer have a load type that looks configured and never calls the checks.
We did not write a second tax rule into the upload. A later change to a BRF+ rule should apply to the UI and to the loads at the same time, and that only works if there is one rule.
The partners already in the active area became a cleansing list, and this change did not rewrite them.
The next file
I retest on the supplier type from the menu and on the load type, with the same rows.
A row with no tax number must not become an active partner, and there must be no new partner for that key in BUT000. The message has to be the same one Check shows in the UI. A row whose grouping the UI rejects must not create a vendor, so LFA1 must not receive an account group from that grouping.
A complete row must activate with its tax number on the partner, and CVI_VEND_LINK must point at a vendor whose account group is the one purchasing uses. A second load of the same key must update that partner through a change request, and not through another import with governance off.
If any of those fail, the load is still running outside the checks. I do not add another BRF+ rule to cover the gap, because the rule already stopped the same row in the UI.
To walk this path on our practice servers, the next MDG batch is at https://saberia.in/training. For a live landscape, write to admin@saberia.in or see https://saberia.in/consulting.