Skip to Content
author's profile photo Former Member
Former Member

How to set the status when Idoc fails

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Aug 12, 2008 at 08:12 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 12, 2008 at 08:20 AM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.