Skip to Content
Author's profile photo Mateen Popatia

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.

10.PNG

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.

11.PNG

Step 2: First level structure mapping.


Assign “AddressInformation” as the source and target structure. This time “Indirect Mapping” checkbox is selected as well.


12.PNG


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.

13.PNG

Step 3: Second level structure mapping.


Assign “Address” as source and target structure. This time as well “Indirect Mapping” checkbox is selected.


14.PNG

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.

15.PNG

Step 4:  Third level structure mapping.


Assign “PhysicalAddress” as the source and target structure. This time as well “Indirect Mapping” checkbox is selected.


16.PNG


Map the target field “RegionName” with the source field “StreetPostalCode”.

18.PNG

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Former Member
      Former Member

      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

      Author's profile photo Allan Jones Montemayor
      Allan Jones Montemayor

      Heyyyy Thank You for this! It really helps especially I'm developing a deep IDoc structure!