cancel
Showing results for 
Search instead for 
Did you mean: 

IDoc Error Processing workflow

Former Member
0 Kudos

Invoices are posted from SRM to ECC as IDocs whose message type is BBPIV. When there is an error in the IDoc input such as invalid IO and GL, invalid company code etc., these IDocs will be moved to status 51.

When IDoc is moved to status 51, work item need to be sent to approvers saying this IDoc has an error and need to be corrected. For this a workflow task needs to be developed.

In our system, there are two types of IDoc invoices sent to ECC. One is of type INVOIC01 and another is of type BBPIV01. There already exists a standard task TS00008057 which is activated for the event INPUTERROROCCURREDMM for IDOCINVOIC object type.

I shouldn't use the same event (INPUTERROROCCURREDMM) and IDoc object type(IDOCINVOIC) for BBPIV01, because responsible agents for both type of invoices are different in our company.

Please help us in getting this resolved. Also let me know if my approach is wrong towards this problem.

Thanks,

Rajesh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Rajesh,

Using the same BOR object and event for two different idoc types is not necessarily wrong. There are ways to differentiate the responsible agents based on the idoc type if needed.

Here is how I would solve this:

Prerequisite: you need to make sure that event IDOCINVOIC.INPUTERROROCCURREDMM is triggered when your BBPIV01 iDoc is in error. To check that, you can activate the event trace and test your idoc (activate with tx SWELS, display with tx SWEL).

If the event does not trigger then you need to find out which event is getting triggered (using the event trace as well).

Now the serious business:

1. Create a copy of standard task TS00008057 that will be used for when BBPIV01 iDocs are in error.

2. Link this task to your event IDOCINVOIC.INPUTERROROCCURREDMM in transaction SWETYPV

3. Check in SWO1 if you have an attribute that gives the idoc type (or anything else which you can use to determine wich workflow should start in each case).

If not you need to create a subtype of IDOCINVOIC and in the subtype create an attribute that returns the iDoc type. Then you would need to delegate IDOCINVOIC to your subtype.

4. Create start conditions (tx SWB_COND) in which you check that TS00008057 starts only when idoctype is INVOIC01 and your new task starts only when idoc type is BBPIV01.

Cheers,

Patrick

Former Member
0 Kudos

Hi Patrick,

Thanks for your answer. It is very helpful for me to proceed forward.

Thanks,

Rajesh