Lesson 3 of 5
Adding fields and structures
11 min
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 field | Developer-appended field | |
|---|---|---|
| Created with | The Custom Fields app (key user extensibility) | An append to the database table and API structures by a developer |
| Migration template | Appears automatically if the object supports custom fields and the field is enabled for the relevant context | Must be added to the source structure in the modeler and mapped |
| Typical in | New designs following clean core guidance | Fields appended by developers, often inherited from ECC in a conversion |
| Contoso example | Warranty class on products | Core part flag appended to the product tables in ECC and kept by the conversion |
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.
- Confirm targetField exists in the target tables in the development system
- Confirm API pathThe creating BAPI or function module can pass the field, for example via its extension structure
- Add to sourceAdd the field to the right source structure at the right level
- MapMap the source field to the target field; add a rule or translation if needed
- Generate and syncRegenerate, synchronize staging tables, download a fresh template
- TestLoad targeted records; display the result in the target app
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.
- 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
- Does the field exist in the target tables?No → the developer must create it first · Yes → next question
- 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
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?
- 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. Which prefix do key user custom fields created with the Custom Fields app carry?
2. For a developer-appended field, what must exist before mapping it in the modeler?
3. What must each row of an added lower-level source structure contain?
4. A field is mapped and the load succeeds. How do you confirm the change works?