I have a Java application that uses SAP JCo 3 libraries. One of the use cases consists of receiving a IDoc file from the SAP instance (R/3, ERP 6.0 EhP 7) and convert it to XML. The problem is that, during the conversion (executed by the IDoc library), the right spaces at the end of the fields get trimmed. Apparently, to reduce the message size. So far, I haven't found any configuration that can be done from the Java side.
Searching the net, I found the following suggestions from the SAP side:
whiteSpace=preserve
from the XSD Editorxml.fieldContentFormatting=nothing
in the Sender File/FTP
AdapterHowever, I haven't been able to find those tools nor configure them accordingly.
I would appreciate any insights on these two approaches or any other solution.
The SAP Java IDoc Class Library does not offer an option to preserve trailing SPACES in the IDoc fields.
Trailing SPACE characters in IDoc fields do not serve any purpose as long as the IDoc will be sent to another SAP system in the end again. In this case they really would only enlarge the XML message size without adding any value.
I currently cannot imagine for what reason you would like to keep those trailing SPACES? SPACE characters are the default initial value for ABAP CHAR type fields, so you also cannot know if some of these characters would have been set by intention or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With