Select many check box problem

I'm having a lot of trouble with a selectManyCheckBox. I've got a faces panelTabbedPane - and one of the tabs contains a selectManyCheckbox. All the data in the tabs applies to the same bean so I want to apply all the changes or none of them.
If I don't have the h:form around the tab then the check boxes aren't initialised. However with the h:form when I try and submit the form the checkbox values don't get set on my bean.
What am I doing wrong and how do I fix it? Any help would be appreciated.
JSP containing the panel tabbed pane
    <h:form id="edit.form">
        <x:messages id="messageList" showSummary="true" showDetail="true" summaryFormat="{0}:" styleClass="error" />
        <x:panelTabbedPane title="#{msg['account.edit.tabs.title']}" >
            <f:subview id="tab1" >
                <jsp:include page="editGeneral.jsp"/>
            </f:subview>
                <h:form id="roles.form">
            <f:subview id="tab2" >
                        <jsp:include page="editRoles.jsp"/>
            </f:subview>
                </h:form>
            <f:subview id="tab3" >
                <jsp:include page="editPreferences.jsp"/>
            </f:subview>
            <f:subview id="tab4" >
                <jsp:include page="editCustomers.jsp"/>
            </f:subview>
            <f:verbatim><br /></f:verbatim>
            <x:commandButton id="editButton" value="#{msg['account.update']}" action="#{selectedAccount.update}" title="#{msg['account.update.alt']}" />
            <x:commandButton id="cancel" immediate="true" value="#{msg['enable.cancel']}" action="cancel" title="#{msg['enable.cancel.alt']}" />
        </x:panelTabbedPane>
    </h:form>And the included JSP
<x:panelTab label="#{msg['account.edit.tab.roles']}" title="#{msg['account.edit.tab.roles.title']}" >
    <h:panelGrid columns="2" >
        <h:outputLabel for="roles" value="#{msg['account.edit.role']}" />
        <h:selectManyCheckbox id="roles" value="#{selectedAccount.roles}" layout="pageDirection" styleClass="menuSelectMany" >
            <f:selectItems value="#{userPreferences.roles}" />
        </h:selectManyCheckbox>
    </h:panelGrid>
</x:panelTab>Thanks

What type does 'userPreferences.roles' represent in your included jsp?
Is it a collection of Role classes returned as a SelectItem array?

