on 09-18-2007 9:11 AM
Hi Experts,
I have a problem with the radio button entry not clearing out. Below is my code which is in the iterator. I have 2 buttons on my bsp page "Approve All" and "Reject All" push-buttons.
First when I click on "Reject All" push-button ls_action = 'REJC' and all the Reject radio buttons get selected as expected, but as soon as I click on the "Approve All" push-button both Approve radio button as well as the Reject radio buttons get selected, which leads to confusion. Can any one body please suggest me to tackle this issue. Thanks.. Below is the code which is inside the render_cell_start
method of the iterator.
WHEN 'OPTION'.
DATA:
lo_radiobuttongrp TYPE REF TO cl_htmlb_radiobuttongroup,
lo_radiobutton TYPE REF TO cl_htmlb_radiobutton,
lo_table TYPE REF TO cl_bsp_bee_table.
CLEAR : lv_appr_checked,lv_rejc_checked,ls_action.
READ TABLE model->appr_status[]
WITH KEY product_id = current_row_ref->product_id
INTO ls_status.
if sy-subrc = 0.
ls_action = ls_status-action.
endif.
IF ls_action = 'APPR'.
lv_rejc_checked = 'FALSE'.
lv_appr_checked = 'TRUE'.
ELSEIF ls_action = 'REJC'.
lv_appr_checked = 'FALSE'.
lv_rejc_checked = 'TRUE'.
ELSEIF model->ev_flag = 'X'.
lv_appr_checked = 'FALSE'.
lv_rejc_checked = 'TRUE'.
ELSE.
lv_appr_checked = 'FALSE'.
lv_rejc_checked = 'FALSE'.
ENDIF.
CREATE OBJECT lo_table.
lo_radiobuttongrp = cl_htmlb_radiobuttongroup=>factory(
columncount = '2'
id = current_row_ref->product_id ).
lo_table->add( element = lo_radiobuttongrp
level = 1 ).
lo_radiobutton ?= cl_htmlb_radiobutton=>factory(
id = current_row_ref->product_id
id_postfix = 'APPR'
key = 'APPR'
text = 'Approve'
checked = lv_appr_checked
).
lo_table->add( element = lo_radiobutton
level = 2 ).
lo_radiobutton ?= cl_htmlb_radiobutton=>factory(
id = current_row_ref->product_id
id_postfix = 'REJC'
key = 'REJC'
text = 'Reject'
checked = lv_rejc_checked
).
lo_table->add( element = lo_radiobutton
level = 2 ).
p_replacement_bee ?= lo_table.
ENDCASE.
do a view source and check whether for a particular row (set of reject and approve radiobutton group) the id is same?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raja,
Actually I need both the radio buttons in the same line. Below is the example of my output.
Select Product Id
o Approve o Reject 5500-0
o Approve o Reject 6000-0
o Approve o Reject 2200-0
o Approve o Reject 3400-0
o Approve o Reject 7600-0
Can you please tell me how can I handle my previous code in my iterator to avoid both radio buttons getting selected at the same time.. I fell that the radiobutton group values are not the same for both the radiobuttons.
Thanks in Advance.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes I see the group is the same..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the key is the name or id of the radio buttons in the same row (one set of approve and reject) has to be same.
i have used this code in my iterator render cell start and it works fine.
DATA: rad_gp TYPE REF TO cl_bsp_bee_table.
when 'RAD1' .
CREATE OBJECT rad_gp.
CLEAR :htmlstring .
CLEAR rono.
rono = p_row_index .
CONCATENATE 'R' rono INTO rono .
CONDENSE rono NO-GAPS .
CONCATENATE '<input type="radio" value="V1" checked name="' rono '">' INTO htmlstring .
rad_gp->add_html( html = htmlstring ).
p_replacement_bee = rad_gp.
when 'RAD2' .
create object rad_gp.
clear :htmlstring .
clear rono.
rono = p_row_index .
condense rono no-gaps .
concatenate 'R' rono into rono .
concatenate '<input type="radio" value="V2" name="' rono '">' into htmlstring .
rad_gp->add_html( html = htmlstring ).
p_replacement_bee = rad_gp.
Raja
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
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.