How import validation works in NextTables for SAP BW
The map of the validation pipeline: raw value, Import BAdI, built-in type check, Update BAdI, with a table matching each kind of requirement to its hook.
📝 Availability: NextTables for SAP BW, Professional and Enterprise editions. The built-in checks are Professional. The two extension points are BAdIs and require the Enterprise edition.
You will learn
What happens to a value between the moment it arrives and the moment it is stored, which hook your requirement belongs in, and why the answer is almost always the Update BAdI.
This article is the map. It says when each hook runs and which one a given requirement needs. The parameters and the code live in the reference articles it links to.
This article is for whoever is deciding where to put a check, whether or not they will write it themselves.
Prerequisites
- A configured table. Table and column configuration in NextTables for SAP BW.
- Implementing a BAdI needs ABAP development access.
The pipeline
Every value takes the same route, whether it comes from a file, the clipboard or a row a user adds or changes in the grid. Two steps are built in; three are hooks of yours in two BAdIs.

| Step | What runs | Sees | Yours? |
|---|---|---|---|
| The value arrives | Nothing yet. The value is exactly as the file, the clipboard or the grid delivered it, with no expectation that it fits the target type. | One value | No |
Import BAdI, step 1 (I_STEP = 1) |
Your chance to change a value before it has to be type compatible. Mapping only. | One value of one field | Yes, Enterprise |
| Type check and auto-correction | The built-in validation: the data type check, auto-corrections such as adding a currency to a key figure, and the validation report the user sees. | Every value | No |
Import BAdI, step 2 (I_STEP = 2) |
Reads and adjusts the messages of the type check. Nothing else. | One value of one field | Yes, Enterprise |
| Update BAdI | The Validate step checks the rows; the write step derives and corrects. Then the rows are stored. | The whole row | Yes, Enterprise |
Which hook does your requirement belong in?
💡 Checks and their messages belong in the Update BAdI's Validate step, in almost every case. It sees the whole row, so a rule can compare fields; it receives the rows of a request together; and it runs for every write, whoever caused it. The Update BAdI (SET_UPDATE_EXIT) in NextTables for SAP BW explains it step by step.
| You want to | Hook | Why |
|---|---|---|
| Refuse a value that breaks a business rule | Update BAdI, Validate step | Sees the whole row and applies to every write. |
| Derive a value the user does not enter, such as Changed by | Update BAdI, write step | Same reason. The grid needs it too. |
Accept Yes into a NUMC1 field |
Import BAdI, step 1 | The only hook that sees the value before it has to be type compatible. The Update BAdI never gets it, because the type check rejected it. |
| Turn a description in a file into its technical key | Import BAdI, step 1 | Same reason: the description is not a valid key yet. |
| Reword a validation message | Import BAdI, step 2 | Only for the messages of the type check. Messages about your own rules come from the Update BAdI. |
| Restrict which rows a user may see or change at all | None of them | That is authorization, not validation. See Row-level security with analysis authorizations in SAP BW. |
| Stop a value being entered that is not in a list | None of them | Configure a value help with strict mode. See How to give editors the right values in SAP BW. |
⚠️ The Import BAdI is the exception. Use it only for a value that the type check would reject unless it is changed first. It is called twice for every value of the field in its filter, for imports and for rows validated in the grid, so on a large import its logic costs noticeably more time than the same logic in the Update BAdI. Few customers implement one.
The two extension points in detail
The Import BAdI
Definition /NLY/BADI_IMPORT, method SET_IMPORT_EXIT. Filtered by table, table type and field. Reads I_VALUE, returns E_VALUE, and reports what it changed through CT_VALIDATION so the change appears in the import report rather than happening invisibly.
Full reference and a worked implementation: The Import BAdI in NextTables for SAP BW.
The Update BAdI
Definition /NLY/BADI_EDITOR, method SET_UPDATE_EXIT. Runs for every write, whoever caused it. The validate event is where checks belong; the insert, update and delete events are where derivations belong.
Full reference: The Update BAdI (SET_UPDATE_EXIT) in NextTables for SAP BW. Both are created the same way: How to implement a BAdI for NextTables in SAP BW.
Step-by-Step Instructions
1. Ask whether it needs code at all
Value lists, required fields, locked fields and data types are configuration. Work through the configuration reference before designing a BAdI.
2. Start from the Update BAdI
Checks, messages and derived values go into the Update BAdI. This one rule settles most cases.
3. Ask whether the value can survive the type check
If the incoming value would be rejected by the type check, no later hook can help, because the value never reaches them. That is the one situation the Import BAdI exists for.
4. Implement it, and report it
Whichever hook you use, tell the user. The Import BAdI uses CT_VALIDATION, which surfaces in the import report; the Update BAdI uses CT_VALIDATION for refusals and CT_MESSAGES for messages. See Error handling in the table maintenance BAdI for SAP BW. A value changed silently is a value nobody can account for later.
Troubleshooting / FAQs
1. My Import BAdI also runs when someone edits a row in the grid.
That is expected. The grid validates every row a user adds or changes, and that validation runs the same steps as an import, the Import BAdI included. Keep the Import BAdI to mapping values the type check would reject; checks belong in the Update BAdI's Validate step.
2. My Import BAdI never sees the value I want to fix.
Check the field name in the filter. It filters on the field as well as the table, and a filter that does not match means the exit is not called for that column.
3. The value is rejected before my code runs.
The rejection is the built-in type check. Only step 1 of the Import BAdI runs earlier, so the mapping has to happen there.
4. Where do auto-corrections such as adding a currency happen?
In the type check, built in. You do not implement them and you cannot skip them.
5. Can I change the validation messages the user sees?
Yes, in step 2 of the Import BAdI, for the messages of the type check. Messages about your own rules come from the Update BAdI.
6. Which BAdI should a new project implement first?
The Update BAdI, in nearly every case. Add an Import BAdI only when a specific column arrives in a form the target type cannot accept.


