Now accepting guest editorial from SAP, Oracle, Workday and ServiceNow practitioners.Pitch a guide
The Sign-Off Table

Lesson 3 of 5

Adding fields and structures

12 min

Listen to this lesson

0:00 / 7:39

The most common modeler task is adding a field to a predefined object. It sounds trivial and often is, but only when the field already exists in the target and the creating API can carry it. Most problems come from skipping that check and mapping a field into a target that cannot receive it.

Two kinds of custom field

Key user custom fieldDeveloper-appended field
Created withThe Custom Fields app (key user extensibility)An append to the database table and API structures by a developer
Migration templateAppears automatically if the object supports custom fields and the field is enabled for the relevant contextMust be added to the source structure in the modeler and mapped
Typical inNew designs following clean core guidanceFields appended by developers, often inherited from ECC in a conversion
Contoso exampleWarranty class on productsCore part flag appended to the product tables in ECC and kept by the conversion
Key user custom fields often need no modeling; developer appends usually do.
The Sign-Off Table · thesignofftable.com/academy/sap-dmg-301

Key user custom fields are created in the Custom Fields app and enabled for business contexts, user interfaces and APIs. Their technical names carry a YY1_ prefix. When the predefined migration object supports custom fields, enabling the field for the relevant context is enough for it to appear in the template and staging tables. Check SAP's documentation for each object; support is per object, not universal.

Adding a developer-appended field

For a field that a developer appended to the database tables, three things must line up: the field exists in the target table, the creating API can pass it (for example through an extension structure of the BAPI), and the migration object maps it. The modeler handles only the last step. If the API cannot carry the field, the developer must first provide a way, for example by filling the extension parameter the BAPI offers or by a follow-up update, and that is development work with its own testing.

A success message only says the API saved the record; only a check in the target proves the mapped field arrived.
The Sign-Off Table · thesignofftable.com/academy/sap-dmg-301
  1. Confirm targetField exists in the target tables in the development system
  2. Confirm API pathThe creating BAPI or function module can pass the field, for example via its extension structure
  3. Add to sourceAdd the field to the right source structure at the right level
  4. MapMap the source field to the target field; add a rule or translation if needed
  5. Generate and syncRegenerate, synchronize staging tables, download a fresh template
  6. TestLoad targeted records; display the result in the target app
Adding a developer-appended field to a predefined object.
The Sign-Off Table · thesignofftable.com/academy/sap-dmg-301

Adding structures

Sometimes a whole level is missing, for example a set of repeating texts or a sub-table under a header. The modeler lets you add a source structure under an existing one, with its own key fields that link it to its parent. Design the keys carefully: every row in a lower structure must point to exactly one parent record, otherwise the cockpit cannot assemble the call to the creating API. Then map the new structure to the target structure that receives it and map its fields.

An added source structure needs key fields that point every row at exactly one parent, here the product number linking core data to its product header.
The Sign-Off Table · thesignofftable.com/academy/sap-dmg-301
Header structureOne row per product: product number, type, base unit
Plant data structureOne row per product and plant: 1910 Monterrey
Added structure: core dataOne row per product and core type: core part flag, deposit category
A source hierarchy with an added lower-level structure. Each lower row carries the key of its parent.
The Sign-Off Table · thesignofftable.com/academy/sap-dmg-301
  1. Is it a key user field on an object that supports custom fields?Yes → enable it for the context; it appears in the template · No → next question
  2. Does the field exist in the target tables?No → the developer must create it first · Yes → next question
  3. Can the creating API pass the value?Yes → add to the source structure and map it · No → the developer extends the API path, then map
Getting a custom field into a migration object.
The Sign-Off Table · thesignofftable.com/academy/sap-dmg-301

What would you do?

In Wave 2 Mock 1, the product load reports success for all records, including the new core part flag. Business validation then shows the flag empty on every product. What is the most likely cause?

Worked example: the warranty class, end to end

The warranty class shows the key user path. A key user created the field in the Custom Fields app for the product business context and published it. Publishing is not the last step: the field must be enabled for the usages the object relies on, and in many releases the migration object in the project must then be updated before the cockpit adds the new field to the source structure and the staging table. Check the object's documentation for your release to see whether it supports custom fields and how the update is triggered.

  1. Confirm the field is published and enabled for the product context and its API usage.
  2. Update the product object in the Wave 2 project so the field is added to the source structure.
  3. Download a fresh template, or synchronize the staging tables if you fill them directly.
  4. Load two products for plant 1910, one with each warranty class value, and display them in the product app.
TestExampleWhat it catches
Value presentCore part flag = X on one Alternadores productAPI path missing: field mapped but never written
Value absentFlag left blank on a second productRules that default a value nobody asked for
Invalid valueFlag = Y, not in the allowed valuesMissing domain or value check in the target
Lower-level rowTwo core data rows for one productWrong key fields in an added structure

Targeted tests for any field added to a migration object. Each one is cheap and catches a different failure.

Key points
  • Key user custom fields (YY1_) appear automatically for objects that support custom fields.
  • Developer-appended fields need a target field, an API path and a mapping in the modeler.
  • Added structures need keys that link every row to exactly one parent.
  • Confirm values in the target after loading; a successful load does not prove the field arrived.

Check your understanding · not graded

Lesson check

  1. 1. Which prefix do key user custom fields created with the Custom Fields app carry?

  2. 2. For a developer-appended field, what must exist before mapping it in the modeler?

  3. 3. What must each row of an added lower-level source structure contain?

  4. 4. A field is mapped and the load succeeds. How do you confirm the change works?