on 05-06-2015 11:43 AM
Hi,
I have a survery form where user has to enter rating and remarks for each questions. I have a table ZUSER which holds username and organization and an ouput table ZOUTPUT where I save username, organization along with rating, remarks and questions. I have used buttons and given questions as button text (to get border and a crisp view). There are 14 questions.
Context nodes: Output--Username
--Organization
--Rating
--Remarks.
All input fields are mapped to same attributes(rating and remarks). Only the last values gets saved into DB.
Can you please tell, what should I do to get user inputs correctly from context to save them in ZOutput.
Also tell, is there any way to get the corresponding questions while saving the answers other than direct hard-coding
I have attached the form layout.
Thanks,
Ashly
Hi,
As all your input fields are mapped to same attribute, your latest and last record will hold the value that it has at run time. So obviously you will be having the last entered data in your hand.
Please try to change into your design as below.
1. Create a context node w.r.t the table ZOUTPUT(User Name, Org and Questions).
2. Now create one more node with Questions, Ratings and Remarks with specific to each questions. Else you can also design your node with 14 questions and with one remark/rating context. So in this case, to get the exact ratings and remark, read the values with respect to the type of questions from the user.
Try out this.
BR,
RAM.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, did the same.
Is there any way to invalidate a node.? I have a button CANCEL, on clicking which I should make all fields blank. It should happen without clicking SUBMIT button, as user wants to cancel his action.
I have tried various options like:
1) clear ls_output.
append ls_output to lt_output_node.
2) lo_nd_output_node->invalidate( ).
But none of them worked. Plz help
Hello,
lo_nd_output_node->invalidate( ) will actually clear all the context attributes automatically. No need to go ahead for clearing ls_output.
Please recheck your code in on-action of your Cancel button, once you invalidated the node. I feel that, you are setting the context values after the method lo_nd_output_node->invalidate( ).
Please check it once. Else paste your code here. it will be easier to analysis.
BR,
RAM.
Dear Ashly,
You have to create the 14 different field for your 14 question, Because if you mapped the same field into two element the latest changes are updated in the DB, that thing was happened in your case,
Thanks
Nishant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.