cancel
Showing results for 
Search instead for 
Did you mean: 

Change User-Status on campaign in a daily report

Former Member
0 Kudos

Hi Experts,

I have implemented a report to change the user-status on campaingns depending on some criteria.

To approve the status change I use the class "cl_crm_mktpl_appl_base" with the Method "status_change_extern".

When debugging my report I found out that the status is changed during runtime as expected, but it seems like the changes are not commited.

I tried also to add a "commit work and wait" and the end of my report, but without success (the method returns no error).

Additionanlly i checked the method "Save_and_commit" of the appl_base-class but this one didn't work, because it recognize no changes at all.

Does anyone have a clue what I might be doing wrong or if the my mentioned class is usable for my scenario in a report?

Any help would be highly appreciated.

Cheers

Dennis

Accepted Solutions (1)

Accepted Solutions (1)

former_member214667
Contributor
0 Kudos

Hi Dennis,

You should call save_and_commit( ) method of the appl_base class. However, the marketing objects are not saved if there is any error during save. So, you might need to debug into the save and commit method to figure out if that is the case. Also, what does save_and_commit( ) return for you?

Regards,

Shiromani

Former Member
0 Kudos


Thanks you shiromani and it worked well.  The method save_and_commit( ) to be called after any changes to campaign using BAPI or Method.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Shiromani,

just to give you a short reply:

I've managed to fix the commit-issue.

There were some other problems with a partner determination so the commit runs on an error, but after fixing these issues the commit works fine.

Many thanks to you and Carl for your support!

Cheers,

Dennis

Former Member
0 Kudos

Hi Carl and Shiromani,

thank you for your fast reply!

I guess I will give it a try to do this with functions if I just can get it running with the cl_crm_mktpl_appl_base-class.

As you suggested Shiromani the Save_and_commit gets an error in the assignment checks in the check_attributes-method.

So I probably have to take a closer look why this method is returning an error-flag. Unfortunately I am not getting an error message - only an error flag is set.

I will take a closer look at it today and keep you informed if I find out anything useful.

Cheers,

Dennis

Former Member
0 Kudos

Hi,

I also encountered issues in trying to change the status of objects via (BOL)-methods. It is best to do the status change via the Function Modules 'CRM_ORDER_MAINTAIN' -> 'CRM_ORDER_SAVE' -> 'BAPI_TRANSACTION_COMMIT'.

Kind regards,

Carl