on 12-31-2009 5:53 AM
Hi All,
I have requirement on survey: In one survey there are 10 questions, depending upon the value (answer) selected from the first question, I have to filter the next questions, is it possible to achieve this in Web UI?
I am trying the PBO FMs but not able to get the results, if anyone worked on this scenario, please let me know the process for this.
Regards,
S Reddy
Functionality not working in Web UI
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi SS Reddy,
I have the similar requirement in WebUI that i have to build Dynamic questionnaire. Based on the Answer that the user has chosen, the questions displayed below has to be changed. Firstly the user can choose the Answer->Question to be displayed.
Example:
1. Question 1
1a. Answer
1b. Answer
1c. Answer
2. Question 2
2a. Answer
2b. Answer
2b. Answer
3. Question 3
3a. Answer
3b. Answer
3c. Answer
n. Question n
na. Answer
nb. Answer
nc. Answer
If the user chooses answer 1a, it has to point to question 3. If user chooses 1b, it has to point question n.
Any thoughts around would definitely be helpful.
Thanks & Regards,
Jagadish G
Hi S Reddy,
For populating the dynamic answer in survey depending upon first question,you have to write a code in PBO Method.Put the enhancement spot in PBO method in lower side.Then you have to add the dynamic answer in list box.first you can use this method ir_survey_values->values_get_all for getting the complete list of question answer and value.then you van use this method ir_survey_values->dynamic_items_get for getting the dynamic value for answer.you can use this method ir_survey_values->dynamic_items_add for adding the dynamic answer in list box.
Thanks
Vishwas Sahu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Our requirements is to filter the questions based on the answer selected for the first question.
I have written a PBO FM and assinged it to survey. using the statement ir_survey_values->values_get_all , all the questions are stored in local table. to delete the questions I am using ir_survey_values->values_delete, but the questions are not getting deled, following code is written in FM:
CALL METHOD ir_survey_values->values_get_all
IMPORTING
et_all_values = lt_values_old.
LOOP AT lt_values_old INTO ls_value_old.
APPEND ls_value_old-value TO values_tab.
CALL METHOD ir_survey_values->values_delete
EXPORTING
i_question_id = ls_value_old-question_id
i_answer_id = ls_value_old-answer_id
it_values = values_tab.
CLEAR: values_tab[], ls_value.
ENDLOOP.
and dynamic values are not populated for ir_survey_values->dynamic_items_get statement.
could u share me the code snippet if possible?
Regards,
S Reddy
You can use the following coding in PBO function to hide fields (questions)...
read table lt_all_values into ls_value
with key answer_id = 'id of answer which sets the field to hidden'.
if sy-subrc = 0 and ls_value-value ne 'id of answer option'.
ls_no_display-name = 'id of questionary that you want to hide'.
ls_no_display-value = 'no_display'.
append ls_no_display to lt_no_display.
set field to no_display
call method ir_survey_values->no_display_add
exporting
it_no_display = lt_no_display.
However I saw that this works ok on SAP GUI, while on WEB UI it works but only the first time (when opening survey) but later the PBO function is not called.
Regards.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.