cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to make KUT field from characteristics to Key Figure

former_member690694
Participant
0 Likes
1,058

Dear Team,

For one of my requirement , I want to use KUT field text type or date as a key figure in Business analytics. Currently it's coming under characteristics while adding it to data source. . Could you please guide me . How to get this field in basic key figure from PDI.

Thanks and Regards,

Madhuri Dubey.

Accepted Solutions (0)

Answers (4)

Answers (4)

former_member690694
Participant
0 Likes

Thank you Saurabh, It works fine now. I just need one more code guide. PFB description. If you can help me in it.

As Assigned employee of Service ticket i got with help of below code now L1, L2, L3 manager required.

var assignto = this.ProcessorParty.Party.Name.GetFirst();

if ( assignto.IsSet() )

{ var L1manager = how to get this..

Var L2 Manager = How to Get this.

Var L3 Manager = How to get this.

}

Thanks and Regards,

MD

former_member226
Employee
Employee
0 Likes

Hello Madhuri,

I see that you have already raised a new topic for it https://answers.sap.com/questions/13221381/how-to-get-manager-name-of-service-assigned-to-emp.html therefore to make to most of the community guidelines, I would recommend to close this thread and handle it in the new question you have already raised.

BR

former_member690694
Participant
0 Likes

Hi Saurabh,

OK that's fine I have added decimal type KUT field in key figure. But could you please tell me how to get the date subtraction in C4C.

I have written below code in Aftermodify method- Dayscalculate is text type even with numeric also i tried same output.

this.DaysCalculate = Context.GetCurrentUserDate().Delta(this.LastChangeDate,true);

Output for dayscalculate = P1D coming means P- Period 1= subtraction value and D= Days.

Can I get only numeric subtraction. like 1 only instead of P and D.

Regards,

MD.

former_member226
Employee
Employee
0 Likes

yes, this is possible using "ConvertToDays()" function.

this.DaysCalculate = Context.GetCurrentUserDate().Delta(this.LastChangeDate,true).ConvertToDays();

Hope it helps!

BR

former_member690694
Participant
0 Likes

Hi Saurabh,

OK , Do you know how to make date type KUT field key figure field in data source.

Thanks and Regards,

MD.

former_member226
Employee
Employee
0 Likes

No. So far I have always seen the custom KUT Date field as a characteristics field but in standard data source "Opportunity Header(CODOPPH)", I have seen Start Date or Phase Start Date as Key Figure. So in my opinion they have made some adjustment in the backend system to show them as Key Figure. May be you can ask SAP support about how they created such field as Key Figure?

former_member226
Employee
Employee
0 Likes

Hello,

A key Figure is always something that can be measurable. Therefore, you can never define a KUT field of type "Text" as a key figure, technically. In case of type "Date" same is true as well BUT for a few standard Data Sources, you can still find the Date as Key Figure. I believe that is done via some backend trick.

Hence in my opinion, in case you want to show the same text field as Key Figure in reports then you need to have a duplicate field with the same label but with a different Data type. In the new field you have to copy the value of the existing "text" field (Type conversion should be taken care of while coping the value either via workflow or PDI)

former_member690694
Participant
0 Likes

Hi Saurabh,

OK that's fine I have added decimal type KUT field in key figure. But could you please tell me how to get the date subtraction in C4C.

I have written below code in Aftermodify method- Dayscalculate is text type even with numeric also i tried same output.

this.DaysCalculate = Context.GetCurrentUserDate().Delta(this.LastChangeDate,true);

Output for dayscalculate = P1D coming means P- Period 1= subtraction value and D= Days.

Can I get only numeric subtraction. like 1 only instead of P and D.

Regards,

MD.