cancel
Showing results for 
Search instead for 
Did you mean: 

File conversion Problem

Former Member
0 Kudos

Hi Experts,

we are facing a problem when converting one text file by using FTP adapter.

the flat txt file is as below

AT1230001

"AT" - Segment Name

"123" - Field One

"0001" - Field Two

we are using FTP Adapter conversion for the same

the result of XML is as below

- <AT>

<F1>AT</F1>

<F2>123</F2>

</AT>

for the field one it is taking the value of Segment Name, as we are giving KeyFieldValue in Configuration "AT".

please help, it is urgent,

Regards,

Study SAP

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

What is your problem.....I didnt understood what ur requirement is.

Can you please eloborate it.

Thnx

Chirag

Former Member
0 Kudos

Hi Chirag,

Thanks for your reply,

what we are facing here is that in our flat file data, it is EDI file

AT is segment name value

*(estric) is separator

123 is first field value

0001 is second field value

in XML conversion the Segment Name is going into the first field name value and first field name is going in second field value and second field we are not able to capture as we have only two fields for capturing.

As in XML format

<AT>

<F1>AT</F1> "it is taking the value of Segment Name, but it should capture first field value which is "123"

<F2>123<F2> "it is taking the value of First field, it should capture value "0001"

</AT>

How we can ignore Segment value when transferring data ?

Regards,

Study SAP

Former Member
0 Kudos

Hi,

You can use the offset value in file content conversion.

Under Document Offset, specify the number of lines that are to be ignored at the beginning of the document.

This enables you to skip comment lines or column names during processing. If you do not make an entry, the default value is zero lines.

FOr your case mention 1 so it will offset the Segment name value.

Also check the mapping which have done, have u mapped the proper field values to target element.

You can also test your scenario in the test tab using the same XML file in the test tab of MM.

Thnx

Chirag

Former Member
0 Kudos

Hi,

Check whether you have defined your fields in Sub level to your node AT or in the same level of AT. If they are in same level depending on your mapping it may take as you said.

Regards

Former Member
0 Kudos

Hi,

Please insert following statement in the FCC parameters.

Recordsetstructurename.keyFieldInStructure----> ignore.

It is used when the key field is to be ignored.

Hope it will help.

Regards

Amitanshu

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

please try the following configuration in your Sender File Adapter:

Documentname: AT

Document Namespace: e.g. http://test

Recordset Structure: Recordset,*

Recordset Sequence: Ascending

Recordsets per Message: *

Key Field Name: Dummy

Key Field Type: String

Recordset.fieldNames: Dummy,F1,F2

Recordset.fieldSeparator: *

Recordset.keyFieldValue: AT

Recordset.keyFieldInStructure: ignore

ignoreRecordsetName: true

The result should look like that:

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

<ns:AT xmlns:ns="http://test">

<Recordset>

<F1>123</F1>

<F2>0001</F2>

</Recordset>

</ns:AT>

Best regards

Lars

Former Member
0 Kudos

for this u dont need to use any key fld identification

just have ur separators, fixed lengths mentioned in fcc. thats enough.

also use this Recordsetstructurename.keyFieldInStructure----> ignore

thanks

kiran

prabhu_s2
Active Contributor
0 Kudos

change the structure to the below and check with the fcc

<row>

<AT>

<F1>AT</F1>

<F2>123</F2>

</AT>

</row>