08-18-2009 5:39 PM
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é
08-18-2009 5: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
08-18-2009 5:50 PM
Hi,
i want to change it automatically while the idoc is processed in a Fubar.
Thank you
René
08-18-2009 5: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.
08-19-2009 9:00 AM
hi,
Yes this is what i mean.
But the attributes of the table are not clear to me.
But my problem is that i don´t know where i get the values from (e.g. parameter 1-4 etc)
Can you please tell me the relevant fields and how to get the values ?
Or can i use a standard function to change the idoc status ?
Thank you
best regards
Edited by: René Hölterling on Aug 19, 2009 11:16 AM
08-19-2009 2:04 PM
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.
11-12-2009 5: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