Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How we will process error IDOC s.

Former Member
0 Likes
604

Hi Experts,

can any body tell me how we will process the idoc when we got the error.

Thanks in advance.

-Bhaskar.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
571

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.

4 REPLIES 4
Read only

piyush_mathur
Active Participant
0 Likes
571

Hi Bhaskar,

you can reprocess the IDoc from T Codr we19

Thanks

Piyush

Reward points, if helpfull

Read only

Former Member
0 Likes
571

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.

Read only

Former Member
0 Likes
571

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

Read only

Former Member
0 Likes
572

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.