CRM DINAMIC SURVEY
I need help with create the dynamic questionnaire. In transaction CRM_SURVEY_SUITE I have the own survey with a few questions. I want to hide/delete some questions depending on the answers of to previous questions. To do this, I created own FM Z*PBO (copy of CRM_MKTCA_SURVEY_MKT_PBO). To begin, I write a simple code to instantly hide some questions, starting with the third. I'am using method _survey_values->no_display_add in that FM:
loop at lt_all_values into ls_all_values.
if ls_all_values-question_id = zcl_crm_mkt_svz_survey=>c_qst2 and lv_excl_flag is initial.
lv_excl_flag = 'X'.
elseif lv_excl_flag = 'X'.
ls_no_display-name = ls_all_values-question_id.
append ls_no_display to lt_no_display.
call method ir_survey_values->no_display_add
it_no_display = lt_no_display.
I found the code that returns text. Maybe there is functionality that they can change this texts?
data lo_surv_texts type ref to cl_crm_svy_survey_texts.
data lt_crm_text_t type crm_svy_api_survey_text_t.
create object lo_surv_texts
i_application_id = i_application_id
i_survey_id = i_survey_id
i_survey_version = i_survey_version
i_language = sy-langu
survey_not_found = 1
others = 2.
call method lo_surv_texts->get_all_texts
et_texts = lt_crm_text_t.