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

Error Message during iDoc population

Former Member
0 Likes
2,312

Hi. We have a custom FM for populating segments of the idoc.

We have a scenario wherein if a certain condition is met, we want that the idoc should still be created but will be in error, probably status 51.

Will raising an error message or an exception do this? Or will doing so stop the creation of the idoc?

if <condition>

Message e999 with 'idoc in error'.

endif.

What approach should best be taken?

1 ACCEPTED SOLUTION
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,167

In the inbound IDoc processing function module there is a TABLES param(viz., IDOC_STATUS) which is of type BDIDOCSTAT where you set the status of the IDoc.

Check the structure BDIDOCSTAT, you'll understand how to pass the status & the corres. message details.

We have a scenario wherein if a certain condition is met, we want that the idoc should still be created but will be in error, probably status 51.

Status 51 is relevant for inbound IDocs & not outbound IDocs. Which scenario are you working on?

BR,

SUhas

Edited by: Suhas Saha on Nov 9, 2011 4:21 PM

4 REPLIES 4
Read only

SuhaSaha
Product and Topic Expert
Product and Topic Expert
0 Likes
1,168

In the inbound IDoc processing function module there is a TABLES param(viz., IDOC_STATUS) which is of type BDIDOCSTAT where you set the status of the IDoc.

Check the structure BDIDOCSTAT, you'll understand how to pass the status & the corres. message details.

We have a scenario wherein if a certain condition is met, we want that the idoc should still be created but will be in error, probably status 51.

Status 51 is relevant for inbound IDocs & not outbound IDocs. Which scenario are you working on?

BR,

SUhas

Edited by: Suhas Saha on Nov 9, 2011 4:21 PM

Read only

Former Member
0 Likes
1,167

Hi. Sorry. We are working on outbound idocs.

Yeah not status 51, i just revisited the list of idoc status. Basically, what we want to happen is to create the idoc but it will be in Red status.

Read only

Former Member
0 Likes
1,167

Hi,

After IDOC creation set the status '02' by using below mentioned FM.

EDI_DOCUMENT_STATUS_SET

BR,

Vijay

Read only

Former Member
0 Likes
1,167

Hi,

Make use of the control record and set the status to 51 which will make the idoc into error status. Triggering error while idoc generation will not be good idea to do this.

Regards

Senthil