Skip to Content
0

AIF Inbound IDoc - Splitting Logic

May 25, 2017 at 02:33 PM

163

avatar image

Dear Experts,

I have an open question regarding an AIF Inbound IDoc scenario.
I am wondering wthether it is possible/advisable (without much programming effort) to do an IDoc-Split scenario with the AIF framework.

In the scenario there is an outbound DESADV IDoc with several delivery positions (=E1EDL24 segments). Upon arrival in the system for each position of this IDoc a separate inbound IDoc (DELVRY03) should be posted. We have considered using AIF for that purpose (implementing the splitting of the IDoc data in an AIF action and then calling the IDoc inbound processing function module for each position also in the AIF action.
(Scenario without an integration broker in-between which would do the splitting).

We have so far implemented a proof of concept for that, which is not yet working as expected. Before fixing all the issues I am just wondering whether this would be a good approach at all and whether the AIF action would be a good place for the "splitting logic".

Thank you in advance for any thoughts/advices on this.
Kind regards,
Beata

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

David Rittinghaus May 29, 2017 at 03:00 PM
0

Hi Beata,

this sounds like a reasonable approach to me.

We've "moved" messages or message parts from one AIF interface to another via apropriate calls in the Action and it does not cause problems if you ensure that you dont run into transactional processing issues.

Imagine the process of splitting breaks after x elements and you have to restart the message after fixing the issue. Then you would have to make sure that the x elemenst already processed are properly skipped. But all this should be easily managable either through aif functionality directly or with a proper logic.

But you would have this kind of problem regardless of the approach you select.

Kind Regards

David Rittinghaus

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi David,

Thanks for sharing your input.

I am not that proficient in the AIF framework, but after I have set up a simple POC using
the AIF IDoc Inbound Interface I came to the conclusion that using an AIF action may not be the most
"straight forward" way for a solution to my problem.

In the AIF action - in order to get the data in an IDoc format (to be able to read the IDoc segments and based on that do the split) I first need to do the conversion from AIF to IDoc format (/AIF/CL_IDOC_UTILITIES=>CONVERT_AIF_STRUCTURE_TO_IDOC).
Then after the IDoc data has been manipulated again a conversion to the AIF data reference needs to be done:
/AIF/CL_IDOC_UTILITIES=>CONVERT_IDOC_TO_AIF_STRUCTURE - this to be able to call the /AIF/IDOC_ACTION_FUNCTION, where again (inside the FM) a conversion to IDoc "native" data is done.
This data-conversion-shuffling does not seem to be the an elegant solution for me.

Instead I am probing right now the option of using an ABAP-PI port (TA: WE21) in the Outbound scenario,
and to do the IDoc-Data-Split already there.

Best regards,
Beata

0

Hi,

thanks for elaborating on your approach.

If that works i guess that will be fine.

I am not sure why you would need to convert the data into the idoc format to be able to split it. If you directly split the data while it is in AIF-Format then you can skip both conversions you mentioned.

Kind Regards

David Rittinghaus

0

Hi David,

The data available in the AIF action (according to the action FM interface) is in a DATA -> SAP structure format.
It does not know about the IDoc structure (IDoc segments, control record etc.).
So in order to process any logic connected to the IDoc itself it first needs to be converted into the IDoc structure e.g.
by using FM: /AIF/IDOC_CONVERT_SAP_STRUCT or
class method: /AIF/CL_IDOC_UTILITIES=>CONVERT_AIF_STRUCTURE_TO_IDOC.

Kind regards,
Beata

0