Similar Messages

  • Re- Single click in the check box ensure to select all check boxes

    Hi All,
    I have an issue to notify the urgency of the cart to the buyer while creating the cart.For that scenario we have a check box in the Basic data of shopping cart.I added the check box in the basic data. Now the  quote check box is available for all the line items.
    The requestor can select any check box in any line items,so whenever he selects the check box- automatically all the check box should get selected , if any of the check box get deselected then imediatelely all the check box in different line items also should get deselected.

    Hi Batchu,
    Thanks for your reply, See if you add any custom field it will come one by one in the basic data section. Adding one more check box doesnot work for this case.
    Moreover the problem is change to any particular line item can be captured in DOC_CHANGE_BADI but i cannot bring the same change to all line items (ie) If 3 rd line item check box is marked then immediately rest of the line item also should get marked.
    In the case of DOC_CHECK_BADI to identify the line on which the change happens is tough.
    SO thats is the problem for me to bring the logic in the code.
    Please if any one come across similar kind of issue please give your suggestion.
    Thanks,
    Sibi

  • "Always Use Selected Format" check box in line items report

    Hi Experts,
    I have an issue in ECC 6.0.
    From the transaction code FBL1N (Vendor Line Items) I am trying to export the report to spreadsheet by selecting the option  List> Export>Spreadsheet  then I have selected "Always Use Selected Format" check box.  But if I execute the same report again I am not getting this option "Always Use Selected Format". Please let me how can we retrieve that option. Is there any possibility to get that option again either functionally or technically. I would like to know all the possible ways to get this option again.
    Please do the needful.

    Hello,
    In one my thread Mr. Frank has replied as follows. I believe he has solved this.
    Hope this may be really helpful.
    The problem with the spreadsheet download is at one point, users have selected their default file type.
    That said, SAPGUI is working as it should. (gui710)
    Question though is how do we reset the values so they get the ?Select Spreadsheet Format? popup again.
    The following steps should be performed :
    - Call transaction SE38, enter program SALV_BS_ADMIN_MAINTAIN, and press F8.
    - Follow the parameters below :
    - Select ?DELETE? on the Actions Group
    - Select ?DETAILED SELECTION? on the General Data :
    - On Client - your number
    - User : <user name>
    -Hit EXECUTE.
    -Press ENTER on the POPUP
    - If there is an entry in the report that will need to be deleted. Also, make sure that the entry you will delete (for the user) has a value of GUI_ALV_XML_VER on field ?Parameter? .
    - Select the line and hit the DELETE icon .
    - Press ?Y? to continue delete. Press ENTER on the popup.
    - Then EXIT all the way out of the program.
    NOTE : When you run program SALV_BS_ADMIN_MAINTAIN, make sure they are out of any program that they are using for download.
    Re: "Always Use Selected Format" check box in line items report
    Regards,
    Ravi
    Edited by: Ravi Sankar Venna on May 15, 2009 2:31 PM

  • Dynamic selection of check boxes on selecting a check box

    Hi Friends,
    I have to select the check boxes which are herarchically lower to a top check box,dynamically.
    Eg:
    Checkbox1
       checkbox2
       checkbox3
    so if i select check box 1, on the screen both checkbox2 and checkbox3 have to be selected.
    I did like below.
    AT SELECTION-SCREEN OUTPUT.
      LOOP AT SCREEN.
        IF P_ALL = 'X'.
          P_VAT = 'X'.
          P_NAME = 'X'.
        ENDIF.
        MODIFY SCREEN.
      ENDLOOP.
    but values are checked but on screen its not checked.
    how to handle this.
    Regards,
    Simha

    hi
    do like this
    paramenter: check_1  type c as check box at user-command ,
    check_2 type c as checkbox default X,
    check_3 type c as checkbox default X.
    At selection Sreen output
    if check_1 = 'X'.
    loop at screen .
    if screen-name = 'check_2'.
    screen-invisible  = '0'.
    endif.
    endloop.
    loop at screen .
    if screen-name = 'check_3'.
    screen-invisible  = '0'.
    endif.
    endloop.
    else
    loop at screen .
    if screen-name = 'check_2'.
    screen-invisible  = '1''.
    endif.
    endloop.
    loop at screen .
    if screen-name = 'check_3'.
    screen-invisible  = '1'.
    endif.
    endloop.
    endif.
    this solve ur problem
    Cheers
    Snehi

  • Many check boxes list(question modified)

    hi dear,
    i want store the many check box values in database
    i am giving example
    i have one input list box
    if i click on that list box many check box will come.which is already stote in the database
    location
    bangalore
    chennai
    hyderabad
    mubai
    .now i will select bangalore,chennai and it will show in the list box .that value i want store in the database for particular record along with emp id.
    how to store pls help me.

    You can see my answer in your previous post: how store in database  list of multiple check boxes values
    With af:selectManyChoice the same, as with af:selectManyCheckbox:
    <af:selectManyChoice value="#{backingBeanScope.rpoDangerObjectBean.licensedActionsSelected}"
    label="#{bindings.LicensedActionsClsVO.label}"
    id="smc2" simple="true"
    contentStyle="width:440px"
    autoSubmit="true"
    disabled="#{pageFlowScope.disabledMode}">
    <af:forEach items="#{bindings.LicensedActionsClsVO1.rangeSet}"
    var="item">
    <f:selectItem itemValue="#{item.Num}"
    itemLabel="#{item.Code} #{item.Name}"
    id="si66"/>
    </af:forEach>
    </af:selectManyChoice>

  • How to disbale a group of checkboxes when i select one check box WEBDYNPRO

    Hi Friends,
    Can any body help me how to disbale a group of checkboxes when i select one check box WEBDYNPRO Abap
    Also can any body tell me how to handle chain endchain type of scenario in WEBDYNPRO Abap
    Thank you..
    Sai

    Hi
    In the context tab , create 2 context attributes ca_attr1 and ca_attr2   of type WDY_BOOLEAN under a context node cn_node
    now in ur Layout , bind the ENABLE property of CheckBoxGroup UI Element with this attribute ca_attr1
    bind the ENABLE property of CheckBox UI Element with this attribute ca_attr2
    create a action for ur Checkbox , for the OnToggle property of ur checkbox
    in OnactionToggle , check if ca_attr2 is 'X' , set ca_attr2 to ' ' ( for disable)
    this can be done by code wizard , press control +f7 and use read/set context attributes , use get_attribute and set_attribute methods
    // if ca_attr2 is 'X'
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr2.
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   get single attribute
        lo_el_cn_node->get_attribute(
          EXPORTING
            name =  `CA_ATTR2`
          IMPORTING
            value = lv_attr ).
    // if lv_attr2 is 'X' , use set_attribute method for ca_attr1
    IF lv_Attr EQ 'X' .
    DATA lo_nd_cn_node TYPE REF TO if_wd_context_node.
        DATA lo_el_cn_node TYPE REF TO if_wd_context_element.
        DATA ls_cn_node TYPE wd_this->element_cn_node .
        DATA lv_attr  LIKE ls_city-ca_attr.
    *   navigate from <CONTEXT> to <CN_VISIBLE> via lead selection
        lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_ca_attr).
    *   get element via lead selection
        lo_el_cn_node = lo_nd_cn_node->get_element(  ).
    *   set single attribute
        lo_el_cn_node->set_attribute(
          EXPORTING
            name =  `CA_ATTR1`
            value = ' ').
    ENDIF.
    regards,
    amit

  • Enable to select a check box in ALV while accessing it through portal

    Hi All,
    Currently I have given a link on portal to run a transaction code. The output of the program is ALV report, where user any select the check boxes.
    Now when I try to select a check box, it is not getting selected. I click on the checkbox, the tick appear and then the screen refreshes itself and the tick goes off. This is happening only when accessing it through portal. If i run the program in R/3 directly, I am able to select the check box.
    Please advice on this.
    Thanks
    Namit

    Reported to SAP for the same.

  • Uncheck one check box when we select other check boxes

    Hi All,
    This might be very simple question for experts. I just want to unselect one check box (this check box is to select 'ALL' and this will be selected by default) when we select any other check box (for individual categories) on same region. Can any one please suggest me how to implement this?
    Thanks in advance.
    Regards,
    Hari

    Hi Shijesh,
    Thanks for you reply.
    I'm using two items (check boxs), like P1_ALL and P1_TEST. I want to unselect P1_ALL when we select P1_TEST check box.Both the check boxes contains single value in List of values. For this I wrote script like
    <script type="text/javascript">
    function uncheckAll(pthis)
    elm = document.getElementsByName('P1_ALL');
    if(pthis.checked)
    elm.checked = false;
    </script>
    And in HTML form element attribute of P1_TEST, I have 'onclick=uncheckAll(this)'. But for some reason when I select 'P1_TEST', P1_ALL check box not getting un-selected.
    I would be grateful if you suggest what needs to correct in this one.
    Regards,
    Hari

  • Input control -Check Box Problem in webi4 over Bex query

    Hi All
    i am in webi4 over bex query
    my customer requirement is to have the option to select multiple values from object (e.g Document class) with out the need of presenting the field(e.g document class) in the report
    when I use the input control check box or list box i have the following problem
    if I select from the input control all values I see the report ok
    if I select 2 values from the list I receive #UNAVAILABLE , but if i add the field to the report ( the document class) it works fine.
    the problem is that  if I don't have the field in the report i get the #UNAVAILABLE
    any assistance is appreciated
    Thanks

    Hi,
    this question has been asked many times before on this forum, so do please search first.
    Here's some steers : http://forums.sdn.sap.com/thread.jspa?messageID=10852102#10852102
    and : http://forums.sdn.sap.com/thread.jspa?messageID=10838993#10838993
    Also, do search the knowledge base articles over here in the cross-search: www.service.sap.com/xsearch
    you keywords would be "4.0 webi #UNAVAILABLE"    (there are 12 sap notes about this)
    Finally, make sure you use all the latest Patches (Patch2.11,  2.12 next week) to include corrections.
    Regards,
    H

  • Selection using check box in std ALV grid!

    Hi all,
    I have written a custom report to show the O/p in ALV grid.
    This is my code:
    TABLES :zpo_loi.
    TYPE-POOLS : slis.
    TYPE-POOLS: icon.
    TABLES : sscrfields.
    DATA : ls_composer TYPE ssfcompop,
               ls_control TYPE ssfctrlop.
    DATA : wa_return TYPE TABLE OF bapiret2  ,
            wa_address TYPE bapiaddr3.
    DATA : wa_crmd_orderadm_h TYPE zpo_loi,
           it_po TYPE TABLE OF crmd_orderadm_h,
           wa_po TYPE bbp_pds_header.
    DATA : it_tab TYPE TABLE OF zpo_loi.
    DATA :  it_data TYPE TABLE OF crmd_orderadm_h,
            wa_data TYPE bbp_pds_header,
            et_data TYPE bbps_sf_po_output.
    DATA : w_formname TYPE tdsfname ,
           w_sfname TYPE rs38l_fnam.
    DATA :it_po_no TYPE TABLE OF select_be_obj_id,
          wa_it_po_no  LIKE LINE OF it_po_no.
    DATA :r_itab TYPE ddshretval OCCURS 0.
    DATA : it_output LIKE TABLE OF zloi,
           wa_output TYPE zloi.
    DATA : w_answer TYPE c.
    DATA : g_repid LIKE sy-repid,
          g_title TYPE lvc_title,
          g_set_pf_stat TYPE slis_formname VALUE 'SET_PF_STATUS',
          g_user_command TYPE slis_formname VALUE 'USER_COMMAND',
          g_layout TYPE slis_layout_alv,
          g_print_alv TYPE slis_print_alv,
          g_variant LIKE disvariant,
          c_char_a(1) VALUE 'A',
          c_char_x(1) VALUE 'X',
          itab_alv_sort TYPE slis_t_sortinfo_alv,
          itab_alv_fcat TYPE slis_t_fieldcat_alv.
    *       Internal tables          Begin with IT_                       *
    DATA : it_fcat TYPE slis_t_fieldcat_alv,                           "---ALV
           it_disp TYPE TABLE OF zloi.
    *       Work Area for Internal tables      Begin with WA_             *
    DATA : wa_fcat TYPE slis_fieldcat_alv ,              "---ALV
           wa_layout           TYPE lvc_s_layo,               "---ALV
           wa_it_disp LIKE LINE OF it_disp.
    DATA : it_sf_po TYPE TABLE OF crmd_orderadm_h,
           wa_sf_po TYPE bbp_pds_header.
    *SELECTION-SCREEN:
    *  BEGIN OF SCREEN 500 AS WINDOW TITLE title,
    *  END OF SCREEN 500.
    *DATA : functxt TYPE smp_dyntxt.
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS sel_po FOR zpo_loi-zobject_id.
    SELECTION-SCREEN END OF BLOCK b1.
    SELECTION-SCREEN BEGIN OF BLOCK b2 WITH FRAME TITLE text-002.
    PARAMETERS : pr_loi RADIOBUTTON GROUP grp1 USER-COMMAND ucom,
                 pr_fondo RADIOBUTTON GROUP grp1.
    SELECTION-SCREEN END OF BLOCK b2.
    *       At selection-screen output                                    *
    AT SELECTION-SCREEN OUTPUT.
      IF pr_fondo = 'X'.
        REFRESH sel_po.
        LOOP AT SCREEN.
          IF screen-name = text-003 OR screen-name = text-004.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF pr_loi = 'X'.
        LOOP AT SCREEN.
          IF screen-name = text-003 OR screen-name = text-004.
            screen-input = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    *       At selection-screen on radiobutton                            *
    AT SELECTION-SCREEN ON RADIOBUTTON GROUP grp1.
      IF pr_fondo  = 'X'.
        REFRESH sel_po.
        LOOP AT SCREEN.
          IF screen-name = text-003 OR screen-name = text-004.
            screen-input = '0'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ELSEIF pr_loi = 'X'.
        LOOP AT SCREEN.
          IF screen-name = text-003 OR screen-name = text-004.
            screen-input = '1'.
            MODIFY SCREEN.
          ENDIF.
        ENDLOOP.
      ENDIF.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_po-low.
      PERFORM populate_table.
      PERFORM f4_help.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sel_po-high.
      PERFORM populate_table.
      PERFORM f4_help.
    *       At selection-screen                                           *
    AT SELECTION-SCREEN.
    *---CHECKING THE INPUT >>>
      IF sy-ucomm = 'ONLI'.
        PERFORM f002-check_input.
        PERFORM f001-check.
      ENDIF.
    *&      Form  POPULATE_TABLE
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM populate_table .
      SELECT zobject_id
               description
      FROM zpo_loi
      INTO CORRESPONDING FIELDS OF TABLE it_tab.
      SORT it_tab BY zobject_id ASCENDING.
    ENDFORM.                    " POPULATE_TABLE
    *&      Form  F4_HELP
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f4_help .
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          ddic_structure = ' '
          retfield       = 'ZOBJECT_ID'
          dynpprog       = sy-repid
          dynpnr         = sy-dynnr
          dynprofield    = 'A'
          value_org      = 'S'
        TABLES
          value_tab      = it_tab
          return_tab     = r_itab.
    ENDFORM.                                                    " F4_HELP
    *&      Form  F001-CHECK
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f001-check .
      IF pr_fondo = 'X'.
        PERFORM display_expiring_fondos.
      ELSEIF pr_loi = 'X'.
        PERFORM fetch_po_det.
        PERFORM build_fcat.
        PERFORM alv_display.
      ENDIF.
    ENDFORM.                    " F001-CHECK
    *&      Form  F002-CHECK_INPUT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM f002-check_input .
      IF pr_loi = 'X'.
        REFRESH it_po.
        IF sel_po-low IS NOT INITIAL.
          SELECT object_id
          FROM crmd_orderadm_h
          INTO CORRESPONDING FIELDS OF TABLE it_po
          WHERE object_type = 'BUS2201'
          AND object_id = sel_po-low.
          IF sy-subrc NE 0.
            IF sel_po-high IS NOT INITIAL.
              SELECT object_id
              FROM crmd_orderadm_h
              INTO CORRESPONDING FIELDS OF TABLE it_po
              WHERE object_type = 'BUS2201'
              AND  object_id = sel_po-high.
              IF sy-subrc NE 0.
                MESSAGE e009(zsrm).
              ENDIF.
            ENDIF.
            MESSAGE e007(zsrm).
          ENDIF.
        ELSE.
          MESSAGE e010(zsrm).
        ENDIF.
        IF sel_po-high IS NOT INITIAL.
          SELECT object_id
          FROM crmd_orderadm_h
          INTO CORRESPONDING FIELDS OF TABLE it_po
          WHERE object_type = 'BUS2201'
          AND  object_id = sel_po-high.
          IF sy-subrc NE 0.
            MESSAGE e008(zsrm).
          ENDIF.
        ENDIF.
      ENDIF.
    ENDFORM.                    " F002-CHECK_INPUT
    *&      Form  FETCH_PO_DET
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM fetch_po_det .
      REFRESH it_po.
      it_po_no[] = sel_po[].
      DATA : w_count TYPE i,
             w_lines TYPE c,
             wa_header TYPE bbp_pds_po_header_d.
      REFRESH : it_po,it_output.
      IF sel_po-high IS NOT INITIAL.
        SELECT object_id
               description
               posting_date
               created_by
        FROM crmd_orderadm_h
        INTO CORRESPONDING FIELDS OF TABLE it_po
        WHERE object_type = 'BUS2201'
        AND object_id BETWEEN sel_po-low AND sel_po-high.
      ELSE.
        SELECT object_id
               description
               posting_date
               created_by
        FROM crmd_orderadm_h
        INTO CORRESPONDING FIELDS OF TABLE it_po
        WHERE object_type = 'BUS2201'
        AND object_id = sel_po-low.
      ENDIF.
      w_lines = sy-dbcnt.
      w_count = 1.
      DO.
        IF w_count LE w_lines.
          READ TABLE it_po INTO wa_po INDEX w_count.
          MOVE wa_po-object_id TO wa_output-zzpono.
          MOVE wa_po-description TO wa_output-zzpodesc.
          MOVE wa_po-posting_date TO wa_output-zzpodate.
          MOVE wa_po-created_by TO wa_output-zzpocreator.
          CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
            EXPORTING
              i_object_id = wa_output-zzpono
            IMPORTING
              e_header    = wa_header.
          CALL FUNCTION 'BAPI_USER_GET_DETAIL'
            EXPORTING
              username = wa_output-zzpocreator
            IMPORTING
              address  = wa_address
            TABLES
              return   = wa_return.
          CLEAR wa_output-zzpocreator.
          CONCATENATE wa_address-firstname '   '  wa_address-lastname INTO wa_output-zzpocreator .
          MOVE wa_header-total_value TO wa_output-zzpoval.
          MOVE wa_header-currency TO wa_output-zzpocur.
          APPEND wa_output TO it_output.
          w_count = w_count + 1.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
    ENDFORM.                    " FETCH_PO_DET
    *&      Form  BUILD_FCAT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM build_fcat .
      g_repid = sy-repid.
      g_title = 'Print LOI details'.
      g_print_alv-no_print_listinfos = 'X'.
      g_variant-report = sy-repid.
      g_variant-variant = sy-title.
      CLEAR g_layout.
      g_layout-f2code = ' '.
      wa_layout-zebra       = 'X'.
      g_layout-flexible_key = 'X'.
      g_layout-colwidth_optimize = 'X'.
      g_layout-detail_initial_lines = 'X'.
      g_layout-box_fieldname = 'ZZCHECK'.
      REFRESH it_fcat.
    *Po no
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ZZPONO' .
      wa_fcat-tabname = 'IT_DISP'.
      wa_fcat-seltext_m  = 'Purchase Order'.
    *wa_fcat-seltext_s = 'Purchase Order.
      wa_fcat-icon = 'X'.
      wa_fcat-col_pos = '2'.
      wa_fcat-outputlen = 10.
      APPEND wa_fcat TO it_fcat.
    *Description
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ZZPODESC' .
      wa_fcat-tabname = 'IT_DISP'.
    *wa_fcat-seltext_l = 'Description'.
      wa_fcat-seltext_m = 'Description'.
    *wa_fcat-seltext_s = 'Description'.
      wa_fcat-col_pos = '3'.
      wa_fcat-outputlen = 10.
      APPEND wa_fcat TO it_fcat.
    *Posting date
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ZZPODATE' .
      wa_fcat-tabname = 'IT_DISP'.
      wa_fcat-seltext_l = 'Posting Date'.
      wa_fcat-seltext_m = 'Posting Date'.
    *wa_fcat-seltext_s = 'Posting Date'.
      wa_fcat-col_pos = '4'.
      wa_fcat-outputlen = 8.
      APPEND wa_fcat TO it_fcat.
    *value
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ZZPOVAL' .
      wa_fcat-tabname = 'IT_DISP'.
    *wa_fcat-seltext_l = 'PO value'.
      wa_fcat-seltext_m = 'PO value'.
    *wa_fcat-seltext_s = 'PO value'.
      wa_fcat-col_pos = '5'.
      wa_fcat-outputlen = 15.
      wa_fcat-no_zero = 'X'.
      APPEND wa_fcat TO it_fcat.
    *Currency
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ZZPOCUR' .
      wa_fcat-tabname = 'IT_DISP'.
    *wa_fcat-seltext_l = 'PO Currency'.
      wa_fcat-seltext_m = 'PO Currency'.
    *wa_fcat-seltext_s = 'PO Currency'.
      wa_fcat-col_pos = '6'.
      wa_fcat-outputlen = 5.
      APPEND wa_fcat TO it_fcat.
    *Creator
      CLEAR wa_fcat.
      wa_fcat-fieldname = 'ZZPOCREATOR' .
      wa_fcat-tabname = 'IT_DISP'.
    *wa_fcat-seltext_l = 'Buyer'.
      wa_fcat-seltext_m = 'Buyer'.
    *wa_fcat-seltext_s = 'Buyer'.
      wa_fcat-col_pos = '7'.
      wa_fcat-outputlen = 12.
      APPEND wa_fcat TO it_fcat.
    ENDFORM.                    " BUILD_FCAT
    *&      Form  ALV_DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM alv_display .
      SORT it_output BY zzpono.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = g_repid
          i_callback_pf_status_set = g_set_pf_stat
          i_callback_user_command  = g_user_command
          i_grid_title             = g_title
          is_layout                = g_layout
          it_fieldcat              = it_fcat[]
          is_variant               = g_variant
          is_print                 = g_print_alv
        TABLES
          t_outtab                 = it_output[]
        EXCEPTIONS
          program_error            = 1
          OTHERS                   = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    *&      Form  user_command
    *       text
    *      -->R_UCOMM      text
    *      -->RS_SELFIELD  text
    FORM user_command USING r_ucomm LIKE sy-ucomm
    rs_selfield TYPE slis_selfield.                             "#EC CALLED
      DATA: gd_repid LIKE sy-repid, "Exists
      ref_grid TYPE REF TO cl_gui_alv_grid.
      IF ref_grid IS INITIAL.
        CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
          IMPORTING
            e_grid = ref_grid.
      ENDIF.
      IF NOT ref_grid IS INITIAL.
        CALL METHOD ref_grid->check_changed_data .
      ENDIF.
      rs_selfield-refresh = 'X'.
      CASE r_ucomm.
        WHEN 'PRINTLOI'.
          PERFORM call_sf.
        WHEN 'BACK'.
          CALL SELECTION-SCREEN 1000.
        WHEN 'CANCEL'.
          CALL SELECTION-SCREEN 1000.
        WHEN 'EXIT'.
          CALL SELECTION-SCREEN 1000.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  set_pf_status
    *       text
    *      -->RT_EXTAB   text
    FORM set_pf_status USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZALV' EXCLUDING rt_extab.
      SET TITLEBAR 'ZALV'.
    ENDFORM.                    "set_pf_status
    *&      Form  CALL_SF
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM call_sf .
      REFRESH it_sf_po.
      LOOP AT it_output INTO wa_output WHERE zzcheck = 'X'.
        wa_sf_po-object_id = wa_output-zzpono.
        APPEND wa_sf_po TO it_sf_po.
      ENDLOOP.
      w_formname = 'ZSR_EBP_DOCU_LETTEROFINTENT1'.
      CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
        EXPORTING
          formname           = w_formname
        IMPORTING
          fm_name            = w_sfname
        EXCEPTIONS
          no_form            = 1
          no_function_module = 2
          OTHERS             = 3.
      IF sy-subrc <> 0.
      ENDIF.
      ls_composer-tdnewid = 'X'.
      ls_control-no_dialog = 'X'.
      LOOP AT it_sf_po INTO wa_sf_po.
        CALL FUNCTION w_sfname
          EXPORTING
            control_parameters = ls_control
            output_options     = ls_composer
            wa_object          = wa_sf_po
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
        IF sy-subrc <> 0.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " CALL_SF
    *&      Form  DISPLAY_EXPIRING_FONDOS
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM display_expiring_fondos .
      SET PF-STATUS 'ZLOI'.
      SET TITLEBAR 'ZLOI'.
      TYPES : BEGIN OF ty_output1,
                guid TYPE bbp_guid,
                object_id TYPE crmt_object_id_db,
                description TYPE crmt_process_description,
                posting_date TYPE crmt_posting_date,
                zzfondo_dat TYPE zfondo_dat,
                created_by TYPE crmt_created_by,
               END OF ty_output1.
      DATA : it_output1 TYPE TABLE OF ty_output1,
             wa_output1 TYPE ty_output1,
              w_lines,
              w_count,
              it_fondo TYPE TABLE OF zsr_fondo,
              it_temp_fondo TYPE TABLE OF zsr_fondo,
              wa_temp_fondo TYPE zsr_fondo,
              wa_fondo TYPE zsr_fondo,
              w_diff TYPE p,
              wa_header1  TYPE bbp_pds_po_header_d.
      CONSTANTS : c_otype(8) VALUE 'BUS2201'.
      REFRESH : it_output1,it_temp_fondo,it_fondo.
      SELECT b~zzfondo_dat
             a~guid
             a~object_id
             a~description
             a~posting_date
             a~created_by
      INTO CORRESPONDING FIELDS OF TABLE it_output1
      FROM bbp_pdhsc AS b
      LEFT OUTER JOIN crmd_orderadm_h AS a ON b~guid = a~guid
      AND a~object_type = c_otype.
      LOOP AT it_output1 INTO wa_output1.
        CALL FUNCTION '/SDF/CMO_DATETIME_DIFFERENCE'
          EXPORTING
            date1            = sy-datum
            date2            = wa_output1-zzfondo_dat
          IMPORTING
            datediff         = w_diff
          EXCEPTIONS
            invalid_datetime = 1
            OTHERS           = 2.
        IF sy-subrc <> 0.
        ENDIF.
        IF w_diff <= '7'.
          wa_temp_fondo-zzpono = wa_output1-object_id.
          APPEND wa_temp_fondo TO it_temp_fondo.
        ENDIF.
      ENDLOOP.
    *select the final entries for PO whose FONDO is expiring
      DESCRIBE TABLE it_temp_fondo LINES w_lines.
      w_count = 1.
      DO.
        IF w_count LE w_lines.
          READ TABLE it_temp_fondo INTO wa_temp_fondo INDEX w_count.
          IF sy-subrc = 0.
            CALL FUNCTION 'BBP_PD_PO_GETDETAIL'
              EXPORTING
                i_object_id = wa_temp_fondo-zzpono
              IMPORTING
                e_header    = wa_header1.
            wa_fondo-zzpono = wa_temp_fondo-zzpono.
            wa_fondo-zzpodesc = wa_header1-description.
            wa_fondo-zzpodate =  wa_header1-posting_date.
            wa_fondo-zzexpdate = wa_header1-zzfondo_dat.
            wa_fondo-zzpoval = wa_header1-total_value.
            wa_fondo-zzpocur = wa_header1-currency.
            wa_fondo-zzpocreator = wa_header1-created_by.
            CLEAR : wa_address.
            REFRESH wa_return.
            CALL FUNCTION 'BAPI_USER_GET_DETAIL'
              EXPORTING
                username = wa_header1-created_by
              IMPORTING
                address  = wa_address
              TABLES
                return   = wa_return.
            CLEAR wa_fondo-zzpocreator.
            CONCATENATE wa_address-firstname '   '  wa_address-lastname INTO wa_fondo-zzpocreator .
            w_count = w_count + 1.
            APPEND wa_fondo TO it_fondo.
          ENDIF.
        ELSE.
          EXIT.
        ENDIF.
      ENDDO.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_structure_name = 'ZSR_FONDO'
          i_grid_title     = 'EXPIRING FONDOS'
        TABLES
          t_outtab         = it_fondo[]
        EXCEPTIONS
          program_error    = 1
          OTHERS           = 2.
      IF sy-subrc <> 0.
      ENDIF.
    ENDFORM.                    " DISPLAY_EXPIRING_FONDOS
    Now in my ALV grid o/p i can see the check box but if i select one row and then try to select another the first one gets deselected.
    Can anybody tell me what is missing?

    Hi,
    Try like changing  this
    insted of
    g_layout-f2code = ' '.
    use this
    g_layout-f2code = 'DISP'. " Sets fcode for when double
    and
    g_layout-f2code = '&ETA'. " it will display POPUP screen
    Best Regards
    Ranga
    Edited by: Ranga Swamy on Nov 1, 2008 11:07 PM
    Edited by: Ranga Swamy on Nov 1, 2008 11:17 PM

  • Select all check box at some time

    Hi all,
    I have a search display .jsp page, which have some checked box, allow the users to check the box and download data from database, righr now the use need to checked the checked the box one by one,
    bu tthey want to add other button, which allow them to select all the checked box by click the box, not ideal how to handle.
    any advise

    Hi ,
    thank you for the reply,
    I finally have time to finish this part
    the code is <script language="JavaScript" type="text/javascript">
    function checkAll(field)
    for (i = 0; i < field.length; i++)
    field.checked = true ;
    function uncheckAll(field)
    for (i = 0; i < field.length; i++)
    field[i].checked = false ;
    <input type="button" name="b1" value="Check All" onClick="checkAll(document.form1.mybox)">
    <input type="button" name="b12" value="Uncheck All" onClick="uncheckAll(document.form1.mybox)">
    </form>
    </script>

  • How to select the check box automatically

    Hi All,
    I'm using forms 6i.I have 3 check boxes.If i Select the 2nd and 3rd check box then the fist check box should be selected automatically.The 2nd and 3rd check boxes are mutliarray block attached to each other while the !st check box is not attached to them. while Can someone please tell me how to write the code for this?
    With Regards,
    Gowtham
    Message was edited by:
    Gowtham1232
    Message was edited by:
    Gowtham1232

    It's not very clear, but I think that having a WHEN-CHECKBOX-CHANGED trigger on checkbox2 and checkbox3 that says
    IF :checkbox2 = 'Y' and :checkbox3 = 'Y' THEN
      :checkbox1 := 'Y';
    ELSE
      :checkbox1 := 'N';
    END IF;assuming 'Y' is the checked value of each checkbox and 'N' the unchecked.

  • How to Select each check box values in a group of records

    Hi,
    I have a requirement in forms 10g. In that form there are 10 records are displaying each record has one check box is there if i click the check box on record number one and record number three and do some changes in the text field(adjustment field is number data type) then finally I want to see the total on one field called total amount.
    In this my question is how to select particular records in a group of records? and finally these selected records are inserted into one table.
    Because I am not able to fetch these records at a time.
    Is there any Array to define a record group to fetch each of them individually for example Rec[1],Rec[2]...like that if yes please suggest me the steps how to do this.
    Thanks in advance
    Prasanna
    Edited by: user10315107 on Dec 17, 2008 11:44 PM

    I'm sorry, but i didn't get your requirement in detail.
    Do you want to do the summing of the selected records in forms ? Or do you just want to know which records are selected and then process them?
    If you want to process the selected records in sql you could use an object-type to store the list of id's (of whatever primary key you use), loop over the block to fill it, and then afterwards process them.
    For this approach, first create an object-type in the database:
    CREATE OR REPLACE TYPE ID_LIST AS TABLE OF NUMBER;
    /Then, in forms you could do something like this to fill a list of id's:
    DECLARE
      lIds ID_LIST:=ID_LIST();
    BEGIN
      GO_BLOCK('MYBLOCK');
      FIRST_RECORD;
      LOOP
        EXIT WHEN :SYSTEM.RECORD_STATUS='NEW';
        IF :BLOCK.CHECKBOXITEM="CHECKEDVALUE" THEN
          lIds.EXTEND(1);
          lIds(lIds.COUNT):=:BLOCK.PRIMARYKEYITEM;
        END IF;
        EXIT WHEN :SYSTEM.LAST_RECORD='TRUE';
        NEXT_RECORD;
      END LOOP;
      -- Now you can use the object-list in SQL like :
      INSERT INTO MYNEWTABLE (cols..)
      SELECT (cols..)
        FROM MYOLDTABLE
       WHERE ID IN (SELECT COLUMN_VALUE FROM TABLE(lIds));
    END;Edited by: Andreas Weiden on 18.12.2008 18:17

  • Select all check boxes in alv

    hi,
      the first column of my alv grid display is check boxes. i want all the check boxes to be checked when the user clicks on the select all button present on the grid.it very urgently required.plz give me the code.
    thanks & regards,
    santosh

    Hi santosh nayak  ,
       on the action method of select all button, read the the whole alv. Set the value of the first field as abap_true. Bind the itab back to the node.
    Regards
    Sarath

  • Check box problem in struts

    I am getting several checkboxes on a JSP form that are created depending on the no. of iterator values. e.g.
    <s:iterator value="group">
    <s:checkbox name="check"/>
    <s:textfield name="name"/>
    </s:iterator>
    Now all the check boxes created are having same name i.e. check.
    I have to pass values of these boxes on the click of a button to an action class, how can i pass an array of checkbox values if i have only one element with one name. In action class, I have to determine whether the check boxes are selected or not.

    How can we use an array of struts 2 tag elements which may contain multiple check boxes.

Maybe you are looking for

  • HT1657 Why is it taking 14 hours to download a movie? My download speed tested at 4.2MB/sec

    Why is it taking 14 hours to download a movie from iTunes? My download speed tested at 4.2MB/sec

  • Constructor in jsp

    How do we define constrctor on jsp..?.Could pls reply to this topic

  • Installing Internet Explorer 5.1.7

    G3 B&W - 512 MB -350MHZ - OS 9.1 - USB HP  PRINTER. When I have installed IE 5.1.7 it fails to designate this version in the banner of "About  Internet Explorer".It declares  boldly "Internet Explorer: mac 5.1"  At the bottom of the page it registers

  • ACTIONS in TASK

    Hi, In WEBUI, we have Iteraction Record and we configured TASK (to assign some work to the employees). Now the requirement is, we need to send email to the employee when the TASK is saved. What is the standard,ACTION DEFINITION avilable for sending t

  • Power Supply Crashes Macbook Pro

    When I try to power up my Macbook Pro with the AC wall power supply plugged in -it wil not power up -light blinks and I hear rapid 'beeping'. If I unplug the PS , it boots up but if I then plug in the PS, the Macbook will eventually freeze and I'll b