cancel
Showing results for 
Search instead for 
Did you mean: 

Conditional Structural mapping in SAP AIF

Former Member
0 Kudos

Hello All,

We have scenario where in AIF Structural mapping we need to call two different value mapping based on condition.

E.g. If Source Field = 'X' Then

           Call Value Mapping 1 to map Target Field

       Else

           Call Value Mapping 2 to map Target Field             

       End If.

I thought there would be way to define two different field mappings with different conditions but AIF is not allowing me to create two different field mapping for same target field.

How to resolve this ?


Thanks & Regards,

Dijesh Tanna 

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Dijesh,

in this case you can define a condition for this field mapping.

In your field mapping use Value Mapping 2. In the corresponding condition define: If the source field value is equal 'X', use condition type "Alternative Value Mapping / Fieldname". Enter the namespace and value mapping name of Value Mapping 1 into fields namespace and Alternative Value Mapping.

More detailed information are good documented in the F1-Help for every field in the condition customizing screen.

Hope this fits to your requirements.

Best wishes

Christoph

Former Member
0 Kudos

Hello Christoph,

Thanks for quick response!!

If I understood it correctly , we have option of defining alternate value mapping with different set of field as input.

So I can achieve If .. Else condition easily. Can I go beyond this ? I mean defining multiple conditions ( Kind of " If Then... Else IF  ... Else If ... Else " ) scenario ?

From search help it seems that I can keep defining conditions , but just wanted to verify it.

Thanks & Regards,

Dijesh Tanna

Answers (0)