cancel
Showing results for 
Search instead for 
Did you mean: 

File Content Conversion Sender

brian_briones
Participant
0 Kudos

Hi friends,

I have the next scenary.

The file sender is :

:20:text

:22:text2

:23:text3text3text3

text3text3text3text3text3text::::3text3

text3text3text3text3text3

:24:text4

:25:account

....

etc...

I need separate this data and get on the data type.

do you have any example?

dont know how separate :20: of  text

help me...

regards.

Accepted Solutions (1)

Accepted Solutions (1)

rubanprasanth_s
Participant
0 Kudos

Hi Brain,
Create the DT as follows:
DATA

  Field1     - create dummy field

  Field2     - for 20,22,23..
  Field3     - for text

Case 1:

Very simple too (I prefer to go for it )

In your CC Give the following parameter:


RecordSet Structure = DATA,*



Name                                   Value

--------------------------------------------------------------------------------

DATA.fieldNames                          Field1,Field2,Field3

DATA.fieldSeparator                     ':'

--------------------------------------------------------------------------------

Case 2:

you can try with enclosure too

Name                                             Value

--------------------------------------------------------------------------------------------

DATA.fieldNames                                     Field1,Field2,Field3

DATA.fieldSeparator                                <empty space>

DATA.enclosureSign                       :

DATA.missingLastFields                 ignore

DATA.enclosureSignConversion  -    YES

-----------------------------------------------------------------------------------------

Kindly check

Regards,
Ruban.S

brian_briones
Participant
0 Kudos

Hi Ruban, Im goin to do this configuration. but, happens if a text is ":" take it as the end of the line?

Answers (3)

Answers (3)

Harish
Active Contributor
0 Kudos

Hi Brian,

you can convert the file as text and number.

Plain2XML Transform.Class      com.sap.aii.messaging.adapter.Conversion

Plain2XML Transform.ContentType      text/xml;charset=utf-8

Plain2XML xml.conversionType      SimplePlain2XML

Plain2XML xml.processFieldNames      fromConfiguration

Plain2XML xml.documentName      Document

Plain2XML xml.documentNamespace      http://xi.com/test

Plain2XML xml.structureTitle      Title

Plain2XML xml.fieldNames      field-name1,field-name2

Plain2XML xml.fieldseparator      :

please refer the below link

Examples of Content Conversion Using MessageTransformBean (SAP Library - SAP Exchange Infrastructure...

Regards,

Harish

brian_briones
Participant
0 Kudos

Hi hirish,

thank for response.

The problems is I dont know the length of the data and this one is variable...

Harish
Active Contributor
0 Kudos

Hi Brian,

You can read the entire data in field2. you do not need to define the fixed length.

regards,

Harish

former_member184720
Active Contributor
0 Kudos

Hi Brian - May be you do that with simple content conversion

<node>.fieldSeparator - :

In your datatype define the first field as "dummy" then the actual field names..

In the mapping you can ignore the first field "dummy"

For content conversion you can refer to

http://www.riyaz.net/sap/xipi-file-content-conversion-for-simple-structure/75/

Message was edited by: Hareesh Gampa

Former Member
0 Kudos

Hi Brian,

Define a Data Type, like this:

Row

.... Field1 (or LineNbr) for your 20 21 22 etc...

.....Text

In Sender CC, choose a file content conversion with:

RecordSet Structure = Row,*

with options (at least):

Row.fieldNames = Field1,Text

Row.fieldSeparator = ':'

see other options in this SAP help.


regards

Mickael