cancel
Showing results for 
Search instead for 
Did you mean: 

idoc 2 file - file content conversion in receiver

Former Member
0 Kudos

Hi,

My scenario is idoc to file.

if i want to use file content conversion at receiver side,

so i need to create record set according to sender side data type or receiver data type?

plz give some inputs reg. this.

Thanks

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Its the receiver data type you should use on the receiver FCC. Following might help you

http://help.sap.com/saphelp_nw04/helpdata/en/bc/bb79d6061007419a081e58cbeaaf28/content.htm

Shabarish_Nair
Active Contributor
0 Kudos

/people/shabarish.vijayakumar/blog/2007/08/03/file-adapter-receiver--are-we-really-sure-about-the-concepts - this should help you

Former Member
0 Kudos

Hi,

Thanks for ur reply.

I have gone thru these web blogs .

it could not clear my doubt.

could you answer my Q's?

I know that it is repeating Q.

plz do not give some link.

I have gone thru those links like web blog or help.sap.com

Thanks

Edited by: ruban R on Apr 21, 2008 8:47 PM

Edited by: ruban R on Apr 21, 2008 8:49 PM

Former Member
0 Kudos

Ruban:

If you want to create the FCC on the receiver side, you need to have some sort of data type on the receiver side because in the FCC of receiver adapter, you are going to use the variables of receiver data type and define the parameters to create the CSV file.

For example, you need to create a file like

Pope, Male, 69, Rome

John, Male, 24, Chicago

Then the receiver data type should be like

Receiver_DT

.....Message(0..unbounded)

.........Name..1

.........Sex.....1

..........Age.....1

.........Place....1

and define FCC as

Message.fieldSeparator = ','

Message.endSeparator = 'nl'

Hope you understand what I want to convey

Former Member
0 Kudos

Hi,

Thanks for ur reply.

My receiver data type is like this,

Reciver_DT

then sub element (under this)

Customers_copy

then sub element (under this)

Customer

then sub element ...fields like (under this)

Name

Price

Date

I created FCC like this,

my recordset structure Customers_copy,Customer

name Customers_copy.fieldSeperator

value is ','

name Customers_copy.endSeperator

value is 'nl'

name Customer.fieldSeperator

value is ','

name Customer.endSeperator

value is 'nl'

I am getting error like this in my CC monitoring,

Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter 'Customers_copy.fieldFixedLengths' or 'Customers_copy.fieldSeparator' is missing

Former Member
0 Kudos

Ruban

Reciver_DT....1

.....Customers_copy....1

...........Customer...0....unbounded

................Name..1

................Price...1

................Date....1

I have assumed the occurances and guess above is your data type

FCC are below

ecordset structure Customers_copy,1, Customer, * /* assuming the occurrances given above */

Customer.fieldSeparator = ','

Customer.endSeparator = 'nl'

Customer_copy.fieldSeparator = 'nl'

Former Member
0 Kudos

Hi,

My receiver data type is like this,

Reciver_DT occurence is nothing

then sub element (under this)

Customers_copy occurence is 0..unbounded

then sub element (under this)

Customer occurence is 0..unbounded

then sub element ...fields like (under this)

Name occurence is 0..1

Price

Date

if i made any mistake plz tell me.

is it right Reciver_DT occurence is nothing?

one more thing:

i need to give my Recordset structure as

Customers_copy,*, Customer, *

Thanks

Ruban

Edited by: ruban R on Apr 21, 2008 10:52 PM

Former Member
0 Kudos

Ruban

is it right Reciver_DT *occurence is nothing*?

Its ok.. Root can be like that

i need to give my Recordset structure as

Customers_copy,*, Customer, *

Yes

and your FCC is the same

Customer.fieldSeparator = ','

Customer.endSeparator = 'nl'

Customers_copy.fieldSeparator = 'nl'

This should work perfectly

Former Member
0 Kudos

Hi,

I have given my recordset structure like this

Customers_copy,*, $one space after comma$ Customer, $one space after comma$ *

is it right?

I am getting error like this,

Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing

Thanks

Ruban

Edited by: ruban R on Apr 21, 2008 11:35 PM

Edited by: ruban R on Apr 21, 2008 11:37 PM

Former Member
0 Kudos

Check the spelling and Cases of the variables and parameters you mentioned in FCC. It seems like 'fieldSeparator' is misspelled or upper/lower case missing there

and also just provide

Recordset structure = Customers_copy, Customer

Do not use any occurrences..

Edited by: Guru on Apr 21, 2008 4:41 PM

Former Member
0 Kudos

Hi,

I checked spelling of separator.

it is fine..

I gave as u said.

even though

i am getting error like this:

Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '.fieldFixedLengths' or '.fieldSeparator' is missing

Former Member
0 Kudos
Conversion initialization failed: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: Parameter '*.fieldFixedLengths' or '*.fieldSeparator' is missing

