cancel
Showing results for 
Search instead for 
Did you mean: 

RCVR File Content Conversion - Remove empty Recordsets

Former Member
0 Kudos

Hello everyone,

Here's my scenario: IDOC > XI > TXT (File Content Conversion)

Here's how my output XML currently looks like:

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

<ns0:D001FILE_MT xmlns:ns0="http://www.pharmaindustries.com">

<Recordset/>

<Recordset>

<MATLCODE>00155581</MATLCODE>

<MATLNAME>ALCOHOL REFINED 96% V/V (BALAYAN)</MATLNAME>

</Recordset>

<Recordset>

<MATLCODE>00155581</MATLCODE>

<MATLNAME>ALCOHOL REFINED 96% V/V (BALAYAN)</MATLNAME>

</Recordset>

<Recordset/>

<Recordset>

<MATLCODE>20388853</MATLCODE>

<MATLNAME>POLYSORBATE 60 SD (TWEEN 60 SD)</MATLNAME>

</Recordset>

</ns0:D001FILE_MT>

Currently, the conversion settings in the receiver file adapter results into this:

BLANK

00155581 ALCOHOL REFINED 96% V/V (BALAYAN)

00155581 ALCOHOL REFINED 96% V/V (BALAYAN)

BLANK

20388853 POLYSORBATE 60 SD (TWEEN 60 SD)

I want to get remove the BLANK LINES from the text file so that it now resembles this:

00155581 ALCOHOL REFINED 96% V/V (BALAYAN)

00155581 ALCOHOL REFINED 96% V/V (BALAYAN)

20388853 POLYSORBATE 60 SD (TWEEN 60 SD)

Here are the conmmand parameters already existing in the "Content Conversion Parameters":

Recordset.fieldNames

Recordset.fieldFixedLengths

Recordset.endSeparator

Would anyone know which command I should add in this section so that empty "Recordsets" are removed from the text file?

Thanks in advance!

Glenn

Accepted Solutions (0)

Answers (5)

Answers (5)

Former Member
0 Kudos

Hello everyone,

Okay, so here's how I got around the blank lines appearing on my output file:

I added the following information on my comm. channel parameters:

Recordset.endSeparator = '0'

So that it doesn't go to the next line (which is the default)

and..

Recordset.absoluteRowWidth = 255

So that it goes to the next line only after 255 characters (which is my requirement)

I hope that this can help someone someday.

Cheers!

Glenn

Former Member
0 Kudos

hi,

Add the following and try

Recrodset.fieldSeparator '0'

check this wiki page

https://wiki.sdn.sap.com/wiki/display/profile/2007/07/30/RemovingtheemptylineduringReceiverFCC%21

Regards

Ramesh P

Former Member
0 Kudos

Okay, I'll give it a try!

santhosh_kumarv
Active Contributor
0 Kudos

Hi,

Avoid the generation of the empty Recordset in the mapping.

Thanks

SaNv...

Former Member
0 Kudos

Hello Santosh,

You are right, but I've tried so many condition combinations to avoid the empty recordsets all to no avail.

Is it possible to do it in the content conversion parameters instead?

Warm regards,

Glenn

santhosh_kumarv
Active Contributor
0 Kudos

Hello Glenn,

Could you provide the mapping pattern that you are using.

Thanks

SaNv...

Former Member
0 Kudos

Let me get back to you guys in a bit! I really appreciate your replies.... keep the suggestions coming, I'll continue testing for the meantime.....

Former Member
0 Kudos

hi,

Add the following and try

Recrodset.fieldSeparator '0'

Regards

Ramesh P

Former Member
0 Kudos

Hi Ramesh,

I already have

Recorset.fieldFixedLengths in place.

It might conflict with:

Recrodset.fieldSeparator '0'

won't it?

Regards,

Glenn

former_member859847
Active Contributor
0 Kudos

Hi,

Use folllowing FCC paremeter to avoid recordsetname.

i.e Recordset.endSeparator-'nl'

Recordset.field names -

Recorset.fieldFixedLengths

Recordset.endseparator -'nl.

pls mention recordset structure as

Recordset, Recordset

still u r facing any problem let us know.

warm regards

mahesh.

Former Member
0 Kudos

Hello Mahesh,

I already have those fields filled up. What I need to know is which command removes the empty recordsets so that I don't get blank rows in my output text file.

eg. Recordset.removeEmptyValues = yes

is there something like that?

Warm regards,

Glenn

former_member859847
Active Contributor
0 Kudos

Hi,

as per my understanding, u have teo record sets

i.e Recordset(bold one which has no fileds)

Recordet(which has two fileds)

if you use Recordset.field Separator-- 'nl'

nothing but ignoring the first record set

for second record set(which is not bold)

provide FCC parameters which i have provided previously.

still u r facing problem, try with

ignore recordset name - true

Recordset.fieldContentFormatting - ignore

note: here you have two record set i.e<Recordset>(blod)

<Recordset>(not bold).

warm regards

mahesh.