Skip to Content
avatar image
Former Member

Change idoc status to 64

Hi everybody.

I have scheduled the report RBDAPP01 to process an inbound idocs. In some cases Id like that the idoc was reprocessed in the next execution of the job and d

Id like to know if it´s enough to change the idoc status to 64.

Thanks a lot

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Dec 01, 2009 at 06:01 PM

    It's not necessarily a 'strange requirement'. I can think of several scenarios where this might make sense. You don't need to set the status to '51' and you certainly don't need to use that function given. You can 'defer' processing and basically do nothing in the IDOC process code. Your IDOC should already be in a '64' status (unless it's '66' and you should not change that) so you can keep the status as-is. You can choose to add a message or not - personally, I would add a message to indicate that the IDOC was 'processed but deferred'. Now, if you're doing this as some sort of serialization technique, you may want to look into using that process instead if it makes sense for you.

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 01, 2009 at 05:10 PM

    You can use this sample.

     DATA       L_IDOC_STATUS_TAB LIKE BDIDOCSTAT OCCURS 1 WITH HEADER LINE.
        L_IDOC_STATUS_TAB-DOCNUM = IDOCCONTROL-DOCNUM.
        L_IDOC_STATUS_TAB-STATUS = '64'.
        APPEND L_IDOC_STATUS_TAB.
    
    
        CALL FUNCTION 'IDOC_STATUS_WRITE_TO_DATABASE'
             EXPORTING
                  IDOC_NUMBER               = IDOCCONTROL-DOCNUM
             IMPORTING
                  IDOC_CONTROL              = IDOCCONTROL
             TABLES
                  IDOC_STATUS               = L_IDOC_STATUS_TAB
             EXCEPTIONS
                  IDOC_FOREIGN_LOCK         = 1
                  IDOC_NOT_FOUND            = 2
                  IDOC_STATUS_RECORDS_EMPTY = 3
                  IDOC_STATUS_INVALID       = 4
                  DB_ERROR                  = 5
                  OTHERS                    = 6.
    

    you can set

    L_IDOC_STATUS_TAB-STATUS = '64'.

    to your final status

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 01, 2009 at 05:15 PM

    Thats a strange requirement. The only reason i could think off where we would need to reprocess the idoc is if there was some failure. If that is the case i think it makes more sense to let the idoc go to 51 status and then schedule a sweep job with program RBDMANI2 to reprocess all the failed idocs.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hello,

      Indeed a strange way of working.

      Previous post makes a lot of sense, it is better to put the status in 51(error) and reprocess the IDOC via the specified report.

      In case you want correctly posted IDOCs in status 53 be processed again, you can use following report to change the IDOC status back to 64.

      RC1_IDOC_SET_STATUS

      Wim