cancel
Showing results for 
Search instead for 
Did you mean: 

MessageTransformBean not working for receiver File Adapter

Former Member
0 Kudos

Hello Experts,

Our PI server is on 7.31 and we are trying to convert the XML message structure to the file structure as below:

XML structure

MT

   Header

      Field1

      Field2

      Details

         Field3

         Field4

   Header

      Field1

      Field2

      Details

         Field3

         Field4

      Details

         Field5

         Field6

File structure

Field1;Field2

Field3;Field4

Field1;Field2

Feild3;Field4

Field5;Field6

Since this is not possible using the FCC, we are trying to use the message transform bean with the configuration as per the attached file. Upon checking the logs of message processing, we see that the MTB has executed and transformation has happened successfully, but the output is the same XML file which has been generated by the mapping program.

Can you check if the MTB configuration is correct?

Regards,

Diptee

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member182412
Active Contributor
0 Kudos

Hi Diptee,

If you create the target structure like below and do the mapping like below.

Use below FCC in receiver file adapter.

File output.

Regards,

Praveen.

Former Member
0 Kudos

Hello Praveen,

The source structure we have is like

Details

   Field1

   Field2

   Field3

   Field4

   Feild5

 

Out of these, the Field1 and Field2 get mapped to Field1 and Field2 under Header, and all other fields under Details for the target structure. Also the source may have multiple records with same value in Field1 which have to be grouped under one Header on the target side.

Can you let me know how may I achieve this alongwith the solution you suggested?

Also, we are using module as FCC wont support a 3-leve structure.

Regards,

Diptee

former_member182412
Active Contributor
0 Kudos

Hi Diptee,

Can you supply me sample source xml and required output xml so that i can help you with this.

Regards,

Praveen.

Former Member
0 Kudos

Hello Praveen,

PFA

former_member182412
Active Contributor
0 Kudos

Hi Diptee,

Use below mapping.

Regards,

Praveen.

Former Member
0 Kudos

Hello Praveen,

Please share the output payload you have generated with the above mapping logic.

Also note we need the output structure to be like

Header1
Details1

Details2

Header2

Details1

Regards,

Diptee

former_member182412
Active Contributor
0 Kudos

Hi Diptee,

This is the mapping output.

Create the target structure like above and use the FCC which i shown in previous reply.

Regards,

Praveen.

Former Member
0 Kudos

Thanks Praveen,

We will try this and revert.

Regards,
Diptee

former_member182412
Active Contributor
0 Kudos

Hi Diptee,

Were you able implement this?

Regards,

Praveen.

Former Member
0 Kudos

Hello Praveen,

Unfortunately, due to time commitments I had to implement a workaround, before you responded and I have not yet found the opportunity to implement this.

Regards,

Diptee

former_member182412
Active Contributor
0 Kudos

Hi Diptee,

Can you close this thread then as per this blog

Regards,

Praveen.

iaki_vila
Active Contributor
0 Kudos

Hi Diptee,

I think the problem is that you have two headers with their details, i think only one level is supported.

Regards,

former_member186851
Active Contributor
0 Kudos

Hello Diptee,

File adapter supports FCC,why ur using module beans?

If its SFTP change ur transform class-com.sap.aii.af.sdk.xi.adapter.Conversion

And check the below link for mandatory parameters