Show TOC

Procedure documentationCreating a Mapping

Procedure

  1. Call transaction SMAP.

  2. Enter a name in the Mapnames list box and choose Save.

  3. Choose tab Mapping details and enter the details of map header entries.

  4. In the Map Header entries, enter the source and destination DDIC structures.

    The following entries can be made for the source and destinations.

    • The combination of transaction and table entries is checked, if a segment structure exists (SEG_DD) for that combination.

    • When Transaction name is blank, the table name column takes either a DDIC structure name or a transparent table name. Its existence is checked.

    • When a DDIC segment structure name (SEG_DD) is entered, the tool automatically maps the structure to Transaction name and Table name.

    • Input type field should contain the value either I or S, which signifies ITAB processing or Structure processing for the mapping.

    • Map Order should be numeric and no two entries are allowed to have the same map order.

    • When a map name is deleted, all the relevant entries in Map Header table SMO9_SMAP1 and the Map Details table SMO9_MDTL1 are deleted.

    • When a Map Header row is deleted, all the entries in the Map Details table SMO9_MDTL1 are deleted.

  5. Save your entries.

    • The combination of transaction and table entries is checked, if a segment structure exists (SEG_DD) for the combination.

    • When Transaction name is blank, the table name column takes either a DDIC structure name or a transparent table name. Its existence is checked.

    • When a DDIC segment structure name is entered, the tool automatically maps the structure to Transaction name and Table name.

    • Input type field should contain either the value I or S.

    • Map Order should be numeric and no two entries are allowed to have the same map order.

    • Cascade Delete is ensured.

    • When a map name is deleted, all the relevant entries in Map Header table SMO9_SMAP1 and the Map Details table SMO9_MDTL1 are deleted.

    • When a Map Header row is deleted, all the entries in the Map Details table SMO9_MDTL1 are deleted.

    Note Note

    If mapping has to be done on the Data Element level go to the Map Structure fields tab.

    End of the note.
  6. To view the result of the Data Element mapping choose the Map Fields Details tab.

  7. If map entries other than the Data Element need be done or functions and conditions for the mapping need to be applied, choose the Map Fields Details tab.

    Following are the descriptions of each column:

    Name

    Description

    Source Field

    Source field in the source structure entered in the previous tab. Source fields can be concatenated like STREET+KTOKD.

    Destination Field

    Field in the destination table structure entered in the previous tab.

    Forward and Reverse

    Specify the functions that could be applied for the source field before mapping to destination field.

    Constant

    Assigns constant value specified to the destination field.

    Forward ConditionReverse Condition

    Specify the conditions which could be applied for mapping in the forward and reverse direction. The field name specified should belong to the source structure. The format for specifying conditions is &IPSTRU-<fieldname>=<value>

    Example Example

    &IPSTRU-KTOKD='CONT'

    End of the example.

    Append Destination

    Indicates whether contents of source field are to be appended or overwritten to the destination field. A tick in this check box means the contents of source fields would be appended to destination field.

    Forward Mappingand Reverse Mapping

    This mapping code cam be generated for the forward map or reverse map. A tick in this check box means that, this map would be done for the direction in which the check box is checked.

    Map Comment

    Comments to the generated mapping code.

    Note Note

    The following are valid functions that can be applied in source field.

    • SUBSTR( start, length )

    • COMPACT( )

    • TRIMSTART( )

    • TRIMEND( )

    • TRIMALL( )

    • LEFTJUSTIFY( )

    • RIGHTJUSTIFY( )

    • PADR( C )

    • PADL( C )

    • TOUPPER( )

    • TOLOWER( )

    End of the note.
  8. Save your entries.

  9. Choose the List of mapping tab to go to the initial screen.

    Now our mapping is defined and ready for generation.

  10. Choose Single Map Generate to generate code for the newly created mapping.

    You can view error during code generation by choosing Error Status after code generation.

    The Generated code would be in the following function module.

    • Forward Mapping Code: <Customer Name space>_<Map Name>F_SMP

    • Reverse Mapping Code :

      <Customer Name space>_<Map Name>R_SMP

    Example Example

    Map Name SALES_DATA defined in Structure Mapper front-end tab List of Mappings, the generated function would be under the following names in SFA system:

    Forward Mapping: /1CRMG0/SMOT_SALES_DATAF_SMP

    Reverse Mapping: /1CRMG0/SMOT_SALES_DATAR_SMP

    1CRMG0 =: customer namespace

    SALES_DATA = Map Name

    F/R =Forward / Reverse

    End of the example.