cancel
Showing results for 
Search instead for 
Did you mean: 

Check box selection

former_member125931
Active Participant
0 Kudos

Hi All,

I am using simple HTML for BSP program having two fields TCODE and check box if user cecks check box I need to identify that TCODE,it may be more than one can any one suggest me how to proceed.

Thanks n regds,

Sree.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Sree,

Can you please post your code here of layout and OnInputProcessing?

Regards,

Abhinav

Former Member
0 Kudos

Hi Sree,

Are you using Pages with flow logic or MVC?

Try this:

<html_b checkbox i-d = "cr1"

te-xt = "User1"

on-Click = "chkBox1" /

<html_b checkbox id- = "cr2"

te-xt = "User2"

on-Click = "chkBox2" /


and in Do_HANDLE_EVENt or OnInputProcessing

DATA: event TYPE REF TO cl_htmlb_event.

DATA lr_checkbox TYPE REF TO cl_htmlb_event_checkbox.

lr_checkbox ?= event.

Please remove - from htmlb code above and use the proper syntax I could not paste the proper code.

Hope this helps.

Regards,

Abhinav

former_member125931
Active Participant
0 Kudos

HI Abhinav,

I am using simple html and page and flow logic,

a string holding all check box values dynamically,

but I am unable topass these values to oninputprocessing.

former_member184111
Active Contributor
0 Kudos

Hi Sree,

HTML or HTMLB you can always use

DATA: lt_fields  type tihttpnvp . 
call method request->get_form_fields
            changing
              fields = lt_fields.

To get the selected checkboxes on page.

Regards,

Anubhav

Former Member
0 Kudos

Hi Sree,

Try using htmlb extension "checkbox" for this.

You mentioned, you have 2 fields TCODE and checkbox, I guess you can use TCODE in the text of check box and if you have more then one TCODE you may also use checkboxgroup.

You can go to Tag Browser under htmlb extensions and see this, also on your BSP page click F1 on the extension to see the documentation

Hope this helps,

Abhinav.

former_member125931
Active Participant
0 Kudos

Hi Abhinav,

Thanks for your reply,

I assigned check box values to variables like usr1 -> checked,usr2 -> unchecked this checked and unchecked assigned to variable how can I get this value in my program,if I am using request->get_form_field('checkname') but it is holding single value,can any one help me.