Synax error in SAP when idoc is posted

Hi every one,

I am sending DELINS idoc to SAP. But when I have seen in the SAP, I found a syntax error. The hierarchy of the segments is not present. All the segments are at the 001 level.
Before sending the idoc, I rechecked the structure. The order of the segments is fine. I am using the below sequence.

The transformHierarchyToFlat service is not returning any HLEVEL attribute for the segments. And it doesn’t for other idocs also (ORDERS, DESADV ect) which are successfully posted. What might be the solution?

Using WM 6.5 and sending only one idoc at a time.


I found that a null segment in IDOC was causing this problem. After I removed the null segment, the idoc was recognized in SAP. Pretty strange.:confused: