on 12-18-2013 6:41 PM
Hi Team
In webdynpro there is a requirement to display text dynamically based on check box. For example we have 4 check boxes, when a user checks 'US'. then text 'This is US' should be displayed. If User unchecks and checks 'India' then US Text should be refreshed and text should be 'This is india'.
actual requirement is like Loop at screen in module pool programming.How we can show this in webdynpro.
Request you to help me on this one.
Thanks and Regards,
Shakeer Hussain
Hi Shakeer,
Both Bansal and Rama are correct but I need to clarify whether you need only one entry to be selected at a time or more than one. If only one entry then you should use the radio button instead of checkbox or if more than one entries then you should assign 4 textviews in the node and dislay it in the layout. The scenario in the way if i select both US and IN then both the text will be displayed in their respective textviews.
With Regards,
Giriesh M
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Giriesh,
There are multiple possible cases for that. If you want to create one text view for all the box it is also possible and you can also restrict the user to check only one check box at one time.
But if you have requirement to check only one check box at one time then i would suggest use the Radio button instead of checkbox & Define one Text view for all radio button,
Regards,
Nishant Bansal
Hi,
You can achieve your requirement as below
Sample code:
lo_el_data->get_static_attributes(
IMPORTING
static_attributes = ls_data ).
CASE id.
WHEN 'CHECK1'.
CLEAR: ls_data-check2,
ls_data-check3,
ls_data-check4.
ls_data-display_text = 'USA'.
WHEN 'CHECK2'.
CLEAR: ls_data-check1,
ls_data-check3,
ls_data-check4.
ls_data-display_text = 'INDIA'.
WHEN 'CHECK3'.
CLEAR: ls_data-check1,
ls_data-check2,
ls_data-check4.
ls_data-display_text = 'check3'.
WHEN 'CHECK4'.
CLEAR: ls_data-check1,
ls_data-check2,
ls_data-check3.
ls_data-display_text = 'check4'.
WHEN OTHERS.
ENDCASE.
lo_el_data->set_static_attributes(
EXPORTING
static_attributes = ls_data ).
Hope this helps you.
Regards,
Rama
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI Shakeer Hussain,
Define one Text View along with Check Box .
Create one Context Element of String Type and Bind to TEXT View 'Text' Property.
Please Check Event of Check Box ONToogle.
This Event is generated when Clicking on Checkbox, Define one Method as a Event Handler & set the Text View Attribute Property as per your selection.
Let me know if any issue.
Regards.
Nishant Bansal
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.