Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How to control sequence of mapping processing in AIF?

Hello AIF fans!

I'm facing an issue with AIF for which can't find any applicable customizing solution.

Need to process a rather complex interface mapping, consisting of three main structures and multiple substructures/tables inside. Smth like this:

Vehicle Interface

- System Information

-- ...

- Vehicle Information

-- ...

-- ...

- Order Document

-- ...

-- ...

In my mapping I have to determine some fields in Order Document mapping depending on the values, previously determined in Vehicle Information mapping and stored in some target structure fields. But the problem is (if I understand it correctly) that AIF processes mappings in alphabetical order of _source structures_, so mapping for Order Documents structure runs _before_ mapping for Vehicle Information (cause O is before V). So at the time of Order Document is being processed values are not determined in Vehicle Information.

Have no idea how to solve this issue if not doing everything in FM (which than makes use of AIF much less handy). It there any solution?

From my POV it would be nice to have additional sequence field in /AIF/T_INTREC table (where source structures are maintained) as non-key field  but having priority over RECTYPE for sorting. It can be defaulted to 0 when not needed (in this case AIF will work as it does now), but if maintained, it can provide ability to alter processing sequence.



Former Member

Hi Petr,

it is a good idea to have one (optional) field for sorting here; but I have also one hint how you CAN control the sequence already, by using hierarchical mappings from root structure.

1. In "Select Source Structure", enter "SPACE" for the root structure

2. In "Assign Destination Structure", insert three structure mappings 10/20/30 with destination structure "SPACE"

3. In "Define Field Mapping" of structure mapping 10, enter the structure which should be mapped first as indirect mapping (using "Field in Destination Structure" and "Sub-Table")

4. Define your "real" structure mapping as usual, but set the flag "Indirect Mapping" in "Assign Destination Structure"

Then AIF will execute your structure mappings in the defined sequence.

Best regards,

Thomas Elsässer (AIF Development Team)

2 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question