Skip to Content
0
Former Member
Mar 03, 2009 at 09:49 PM

Multiple idoc status records for an inbound idoc

669 Views

Hi,

I'm developing a custom idoc function module and we'd like to capture all the messages including warnings, errors, etc. My internal table of IDOC_STATUS might have a '52' if some data is incomplete along with a '51' if the data error is more severe.

The ALE layer doesn't seem to recognize the highest level of error in the IDOC_STATUS table.

I am setting the IDOC_CONTRL-STATUS to '51' so I'm not sure how ALE decides the final status of the IDOC.

Am I supposed to sort the IDOC_STATUS table? Am I not supposed to include minor errors in the table after I encounter a more severe one?

Thanks for any suggestions you can offer,

Ray

if ls_data-matnr is initial.
  perform append_status using 'matnr' '51'.
endif.
if ls_data-arktx is initial. "less severe
  perform append_status using 'arktx' '52'.
endif.

form append_status using p_fnam p_stat.
if p_stat = '51'.
  idoc_contrl-status = '51'.
endif.

idoc_status-status = p_stat.
idoc_status-msgv1 = p_fnam.
...
append idoc_status.
endform.