cancel
Showing results for 
Search instead for 
Did you mean: 

Repeatation of datas in a file, doing file content conversion

ayan_chaudhuri
Participant
0 Kudos

Hi experts,

I have a file structures

A|100

B|T20|123

B|T30|456

A|105

B|T30|789

B|T40|456

And these combination A & B keep on repeating in the source file......A and B being the key value.....What would be my file content conversion look like!!..

Thanks

Ayan

Accepted Solutions (0)

Answers (4)

Answers (4)

prasannakrishna_mynam
Contributor
0 Kudos

Hi Ayan,

Recordset1
Field1
Field2
RecordSet2
Field1
Field2

Your structure has only two fields and the source file has three fileds and two fields. If you want to keep the key value in the structure, you need to ignore last field or you can ignore the key fields to accomidate in the structure.

Check the following blog-Conversion with key

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

Regards,

Prasanna

Former Member
0 Kudos

Hi Ayan,

User FCC configuration will be

Recordset Structure - Recordset,,field,

KeyFieldName - KeyField

Recordset.fieldName = KeyField

Recordset.fieldSeparator = |

Recordset.endSeparatyor = 'nl'

Recordset.keyFieldValue=A

Field.fieldName = KeyField,x,y,z....

Field.fieldSeparator = |

Field.endSeparator = 'nl'

Field.keyFieldValue=B

former_member187339
Active Contributor
0 Kudos

Hi,

Try usingh these:


Recordset Name : Recordset1
Recordset Structure : Field1,*,Field2,*

Field1.fieldName = x,y,z....
Field1.fieldSeparator = ','
Field1.endSeparatyor = 'nl'
Field2.fieldName = x,y,z....
Field2.fieldSeparator = ','
Field2.endSeparator = 'nl'

Regards

Suraj

jyothi_anagani
Active Contributor
0 Kudos

Hi Ayan,

Please give your source data type aswell. Then I can clearly give the content conversion parameters.

You can use keyFieldValue and missingLastfields parameters.

For more help Refer this link.

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

Thanks.

ayan_chaudhuri
Participant
0 Kudos

Hi Jyoti,

My source data type is as follows..

Recordset1

Field1

Field2

RecordSet2

Field1

Field2

Hope it helps...

Thanks...

jyothi_anagani
Active Contributor
0 Kudos

Hi Ayan,

If This is your data

   
A|100
B|T20|123
B|T30|456
A|105
B|T30|789
B|T40|456

and if structure is like this.

   
Recordset1
Field1
Field2
RecordSet2
Field1
Field2

If it is like this, Do you want to pass like

   
Recordset1       
Field1         A
Field2        100
RecordSet2
Field1        B
Field2        T20

If not provide me the exact structure you want for that data.

Thanks.

jyothi_anagani
Active Contributor
0 Kudos

Hi Ayan,

Refer this link....It will really help you alot.

/people/shabarish.vijayakumar/blog/2006/02/27/content-conversion-the-key-field-problem

Thanks.

ayan_chaudhuri
Participant
0 Kudos

HI Jyoti,

I wanted to pass exactly , as you have written..

Thanks

jyothi_anagani
Active Contributor
0 Kudos

Hi Ayan,

Use the FCC parameters as given below.



Doccument Name                        MT_Source( Your Source Message Type name)
Doccument Namespace                   http://xxxxxx(Your Message type Name space)
Recordset Structure                   Recordset1,*,Recordset2,*
Key Field Name                        field1
Key Field Type                        String

Recordset1.fieldSeparator            '|'
Recordset1.fieldNames                field1,field2
Recordset1.keyFieldValue             'A'
Recordset1.endSeparator              'nl'
Recordset2.fieldSeparator            '|'
Recordset2.fieldNames                field1,field2
Recordset2.keyFieldValue             'B'
Recordset2.additionalLastFields      ignore
Recordset2.endSeparator              'nl'     

If you are getting any problem Let me know.

Thanks.

former_member183908
Active Contributor
0 Kudos

Hi Ayan,

-->There is nothing much to explain if you follow as per the shabarish blog you can easily understand.

Thanks

ayan_chaudhuri
Participant
0 Kudos

Hi Jyoti,

In MONI, my Technical Routing-- payload ...

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

<ns0:mt_nested_file xmlns:ns0="urn://iext1424_file_to_idoc" />

Rest are all blank..So file is not generating is destination folder..

Thanks

jyothi_anagani
Active Contributor
0 Kudos

Hi Ayan,

File is picked or not. If it is picked then goto Runtime Workbench and in communication channel monitoring check message id is created or not and click on message Id and goto payload and check whether you are getting the exact payload ornot.

I Think It may not be the problem with FCC. If It is the problem with FCC, file will not be picked.

Thanks.