How to get the  Checked box which are clicked

for(int k=0;.....
jsp code
<input type=checkbox name=checkbox value='<%=k%>' >
how to get the particular Checkbox which are checked???

String[] checkedValues = request.getParameterValues("checkbox");You'll get an array filled with the values only for the checked boxes. In other words, if no boxes are checked, checkedValues will be null or checkedValues.length == 0, not sure, going from memory.
Hope this helps!
Patrick

Similar Messages

  • How to get a check box on the selection screen

    Hi all
    can any body tell me how to get a check box on the selection screen

    parameter: pa_check   as checkbox.
    To define the input field of a parameter as a checkbox, you use the following syntax:
    PARAMETERS <p> ...... AS CHECKBOX ......
    Parameter <p> is created with type C and length 1. In this case, you may not use the additions TYPE and LIKE. Valid values for <p> are ' ' and 'X'. These values are assigned to the parameter when the user clicks the checkbox on the selection screen.
    If you use the TYPE addition to refer to a data type in the ABAP Dictionary of type CHAR and length 1 for which 'X' and ' ' are defined as valid values in the domain, the parameter automatically appears as a checkbox on the selection screen.
    REPORT DEMO.
    PARAMETERS: A AS CHECKBOX,
    B AS CHECKBOX DEFAULT 'X'.

  • How to get the last wbs which is displayed  in transaction code cj03?

    Dear Experts,
       I want to get the last wbs which are displayed in  transaction code cj03, i have written below program,but i found it is incorrect. because the sort of wbs  in cj03 is not equal to table prps. the last wbs in cj03  is not equal to table prps.
    who can tell me how to get last wbs which is displayed in cj03?
      SELECT
         PRPS~STUFE
         PRPS~POSID
         PROJ~POST1
         INTO CORRESPONDING FIELDS OF TABLE WA_PRPS_TEMP FROM PRPS INNER JOIN PROJ ON PROJPSPNR = PRPSPSPHI
         WHERE PROJ~PSPID EQ P_PROJECT.
      WA_TLINE = LINES( WA_PRPS_TEMP ).
      READ TABLE WA_PRPS_TEMP INDEX WA_TLINE.
      IF WA_PRPS_TEMP-POSID = P_lastWBS.
        P_LAST = 1
    endif.
    Best Regards,
    Merry

    Hi Merry  ,
      The WBS elements are stored in the table PRPS , so please try using the conversion exit and use the data in internal format then use it in the IF condition.
    Check the FM CONVERSION_EXIT_ABPSN_INPUT and CONVERSION_EXIT_ABPSN_OUTPUT
    Regards,
    Arun

  • How to name the Check Box as "Want Free Gift" using PARAMETERS statements

    Hi all,
    I am new to check boxes. I have a existing report where I have to add a check box to the selection screen.
    So i said
    PARAMETERS: p_cncldc AS CHECKBOX.
    everythibng is fine and I get the check box on the selection screen. when i execute the report i get the name of check box as p_cncldc. but i want the name of the check box as "Want Free Gift".
    How to name the check box as "Want Free Gift".
    if i am saying
    PARAMTERS: Want Free Gift AS CHECKBOX. it says a syntax error saying it canot be more that 8 chars.
    Some one please help. I am new to Check boxes
    Regards,
    Jessica Sam
    Edited by: jessica sam on Mar 31, 2009 10:37 PM

    Text on the Right hand side of check box.
    selection-screen begin of block b1.
    selection-screen begin of line.
    parameters: w_check as checkbox.
    selection-screen: comment  4(30) TEST .
      selection-screen end of line.
    selection-screen end of block b1.
    INITIALIZATION.
    test = 'Want Free Gift AS CHECKBOX'.
    Text on the Left hand side of check box.
    selection-screen begin of block b1.
    selection-screen begin of line.
    selection-screen: comment  2(30) TEST .
    parameters: w_check as checkbox.
      selection-screen end of line.
    selection-screen end of block b1.
    INITIALIZATION.
    test = 'Want Free Gift AS CHECKBOX'.
    OR:
    GOTO(Menubar)>Text Elements>Selection Texts
    Regards,
    Gurpreet

  • How to activate the Check box in Purchase Order after Goods Receipt

    Hi All,
    How to activate the check box after Goods receipt of Purchase order in Item view (Goods Receipt is completed).
    Where t make the settings in SPRO.
    Regards,
    Shailendra Hadkar

    Hi
    SPRO - SAP IMG- Material management - Inventory management and physical inventory - Goods receipt - create purchase order automatically - activate auto Po creation for movement type.
    Then activate the auto PO creation in Vendor master - Purchasing view
    Check it out.
    Regards,
    raman

  • How to get the form name which is used in standard tcode like me23n in sap

    how to get the form name which is used in standard tcode like me23n in sap
    Moderator message: four out of four threads locked, please read and understand the following before posting further:
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
    Edited by: Thomas Zloch on Nov 18, 2011 1:32 PM

    how to get the form name which is used in standard tcode like me23n in sap
    Moderator message: four out of four threads locked, please read and understand the following before posting further:
    [Rules of engagement|http://wiki.sdn.sap.com/wiki/display/HOME/RulesofEngagement]
    [Asking Good Questions in the Forums to get Good Answers|Asking Good Questions in the SCN Discussion Spaces will help you get Good Answers]
    Edited by: Thomas Zloch on Nov 18, 2011 1:32 PM

  • How to create the Check box and Text Area inside the Assignment block

    Dear all,
            I am new to web UI development. my requirement is to create the Check box and Text box in the Assignment block. Can anyone help me to do this requirement.
    Thanks & Regards,
    Ashok.

    Hi,
      Please place the below code in the GET_P methods of the fields.
      For Text Area 
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_textarea.
      ENDCASE.
    For Check Box 
    CASE iv_property.
        WHEN if_bsp_wd_model_setter_getter=>fp_fieldtype.
          rv_value = cl_bsp_dlc_view_descriptor=>field_type_checkbox.
      ENDCASE.
    Regards,
    Lakshmi.Y

  • How to pass the check box values from one view to another view

    Hi Experts,
    I have a selection screen view which consists of check boxes.
    WBS System status.
    Release                      Completed                  Closed as 3 check boxes.
    Note : The above ones are check boxes.
    Based on the selection made by the user, those values needs to be passed to second view which retrieves the data and
    displays the data accordingly.
    At the same time if the user does not make any selection, then WBS System status should contain Released, Completed and Closed values and that needs to be sent to Second view.
    Kindly advise.
    Regards,
    Chitrasen

    hi ,
    make a attribute of type WDY_BOOLEAN to achieve this functionality
    u need to follow these steps :
    1 in side ur component controller , under the ATTRIBUTES tab , make 3 attributes say attr1 , attr2 and attr3 of type WDY_BOOLEAN
    2 create a context node , cn_check and 3 context attribute ca_check1 , ca_check2 and ca_check3 in ur first view for
    release , complete and close check boxes
    3 inside the DOINIT of ur 1st view , set the attributes attr1 , attr2 and attr3 to blank
    wd_comp_controller->attr1 = ' '
    wd_comp_controller->attr2 = ' '
    wd_comp_controller->attr3 = ' '
    4 inside the method , where u r validating , if the check boxes are checked or not , read the attributes ca_check1 , ca_check2 and
    ca_check3
      DATA lo_nd_cn_check TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_check TYPE REF TO if_wd_context_element.
        DATA ls_cn_check TYPE wd_this->element_cn_check.
        DATA lv_ca_check1 LIKE ls_cn_check-ca_check1.
    *   navigate from <CONTEXT> to <CN_CHECK> via lead selection
        lo_nd_cn_check = wd_context->get_child_node( name = wd_this->wdctx_cn_check ).
    *   get element via lead selection
        lo_el_cn_check = lo_nd_cn_check->get_element(  ).
    *   get single attribute
        lo_el_cn_check->get_attribute(
          EXPORTING
            name =  `CA_CHECK`
          IMPORTING
            value = lv_ca_check1 ).
    IF lv_ca_check1 EQ 'X' .
    wd_comp_controller->attr1 = ' X'
    wd_comp_controller->attr2 = 'X '
    wd_comp_controller->attr3 = ' X'

  • Help requested: How to pass the (check box) selected rows data to other scr

    Hi friends, Here is a situation where I have to pick only those records data which i select by checking the check boxes and carry on to next screen where I have to display them and do some processing on such selected rows of data. Can any one suggest me how to code this. Thanks in advance.

    Hi Subbarao,
    One way is to check if the field is selected by checking if the field value = 'X'.
    If it is a table control we will have to loop and find out which all records are selected..it is notable that the check box field will mostly be of single character and contain 'X' if it is checked and space if not checked
    Based on the structure where the check box is held we may have to implement various logic to retrieve whether the field is checked or not....for instance we can move data to another internal table for which the checkbox is checked and can retrieve it from the next screen
    Pls check,revert and reward if helpful
    Regards
    Byju

  • How to get the PDF data which i have send to Spool

    Dear Freinds,
                   My requirement is to display the output which iam getting from a custom report(ZSALARY) in the form of  PDF . So now i wanted to display the ALV output  on to my desktop (as of now) in PDF format.
    i have done the below coding please correct me why iam not getting the same data which is coming out of my report in the PDF, iam passing the same internal table.
    IF NOT it_final[] IS INITIAL.       -
    >IT_FINAL is my main internal table in the report ZSALARY
          DATA : count TYPE syprcop,
             days TYPE sypexpi,
             params TYPE pri_params,
             valid TYPE c,
          pdf_table TYPE  rcl_bag_tline,
          spoolid TYPE rspoid,
          pdf_fsize TYPE  i.
            CALL FUNCTION 'GET_PRINT_PARAMETERS'
              EXPORTING
                destination    = 'LP01'
                copies         = count
                list_name      = 'ZSALARY'   -
    tHIS IS MY REPORT NAME
                list_text      = 'ZSSPOOL'
                immediately    = ' '
                release        = 'X'
                new_list_id    = 'X'
                expiration     = days
                line_size      = 90
                line_count     = 65
                layout         = 'X_PAPER'
                sap_cover_page = 'X'
                receiver       = 'SAP*'
                department     = 'System'
                no_dialog      = 'X'
              IMPORTING
                out_parameters = params
                valid          = valid.
            NEW-PAGE PRINT ON PARAMETERS params NO DIALOG.
            WRITE : 'hi this is the test for spool'.
            NEW-PAGE PRINT OFF.
            COMMIT WORK.
            WRITE : / 'The Spool no is ', sy-spono. "system variable for spool no
            spoolid = sy-spono   .       -
    At this point i can see the spool no.
            CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
              EXPORTING
                src_spoolid   = spoolid
                no_dialog     = 'X'
              IMPORTING
                pdf_bytecount = pdf_fsize
              TABLES
                pdf           = pdf_table
              EXCEPTIONS
                OTHERS        = 0.
            CHECK sy-subrc = 0.
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                bin_filesize = pdf_fsize
                filename                = 'C:\Documents and Settings\Administrator\Desktop\test.pdf'
                filetype                = 'BIN'
              TABLES
                data_tab                = it_final
              EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                OTHERS                  = 5.
          ENDIF.
    if i go and on my desktop it is saying the below error "ADOBE  READER COUDNT OPEN 'test.pdf'
    because it is either not supported  file type or because the file has been damaged.
    my aim is to get the data which is there in IT_final in the PDF .....please correct me the parameters which i have given wrong. my doubt is in GUI_download  fM  in the tables should i pass it_final or
    the pdf_table coming from'CONVERT_ABAPSPOOLJOB_2_PDF'...... i tried this option iam able to open and it is just giving message which i kept before this FM i.e  WRITE : 'hi this is the test for spool'.
    what i should to get my internal table data.
    Pls help.
    regards
    srinivas.

    Dear Karthik,
              Thank you for giving me the link there by iam able to get the ouput download int he pdf
    as below code , but now a small problem for me .......i have 10 fileds in the Report ouput ....but however in the pdf output i can see only 8 fields and the two fields got truncated . Could you please tell me what
    i have to change in my below code so that i can get all the values  
    IF NOT it_final[] IS INITIAL.
    data : it_tsp01 type standard table of tsp01,
           l_wa_tsp01 type tsp01.
            CALL FUNCTION 'GET_PRINT_PARAMETERS'
              EXPORTING
                destination    = 'LP01'
                copies         = count
                list_name      = 'ZHR_BON'
                list_text      = 'ZSSPOOL'
                immediately    = ' '
                release        = 'X'
                new_list_id    = 'X'
                expiration     = days
                line_size      = 90
                line_count     = 65
                layout         = 'X_PAPER'
                sap_cover_page = 'X'
                receiver       = 'SAP*'
                department     = 'System'
                no_dialog      = 'X'
              IMPORTING
                out_parameters = params
                valid          = valid.
    SUBMIT (sy-repid) TO SAP-SPOOL
                     SPOOL PARAMETERS mstr_print_parms
                     WITHOUT SPOOL DYNPRO
                    WITH pnppernr =  p0001-pernr
                     AND RETURN.
    CALL FUNCTION 'CONVERT_ABAPSPOOLJOB_2_PDF'
              EXPORTING
                src_spoolid   = spoolid
                 no_dialog     = 'X'
                 DST_DEVICE  = params-PDEST
               IMPORTING
               pdf_bytecount = pdf_fsize
              TABLES
                pdf           = pdf_table
              EXCEPTIONS
                OTHERS        = 0.
            CHECK sy-subrc = 0.
            CALL FUNCTION 'GUI_DOWNLOAD'
              EXPORTING
                bin_filesize            = pdf_fsize
                filename                = 'C:\Documents and Settings\Administrator\Desktop\test.pdf'
                filetype                = 'BIN'
              TABLES
                data_tab                = pdf_table    "it_final
              EXCEPTIONS
                file_write_error        = 1
                no_batch                = 2
                gui_refuse_filetransfer = 3
                invalid_type            = 4
                OTHERS                  = 5.
          ENDIF.
    Please tell me how i can get the all the fields which are there in my normal alv output ......
    Case 1) .i wanted all the 10 fields in PDF  to be displayed  without truncated , I have checked in Spool ........ i found all the fields are there .....but however when i check the downloaed PDF i can see some fields are getting truncated.
    Case 2) However  if on the ALV output if the user  hides 2 fields out of 10 fields then only 8 feilds which are appearing on the output  before sending the Spool should only be displayed in PDF as well -
    > for this scenario what i have to do.
    Thanks  Once again.
    regars
    srini.

  • How to change the check box with the push button in itrator table rows

    Hi all,
    I want to change the check box of the itrator table rows with push button/ some thing better as to give
    the table view more good look and user friendly.
    Does any one has tried any other option in table view in place of check box
    Thanks
    Bhagat

    There are various objects which you can create via iterators. Please see the application SBSPEXT_TABLE for more details.
    DATA: lo_text      TYPE REF TO cl_htmlb_textview,
            lo_ddlb      TYPE REF TO cl_htmlb_dropdownlistbox,
            lo_input     TYPE REF TO cl_htmlb_inputfield,
            lo_button    TYPE REF TO cl_htmlb_button,
            lo_chk_bx    TYPE REF TO cl_htmlb_checkbox.
      row_ref = p_row_data_ref.
      CASE p_column_key.
        WHEN 'EFF_DATE'. " Input field
          CREATE OBJECT lo_input.
          lo_input->id       = p_cell_id.
          lo_input->type     = 'DATE'.
          lo_input->showhelp = 'TRUE'.
          lo_input->width    = '60'.
          lo_input->invalid  = 'true'.
          p_class            = `ao`.
          lo_input->value     = get_column_value( p_column_key ).
          p_replacement_bee = lo_input.
        WHEN   'NEW_LOC'. " Drop down list box
          CREATE OBJECT lo_ddlb.
          GET REFERENCE OF gt_persa INTO lo_ddlb->table.
          lo_ddlb->id                =  p_cell_id.
          lo_ddlb->nameofkeycolumn   = 'NAME'.
          lo_ddlb->nameofvaluecolumn = 'VALUE'.
          lo_ddlb->selection         = get_column_value( p_column_key ).
          lo_ddlb->selection  = 'DUMMY'.
          p_replacement_bee          = lo_ddlb.
        WHEN 'MON' . " Check box
          CREATE OBJECT lo_chk_bx.
          lo_chk_bx->id = p_cell_id.
          lo_chk_bx->checked =  get_column_value( p_column_key ).
          p_replacement_bee  = lo_chk_bx.
        WHEN 'NEW_MGR_SRCH'. " Button
          CREATE OBJECT lo_button.
          lo_button->id            = p_cell_id.
          lo_button->text          = 'Search Mgr'.
          lo_button->onclientclick = 'script'.
          p_replacement_bee = lo_button.
        WHEN OTHERS. " Text
          CREATE OBJECT lo_text.
          lo_text->id       = p_cell_id.
          lo_text->wrapping = 'FALSE'.
          lo_text->text     = get_column_value( p_column_key ).
          lo_text->design   =  'STANDARD'.
          lo_text->textcolor = 'POSITIVE'.
          p_replacement_bee = lo_text.
      ENDCASE.
    Thanks
    A

  • How to read the check box value in alv report

    hi experts,
    i m working on one alv report where i m using the check box for field selection in alv display.
    but i don't know how to read the only selected fields.
    wa_fieldcat-fieldname = 'BOX'.
      wa_fieldcat-tabname = 'IT_HEADER'.
      wa_fieldcat-seltext_m = 'Box'.
      wa_fieldcat-checkbox = 'X'.
      wa_fieldcat-input = 'X'.
      wa_fieldcat-edit = 'X'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = 'AUFNR'.
      wa_fieldcat-tabname = 'IT_HEADER'.
      wa_fieldcat-seltext_m = 'Sales Doc'.
      wa_fieldcat-hotspot = 'X'.
      APPEND wa_fieldcat TO i_fieldcat.
      CLEAR wa_fieldcat.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = v_repid
         I_CALLBACK_PF_STATUS_SET          = 'SET_PF_STATUS'
         i_callback_user_command           = 'USER_COMMAND'
         i_callback_top_of_page            = 'TOP_OF_PAGE'
         it_fieldcat                       = i_fieldcat[]
         i_save                            = 'A'
         it_events                         = v_events
        TABLES
          t_outtab                          = it_header
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
    *&      Form  USER_COMMAND
          text
         -->R_UCOMM    text
         -->,          text
         -->RS_SLEFIELDtext
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    when '&RELEAS'.
    endcase
    endform.
    i gone through some already posted que for same problem i tried options like
    loop at it_header.
    endloop.
    but i m getting box field empty.
    is there i missed something? plz sugeest.. if u have any other solution plz post...

    Have this code in your user command fm:
    * For capturing changed data
      CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
        IMPORTING
          e_grid = w_grid.
      CALL METHOD w_grid->check_changed_data
        IMPORTING
          e_valid = w_valid.
      IF w_valid = 'X'.
    loop at itab where mark = 'X'.
    endloop.
    ENDIF.
    Regards,
    Ravi

  • How to get dynamic check box value in NW Mobile 7.1

    Hi,
    i have 5 rows it contains dropdown and checkbox in a row.when i click update button i need the values of checkbox.How to get?
    Regards,
    Kanagaraj.

    Hi Vidyadhar,
    I have dropdown in first page.based ondropdown value selected navigating to next page.In that i am using row repeater it has label,checkbox and dropdown.here i need to  know whether the check box is checked or not while clicking update button.
    Drow down value also not able to get.
    How to get Checkbox and dropdown values?
    can u provide some sample codes??
    Regards,
    Kanagaraj.

  • How to use the check box?

    How is the check box to be used? If I have 10,000 songs in my itunes library and have 1,000 of them checked, how can I place all 1,000 checked songs into a new playlist that I have created just for them. They are not located together in my library so I can't just hold down the SHIFT key and highlight them all for movement. Also, I would rather not have to hold down the CONTROL key and then search through 10,000 songs for the 1,000 I have checked. So what is the secret to accomplishing this?
    Can you sort your library by whether a songs is checked or not? If I could sort them all together as a group, then I could use the SHIFT key to highlight and move them all.
    Am I missing something here? How can you select and sort songs by whether they are checked or not in your library?
    Thanks so much for any help you can provide.

    If only the 1,000 songs you want are currently checked, create a Smart Playlist to collect them.
    How to Create a Smart Playlist
    - File=>New Smart Playlist
    - Playlist is 'whatever playlist you want to use'
    - Match only checked songs
    Note: There is no way to select the Main Library. If you're working with the Library as a base, you'll need un-check the 'Match the following rule' and check 'Limit to' and put a high enough number to capture all the songs.
    Several ways to creatively manage the issue.
    You may wish to create a Static Playlist once you are done, and drag those songs into it for more permanence.
    Post back if you have more questions.

  • How to find the check box selected while using Class in ALV grid display

    hi,
    I am displaying the ALV report using Class 
    For Example: CALL METHOD MYGRID->SET_TABLE_FOR_FIRST_DISPLAY EXPORTING I_STRUCTURE_NAME = 'ACC1'
                                                             IS_VARIANT = GS_VARIANT
                                                             I_SAVE = 'A' "XSAVE
                                                             IS_LAYOUT  = LOUT
                                                     CHANGING  IT_FIELDCATALOG = IT_FIELD
                                                               IT_OUTTAB = ACC_NO[].
    In output i am getting 10 customer with check box, how do i find that customer number is selected.

    HI,
    Once user selects a check box, he would CLICK on a button ( say PROCESS )inorder to do the processing for the selected records. So in the PAI, under the EVENT ( OK CODE ) of the Button ( say PROCESS ), write the following code.
    CALL METHOD MYGRID->check_changed_data.
    Now,
    Loop at acc_no where check = `X`.
    Do the processing.
    endloop.
    Best regards,
    Prashant

