cancel
Showing results for 
Search instead for 
Did you mean: 

How to control sequence of mapping processing in AIF?

Former Member
0 Kudos

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.

Regards,

Petr

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Petr,

we had the same problem. But it was only one field mapping (cost center in line) where we needed a target value that has not been mapped (company code in header). For this single field mapping instead of using a nice AIF value mapping, we created a AIF value mapping function module, where we call the later value mapping (company code) at first and then the planned value mapping (cost center) for this single field.

A nice easy AIF solution looks different, but this was the quickest way.

Best wishes

Christoph

Former Member
0 Kudos

Hi Christoph,

So we are in same boat. Pity though, I have more than 200 fields in mapping and not one but several fields where I have to rely on data in structure, being processed later. Maybe will try to ask my PI colleague to create some simple transformation of names at PI side and forward them to AIF as 01_SYSTEM_INFORMATION, 02_VEHICLE_INFORMATION, 03_ORDER_DOCUMENT.

This can be a workaround. Hope AIF developers will provide better solution with one of the updates.

Regards,

Petr

thomaselsaesser
Advisor
Advisor
0 Kudos

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)

Former Member
0 Kudos

Hi Thomas!

After some experiments I would like to confirm, that workaround, proposed by you, actually works.

I faced some weird behavior of such mapping (which turned out in empty Process Step in /AIF/IFTEST -> Analyze), but my current understanding is that this was due to some cashing issues (and could be sorted out by /AIF/DELETE_STRUCTURE_CACHE). So, once again I'm closing this question with positive result.

P.S. Hope you will be able to realize manual sorting of mappings in the future. And (if you include this in your development plan) than it would be clever to provide such control not only for structure mapping (/AIF/T_INTREC), but also for field mapping level (/AIF/T_FMAP). In later case, maybe this can be also sorted out by using separate structure mapping numbers (SMAPNR). Still direct ability to set sort direction would come handy.

Best regards,

Petr Perstnev

Message was edited by: Petr Perstnev

manusnghl
Explorer
0 Kudos

Hi Christoph,

We are facing one problem realated to Field Value Mapping . We have to use custom mapping for the one field in nested structure .

We are using the standard IDOC PRODCH for purchase order change.

I have structure like this

ZMMT_PROD

1.  EDIDC

2.  PRODC

         E1BMEPOHEADER ---- Stru

         E1BMEPOITEM  ----- TTYP

I am able to map the field CMP_CODE in E1BMEPOHEADER .I have created one custom table and maitain the value there is one to one mappng . This is working fine. For this I have created one value mapping v_map1

But when I tried to do same for the PLANT in E1BMEPOITEM it is not working .  May be becuase it is table . For this also i have created v_map2 . Where I have 1-1 mapping for PLANT.

May be in Structure mapping I am not able to do correctly.

Could you please help me if such mapping possible.


           

Answers (0)