SAP Function /SPE/RET_CHECK_ERROR_IDOCS - FM to check if Idoc has Error status

Parameter Reference Type Length Default Optional Text
IV_DIRECT EDIDC-DIRECT C 1 Direction for IDoc
IV_MESTYP EDIDC-MESTYP C 30 Message Type
IV_SEGMENT EDISYN-SEGTYP C 27 Segment type
IV_VBELN_FIELD EDIPAR0002-EDI_FIELD C 30 Segment field to be searched for value
IV_VBELN_VALUE VBELN_VL C 10 Delivery

Parameter Reference Type Length Text
EV_FOUND C C 0

Exception Text
NO_DATA_FOUND

Functionality
This function module checks if the IDoc for delivery entered has errors.This function module performs the following checks :

  • Select all the outbound IDocs with message type RETINS and status
  • as ERROR.
    • Search for the particular data record with the specified delivery number
    • (VBELN), for all the IDocs selected from above.
      • Set the EV_FOUND indicator as X (for further processing of
      • delivery and sending it to SAP ICH), if the entry is found.