cancel
Showing results for 
Search instead for 
Did you mean: 

Outbound IDoc interface via AIF using value mappings

Former Member
0 Kudos

Hi all,

Is it possible to use AIF for outbound IDoc processing between ECC and PI?

I want to make use of the AIF value mapping framework to map some fields in the outgoing IDoc.

Many thanks in advance.

Kind regards,

Brecht Bauwens

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Solved this myself by using ABAP-PI port (WE21) and using a custom function module (as a copy of OWN_FUNCTION)  to pass the IDoc data to AIF via code below:

CALL METHOD /aif/cl_enabler_idoc=>transfer_to_aif

       EXPORTING

         is_idoc_control_rec = edidc

In AIF, I'm using actions to send the data to PI via proxy framework.

Kind regards,

Brecht

robphelan
Participant
0 Kudos

Brecht,

thanks for sharing your solution - that doesn't happen often enough.

as a matter of fact, I'd love to see the AIF community set up some sort of site where we could each outline our individual cases on how we are using AIF.

I for one have little experience with iDocs & would like to see how others are using them and discussion on alternatives etc...

Former Member
0 Kudos

Hi all,

Using cl_enable_idoc->transfer_to_aif didn't seem to trigger the AIF actions. Therefore I'm using the xml enabler:

CALL METHOD /aif/cl_enabler_xml=>transfer_to_aif

             EXPORTING

               is_any_structure = <ls_source_data>.


This one is triggering the AIF actions.

Here you need a deep structure as input, so I'm using FM  /AIF/IDOC_READ_FROM_DB to read the IDoc data directly into a deep structure.

Kind regards,

Brecht Bauwens

Former Member
0 Kudos

Hi Brecht,

Can you please elaborate on the outbound IDOC scenario for which you have incorporated AIF and elaborate on the place where this transfer_to_aif method was called?

Thanks

Prabhu

Former Member
0 Kudos

Hi Prabhu,

As mentioned before:

Solved this myself by using ABAP-PI port (WE21) and using a custom function module (as a copy of OWN_FUNCTION)  to pass the IDoc data to AIF via code below:


CALL METHOD /aif/cl_enabler_xml=>transfer_to_aif

             EXPORTING

               is_any_structure = <ls_source_data>.

So create a z-function module (copy of OWN_FUNCTION) and put in this code to pass the data to AIF.

You will also need to map the IDoc flat table into the deep structure via function module  /AIF/IDOC_READ_FROM_DB.

Kind regards,

Brecht

Answers (2)

Answers (2)

Dimitri
Active Contributor
0 Kudos

Hi Brecht,

You can use AIF in conjunction with SAP PI or SAP PO. That is no problem.

Have a look at the Belgian User Group (SAPience), there is a presentation you could download which could provide more context.

Kind regards,

Dimitri

Former Member
0 Kudos

Hi Dimitri,

We are already using AIF in conjuction with SAP PI.

But now we are trying to build an interface in which IDoc is send from ECC to PI with AIF in between to use value mappings to translate some IDoc field values into custom values.

IDOC -> AIF -> PI

Kind regards,

Brecht

Dimitri
Active Contributor
0 Kudos

Hi Brecht,

I guess you know you can do the same on SAP PI?

Are you aiming for maintainability of the custom values? Or why do you want to use value mappings on AIF?

Be aware you can also do JDBC/RFC lookups and maintain a table on your backend system.

Kind regards,

Dimitri

Former Member
0 Kudos

Hi Dimitri,

I know we can build same checks in PI, but we are using AIF as central interface monitor and alerting framework for business community.

Also want to make use of AIF "checks" to trigger alert for wrong values in IDoc, so business can solve themselfs in AIF.

Kind regards,

Brecht Bauwens

Former Member
0 Kudos

Hi Brecht,

We are also trying to do a POC for outbound IDOC scenario with or without value mapping. We also could not get any information on this. There is a mention in the thread

, we need to use /AIF/SEND2XI. But, nothing more than that for IDOC scenario.

If you get any information please share it in this thread.

Thanks

Prabhu