I am creating an inbound IDoc using ABAP. I have successfully created the IDoc, but I am getting errors, I believe because of the format of the Data Records in the IDoc. Here are the fields for the Data Records:
MANDT - using sy-mandt
DOCNUM
SEGNUM
SEGNAM - populating with segment name
PSGNUM
HLEVEL
DTINT2
SDATA - populating with data based on segment format
Can somebody either explain, or provide a link to instructions on how the other elements should be populated. I am getting a "flat" IDoc, and I think it's because I am not populating the hlevel, and possibly other elements, properly. I'm just not sure what to put in these elements to show the correct hierarchy of the IDoc.