‎2008 Jan 21 10:32 AM
Hi Experts,
can any body tell me how we will process the idoc when we got the error.
Thanks in advance.
-Bhaskar.
‎2008 Jan 22 4:43 AM
If you know the IDoc number, you can use FM IDOC_GET_MESSAGE_ATTRIBUTE to get the error message.
Otherwise, you can go to transaction WE02/WE05 and BD87 to find the error.
Goto EDIDS Table and u can get the idocs with errors,all the idoc with status will be stored in this table only.
Reward points if useful.
‎2008 Jan 21 12:29 PM
Hi Bhaskar,
you can reprocess the IDoc from T Codr we19
Thanks
Piyush
Reward points, if helpfull
‎2008 Jan 21 12:51 PM
GOTO--- WE19
EXISTING IDOC ->PRESS F8-> PUT YOUR POINTER ON IDOC -> CLICK ON -INBOUND FUNCTION MODULE -> THEN PRESS F4 THEN SELECT FM FROM THERE -> THEN U CAN SELECT -> IN BACKGRROUND/IN FOREGROUND OR IN FOREGROUND AFTER ERROR.
AFTER THESE PROCE I THING YOUR PROBLEM WILL.............
***********************************
IF THIS THING HELP FULL TO U GIVE ME MAX REWAD POINTS.
‎2008 Jan 22 2:46 AM
Hi Experts,
can any body tell me how we will process the idoc when we got the error.
Thanks in advance.
-Bhaskar.
Hi,
When an IDOC have some errors you need to set status for this IDOC by filling table IDOC_STATUS( IDOC_STATUS STRUCTURE BDIDOCSTAT) and table RETURN_VARIABLES (RETURN_VARIABLES STRUCTURE BDWFRETVAR).
code sample:
LOOP AT IDOC_CONTRL.
Set IDOC status
CLEAR IDOC_STATUS.
IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
IF FLAG_ERROR_HAPPENED = C_FALSE.
IDOC_STATUS-STATUS = '53'. "OK!
JH/02.02.98/4.0C KPr100004993 (Anfang)
Fill Return variables
CLEAR RETURN_VARIABLES.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
RETURN_VARIABLES-WF_PARAM = 'Processed_IDOCs'.
APPEND RETURN_VARIABLES.
Verknüpfungseintrag anlegen
READ TABLE T_IDOC_MATNR WITH KEY DOCNUM = IDOC_CONTRL-DOCNUM
BINARY SEARCH.
IF SY-SUBRC = 0.
RETURN_VARIABLES-DOC_NUMBER = T_IDOC_MATNR-MATNR.
RETURN_VARIABLES-WF_PARAM = 'Appl_Objects'.
APPEND RETURN_VARIABLES.
ENDIF.
JH/02.02.98/4.0C KPr100004993 (Ende)
ELSE.
IDOC_STATUS-MSGID = I_MERRDAT-MSGID.
IDOC_STATUS-MSGTY = I_MERRDAT-MSGTY.
IDOC_STATUS-MSGNO = I_MERRDAT-MSGNO.
IDOC_STATUS-MSGV1 = I_MERRDAT-MSGV1.
IDOC_STATUS-MSGV2 = I_MERRDAT-MSGV2.
IDOC_STATUS-MSGV3 = I_MERRDAT-MSGV3.
IDOC_STATUS-MSGV4 = I_MERRDAT-MSGV4.
IDOC_STATUS-STATUS = '51'. "ERROR!
Fill Return variables
CLEAR RETURN_VARIABLES.
RETURN_VARIABLES-DOC_NUMBER = IDOC_CONTRL-DOCNUM.
return_variables-wf_param = c_wf_par_processed_idocs.
RETURN_VARIABLES-WF_PARAM = 'Error_IDOCs'.
APPEND RETURN_VARIABLES.
WORKFLOW_RESULT = 99999.
ENDIF.
APPEND IDOC_STATUS.
ENDLOOP.
Regards,
Gy
‎2008 Jan 22 4:43 AM
If you know the IDoc number, you can use FM IDOC_GET_MESSAGE_ATTRIBUTE to get the error message.
Otherwise, you can go to transaction WE02/WE05 and BD87 to find the error.
Goto EDIDS Table and u can get the idocs with errors,all the idoc with status will be stored in this table only.
Reward points if useful.