Skip to content
  • There are no suggestions because the search field is empty.

The SET_META_EXIT method in NextTables for SAP BW

The parameter reference for the Meta method: the three editability states, the key-field rule, and every table, field, search and button property the exit can set.

📝 Availability: NextTables for SAP BW, Enterprise edition. This article documents a BAdI; BAdI support is an Enterprise feature.

You will learn

What the SET_META_EXIT method of the Table Maintenance BAdI can change, how editability and visibility are expressed, and what every table and field parameter carries. The method controls the shape of the table: which columns a user sees, which of them can be edited, how a column searches for its values, and whether the table may be edited at all.

This article is for ABAP developers. It is the parameter reference; the settings it overrides are the ones described in Table and column configuration in NextTables for SAP BW.

Prerequisites

  • A Table Maintenance BAdI implementation for your table. How to implement the table maintenance BAdI covers the enhancement spot, the implementing class and the filter values.
  • ABAP development access on the BW system.

The method

The Table Maintenance BAdI's interface is /NLY/IF_BADI_EDITOR. It includes the component interface /NLY/IF_EDITOR, which carries the three exits. Metadata logic therefore runs in /NLY/IF_EDITOR~SET_META_EXIT of your implementing class.

The implementing class of the Table Maintenance BAdI, showing SET_META_EXIT in the method list

The method runs before the table is rendered, so whatever it sets is what the user gets. It overrides the front-end configuration, which makes it the right place for rules that depend on who is logged in, on the time of year, or on data the configuration screen cannot see.

Editability: the three states

Every field is in one of three states, expressed by the EDITABLE property:

  • 1 Locked. The user cannot change the value.
  • 2 Editable and required. A value has to be entered; initial is refused.
  • 3 Editable and not required. A value may be entered; initial is allowed.

Key fields behave differently on insert and on update. A key field may be filled when a row is created, but changing it later would not edit the row, it would create a different one. On an update event key fields are therefore always locked:

Field On insert On update
Key field (KEYFLAG = X) 1 locked, 2 editable required, or 3 editable not required Always 1 locked. Key fields are not editable.
Non-key field 1, 2 or 3 1, 2 or 3

Required fields

By default key fields are required and non-key fields are not. Both defaults can be changed. A non-key field can be made required, for example a customer category that the business wants filled on every row. A key field can be made not required, for example when a semantic key spans several fields and one of them is allowed to stay initial.

Non-editable fields

Setting a field to locked stops the user changing it on edit or insert. The clearest case is a field the system fills for you, such as Changed by or Changed on: the value is written before the database update and must not be typed over by hand. How to track changes in NextTables for SAP BW shows that pattern end to end.

⚠️ Not verified on a system: the field-level EDITABLE property also documents 1 as Locked (keep target value) and 4 as Locked (overwrite target value), which would mean value 1 preserves a value written by a BAdI through the save. That reading comes from the configuration documentation and has never been confirmed against a running system. Test it before relying on it.

Table parameters

Properties of the table as a whole, in CH_S_TABLE_INFO:

