Skip to Content
Technical Articles

Getting the basics right – Creating the perfect config table (Part 3, Text tables)

In this example we have a new config table that defines a code and its meaning.  Let’s say the code is for ‘Cancellation reason’ a two character code (Data element ZCANC_REASON) with a twenty character description (Data element ZCANC_DESC).  In a SAP delivered config table this description would be language dependent and whether or not our system is running multiple languages we should really do the same.

So first we create a config table for just the reason code.  Create it as defined in part 1 of this blog, but don’t create the maintenance dialog yet.


Next a text table is needed.  The convention for naming is to take the config table name and suffix it with _T.  Use the same key as the config table, but add a field for language, then the text field.


On the key field (CANC_REASON) in the text table we need to define a Foreign key.


Enter the original config table (ZMM_REASON) as the check table and in the ‘Foreign key field type’ choose the option ‘Key fields of a text table’.

Now this relationship has been defined, create the maintenance dialog for table ZMM_REASON.

When we maintain table ZMM_REASON the maintenance dialog gives us this;


By setting the foreign key the description is included in the maintenance dialog and will store the text in my logon language.

So, if I enter this;


It creates this entry in the text table, as well as the value AB in table ZMM_REASON;


If I then log in using another language, I get this view because the config entry exists but without a text for the logged on language.  The heading shows a question mark because I haven’t translated the texts for the DDIC definitions of the tables.


If I enter a text now I have these entries in the text table, but still with only one entry in ZMM_REASON;


You must be Logged on to comment or reply to a post.
  • Hi Nick,

    In most SAP-defined text tables, SPRAS is the first key field, for buffering reasons (generic buffering), as explained in greater detail in the excellent book of Rich and Thomas: “Next Generation ABAP Development”. Apart from that, again a perfect blog. The series is much appreciated!

    Cheers, Fred

    • Hi Fred,

      Thanks for the feedback.  As you say “most SAP-defined text tables, SPRAS is the first key field”, sadly not the one that I referenced when I started using this technique.

      Clearly not all the SAP developers have read Rich and Thomas’ book.


    • On the other hand, if one wants to transport a range of entries with a wildcard, it’s nicer for the language to be at the end of the key.