cancel
Showing results for 
Search instead for 
Did you mean: 

FieldFixedLengths

harish_babu5
Participant
0 Kudos

Hi

Segment1

Segment2

     Segment7

     Segment3

          Segment8

          Segment4

     Segment5

Segment6

I have a complicated structure

I am using FieldSeperator and I am getting errors

I thought of using FieldFixedLengths

Client wants structure in a string without any seperator

Segment one in first line, with five fields

Segment two in second line, with around fifty fields

The problem is some of the fields that are not mandatory are not coming

For ex: In Segment 2, field seven is dynamic

It can have either some value or it may not have any value at all

Requirement is it should occupy forty spaces. So I used a udf. If there are five fields, I use thirty five spaces. I there are no values at all I pad forty spaces.

1) If I empty spaces for an entire field, will the communication channel treat it as a field or throw errors?

Secondly, I was not able to seperate segment two and segment three into different lines. Both these segments occur unlimited times and the first field of the third segment comes in second segment only. So I used a dummy segment seven.

Similary I used a dummy segment eight to get segment three and segment four in seperate lines

2) Will these dummy fiels throw error in FCC?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Dear Harish,


If I empty spaces for an entire field, will the communication channel treat it as a field or throw errors?

Yes if u use FieldFixedLengths  then u will get error in CC since lenght will not be match for empty fields

Secondly, I was not able to seperate segment two and segment three into different lines. Both these segments occur unlimited times and the first field of the third segment comes in second segment only. So I used a dummy segment seven.

I think , u can separate the segments with FCC but there is no harm in ur logic also

and dummy fields should not throw any error.

Note :- I m not sure but FCC and MTB can handle only 3 level hierarchy so please take care of this thing while adding dummy fields .

harish_babu5
Participant
0 Kudos

Hi Rudra

Thanks for the suggestions

There are only three hierarchy levels Segments 1, 2 and 6 at same level, segments 7,3 and 5 at another level and segments 8 and segments 4 at third level.

I have this issue with using FieldFixedLengths.

Some fields come with no values in the target IDoc. So I will pad spaces in udf.

If field A has value harish, field b is empty and field c is consultant

it would be a string like this harish          consultant

Second field having ten spaces.

In FieldFixedLengths I would specify it as 6,10,10

This is apparently not working with FCC, any work arounds?

I cannot use FieldSeperator in this scenario

Regards

Harish

Former Member
0 Kudos

Dear Harish,

with fixedfieldlengh i dont think we can achieve ur requirement but in place of separator use can tab separator  so i will help u  and u wont get any separator.

Please check once.

Warm Regards,

Rudra

Answers (0)