SAP ALEClient Adapter

When posting data to an SAP IDOC using the 4.2 SAP ALE-Client Adapter, the data written to the IDOC segment field becomes truncated. Does the SAP adapter retrieve field lengths from SAP and truncate based on this value? As I understand, everything is Unicode-String and the SAP Adapter should pass the data to SAP without truncation. In my test example, the “ENTRY_QNT” segment field data is truncated to 13 characters even though SAP has this field defined as 15 characters. Does SAP truncate this data based on “Internal Length” instead of “External Length”? As a side note, I can populate this field with 15 characters when using the IDOC Test Tool. As such, I should also be able to populate this field with 15 characters when posting data using the SAP Adapter. Has anyone else seen this behavior?

ENTRY_QNT : Quantity in unit of entry
internal data type : QUAN
Internal length : 000013 characters
000003 decimal places, without sign
Position in segment : 014, Offset : 0154. external length : 000015



You need to talk to the SAP developer who specified this IDOC and find out the length of this required field (actually he should have a spreadsheet about this IDOC that you can use for reference) and then process this piece of data properly. One thing you can do is: ask the SAP developer to change the length of the field in SAP to 20 to see if the value gets truncated. Pls notice this field in SAP has decimals…which has to be handled with care. Acutally, you can use trace step to see the data field by field posted over to SAP.

Hope it helps.