cancel
Showing results for 
Search instead for 
Did you mean: 

Calling AIF for Value Mapping from standard ES

Former Member
0 Kudos

Hello All,


Is there any option of using SAP AIF for standard ES (for adding value mapping). We have requirement where value mapping needs to be done for standard ES. I was thinking of making explicit call to AIF using following method :

* Call method to AIF

     /aif/cl_enabler_proxy=>process_message(

     exporting  is_input = input

      iv_exception_classname = ' ' ).

However this method doesn't have any exporting parameter to get the changed data back.

Is there any workaround ?


Thanks & Regards,
Dijesh Tanna

Accepted Solutions (1)

Accepted Solutions (1)

g_gita
Advisor
Advisor
0 Kudos

Hi,

You could use FM /AIF/FILE_PROCESS_DATA that has 2 Changing parameters that might be of interest:

  • DATA -> SAP structure
  • RAW_STRUCT

These 2 parameters are not typed, you should type them as per your specific interface, depending on direction (inbound/outbound).

Also, it might be worthwhile looking at these 2 notes, for monitoring existing Enterprise Services:

Hope this is useful for you.

George

Former Member
0 Kudos

Hello Gita,

Both these notes talks about monitoring the existing interfaces / ES using SAP AIF. However, doesn't talk about enhancing existing ES.

Secondly , I had look at function module /AIF/FILE_PROCESS_DATA. However, question is from where we should call this. I was aiming the EXECUTE_ASYNCHRONOUS method of ES and calling this FM from implicit enhancement spot. However, the structure INPUT inside EXECUTE_ASYNCHRONOUS is not changeable. So even if AIF performs value mapping , I can't pass that modified data to standard implementation of SAP ES.

Have a look at below code :

You can see that I passed INPUT to my custom function module which calls AIF internally and performs value mapping , checks etc.. and return the modified data in OUTPUT but SAP's standard code is still using INPUT in subsequent code. I can't assign OUTPUT to INPUT as it is import parameter not changeable.

Thanks & Regards,

Dijesh Tanna

Former Member
0 Kudos

Hi Dijesh,

in addition to the notes George mentioned you can implement note 1917185 and 1983320. I think this will support your requirement.

You have to create an AIF interface and assign your checks and value mappings etc. in Define Structure Mapping. Furthermore, you have to assign an "empty action" (empty namespace and action name) in Structure Mapping.

Best regards,

Verena

Former Member
0 Kudos

Hello Verena,

We have applied the note in our system. However, issue is still there. I think main issue is to find place in standard ES to call AIF method. Since AIF method not returning modified structure , even though Value mapping takes place , we can't get modified data (after value mapping) back to be used in standard ES processing.


Thanks & Regards,

Dijesh Tanna

robphelan
Participant
0 Kudos

Dijesh... I'm not able to really follow.. but are you trying to make use of the standard AIF Value mappings from outside of AIF?

Former Member
0 Kudos

Hello Robert,

We are using AIF value mapping for all our custom interfaces. However, since we are using few standard ES as well which also got value mapping requirement (as data coming from Legacy needs to be converted to SAP value e.g. PlantNo), our intention is to reuse same value mapping defined in AIF for these standard ES as well.

Since standard ES are not developed using AIF framework but instead using traditional code , we are checking the possibility of calling AIF value mapping from standard ES somehow.

I hope I'm able to explain you the issue properly.

Thanks & Regards,

Dijesh Tanna

robphelan
Participant
0 Kudos

Dijesh, I understand now. We had a similar requirement - we have 4 value mappings in VMAP that we wanted to re-use during later processing.

Because our timeline was very short, I wound up writing a method which just selected data out of those VMAP tables ( /AIF/T_VMAPVAL* ) based on importing criteria and passed them back

I'm sure there's a better way embedded in the AIF processing, but I haven't had time yet to debug through it.

Answers (0)