cancel
Showing results for 
Search instead for 
Did you mean: 

FCC in SFTP adapter

Former Member
0 Kudos

Hi Folks,

I am working on WS to File scenario using SFTP .

In this the output file should be in .txt format.

Input structure is

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

- <ns0:MT_WS2file_Rec xmlns:ns0="urn://ws2file">

<NATURAL_ACCOUNT>1202700106</NATURAL_ACCOUNT>

<NATURAL_ACCT_DESC>Cash In Bk-Rmb (Tax)</NATURAL_ACCT_DESC>

<BEGINNING_BALANCE>164718.27</BEGINNING_BALANCE>

<ENDING_BALANCE>228612.15</ENDING_BALANCE>

<PERIOD_DR>6563840.83</PERIOD_DR>

<PERIOD_CR>6500934.55</PERIOD_CR>

<PERIOD_NET>62906.28</PERIOD_NET>

<CURRENCY>CNY</CURRENCY>

<PERIOD_YEAR>2010</PERIOD_YEAR>

<PERIOD_MONTH>3</PERIOD_MONTH>

<GL_LEID>385</GL_LEID>

</ns0:MT_WS2file_Rec>.

Can anyone suggest for this structure how i have to define content conversion tab.

Regards

Kalyan

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi Kalyan,

The problem is caused by the incorrect data structure for FCC. You are missing one node in the hierarchy, like this:

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

<ns0:MT_WS2file_Rec xmlns:ns0="urn://ws2file">

   <Structure>

      <NATURAL_ACCOUNT>1202700106</NATURAL_ACCOUNT>

      <NATURAL_ACCT_DESC>Cash In Bk-Rmb (Tax)</NATURAL_ACCT_DESC>

      <BEGINNING_BALANCE>164718.27</BEGINNING_BALANCE>

      <ENDING_BALANCE>228612.15</ENDING_BALANCE>

      <PERIOD_DR>6563840.83</PERIOD_DR>

      <PERIOD_CR>6500934.55</PERIOD_CR>

      <PERIOD_NET>62906.28</PERIOD_NET>

      <CURRENCY>CNY</CURRENCY>

      <PERIOD_YEAR>2010</PERIOD_YEAR>

      <PERIOD_MONTH>3</PERIOD_MONTH>

      <GL_LEID>385</GL_LEID>

   </Structure>

</ns0:MT_WS2file_Rec>

Basically, you need to use some structure that will group all the fields, otherwise FCC will not work as expected. See SAP Help for receiver FCC for more details:

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/686e687f2a6d12e10000000a1553f6/content.htm

Regards,

Greg

Former Member
0 Kudos

Hi Greg,

I follewed the same structure which you mentioned.

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

<ns0:MT_WS2file_Rec xmlns:ns0="urn://ws2file">

   <Structure>

      <NATURAL_ACCOUNT>1202700106</NATURAL_ACCOUNT>

      <NATURAL_ACCT_DESC>Cash In Bk-Rmb (Tax)</NATURAL_ACCT_DESC>

      <BEGINNING_BALANCE>164718.27</BEGINNING_BALANCE>

      <ENDING_BALANCE>228612.15</ENDING_BALANCE>

      <PERIOD_DR>6563840.83</PERIOD_DR>

      <PERIOD_CR>6500934.55</PERIOD_CR>

      <PERIOD_NET>62906.28</PERIOD_NET>

      <CURRENCY>CNY</CURRENCY>

      <PERIOD_YEAR>2010</PERIOD_YEAR>

      <PERIOD_MONTH>3</PERIOD_MONTH>

      <GL_LEID>385</GL_LEID>

   </Structure>

</ns0:MT_WS2file_Rec>

In Receiver FCC

Recordset structure    MT_WS2file,Structure

Name                                Value

MT_WS2file.fieldSeparator'nl'
Structure.fieldSeparator'0x18'
Structure.endSeparator'nl'

But i didnt receive .txt file

I need to do any thing module tab.Can you help me on this

Regards

Kalyan

former_member184681
Active Contributor
0 Kudos

Hi,

Use this set of FCC parameters:

Recordset structure: Structure

Structure.fieldSeparator = ;

Structure.endSeparator = 'nl'

I'm not sure what did you want to achieve by this '0x18' separator, instead use the semicolon (";") you used initially. In case the file is still not generated, have a look at the communication channel monitor in RWB to get error details.

Regards,

Greg

Former Member
0 Kudos

Hi Kalyan,

Just give following in content conversion TAB:

Recordset structure    Structure

Structure.fieldSeparator,
Structure.endSeparatornl
Former Member
0 Kudos

Hi Greg,

Now Text file is creating ,but iam getting o/p as

But i want O/p as

In Recv Content conversion tab i given like this

Can you help me on this

Regards

Kalyan

former_member184681
Active Contributor
0 Kudos

Dear Kalyan,

If I got it right, you want to add the first line with field names, is that correct? If so, add the following attributes:

Structure.addHeaderLine = 3

Structure.headerLine = NATURAL ACCOUNT NATURAL_ACCT_DESC ... (copy the first line from the required format)

The rest is dependent on the actual message payload.

Regards,

Greg

zameerf
Contributor
0 Kudos

Also,

it looks like the output file is either fixed length or tab separated.

so you can try

Structure.fieldSeparator = '0x09'

You can refer blog by to check another way to specify tab

http://scn.sap.com/people/shabarish.vijayakumar/blog/2005/08/17/nab-the-tab-file-adapter

if fixed length, then specify Structure.fieldFixedLengths with respective field lengths.

Btw, which SFTP adapter do you use? just curious to know which one supports content conversion directly.

-Zameer

Former Member
0 Kudos

Thanks greg its working now,but only one chnage need to be done

I am getting o/p like this

But i want to get the values like this

NATURAL_ACCOUNT           NATURAL_ACCT_DESC                                BEGINNING_BALANCE

801710004033             OpExp-OtsdeSvcs/Fees-Other-Payroll Processing       11564.67

former_member184681
Active Contributor
0 Kudos

Do you mean you want to change the separator between fields? If so, instead of:

Structure.fieldSeparator = ,

use:

Structure.fieldSeparator = '0x09'

Regards,

Greg

Former Member
0 Kudos

Thanks Greg,

Its working now..:-)

Regards

Kalyan

Answers (2)

Answers (2)

arijit_mukherjee2
Participant
0 Kudos

Hi Kalyan,

Use MessageTransformBean. It will definitly work.

http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/frameset.htm

Thanks,

Arijit

Former Member
0 Kudos

Dear Kalyan

Specify Recordset structure as row,*

Under Content conversion :

row.fieldSeparator ;

row.endSeparator ´nl´

Regards

Monika

Former Member
0 Kudos

Hi Monica,

I done the same thing which you mentioned,but the file is not creating anythg.

please find the attatchement.

Regards

Kalyan