PropertyTypeDescriptionPossible values
TBLLENCHAR 30Table lengthReserved for internal use
TECHNAMECHAR 30Technical name of the tableFor example /BIC/AZOMACOST2
TABNAMECHAR 30Table nameFor example ZOMACOST
DESCRCHAR 30Table description
EDITABLECHAR 1What the user may do with the table1 Editable
2 Insertable
3 Editable and insertable
4 Deletable
5 Deletable and editable
6 Deletable and insertable
7 Deletable, editable and insertable
IS_INLINECHAR 1Enable inline editing1 Yes, 2 No
IS_LOC_FILTERCHAR 1Enable the local filter1 Yes, 2 No
IS_PRE_FILTERCHAR 1Enable the global filter1 Yes, 2 No
IS_DELETE_ALLCHAR 1Delete ADSO content1 Delete action available
SUPPRESS_EXPORTCHAR 1Suppress exportX Suppress export
JSFUNCTIONSSTRINGJavaScript functionsReserved for internal use
BUTTONSTableCustom button settingsSee the button parameters below
F1HELPSTRINGF1 helpReserved for internal use
CHECK_AUTH_INFOPROVCHAR 1Check the analysis authorization for the InfoProvider1 Yes
ACTIVATIONCHAR 1Activation behavior after a write1 Activate at once (default)
2 No activation
With no entry, activation happens automatically.
ALIAS_TTYPECHAR 10Alias table type
ALIAS_TABNAMECHAR 10Alias table name
CONTENT_ADMINCHAR 1Content adminX yes, blank no
CONFIG_ADMINCHAR 1Configuration adminX yes, blank no
TABTYPECHAR 10Table type
TABDESCSTRINGDescription
MAX_ROWSNUMCMaximum rows shown in the tableNormally 1000, changeable in the configuration. For a custom table type it is worth setting MAX_ROWS and C_TOTAL_ROWS in code.

Field parameters

Properties of a single column, in CH_T_FIELDS_INFO:

PropertyTypeDescriptionPossible values
FNAMECHAR 30Field name
LENNUMC 6Length in characters
INTLENNUMC 6Internal length in characters
TYPECHAR 1ABAP data typeC character string
D date (YYYYMMDD)
T time (HHMMSS)
P packed number
g variable-length string (ABAP STRING)
G long text (XXL)
Y file (XXL)
> timestamp
M HTML content
j static boxed components
J checkbox (1 yes, 2 no)
INTTYPECHAR 1Internal ABAP data typeC character string
N digits only
D date, T time
X byte sequence, also INT1/2/4 in DDIC metadata
I 4-byte integer
b 1-byte integer up to 254
s 2-byte integer
P packed number, F float
DECIMALSNUMC 6Number of decimal places
DECIMALS_DISPCHAR 1Decimal places as displayed
DESCRCHAR 60Short description
KEYFLAGCHAR 1Marks a key fieldX key field
DISPLAYCHAR 1Visibility1 Visible
2 Not visible, but still usable in the global filter
3 Only visible in table view
4 Not visible and not transferred to the front end
Use 2 to filter on the back end without showing the column; use 4 when the data must not reach the browser at all.
EDITABLECHAR 1Editability1 Locked (keep target value)
2 Editable, required
3 Editable, not required
4 Locked (overwrite target value)
SUPPRESS_EXPORTCHAR 1Suppress exportX
SUPPRESS_LOC_FILTERCHAR 1Suppress the local filterX
SUPPRESS_PRE_FILTERCHAR 1Suppress the global filterX
SUPPRESS_GROUP_BYCHAR 1Suppress group byX
CELLRENDERERSTRINGCell renderer, as a JavaScript function
F4HELPTableSearch settingsSee the search parameters below
F1HELPSTRINGF1 helpReserved for internal use
VARIABLES-NAMECHAR 30Variable name
VARIABLES-DESCRCHAR 60Variable description
INFOOBJECTCHAR 30InfoObject
CONVEXITCHAR 5Conversion routineFor example ALPHA or PERI6. Changing this is rarely needed.
IOBJTPCHAR 3InfoObject typeCHA characteristic
KYF key figure
TIM time characteristic
DPA data packet characteristic
UNI unit of measurement
XXL XXL InfoObject
DDIC_POSITIONNUMC 4Position of the field in the DDIC
UI_POSITIONNUMC 4Position of the field in the user interface
CHECK_INFOOBJECT_INTEGRITYCHAR 1Check InfoObject integrity1 yes, 2 no
IOBJ_AUTH_REL_FLAGCHAR 1InfoObject is authorization relevantReserved for internal use. Filled with X when the InfoObject is authorization relevant.
DISPLAY_TEXTTableCharacteristic display6 No display, 0 Key and text, 1 Text, 2 Key, 3 Text and key, 4 Long text, 5 Medium text, 7 Short text, B/C/D text and key as short, medium, long, E/F/G key and text as short, medium, long
HIERARCHY_FOR_AUTHCHAR 30Hierarchy authorization

