cancel
Showing results for 
Search instead for 
Did you mean: 

Fields with SPACES supressed in FCC: How to avoid it

Former Member
0 Kudos

Hi All,

I have a field with a maximum length '100' on the file. ( In real time it may have 80 characters and 20 spaces in it)

Using FCC,when I capture it, it passes back only 80 characters and ignores the blanks (spaces). So my FCC output field is now only 80 character long. ( 20 chars are missing as they were spaces)

How can I make sure that FCC captures even the spaces(blanks) in such a field.

Regards

Shirin

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Specify below parameter in content conversion

NameA.fieldContentFormatting = nothing

It will capture blank spaces as wel...

please take a note.. SXMB_MONI payload window will not show you these white spaces

to see these spaces in SXMB_MONI, right click to payload window --> view source... this will open payload in notepad .. here you will see those blank spaces...

Former Member
0 Kudos

in case the problem is still not solved,

use the FCC paramter fieldContentFormatting, it has 2 values TRIM and Nothing ,. TRIM is the default

use the FieldName.fieldContentFormatting = nothing, no spaces would be trimmed.

Regards

Abhishek

Former Member
0 Kudos

Hi,

what is FCC please?

But generally - no mapping removes spaces unles you trim the string or use such a function. PLEAS REMEMBER, that when you open a message in SXMB_MONI, it uses IE functionality to display a XML document, so it really "shrinks" visually when there are several spaces next to each other, but this is only visual interpretation. When you click right button on the mouse and choose view source of the message, you'll see all the spaces are there.

Peter

former_member194786
Active Contributor
0 Kudos

FCC stands for File Content Conversion.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi,

I checked the source of message in Sxmb_moni. It also has removed the spaces.

I had another idea: Is theer any XSD data type which can be defaulted to a particular length.

For example in ABAP if I define a variable of type 'N' like

Data: Variable(18) type n.

Here the initial value by default is '000000000000000000'

(18 zeroes).

If I pass a value 9999 to it, then its value is '000000000000009999'.

(Hope you got my point)

So similarly can we have such a data type in XSD which by default willhave spaces in it, so when I pass any data string, it will append the remaining data length(if less) with spaces.

Any ideas.

Regards

Shirin

former_member194786
Active Contributor
0 Kudos

Hi Shirin,

There is a function formatNum which does the same thing, i.e., it fills the blank spaces with the character provided by you. Try it.

Hope it helps.

Regards,

Sanjeev.

Former Member
0 Kudos

Hi Sanjeev,

In my scenario, I am readinga text file and one of the field is 100 characters length.( It may have all 100 characters or partial characters and partial spaces...but definitely 100 length in the file.

Now when I have got this field from FCC, in my Message mapping, I am using the substring function to split this field in 10 different fioelds of length 10 each.

So if FCC returns less than 100 characters, I get a runtime message transformation exception

Exception:[java.lang.StringIndexOutOfBoundsException: String index out of range:

So in this case I can not use the formatnum function as the problem is at FCC level and 'Formatnum' function is used at Message mapping level.

All I want to do is read the entire 100 charcters from file and then split them into 10 diff fields. But if theer is an alternate way, plz let me know.

Thanks

Shirin