How it works

Eight steps for every record, always in the same order

For every record and every target CertiReplica does the same eight things. A simulation does the first six and reports. A real run does all eight, and after the write it reads the target back, so what it remembers is what SAP Business One really holds.

  1. Read

    The record is read from the source company through its Service Layer. The source is never changed by a one-way rule.

  2. Filter

    Does the record pass the rule's conditions for this target? If not, it is left out and counted.

  3. Find the counterpart

    A link from an earlier replication or a mapping; else the same code; else, for records SAP numbers itself, the same name.

  4. Shape

    What the rule wants the target to hold. Stock, balances, costs and dates never travel; fields of one company are left alone unless named.

  5. Translate references

    Every field that points at another record gets the target's own key. A missing one is matched, created first, fixed, left empty, or the record is held.

  6. Compare

    Field by field and row by row. A value someone changed in the target since the last run is told apart from a value the source changed.

  7. Write

    Only what differs is sent. In a simulation this step is a report: what would be written, and nothing is.

  8. Read back

    The target is read again. What it really holds is remembered, and the before and after of every field goes into the history.

Steps 7 and 8 are the only ones that touch a target company, and only in a real run.

Before anything is written

A simulation says what each record would become

Press Simulate on a rule, for a few named records or the first records of the source. Each record and target comes back with one of a handful of outcomes, in plain words.

  • Would be created, with every field it would get and what would be created first
  • Would be updated, with each field's value now and the value it would get
  • Already the same: nothing would be sent
  • Held: something the record refers to has no counterpart, named in a sentence
  • Conflict: the target was changed since the last run and the rule waits for a decision
  • Filtered out or skipped: the rule does not want this record in this target

Simulation · Items from head office to the branches

An illustration in the product's own words. A picture of the real screen is on the features page.

Would be updatedA00002 → BR1
ItemNamePrinter, old nameLaser printer
ItemPrices[1].Price180195
Would be createdA00003 → BR1
Item groups: 'Scanners' (104) would be created in BR1 first.
Already the sameA00001 → BR1
HeldA00004 → BR1
Price lists: 'Wholesale' (5) of HQ has no counterpart in BR1. Map it under Mappings, or set 'Missing references' to 'Create it'.

Two-way rules

The same steps, in both directions, over one link

A two-way rule remembers what each company held when the two last agreed. For every field it can then tell who changed it. Only the source: it travels there. Only the target: it is left alone there and travels back. Both: a conflict, which goes to the winner the rule names or waits for a person.

With Lists travel both ways the same holds for the rows of lists. With Merge a row is never removed. With Mirror a row removed in one company is removed in the other, and a row removed in one and changed in the other is a conflict.

Lists that were never compared for a pair have no history. When CertiReplica made one record from the other, the company it came from is the original and is compared first. When both existed before, the rule's choice for conflicts decides.

What never happens

  • A loop: after a write, the run in the other direction finds the two equal and writes nothing
  • A record of the target emptied by a poorer copy: a record born in the target keeps its lists there until they were compared from its side
  • A record created again by itself after it was removed in the target of a two-way rule: it waits, and says why
  • A deletion: CertiReplica never deletes a record in any company

Noticing

Changes and removals are noticed from outside

Changed records

Objects that carry a date and time of change, such as items and business partners, are asked what changed since the last look, about once a minute. Small setup tables are read whole and compared by fingerprint.

Removed records

About every fifteen minutes, or when someone asks. A record only counts as removed when the source's list lacks it and asking for it by key finds nothing. Its counterpart is reported or put on hold, never deleted.

When a company is down

A company that cannot be reached is tried again with growing waits. When many records seem to be gone at once, nothing is put on hold unasked: the source may just have been unreadable.

What a real system taught

SAP Business One has habits. They are in the product and its tests.

CertiReplica was run against SAP Business One 10.0 on SAP HANA before it was called ready. Some of what the Service Layer does is in no manual; each of these is now handled and covered by an automated test.

A field the target lacks fails the whole record

The Service Layer refuses a record with one unknown field. CertiReplica reads each company's own field list, leaves such fields out and says which.

Nothing and zero are the same value

SAP Business One stores an empty number as 0 and an unset yes/no as empty. Comparing them as different would write the same record for ever.

A changed address needs its partner's code

An address row is only recognised as an existing one when it also names its business partner. Without it the change is refused as a duplicate.

A price list is its own base list

A record that points at itself is created without that field, which is written right after, with the record's new number.

New fields need a restart of the Service Layer

A Service Layer that started before a user-defined field existed does not know it, and can refuse changes to that table. CertiReplica says so when it creates a field, and adds the hint to that refusal.

Some values are silently not taken

A value SAP Business One ignores is reported after the write and remembered, so it is not sent again until the source or the target changes it.

Words we use

The vocabulary of the product, the manual and this site

CompanyOne SAP Business One company database, reached through its Service Layer.
LandscapeA set of companies that belong together, such as Production or Test. A rule never crosses landscapes.
ObjectA kind of master data, such as items.
RuleWhich object goes from which company to which companies, which records, which fields, and what happens when the two sides disagree.
LinkThe knowledge that a record of one company and a record of another are the same thing. A mapping is a link a person made.
ReferenceA field that points at another record, such as the item group of an item.
SimulationWhat a rule would do, without writing anything.
HeldA record that waits because something is missing; the message says what.
ConflictA record whose target was changed by someone since the last replication, waiting for a decision.

All features The objects