cancel
Showing results for 
Search instead for 
Did you mean: 

To read a txt file using the Module

former_member355445
Participant
0 Kudos

HI Gurus

need help in picking the txt file using the Module for SFTP adapter, the raw file looks like below

first line is the header

and from 2nd to 8th line is the records

9th line is the trailer

Header & trailer always occurs only once

but trailer always changes

so this file need to be pulled and send to ECC

can you please provide the module parameters , i am trying from a while but unable to pick the file.

Thanks in advance...

file attached

Accepted Solutions (0)

Answers (6)

Answers (6)

former_member182455
Active Contributor
0 Kudos

Hi Vinay,

Please try the using below SFTP module configuration and check the link for your reference.

http://scn.sap.com/docs/DOC-58321

Regards

Srinivas

gagandeep_batra
Active Contributor
0 Kudos

Hi Vinay,

another thought on that is

create 2 ICO

One SFTP to local NFS or ftp

then NFS to your destination in this you use FCC to convert XML

Regards

GB

former_member182412
Active Contributor
0 Kudos

Hi Vinay,

Check my answer in below thread.

Regards,

Praveen.

former_member190293
Active Contributor
0 Kudos

Hi Vinay!

At first sight I couldn't see identical structure for all your details records so I'd suggest to use simple FCC with one field for each row containing all its contents. Further, in mapping you can take the first and the last row as Header and Footer accordingly and use some UDF to transform each other row contents.

Regards, Evgeniy.

former_member355445
Participant
0 Kudos

HI Evgeniy ,

for SAP sftp adapter is not supporting the FCC, we are doing the content conversion with module only. is there a way that we can achieve through module.

Thanks,

Viany

former_member190293
Active Contributor
0 Kudos

Hi Vinay!

I see, just missed that.

Since there isn't FCC in SFTP adapter you could use java mapping, for example, for parsing your text file into XML structure.

Regards, Evgeniy.

former_member355445
Participant
0 Kudos

HI Evgeniy ,

can you please let me know how can we do with java mapping

Regards

Vinay.

former_member190293
Active Contributor
0 Kudos

Hi Vinay!

Another option is using MessageTransformBean for converting your flat file structure to XML.

Regards, Evgeniy.

former_member355445
Participant
0 Kudos

yes , you mean module..

former_member355445
Participant
0 Kudos

in module we need to specify key field value, what to specify for detail

former_member190293
Active Contributor
0 Kudos

If you want to read each row to single element it's no need for keys specification.

Just define recordset like: "Row,*" and "Contents", for example, as Row.fieldNames.

Thus, you'll get structure like this:

<Your_Message_Name>

     <Your_Recordset_Name> (if defined)

          <Row>

               <Contents>Your source file row contents</Contents>

          </Row>

                    ...

     </Your_Recordset_Name>

</Your_Message_Name>

Regards, Evgeniy.

former_member194786
Active Contributor
0 Kudos

Hi Vinay,

Can you please explain why you need a module for this? Can this not be achieved through content conversion with ~ as the separator for the fields?

Regards,

Sanjeev.

former_member355445
Participant
0 Kudos

HI Shekar ,

FCC is not supporting for the sap SFTP adapter in 7.4 . so we need the module for this. all our integrations based on SFTP will be configured with module.

Thanks,

Vinay.

former_member355445
Participant
0 Kudos

sorry records always change, typo mistake in my question