cancel
Showing results for 
Search instead for 
Did you mean: 

Delete Questions dynamically in Surveys

Former Member
0 Kudos
87

Hi All,

I have a requirement on dynamic questionnaire: depending upon the values selected in an order I have to delete some questions in Survey.

To achieve this I have created a new FM and using it as PBO FM for the Survey.

DATA:lt_all_values TYPE TABLE OF survy_s_all_values,

l_q2 TYPE string VALUE 'id_4b39f0ffc60d35d9e1000000a558a1b5',

l_a2 TYPE string VALUE 'id_4b38891782ce6eece1000000a558a1b5'.

DATA: l_xml TYPE string,

l_xml_hex TYPE xstring.

CONSTANTS: lc_field_for_reload(31) TYPE c VALUE '(SAPLCRM_SURVEY_UI)gv_load_html'.

FIELD-SYMBOLS: <fs_reload_html> TYPE crmt_boolean.

CALL METHOD ir_survey_values->values_get_all

IMPORTING

et_all_values = lt_all_values.

CALL METHOD ir_survey_values->values_delete

EXPORTING

i_question_id = l_q2

i_answer_id = l_a2

it_values = lt_delvalues.

CALL METHOD ir_survey_values->update_values_xml

IMPORTING

e_public_values_xml = l_xml

e_public_values_xml_hex = l_xml_hex.

CONSTANTS: lc_field_for_reload(31) TYPE c VALUE '(SAPLCRM_SURVEY_UI)gv_load_html'.

FIELD-SYMBOLS: <fs_reload_html> TYPE crmt_boolean.

ASSIGN (lc_field_for_reload) TO <fs_reload_html>.

IF sy-subrc EQ 0.

<fs_reload_html> = 'X'.

ENDIF.

Some how this code is not working, if anyone worked on the same, please share your experience.

Regards,

S Reddy

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

not working Web UI

robert_kunstelj
Active Contributor
0 Kudos

Dinamic questionaries are possible only in SAP GUI and on WEB UI this functionality is unfortunately not covered.

Regards.

Former Member
0 Kudos

Any inputs?