cancel
Showing results for 
Search instead for 
Did you mean: 

Can I intercept the update of PO status?

0 Kudos

Hi all,

I have to call an RFC every time a Purchase Order changes its status. For example when a PO is ordered or when it is approved and so on...

When the system update the status of a document?

There is a BADI or a FM in which I can put my RFC?

Thanks.

Norberto.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

You can implement BBP_DOC_CHANGE_BADI for PO (bus2201) method BBP_PO_CHANGE.

This BADI is called whenevr you change the PO.

BR,

Disha.

Pls reward points for useful answers.

0 Kudos

Hi disha,

I have just considered this option but there is the problem that I can't control if the status is changed or not. For example if the PO is only saved, an user can change the PO. After he can only save the PO again, so the status will not change. In the method's interface ther isn't the status information, with wich I can check if the status is changed or not. So the FM will be called every time a PO is changed, not only when the status will change.

BR,

Norberto.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

What is your business requirement ? When do you need to checnge the status from XXX to ZZZ ?

Regards,

Masa

0 Kudos

Hi Masa,

I need to call an RFC every time the status of the PO is changed. All the further elaborations are made in the remote system in wich the RFC are defined. Our main problem is to intercept when the status is changed.

Regards,

Norberto.

masa_139
Product and Topic Expert
Product and Topic Expert
0 Kudos

I have not tested this in SRM but Workflow can rise event when document is changed. Steps are like this. Change Document -> Event -> WF -> task -> call function. Please check the transaction SWED and Change Doc object CRM_ORDER. If you need to call a FM before changing the status, this solution is not valid.

Regards,

Masa

0 Kudos

Hi Masa,

thanks for your reply.

We have already attempted this but with no success. For this situation the F.M. wasn't called in the creation of the PO, in addition we had problem when the successive documents (confirmation, goods receipt...) are created. Meanwhile the prerequisite of the implementation are changed: now for the externel system is sufficient to receive an asincronous comunications of the situation of all the PO one times/day.

Thanks all, Norberto.