cancel
Showing results for 
Search instead for 
Did you mean: 

Activity Update using FM crm_order_maintain

Former Member
0 Kudos

Hi,

I have requirement to upload mass activities and update their status.

I am using logic where I first create the activity in initial status. This gives me the GUID of created activity.

Then, I pick up the GUID and use it to update the status using CRM_ORDER_MAINTAIN to update the status.

I am getting error 'Express document "update was terminated" received from author error.

To clarify, the activity is successfully created but the above error is happening when I pick up the GUID and try to update the status using FM's.

I have also tried using other FM's like CRM_STATUS_MAINTAIN_OW and am getting the same error.

Is it because I created the activity in the same program and then tried to update it?!

Regards,

Prasad

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Prasad

Is there a commit of the data prior to the CRM_ORDER_MAINTAIN.

If the data is not committed at this point the data will not be resident for the update to occur.

Regards

Arden

Former Member
0 Kudos

Hi Arden,

I can see the Activity created in crmd order Tcode as well as running crm order read program.

I am able to manually manipulate the created order too!

But some how using standard FM's to change the order does not seem to work!

Could it be because the creation & status change is happening in the same program that is causing this error?

Regards,

Prasad

dharmakasi
Active Contributor
0 Kudos

Hi Prasad,

Generally it should allow you to update the document after creation, you are calling the crm_order_save or some other save function module before trying to update the status?

You can try CRM_ORDER_INITIALIZE by passing the activity guid before trying to update the status value of the document.

Regards,

Dharmakasi.

Former Member
0 Kudos

Hi Dharmakasi,

I am using CRM_PS_ACTIVITY_CREATE to create the activity. It has CRM_ORDER_SAVE called inside it.

I am also doing BAPI_TRANSACTION_COMMIT after this step.

And I am using FM 'CRM_ORDER_MAINTAIN_MULTI_OW' to update the status.

The St22 dump is in attachment

Regards,

Prasad

Former Member
0 Kudos

Thanks Dharmakasi.

Using CRM_ORDER_INITIALIZE did the trick.

Wondering why there is a need to initialize the order even after BAPI commit?!

Want to know why this happened though..any theories?

Regards,

Prasad

Former Member
0 Kudos

Hi Prasad

I think you'll find it is standard behaviour to run the initialise after commit.

We've had to apply it into loads of custom developments where we update One Order Objects

Regards

Arden

Former Member
0 Kudos

Thanks Arden.

Good to know that, will keep it in mind going ahead!

Regards,

Prasad

Answers (0)