cancel
Showing results for 
Search instead for 
Did you mean: 

Automatic Support Team determination upon User Status change

Former Member
0 Kudos

Hi,

I would like to implement an automatic partner determination logic to change Supply Team on the Support Message when user Status is adjusted.

I have copied the Action Profile SLFN0001_ADVANCED to ZLFN0001_ADVANCED.

I have copied action ZLFN0001_ADVANCED_FIND_PARTNER to ZLFN0001_ADVANCED_SET_PARTNER.

I would like to change the implementation of the method CRM_DNO_PARTNER_1 so that it is triggered upon saving the Support Message instead of when Message is created.

Now I need to enhance the rule 13200137 (CRM_DNO_1), adding a container User Status. And here comes the question:

How can I find the object User Status to add as a container?

Thanx,

Adam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Adam,

you can find the status values in table TJ30.

Regards,

Christoph

Former Member
0 Kudos

Hi Christoph,

tried to refer to TJ30-ESTAT as a container in Rule maintenance. During saving, the system automatically changed its definition: it selected the last radio button (ABAP Dict. Data Type) instead of the middle one which I used (ABAP Dict, Reference), and applied J_ESTAT in the value field.

When Simulating the Rule Resolution, I could not have the system find the specified Support Team. I am not sure if the BAdI implementation behind "knows" that it should check the value of TJ30-ESTAT... In other words, the new container "User Status" seems to be incorrect

Former Member
0 Kudos

Hi Adam,

all container values are filled function module CRM_DNO_READ_PARTNER_WFRULE, called from BADI implementation CRM_DNO_PARTNER_1.

You can add new container to the rule, but since it is not filled in the above function module, it has no effect at all.

If you want to use new container values, you have to copy both implementation and function module and do the data selection for your new container yourself.

Regards,

Christoph

Former Member
0 Kudos

OK, it sounds promising.

Now I am going to:

1 - copy FM CRM_DNO_READ_PARTNER_WFRULE to ZCRM_DNO_READ_PARTNER_WFRULE, and define a selection for the new container

2 - copy the BAdI implementation CRM_DNO_PARTNER_1 to ZCRM_DNO_PARTNER_1 and replace the FM call to my new FM

3 - Change the Processing type of action ZLFN0001_ADVANCED_SET_PARTNER so that is uses the new BAdI implementation

4 - Use the new container in the Responsibilities in rule CRM_DNO_1

Did I understand your instructions correctly?

Former Member
0 Kudos

... maybe I can enhance the FM so that I don't need to touch the BAdI implementation, neither the Processing Type of the Action...

Former Member
0 Kudos

Hi Adam,

yes you got it right.

Enhancement is not practical in this case, since the container filling is done in the middle of the coding and you can only enhance at start and end.

Regards,

Christoph

Former Member
0 Kudos

Thanks a lot Christoph and everyone replying.

Have a nice day.

Ádá

Former Member
0 Kudos

Christoph,

I managed to enhance the Function Module, now it works fine, thanks again. However, I notice that once the Support Team field has a value, the status change does not modify it anymore. If I delete the Support Team and save, it looks up the corresponding Support Team, using the rules I defined based on the User Status.

Are there any settings to force the Action to overwrite the existing Support Team value?

Thanks in advance,

Ádá

Former Member
0 Kudos

Hi Ádám,

in your BADI implementation ZCRM_DNO_PARTNER_1 the function module CRM_DNO_UPDATE_PARTNER sets the new partner, but it has the flag iv_only_when_initial set, so it only does something when there is no partner yet.

If you delete this flag, i think he will not overwrite the existing partner but just add the new partner so that you have two partners in the message!

What you can try is to call function module SOCM_CRM_PA_DELETE_PARTNER before CRM_DNO_UPDATE_PARTNER to delete the existing partner function, then it should work.

Regards,

Christoph

Former Member
0 Kudos

Ooops! When posting a support message from either a satellite system or from SM by selecting Help / Create Support Message, I receive an error message "Because of error 513, no message was created in Support Desk System. Message no. BCOS005". Tx NOTIF_CREATE still works, though the partner determination is missing.

What I have done since it worked last time:

1) Copied Action Profile SLFN0001_ADVANCED to ZSLFN0001_ADVANCED, renaming all included actions to Z...