Maybe you are looking for

  • PL/SQL procedure is 10x slower when running from weblogic

    Hi everyone, we've developed a PL/SQL procedure performing reporting - the original solution was written in Java but due to performance problems we've decided to switch this particular piece to PL/SQL. Everything works fine as long as we execute the

  • Still Out Of Stock??

    Okay well I am waiting with my broken phone here, that I cannot even make a cal with, for a replacement Droid. Where the{word filter avoidance} is it. It has been 2 weeks and I am wondering when I am going to receive this. Does anyone have any idea?

  • Problem emptying Trash despite following every tip and trick I could find..

    Hi there, I have a small number of very large folders I can't delete from my Macbook, which I believe is caused by a problem with the external disk I originally copied them from. I had a problem with a disk because a colleague didn't eject it properl

  • Error in calling a parent

    i am trying to call a parent and have it do a simple action but i always get this error TypeError: Error #1006: value is not a function. function click_f(e:MouseEvent):void { this(this.parent).gotoAndPlay("go"); btn.addEventListener(MouseEvent.CLICK,

  • Xk02 bapi help ?

    Hi everyone, I need a bapi to update the bank info for a vendor in xk02 transaction. I couldn't find a bapi for it so I used 'VENDOR_UPDATE' but I am not sure about its reliability as it uses other tables rather than lfbk like lfas, lfb5 and lfza. I