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: 

Error Message during iDoc population

Former Member
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

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

SuhaSaha
Advisor
Advisor
0 Kudos

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

Former Member
0 Kudos

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.

Former Member
0 Kudos

Hi,

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

EDI_DOCUMENT_STATUS_SET

BR,

Vijay

Former Member
0 Kudos

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