cancel
Showing results for 
Search instead for 
Did you mean: 

New Line with File Content Conversion

Former Member
0 Kudos

Hi there

I have a interesting question, I need to add a new line in the middle of a flat file. I read an idoc and using content conversion I convert it to a flat file. Is there any way I can divide the idoc into 2 parts separated by a new line?

Thanx,

Jan

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

> I have a interesting question, I need to add a new line in the middle of a flat file. I read an idoc and using content conversion I convert it to a flat file. Is there any way I can divide the idoc into 2 parts separated by a new line?

Hi,

In my opinion using the regular FCC method I guess it will be not possible to create a new line in the middle of flat file. You can take the help of java mapping as described in bleow mentioned blogs to convert it into flat file. I am not sure but you can try with these options...

Regards,

Sarvesh

Former Member
0 Kudos

Of course it is possible you just have to be a little creative in your approach.

So to achieve a new line in the middle of your output file you simply need to ensure that your structure (target) has a dummy structure so to say where you want the blank line to come.... you can simply have a dummy structure with one field and thenm on that field you can map a consatnt value to it (blank).

Then in your content conversion on your target file adapter simply do all of the configuration as you would any other including the "dummy" structure and you will have a new line where you want it...

let me know if you need me to elaborate...

Former Member
0 Kudos

Wel, om not 100% with you on that one. I have an idoc and target structure.. Where I do my message mapping I can ad an extra "dummy field" to my target structure and have a blank constant there. So I'll Have:

Field1 --- "Value1"

Field2 --- "Value2"

DummyField --- ""

Field3 --- "Value3"

The dummy field value, if I leave it blank its a initial value with 0 spaces?

Oh, I forgot to mention. I have to create a flat file without any delimeters which means I have to specify the field lengths and names. E.x

.FieldLenghts = 5,3,1,4

.FieldNames = F1,F2,F3,F4

So.. When it comes to the blank field, I have to specify the length which makes things quite dufficult. I guess I could do JAVA mapping but it would be much easier with the content conversion.

Former Member
0 Kudos

Well I appriciate your creativity.. But what is the need to create any dummy field???

Let me give an example suppse we have 100 records coming in IDOC and I know 50th position is the middle position of flat file then how this dummy field is going to help?

Regards,

Sarvesh

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

set in FCC

RecordsetStructureName.endSeprator='0x0D''0x0A'

here RecordsetStuctureName would be the after which you want new line

dharamveer_gaur2
Active Contributor
0 Kudos

Hi

read this thread might help u

Former Member
0 Kudos

In the content conversion parameters you must specify:

Name: YourRecordsetStructureName.endSeparator

Value: 'nl'

That identifies the separator as a new line