cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion

Former Member
0 Kudos

Hi Friends,

Iam trying for File Content Conversion in Sender File Adapter.

Iam stuckup with one problem..

If my input datatype structure is

>Input_DT

Number

Name

>>Address

Street

Here in node Input_DT I have another node Address.

So, how should I give the record structure and what should be given in Name -- Value table.

The process works fine when there is no sub structure in the datatype.

So, how should I specify the sub structure in Sender File Adapter using COntent Conversion....

Regards,

Raju...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

i think u have to create a substructure below input_DT at the address node level.

input_DT

--root

-


name

-


number

--addresss

-


street

so the recordstructure will be

root,(or 1),address( or 1)

if u don create the root strucutre then i think its not poosible to content convert

regards

jithesh

Former Member
0 Kudos

Hi,

The XML message generated by Sender file adapter will of the format shown below..

<documentName>...

<recordset>

<NameA>

<field-nameA1>field-value</field-nameA1>

<field-nameA2>field-value</field-nameA2>

<field-nameA3>field-value</field-nameA3>

</NameA>

<NameB>

<field-nameB1>column-value</field-nameB1>

<field-nameB2>column-value</field-nameB2>

<field-nameB3>column-value</field-nameB3>

</NameB>

</recordset>

...

<recordset>

...

</recordset>

</documentName>...

http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm

You can try having two nodes at the same level...

input_DT

<recordset>

-<input>

name

number

street

-</input>

-<Address>

field1

field2

...

-</Address>

</recordset>

but you need a key fields to differentiate address and input..

BTW how does your input file look like ? May be you can handle this in mapping layer...

Regards

Anand

Answers (3)

Answers (3)

STALANKI
Active Contributor
0 Kudos

read thz blog..it will be useful to understand CC well..

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

Former Member
0 Kudos

hi jithesh,

i m working on the same thing as raju....

we have given same structure u have told in datatypes...

like

input_DT

--root

-


name

-


number

--addresss

-


street

and at recordset structure i have given it as

root,1,address,1....

but will u tell me that what all key field will be required?

my input file will be as

01 Hetal addressabcd

Former Member
0 Kudos

Hi Hetal,

Since address is mentioned as a seperate node structure i think the address has be mentioned in a seperate recordline in ur flat file.

If u want address to be in the same line then address should be a field in root.

For keyfield u need to create seperate field in both root and address with a same name i.e.,

root

-


keyfield

-


name

-


number

address

-


keyfield

-


address

then in ur sender file adapter give the

<b>keyFieldValue keyfield</b>

and in the content conversion parameter give

<b>root.keyFieldValue (value of the keyfield in flatfile)

address.keyfieldValue (value of the keyfield in flatfile)</b>

For the multiple occurance of root and address the keyfield value has to be the same in flat file.

regards

jithesh

Former Member
0 Kudos

As far as I know it's not directly possible to get required nested structure using content conversion. You can achieve this in two steps. I assume you have fixed length file.

1. Using the content conversion get you address data as part of input node itself as shown below.

<input>

Number

Name

Address (get address data as per fixed length)

Street

</input>

2. Then you can use mapping to convert it to required structure.

>Input_DT

Number

Name

>>Address

Street

hope this helps..

Regards

Anand

Former Member
0 Kudos

Anand's approach is the usual one which works, another one would be to manipulate the payload using a modulebean..Try it if you have the patience and Java skills.

Former Member
0 Kudos

Hi,

Have a look at the blog on sender FCC

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

Regards

Vijaya