NULL values in incoming IDOC are replaced by a space

I am using the ALE_Server adapter for webMethods enterprise 4.1.1 on windows NT.
In the IDOC that is sent from SAP there are some fields that have NULL values, however when I debug the adapter and it receives the IDOC these NULL values are replaced by a space. This is creating problems when inserting records in a database since for these fields a space is not an allowed value. I also set the flag allow unset values on the integration component but this doesn’t make a difference.

How can I fix this? Thanks!

How about writing a common operation that is a Java script which trimes white space using java.lang.String.trim() ???

is there a way to clear the spaces from the complete idoc at once? or would this have to be done field by field?
is this “normal behaviour” of the adapter that null values are replaced by spaces?

If you are using insert statement to insert data into say Orcale , you can use decode and NVL functions so that the insert does not fail.