Praman — Agent-First SAP UI5 Test Automation Plugin - v1.3.5
    Preparing search index...

    Function sapObjectLock

    • Builds a lock name scoped to one SAP business object.

      Parameters

      • objectType: string

        Business object type, e.g. 'PurchaseOrder'.

      • objectKey: string

        The instance key, e.g. '4500000123'.

      Returns string

      A lock name of the form sap:sm12:<objectType>:<objectKey>.

      Named after SM12, the SAP lock-entry transaction, because this is the client-side counterpart: it stops two workers reaching the same object at once, rather than reporting the collision after the fact.

      Scoped deliberately — two tests editing different purchase orders should still run in parallel, which a single blanket sap:purchase-order lock would prevent.

      PramanError with ERR_CONFIG_INVALID when either part is blank.

      import { sapObjectLock } from 'playwright-praman';

      const lock = sapObjectLock('PurchaseOrder', '4500000123');
      // 'sap:sm12:PurchaseOrder:4500000123'

      test('approves the PO', { lock }, async ({ ui5 }) => { ... });