cancel
Showing results for 
Search instead for 
Did you mean: 

Survey:Add formula to survey field

naveenkolathuru
Participant
0 Kudos

Hi ,

I have the requiement that I need to add a  field in the survey (CRM_SURVEY_SUITE)  , that should be calculated based on the values entered by users.

Input field - A - 80 (user enters)

Input filed - B - 100 (user enter)

Input field - C should be filled with 80%(calculated using formula).

This calculation shuould be calculated on survey save(Function code SUBMIT) button.

I checked PAI and PBO function modules , I can't find where to enhance and keep my formula.

Please help ..

Thanks,

Naveen.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Naveen,

I am trying to do something very simillar in my survey application.

Please let me know if you have a solution to this.

I will update this thread once I find an answer.

Thanks and Regards,

Farhad Wahid.

naveenkolathuru
Participant
0 Kudos

Hi Farhad,

If you create survey under Marketing in t-code CRM_SURVEY_SUITE then it will trigger badi CRM_MKTCA_SVY_PAI . In badi you can update values . This will work for public surveys , but issue with lead and activity surveys with in the one order transaction, you can't update values.This is the limitation of the standard code.

Hope this information helps for your requirement.

Thanks,

Naveen.

Former Member
0 Kudos

Hi Naveen,

Thanks for the update.

I checked your requirement for field level calculations. The Surveys can be completed in GUI, Webclient by internal users or using HTML format by external users. If you are  using the survey's for internal users who have access to SAP CRM system you can consider writing the code logic in the PBO module. However, for the HTML format the survey will be filled outside the CRM Landscape (probably through some website), the PBO module cannot be used to control the calculations dynamically.

To be consistent and scalable between diferent survey formats, we need to write all the the field level logic (calculations or Validations) in the survey's XSLT files using JAVA Script.

This would ensure that the survey's can run in any formats without any code change.

Hope this helps.

Moderation: Bargains for points is prohibited on SCN. Please avoid this. Thank you.