Search parameters

The F4HELP table of a field decides where its value help comes from and how it is presented:

PropertyTypeDescriptionPossible values
SEARCHMODECHAR 6Search typeDDIC based on table and field in the Data Dictionary
IOBJ InfoObject
CUSTOM custom search, implemented in the Search BAdI
SEARCHNAMECHAR 60Search nameFor example the InfoObject name when SEARCHMODE is IOBJ
SEARCHSTYLECHAR 30How the value help is presentedSEARCH show a search bar
DROPDOWN show a dropdown. Recommended only below about 50 values.
MIN_CHARNUMC 3Characters the user must type before the search starts
STRICTCHAR 1Whether values outside the result list are allowed1 adding values that are not in the result list is not allowed

Which of the three search modes to pick, and why most requirements never need CUSTOM, is covered in How to give editors the right values in NextTables for SAP BW.

Button parameters

The BUTTONS table of the table info defines custom buttons:

PropertyTypeDescriptionPossible values
NAMECHAR 30Button name
DESCRCHAR 60Description
ICONCHAR 60IconAny Font Awesome icon, for example paper-plane
PARENTCHAR 30Parent buttonThe name of another button, which nests this one under it
LOCATIONCHAR 10Where the button appearsTOP top menu, upper right
CONTEXT context menu only, on right click
QUICK quick action menu on the left
SORT_ORDERNUMC 6Sort orderAny number
ACTIONCHAR 12Action to performSee the custom buttons reference
MESSAGESTRINGMessage that blocks the requestSee the custom buttons reference
TOOLTIPCHAR 255Button tooltip

Custom buttons in NextTables for SAP BW explains the actions and what each one expects.

Step-by-Step Instructions

1. Loop over the fields and change what you need

The method hands you the field list as a changing parameter. Loop it, match on FNAME, and set the properties:

FIELD-SYMBOLS:
  <l_s_fields_info> TYPE /nly/ts_fields_info,
  <l_s_f4help>      TYPE /nly/ts_search_info.

* Change properties as needed
LOOP AT ch_t_fields_info ASSIGNING <l_s_fields_info>.

  CASE <l_s_fields_info>-fname.

    WHEN 'FIELD_NAME_1'.
      <l_s_fields_info>-editable = '1'.

    WHEN 'FIELD_NAME_2'.
      LOOP AT <l_s_fields_info>-f4help ASSIGNING <l_s_f4help>.
        <l_s_f4help>-searchstyle = 'DROPDOWN'.
      ENDLOOP.

  ENDCASE.

ENDLOOP.

2. Decide per event where the rule applies

Metadata is set once per table load, so a rule that should only apply while inserting has to test the context itself rather than rely on the event parameters the other two exits receive.

3. Report problems to the user

The method also receives CT_MESSAGES. If your logic refuses to build the table, say so instead of returning an empty grid. Error handling in the table maintenance BAdI for SAP BW covers the message and visual types.

Troubleshooting / FAQs

1. My change is ignored and the configuration wins.

Check the field name in the CASE. FNAME carries the technical field name, which for an ADSO is usually the InfoObject name rather than the label shown in the grid. A WHEN that never matches fails silently.

2. A key field is still locked although I set it to editable.

On an update event key fields are always locked, whatever the exit sets. Changing a key value would address a different row. Set the value on insert instead, or model the field as a non-key attribute.

3. I hid a column but it still reaches the browser.

Visibility 1 through 3 control what is displayed, not what is transferred. Use DISPLAY = 4 when the data itself must not leave the back end.

4. Switching a search to a dropdown returns nothing.

The dropdown loads the full value list. It is recommended only below roughly 50 values; above that use SEARCHSTYLE = 'SEARCH' with MIN_CHAR so the search starts once the user has typed enough characters.