Application Development 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: 

How to set the status when Idoc fails

Former Member
0 Kudos

Hai ,

I created Idoc extension & created a segment under that(Delivery related).

My requirement is,

if certain data not found,

Idoc should fail with text"Shipemnt for delivery <del. No> not found.

Could you please help me how to do this?

I checked the table EDIDC table but the above mentioned status is not there.

Thanks & Best Regards,

Bhaskar.

2 REPLIES 2

Former Member
0 Kudos

Hi,

Try this.

You will be using an exporting parameter of type BDIDOCSTAT.

In that set the status as 51. For the message, there are fields like MSGV1, MSGV2, MSGV3 and MSGV4.

Assign your messages to those fields. It will show those error messages in we02.

Sharin.

former_member188685
Active Contributor
0 Kudos

you need to set the status using IDOC_STATUS

where ever error occurs populate the status table.

IDOC_STATUS-DOCNUM = IDOC_CONTRL-DOCNUM.
   IDOC_STATUS-STATUS = '51' ." if it is inbound
   IDOC_STATUS-MSGTY  = Message-type.
   IDOC_STATUS-MSGID  = message-id.
   IDOC_STATUS-MSGNO  = message-MSGNR.
   IDOC_STATUS-MSGV1  = message-MSGV1.
   IDOC_STATUS-MSGV2  = message-MSGV2.
   IDOC_STATUS-MSGV3  = message-MSGV3.
   IDOC_STATUS-MSGV4  = message-MSGV4.
*  IDOC_STATUS-SEGNUM = ?????????????????
*  IDOC_STATUS-SEGFLD = ?????????????????
*  IDOC_STATUS-UNAME  = ?????????????????
   IDOC_STATUS-REPID  = SY-REPID
*  IDOC_STATUS-ROUTID = ?????????????????
   APPEND IDOC_STATUS.