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

Workflow with invoice posting

Former Member
0 Likes
1,726

Hi,

I have to trigger a workflow at the time of invoice posting. i am facing following 2 problems there.

1. i have tried with business object BUS2081, BKPF & BSEG, workflow is triggered after MIRO but if we try to post document using any other transaction such as FB60 or FB01, workflow is not triggered.

2. After posting a document thru MIRO, workflow is triggered but task is not executed. i can see work item in status READY but it is not executing it. i have not set any specific start condition.

can anyone help me here.

Thanks,

Komal.

7 REPLIES 7
Read only

Former Member
0 Likes
1,182

Hello Komal,

You can try using BTE, transaction FIBF..

And use P/S event

00001050 POST DOCUMENT: Accounting Interface

Basically this involves creating a function module..

You will see more info in the documentation..

You can create your event using SWE_EVENT_CREATE_FOR_UPD_TASK /SWE_EVENT_CREATE

this way you trigger your workflow when the accounting document gets created..

Hope this helps..

Regards,

Samir.

Read only

0 Likes
1,182

Hi,

Thanks for your replies.

event trace i have tried but nothing is coming. event is not generated at all.

BTE i have not used yet so i will read some documentaion and try that. meanwhile i found some SAP notes also regarding this i.e. note number 336305 and related notes. i have created function module but note is instructing to add this function module in BF34. in BF34 it is asking for "customer product" which we have to create in FIBF with some RFC dest etc. what is that. since i am not using any external system what i should use there.

Thanks,

Komal.

Read only

Former Member
0 Likes
1,182

Hi,

Maybe you can activate the event trace and than do your transactions (invoice posting). Than have a look and the event trace and see which objects you can use.

If not, use solution suggested in previous reply.

Regards,

JG

Read only

Former Member
0 Likes
1,182

Hello Komal,

You do not need to maintain the RFC destination, just create Product, anything name is fine.

There is not complex about BTE, think of it like this instead of having a fixed user-exit. They went one step further to have ehancement based at 3 levels, SAP, Partner and Customer..

In you case you treat this function module as function exit and proceed.

Regards,

Samir,

Read only

0 Likes
1,182

Hi Samir,

Thanks! i have configured BTE for post event and now it is generating event with document posting.

my worflow is also now getting processed. i had created it as dialog workitem and had not assigned any agent. but now i have change the type as background item since user interaction is not required and it is processing it properly.

Regards,

Komal

Message was edited by: Komal Rani

Read only

0 Likes
1,182

Komal,

I have the same problem with invoice posting. Could you explain me the procedure how you solved this. I would really appreciate if you could provide me with your FM code as well.

I really appreciate if any other can respond on this.

Thanks in advance

venu

Read only

Former Member
0 Likes
1,182

Komal,

I know it's been a long time since you did this, but I'm having the same problem. You wouldn't happen to have a copy of your function module and how you configured BTE lying around, would you?

Thanks,

Scott