cancel
Showing results for 
Search instead for 
Did you mean: 

EDI 856 - Arranging MEA and REF segments

amankumarmangla
Explorer
0 Kudos

Hello all,

Greetings!

I am working on an outbound EDI 856 scenario where ECC is sending data to 3rd party system. Everything is working fine except for one of the requirement from 3rd party regarding arrangement of 2 segments in the EDI file.

As can be seen in the below screenshot, we have segments MEA and REF under header HL.

In standard EDI format, they get populated as they are getting populated here:

Now, the client's requirement is to have a logic in place so as to populate MEA and REF segments as follows:

S_MEA

S_REF

S_MEA

S_REF

S_MEA

S_REF

Kindly note, the 1st MEA segment belongs to 1st REF segment and so on. There may be multiple MEA and REF segments and they are not limited to 3 as shown in above example.

Looking forward to your kind inputs.

Best regards,

Aman

Accepted Solutions (0)

Answers (2)

Answers (2)

manoj_khavatkopp
Active Contributor
0 Kudos

Aman,

Create a intermediate structure where your S_MEA and S_REF are under one node like :

S_INT

---------S_MEA

----------S_REF

Then later in mapping you can handle this like repeating the S_INT multiple times with having each node once like.

S_INT

--------S_MEA

--------S_REF

S_INT

--------S_MEA

--------S_REF

Once this is done you can remove this intermediate structure using node deception concept (you will get blogs on this give it a search) and finally get into your required structure.

This is bit long task i agree but just had this thought on mind, however not sure this can be done via xslt as don't have much exp in XSLT.

Br,

Manoj

amankumarmangla
Explorer
0 Kudos

Hello Manoj,

Thanks for your suggestion. I have created a structure as shown below and the values are getting populated correctly:

Now, over here, I need to remove the all header nodes 'INT_00' and keep 'I_MEA' and 'I_REF' at its position. So my output should look like this:

.

.

S_REF

S_REF

I_MEA

I_REF

I_MEA

I_REF

I_MEA

I_REF

S_CTT

.

.

.

Is there any Adapter Module that I can use in my receiver SFTP adapter to achieve this?

Requesting your kind inputs.

Best regards,

Aman

manoj_khavatkopp
Active Contributor
0 Kudos

Hi Aman,

AFAIK there is no such standard module to replace these nodes.

However you can use Nodeception that would suffice your requirement.

Br,

Manoj

manikanta09568
Explorer
0 Kudos

Just for my information are you doing this in SAP? or in anyother middleware.

amankumarmangla
Explorer
0 Kudos

Hello Mani,

I am doing it in SAP PO system.

Thanks.