2020 Oct 04 6:17 PM - edited 2024 Feb 03 7:26 PM
sending orders to sap failing due to trailing spaces in some fields of order:
while forming csv in datahub to send order to sap its failing due to extra spaces at the end of a purchase order number or any other field of order. In csv that extra space is treated as special character that is '|' symbol and its failing to send to sap. Is this OOTB behavior? If yes how to overcome this.
Request clarification before answering.
First, when you say "forming csv in datahub" what does it mean? Is it loading raw item into datahub in a csv file or the impex csv generated for exporting data out of datahub? In the former case, is that csv automatically generated? If so, can that process be adjusted or how easy is it to adjust the process loading data into DataHub to trim all trailing spaces in the file fields.
Second, regardless of the answer to the first question, you can adjust the canonical or target item model. Those models define the attribute transformation during composition or publication of the item as raw item passes through the datahub to finally be sent out to the target system. The transformations are defined as spel expressions applied to the underlying raw or canonical item respectively.
So, for example, you have something like this in the canonical model:
<transformation>
<rawSource>RawOrder</rawSource>
<expression>orderNumber</expression>
</transformation>or something like this in the target model:
<attribute>
<name>baseDescription</name>
...
<transformationExpression>orderNumber</transformationExpression>
</attribute>You can just add a call to trim() function for either one of them:
<transformation>
<rawSource>RawOrder</rawSource>
<expression>orderNumber.trim()</expression>
</transformation>or
<attribute>
<name>baseDescription</name>
...
<transformationExpression>orderNumber.trim()</transformationExpression>
</attribute>
So, a quick recap: see if data coming to datahub can be cleaned and trimmed of the spaces. If that is not possible or very hard to do, then datahub extensions can be customized to perform that trimming.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.