Skip to Content
avatar image
Former Member

set idoc status

Dear experts,

i have an idoc which i work with. My Problem is:

how can i set the idoc status to 51 and mark it as corrupted ?

or how can i let the system mark it like this if it is not possible to do it myself ?

Thanks a lot and best regards

René

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • avatar image
    Former Member
    Nov 12, 2009 at 05:51 PM

    Use program: RC1_IDOC_SET_STATUS to set the IDOC Status.

    Staus 68 is used when no further processing is necessary.

    Regards Ricky

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Aug 18, 2009 at 04:44 PM

    Hi,

    go to t-code > SWO1 >enter 'IDOCSTATUS' and execute -->enter idoc number and extecute

    -->next execute method 'STATUSPROCESS' and change the status to 51 or 53..

    Generally the 'Program RBDMANI2 for status 51 & 52' is used to change to 53.

    Regards,

    Prabhudas

    Add comment
    10|10000 characters needed characters exceeded

  • Aug 18, 2009 at 04:55 PM

    Do you mean from the IDOC process code? If so, you would append a record to the IDOC_STATUS table with STATUS = '51' and populate the other fields with the respective message values. Be more specific if this isn't what you're looking for.

    Add comment
    10|10000 characters needed characters exceeded

    • Presumably, the 51 status has been triggered by some error condition in your process code. That error condition should have a message associated with it. You should have a table or structure that stores these messages and then at the end of your processing, add those messages to the IDOC_STATUS table. You can also add messages for status 53 (such as the document numbers that you have created), status 68, or any other status value. Look at examples of standard process code and you'll see what I mean but here are a few code snippets:

      Conditional error message:

          GV_IDOC_ERROR_FLAG = 'X'.
          GV_STATUS          = C_IDOC_STATUS_51.
      
          MESSAGE E199(ZCORP) WITH GS_DEL-VBELN INTO GV_MESSAGE.
          PERFORM F9999_ADD_MESSAGE.
      

      Setting the status, adding the messages to the IDOC in a subroutine at the end of processing:

        CLEAR IDOC_STATUS.
      
        LOOP AT GT_MESSAGES INTO GS_MESSAGES.
      
          IDOC_STATUS-DOCNUM = P_DOCNUM.
          IDOC_STATUS-STATUS = GV_STATUS.
          IDOC_STATUS-MSGTY  = GS_MESSAGES-MSGTY.
          IDOC_STATUS-MSGID  = GS_MESSAGES-MSGID.
          IDOC_STATUS-MSGNO  = GS_MESSAGES-MSGNO.
          IDOC_STATUS-MSGV1  = GS_MESSAGES-MSGV1.
          IDOC_STATUS-MSGV2  = GS_MESSAGES-MSGV2.
          IDOC_STATUS-MSGV3  = GS_MESSAGES-MSGV3.
          IDOC_STATUS-MSGV4  = GS_MESSAGES-MSGV4.
      
          APPEND IDOC_STATUS.
          CLEAR  IDOC_STATUS.
      
        ENDLOOP.
      
        IF SY-SUBRC NE 0.
      
          IDOC_STATUS-DOCNUM = P_DOCNUM.
          IDOC_STATUS-STATUS = GV_STATUS.
      
          APPEND IDOC_STATUS.
          CLEAR  IDOC_STATUS.
      
        ENDIF.