cancel
Showing results for 
Search instead for 
Did you mean: 

How to change user status sequence for a status profile through code

Former Member
0 Kudos

Hi Experts,

I have a very peculiar requirement. There are certain rules which needs to be followed for the sequencing of the statuses in a status profile. This sequence settings can be maintained in SPRO through Status management. But we have a requirement wherein the sequencing can only be maintained to certain extent via SPRO.

Apart from that, when the user sets particular status, we need to manually override the settings in SPRO via STATUS BADI and assign new sequence based on current status message.

If anyone knows any FM/method or something to achieve the same, it would be really appreciable.

Useful answers will be rewarded with points.

Thanks in advance,

Karan

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Karan,

Did u try using the FM CRM_STATUS_UPDATE ? You can directly change status of any CRM object using this FM.

First, you need to read the active status of the CRM object using FM CRM_STATUS_READ. Then add 1 to the change number count and apply new status (insert or update) using CRM_STATUS_UPDATE.

Hope this helps,

Raviraj

Former Member
0 Kudos

Hi Karan

Try to use BADI definition CRM_ORDER_STATUS and create new implementation. Here you can change the status. Use which ever method you want before or after change.

Regards

Muthu

Former Member
0 Kudos

Hi,

I know which BADI to user and which method to write the code in. But i do not know the FM which will allow me to chage the status sequence through the code.

I want to change the status sequencing.. Not the status. That is, once the status is changed to say X, and if as per the setting in SPRO, the subsequent status can be Y and Z, I want to change that to A and B through the code.

Regards,

Karan