(SM-2408) Type Mapping

Type Mapping is a feature that enables you to change the mapping of DDIC data types to target data types.

Create custom mapping

Custom storage datatype mapping can be accessed in the transaction /DVD/SM_SETUP by selecting the desired storage type from the context menu and choosing the edit mapping option.

It’s possible to edit mapping from DDIC to target storage types or storage types to DDIC (create a table from external functionality) using tabs. 

Mapping can be edited by clicking on the Edit button and changing the values in the ALV grid. Be careful about what datatypes you are changing the original ones as it might require using further field routines in the extraction process to transform the format or it can end up in failed extractions. After changing the datatypes click CTRL + S to save the configuration.

The settings are global for all storage connections of a particular storage type. Every Glue table created after saving the settings will have the new custom datatypes. Already created GLUE tables won’t be affected by the mapping change.

Length and Decimals fields can be flat numerical values but also support formulas where <SRC> is referring to the original data type length/decimal value. Format: <SRC>[*/-+]([0-9]+)

In case of inconsistencies or difficult extractions, it is possible to go back to the original settings by using the Reset mapping button.

Create data element or domain mapping

There is a possibility to create data elements or domain mapping. This is only available in DDIC to Storage Mapping. To access this functionality, click Data element mapping in the toolbar of Type Mapping.

After clicking on this button popup screen will appear with default data element mapping. In this popup, there is a possibility to edit data elements or domain mapping. Mapping can be edited by clicking the Edit button and resetting to default with the Reset data element mapping button. If the DDIC Data element that is being mapped exists, the Storage Data Type is automatically calculated. Storage Data Type can be changed. Data element mapping has a higher priority than Type Mapping. This means that if data element mapping exists it will be used instead of type mapping.

Examples:

Map DATS to Snowflake Date

  1. Go to the transaction /DVD/SM_SETUP.

  2. Select the Snowflake storage type from the context menu and pick the edit mapping option.

  3. Click on the Edit button and change the mapping of DATS > STRING to DATS > DATE.

  4. Press CTRL + S to save changes.

  5. All newly created Glue tables will map the DDIC datatype DATS to the Snowflake datatype DATE.

 Map XFELD to Snowflake BOOLEAN

  1. Go to transaction /DVD/SM_SETUP.

  2. Select the Snowflake storage type from the context menu and pick the edit mapping option.

  3. Click on the Data element mapping button in the toolbar DDIC To Storage.

  4. Click on the Edit button and add a new row.

  5. Select DATA ELEMENT in the dropdown menu and set DDIC Data Element → xfeld and Storage Data Type → BOOLEAN.

  6. Confirm by clicking Continue in the right bottom corner of the screen (this saves the mapping).

In this case, a custom routine is required!