12-01-2009 4:46 PM
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
12-01-2009 6: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.
12-01-2009 5: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
12-01-2009 5: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.
12-01-2009 5:58 PM
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
12-01-2009 6: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.
12-01-2009 6:16 PM
Thanks Brad Bohn . I totally agree with you.
Do u think is better to set the idoc status with msgty = 'E' or 'W' or 'I' ?
Thank a lot.
You have 10 points!!!!
12-01-2009 6:43 PM