08-12-2008 9:05 AM
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.
08-12-2008 9: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.
08-12-2008 9: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.