(SM-2208) 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 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 to 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 problematic extractions, it’s 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 element or domain mapping. This is only available in DDIC to Storage Mapping. To access this functionality there is a button “Data element mapping“ in the toolbar of Type Mapping.
After clicking on this button popup screen will appear. In this popup, there is a possibility to edit data element or domain mapping. Mapping can be edited by clicking on the Edit 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
Go to the transaction /DVD/SM_SETUP
Select the Snowflake storage type from the context menu and pick the edit mapping option
Click on the Edit button and change the mapping of DATS -> STRING to DATS -> DATE
Press CTRL + S to save changes
All newly created Glue tables will map the DDIC datatype ‘DATS’ to Snowflake datatype ‘DATE’
Map XFELD to Snowflake BOOLEAN
Go to transaction /DVD/SM_SETUP
Select the Snowflake storage type from the context menu and pick the edit mapping option
Click on the Data element mapping button in the toolbar DDIC To Storage.
Click on the Edit button and add a new row.
Select DATA ELEMENT in the dropdown menu and set DDIC Data Element → xfeld and Storage Data Type → BOOLEAN
Confirm by clicking Continue in the right bottom corner of the screen. (this saves mapping)
In this case a custom routine is required!