cancel
Showing results for 
Search instead for 
Did you mean: 

Help required in File Adapter Module Development

phanikumar_akella
Participant
0 Kudos

Hi All,

I am working out a File to File scenario where my source file is in some different format. Please find the below sample:

<Root>

<ID>100</ID>

<NAME>SAP</NAME>

<END-Root>

Before taking this into IS, I need to change the file to a proper XML format. I need to replace "END-" with "/".

<?xml version="1.0" encoding="UTF-8" >

<Root>

<ID>100</ID>

<NAME>SAP</NAME>

</Root>

I think I can achive this by developing Adapter Modules. I am new to Adapter Module development.

Can you please tell me if there are any inbuilt Adapter Modules for this. If not please suggest me some relevant blogs to solve this issue. Thanks in Advance.

Accepted Solutions (1)

Accepted Solutions (1)

stefan_grube
Active Contributor
0 Kudos

Maybe you go for Java Mapping. It is easier to develop and test compared to adapter modules.

There are some blogs about Java mapping. You cannot use SAX or DOM parser for this, as you have no valid XML.

Regards

Stefan

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

I think, in addition to what other xperts has suggested, you can go with xslt mapping as well..

I think xslt mapping would be much easier here. You just need to create xml data as it is with "/" separator for last tag.

Nilesh

Former Member
0 Kudos

Hi Phani Kumar

There are more than one ways to do this. As per your timelines and skill set you can decide

1. You can use the XMLAnonymizerBean this is an inbuilt module

Check Stefen's blog

2. You can read this complete file in a single field and then you can create XSLT or Java mapping to parse it in a target XML you desire.

Check these

https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/3823 [original link is broken] [original link is broken] [original link is broken](XSLT mapping)

(Java Mapping)

(Java Mapping helper DOM)

(XML Node into string)

3. You can develop Adapter modules for this

Refer

Check Guides

XI 3.0

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3bdc14e1-0901-0010-b5a9-a01e29d7...

PI 7.0

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b...

PI 7.1

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00838345-708c-2a10-1199-9514c0b0...

former_member187563
Contributor
0 Kudos

hi,

you have to simply add one module in your communication channel

that is XMLAnonymizerBean

you can refer below for help:

http://help.sap.com/saphelp_nw04/helpdata/en/2e/bf37423cf7ab04e10000000a1550b0/frameset.htm

if you want to change message type nodes you can go for java mapping.

hope it helps.

regards,

ujjwal kumar

prateek
Active Contributor
0 Kudos

I will suggest you another way.

Just create us source datatype with a single field (any fieldname). And using FCC, pass the entire file data into that field. Then use java mapping to parse it and edit it. The logic of java mapping would be same as you would have used in the adapter module.

Can you please tell me if there are any inbuilt Adapter Modules for this.

No

For adapter module development

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/e21106cc-0c01-0010-db95-dbfc0ffd...

Regards,

Prateek