What the error says is 'Recordset Structure' contains * as a variable( Like Customers_Copy and Customer). As we have already defined 'fieldSeparator' for Customers_Copy and Customer and so it is expecting the same for * also. I think it did not refresh properly after you removed the *. Can you please again change the

Recordset Structure = Customers_Copy,Customer

and again activate the change list, refresh the cache. Lets see if this works this time

Former Member
0 Kudos

Hi guru,

I am also surprised about that error.

I followed as u said.

But i am getting the same error.

Thanks

Former Member
0 Kudos

I am sorry ..i think i made a mistake in FCC. In the

Customer.fieldSeparator = ,

Give Just comma ( , )... Do not include single quotes..

Former Member
0 Kudos

hi,

i have done the changes..even though i am getting the same error.

Thanks

Former Member
0 Kudos

Hmmmm...Thats little strange..I hope we have done the correct changes. Just to confirm you did not remove the single quotes for 'nl' right. You just removed for comma. Can you please check the following small blog in case if I/you have missed something

/people/arpit.seth/blog/2005/06/02/file-receiver-with-content-conversion

Also try to add

Customer_copy.endSeparator = 'nl'

and can you post the structure of the Target message you get when you test a sample in test tab of message mapping

Edited by: Guru on Apr 21, 2008 5:57 PM

Former Member
0 Kudos

Hi guru,

Thanks for ur response.

I did not remove quote from 'nl'

My CC status is green.

status message: correctly configured and started

but the error is same

Initially I followed that blog only but i got the same error.

after then only i changed as per SDN Folks..just to see my luck.

My structure in test tab in Message Mapping:

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

<ns0:xxx_Receiver_File_MT xmlns:ns0="http://www.xxx.com/xx/customer"><Customer_copy><Customer><MaterialID>1456790</MaterialID><Upc>2345289</Upc><STK_MFG_CODE>1</STK_MFG_CODE><CostMarkup>3</CostMarkup><Discontinued>true</Discontinued><SPIFF1>1</SPIFF1><SPIFF2>2</SPIFF2><Weight>0</Weight><Height>0</Height><Width>0</Width><Length>0</Length><ProductType>2345</ProductType><UpdateDate>2210</UpdateDate><CreateDate>2222</CreateDate></Customer></Customer_copy></ns0:xxx_Receiver_File_MT>

Edited by: ruban R on Apr 22, 2008 1:04 AM

Edited by: ruban R on Apr 22, 2008 1:04 AM

Edited by: ruban R on Apr 22, 2008 1:12 AM

Former Member
0 Kudos

Ruban:

It is little tiring for you I guess. Lets try some trials. Can you make the

Recordset Structure = Customer

Remove Customer_copy..Try and see how it does

Former Member
0 Kudos

Hi,

There is problem while refreshing in sap xi also.

when i pass new parameter like 7 in my recordset structure,

it is immediately reflecting in CC monitoring.

error it is showing that '7'.

but if i remove that in record set structure

(after activating that in ID)

even though

if i stop and start my CC manually also,

still it is showing that error in CC monitoring

like '7'

basic concept of this file content conversion is

I have to keep at least field separator (ie 'nl' )for outer most node element ie Customer_copy and record set stru. as Customer_copy

is it right?

I tried my own way...still it is giving that error.

what could my fieldSeparator, endSeparator, for ur last case plz tell me?

Edited by: ruban R on Apr 22, 2008 3:01 AM

ambili_jose
Explorer
0 Kudos

Hi Ruban,

Please provide th following and check:-

1. Recordset Structure - Customer_copy,Customer

2. Customer_copy.fieldSeparator Value - ,

3. Customer.fieldSeparator Value- ,

4. Customer.endSeparator Value - ‘nl’

Try this one last time n see....

Regards,

Ambili

Former Member
0 Kudos

Hi,

Finally FCC is working fine.

I could able to receive the file in FTP.

when i test MM then my receiver message type in Message Mapping

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

<ns0:xxx_Receiver_File_MT xmlns:ns0="http://www.xxx.com/xx/customer"><Customer_copy><Customer><MaterialID>1456790</MaterialID><Upc>2345289</Upc><STK_MFG_CODE>1</STK_MFG_CODE><CostMarkup>3</CostMarkup><Discontinued>true</Discontinued><SPIFF1>1</SPIFF1><SPIFF2>2</SPIFF2><Weight>0</Weight><Height>0</Height><Width>0</Width><Length>0</Length><ProductType>2345</ProductType><UpdateDate>2210</UpdateDate><CreateDate>2222</CreateDate></Customer></Customer_copy></ns0:xxx_Receiver_File_MT>

my record set stru: Customer,Customer_copy

name : value

Customer.addHeaderLine : 1

Customer.fieldSeparator: ,

Customer_copy.fieldSeparator : 'nl'

Customer.endSeparator: 'nl'

Customer_copy.addHeaderLine: 1

in my text file(output ) i am getting the

only values..i am not getting the field name