AIF field mapping for nested structure
Requirement: To map child level field in a nested structure in AIF.
Source field: StreetPostalCode –> (/Supplier/AddressInformation/Address/PhysicalAddress/StreetPostalCode)
Target field: RegionName –> (/Supplier/AddressInformation/Address/PhysicalAddress/RegionName)
Solution:
Step 1: Root level structure mapping.
Assign “Supplier” as the source and target structure.
The next segment in the target structure after Supplier is “AddressInformation”.
So, select “AddressInformation” as the field in destination structure and assign it as a Sub-Table as well.
Step 2: First level structure mapping.
Assign “AddressInformation” as the source and target structure. This time “Indirect Mapping” checkbox is selected as well.
The next segment in the target structure after AddressInformation is “Address“.
So, select “Address” as the field in destination structure and assign it as a Sub-Table as well.
Step 3: Second level structure mapping.
Assign “Address” as source and target structure. This time as well “Indirect Mapping” checkbox is selected.
The next segment in the target structure after Address is “PhysicalAddress“.
So, select PhysicalAddress as the field in destination structure and assign it as a Sub-Table as well.
Step 4: Third level structure mapping.
Assign “PhysicalAddress” as the source and target structure. This time as well “Indirect Mapping” checkbox is selected.
Map the target field “RegionName” with the source field “StreetPostalCode”.
Hi Mateen,
good description.In addtion I believe in case of nested structures and activated "move corresponsing fields" it is recommended to activate also "copy fields only" to avoid duplicate structure mapping. I had this case once with AIF 2.0.
Best wishes
Christoph
Hi Mateen!
While you are talking about mapping of exact fields in structures (not table fields), from my experience it is often easier to map them directly, cause both target and source fields allow setting names as linked (e.g. like this:
Source Field: Supplier-AddressInformation-Address-PhysicalAddress-StreetPostalCode
Target Field: Supplier-AddressInformation-Address-PhysicalAddress-RegionName)
Pity though, target field is currently limited to only 45 chars, so in your case (with 4 structures and pretty long names) it just won't fit. But, taking above into account, you can still reduce the number of intermediate mapping from 4 to, e.g. only 2.
Regards, Petr
Heyyyy Thank You for this! It really helps especially I'm developing a deep IDoc structure!