2) I copied the BAdI Implementation CRM_DNO_PARTNER1 to ZCRM_DNO_PARTNER1.

3) I added the same filters to the new method, and copied the same code into the implementation. Activated the code and the BAdI Implementation.

4) Assigned to the Action Profile to Transaction Type SLFN

Any Idea what went wrong?

Former Member
0 Kudos

Hi,

Error 513 is sadly a very very gerneral error and can mean almost anything.

Did you change the transaction type to a Z-type like ZLFN? Then it could be authorizations in the RFC users which create the message.

Did you define the conditions to your new action profile?

If thats all ok you could try to deactivate your partner determination action und check if it works then. A dump in your programm could be the reason for error 513 in the satellite system.

Hope this helps,

Christoph

Former Member
0 Kudos

Yes, I forgot to set the Conditions of the Action Profile. THANKS!!

Former Member
0 Kudos

Hi Christoph,

I experience some strange behavior when testing FM SOCM_CRM_PA_DELETE_PARTNER. It locks the Message, I can't edit it until I log off completely. At the same time, Business Partner SLFN0003 is not removed from the Message, although the FM displays the GUID of the Message as successfully saved... Did you experience the same? Being a FM, it should take care of unlocking... I keep on testing

Best regards,

Ádá

Former Member
0 Kudos

... and regarding calling FM 'CRM_DNO_UPDATE_PARTNER': in case iv_only_when_initial = ' ', the program gets into an endless loop, calling the method of the BAdI implementation again and again... So I assume the only walkable way is to set iv_only_when_initial = 'X', and try to delete the Support Team assignment previously.

Ádá

Former Member
0 Kudos

Hi Adam,

i got this from function module SOCM_CRM_PA_ACTUAL_PARTNER, which changes the acutal processor in a message in ChaRM environment. Maybe you can check how it is used there?

Regards,

Christoph

Former Member
0 Kudos

Hi Christoph,

FM SOCM_CRM_PA_ACTUAL_PARTNER performs no steps between the 2 FM calls (SOCM_CRM_PA_DELETE_PARTNER and CRM_DNO_UPDATE_PARTNER). However, it is restricted to run in dialog mode. I believe that's the reason why I can't apply these 2 FM is the BAdI. What I tried sofar:

1) Using only one of the 2 FMs in the BAdI does work correctly!

2) Using them one after the other does NOT work: we get into an endless loop

3) Exiting the endless loop does not solve the problem, we got an error msg

4) Creating 2 separate actions in the Action Profile and scheduling them in the right order does NOT work, either. The same endless loop problem is produced

I believe it is something to do with the PPF. Any idea how to get over it? Now I try to hack FM CRM_DNO_UPDATE_PARTNER so that it executes the deleting, too, but I have no good outlooks...

Thanks in advance,

Ádá

Former Member
0 Kudos

Ladies and Gentlemen.....

The solution is:

Define 2 separate actions: 1 for deleting the BP, processing time: IMMEDIATE. Add a static attribute to the BAdI implementation class to check if it is the first run of the objects. Check the value at the beginning of the BAdI implementation, and set it at the end. The Update action might remain the same, just schedule it after the Deletion action

Thanks for the great help!

Ádá

Answers (3)

Answers (3)

Former Member
0 Kudos

Need further discussion

Former Member
0 Kudos

hi

same can be view in SPRO ->SAP solution maanger > scenario specific settings -> change request managetmetn -> extended configuration -> change transaction->transaction types ->status administration-> change status profile for user status.

check and update

jansiI

raguraman_c
Active Contributor
0 Kudos

Hi,

Change implementation of the method?!!!

There is much easier way. Try to use actions and conditions.

Transaction SPPFCADM

Action profile:SLFN0001_ADVANCED

Action:SLFN0001_ADVANCED_FIND_PARTNER

You can make this action executed upon User Status change. Define conditions for the same container user status.

This should solve your problem.

Feel free to revert back.

-=-Ragu

Former Member
0 Kudos

Hi Ragu,

Thanks, now I know that this Action, despite its name, does not only fire when a new Support Message is created, but upon changing and saving the message, too.

Now I only need to find the right Container for User Status so that I can define new Responsibilities in the Rule...