IF one checked box in the same PERNR is marked, mark the rest of them?

Hi to everybody!
I've an ALV with checked boxes, now, when the user check  one check box of one PERNR I need to mark all the check boxes of that PERNR...for example
CHECKBOX                 PERNR                    DATA
      ◘                             12345                    555.74
      ◘                                                             5552
      ◘                                                           142,55
      ◘                              5214                       23
      ◘                                                             2522
For example, when the user check the first box, (12345) the next check boxes until the PERNR change must be selected, How can I make this?
Thanks a lot
Regards,

I did the same for VBELN, and it working for me, Only thing is you need to generate some action when you check the checkbox. press some button  and see how it works.
REPORT ztest_alv_check MESSAGE-ID zz .
TYPE-POOLS: slis.
DATA: x_fieldcat TYPE slis_fieldcat_alv,
it_fieldcat TYPE slis_t_fieldcat_alv,
l_layout TYPE slis_layout_alv,
x_events TYPE slis_alv_event,
it_events TYPE slis_t_event.
DATA: BEGIN OF itab OCCURS 0,
vbeln LIKE vbak-vbeln,
posnr LIKE vbap-posnr,
chk(1),
END OF itab.
SELECT vbeln
posnr
FROM vbap
UP TO 20 ROWS
INTO TABLE itab.
x_fieldcat-fieldname = 'CHK'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 1.
x_fieldcat-input = 'X'.
x_fieldcat-edit = 'X'.
x_fieldcat-checkbox = 'X'.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'VBELN'.
x_fieldcat-seltext_l = 'VBELN'.
x_fieldcat-hotspot = 'X'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 2.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
x_fieldcat-fieldname = 'POSNR'.
x_fieldcat-seltext_l = 'POSNR'.
x_fieldcat-tabname = 'ITAB'.
x_fieldcat-col_pos = 3.
APPEND x_fieldcat TO it_fieldcat.
CLEAR x_fieldcat.
CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
  EXPORTING
    i_callback_program      = sy-repid
    is_layout               = l_layout
    i_callback_user_command = 'USER_COMMAND'
    it_fieldcat             = it_fieldcat
  TABLES
    t_outtab                = itab
  EXCEPTIONS
    program_error           = 1
    OTHERS                  = 2.
IF sy-subrc NE 0.
  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
*&      Form  USER_COMMAND
*       text
*      -->R_UCOMM      text
*      -->RS_SELFIELD  text
FORM user_command USING r_ucomm LIKE sy-ucomm
rs_selfield TYPE slis_selfield.
  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.
  LOOP AT itab WHERE chk = 'X'.
    itab-chk = 'X'.
    MODIFY itab  TRANSPORTING chk WHERE vbeln = itab-vbeln .
  ENDLOOP.
  rs_selfield-refresh = 'X'.
  BREAK-POINT.
ENDFORM. "USER_COMMAND

Similar Messages

  • How to disable one check box when another is checked

    Hi, I'm a first time user.
    i am trying to make text fields appar and dissapaer when check boxes are ticked. but only alow one check box to be active at one time. 
    I am making a simple form in Acrobat pro 9,
    I have two check boxes Checkbox1 & Checkbox2.
    I have two text fields Textfield1 & Textfield2
    i have added actions to checkbox1 & checkbox2 to 'hide or show' the text fields.
    Action --> on focus (checkbox1) show/hide field (textfield1) is hide
    Action --> on focus (checkbox1) show/hide field (textfield2) is show
    oposite
    Action --> on focus (checkbox2) show/hide field (textfield2) is hide
    Action --> on focus (checkbox2) show/hide field (textfield1) is show
    problem 1 - how to disable checkbox1 when checkbox 2 is ticked.
    or disable checkbox2 when checkbox1 is ticked.  
    my other problem is that this action has the same effect for ticking or unticking the checkbox.
    thanks in advance to anyone who can help.
    can you please write your answer in simple terms. Basically this is the first time i have used acrobat pro so please dont assume any knowledge at all. thansk very much .

    First, I would experiment with just check boxes and learn their properties and how they can interact.
    Have you tried using the same name for 2 check boxes and assign a different "export value" to each check box.
    Have you looked at the values a check box or boxes have when checked or un-checked?
    Have you looked at how the various actions for a field work?

  • 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

  • How to select One Check Box at a time

    Dear All
    I have 10 records in details blok and also I have 10 check boxes .
    I want user can only check one check box at a time .
    For example If first record I have checked and i am trying to check the last record then the first record UNCHECKED and the last record will checked .
    Like how redio buttons work ..
    How can i do that ..?
    I have done like this :-
    1st I have declare a global variable in PRE_FORM :GLOBAL.CNT := 'N';
    Then
    WHEN-CHECKBOX-CHANGED trigger
    IF CHECKBOX_CHECKED(EMP.CHK') THEN
        IF :GLOBAL.CNT != N THEN
            :EMP.CHK := Null
       HERE what to write ???
            RAISE FORM_TRIGGER_FAILURE;
        ELSE
            :GLOBAL.CNT := Y;
        END IF;
    ELSE
        :GLOBAL.CNT := N;
    END IF;Edited by: LuKKa on Aug 29, 2012 1:12 PM
    Edited by: LuKKa on Aug 29, 2012 1:13 PM

    LuKKa,
    An easier method would be to use a Calculated Field to summarize the value of your CHECKBOX Item. For example, add a non-table item (call it SUM_CHECKED) to your detail block and do not assign it to canvas - so it will not be displayed. Then set the following properties of the SIM_CHECKED item:
    Database Item = No
    Calculation Mode = Summary
    Summary Function = Sum
    Summarized Block = <YOUR DETAIL BLOCK>
    Summarized Item = <YOUR CHECKBOX ITEM>
    Next, you will need to change your Detail Block property Query All Records to YES (this is required for the Calulated Item).
    Now, make sure your checkbox is data type NUMBER and has the following minimum properties set:
    Data Type = Number
    Maximum Length = 1
    Initial Value = 0
    Value when Checked = 1
    Value when Unchecked = 0
    Check Box Mapping of Other Values = Not Allowed or Unchecked
    Now, in your Checkbox Item's When-Checkbox-Changed trigger add code similar to this:
    IF ( CHECKBOX_CHECKED('YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM') ) THEN
       IF ( :YOUR_DETAIL_BLOCK.SUM_CHECKED > 1 ) THEN
       --Reset the checkbox
       :YOUR_DETAIL_BLOCK.YOUR_CHECKBOX_ITEM := NULL;
       MESSAGE('You can only check one item.');
       Message(' ');
       RAISE Form_Trigger_Failure;
       END IF;
    END IF;I have confirmed this method works and it is more efficient than looping through your records to see if other checkboxes are checked.
    Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.

  • 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

  • How to validate that only one check box is checked in detail block

    Hi All,
    I am using oracle Forms 10G on windows.
    I need help on how to validate that only one check box is checked in detail block. I have multiple records in the detail block and I have check boxes for each record in the detail block.
    I have a button to select the values from the detail records where the check box is checked. But I want to make sure that only one record is check not more than one.
    How do I validate this on a push button trigger?
    Thanks

    When I've done this kind of thing, I create a Form level variable of TYPE number and then add or subtract to this variable as I check and uncheck the checkboxes. If the value of the variable is 1, then you know that only one checkbox is selected. If the value is greater than 1, then you know the user has selected more than one check box. You could also add code to your When-Checkbox-Changed trigger to test the variable and instruct the user to un-check selected record before selecing a new record.
    With respect to the Form level variable, you can use a GLOBAL, PARAMETER or Program Unit package specification. I prefer to use the PU Package Spec as this method has a smaller memory footprint. For example, in the Program Unit node of the object navigator create the following;
    /* Form variables package spec */
    PACKAGE Form_Vars IS
      CheckBox_Cnt     NUMBER := 0;
    END;Now in your When-Checkbox-Changed trigger...
    BEGIN
       IF ( Form_Vars.CheckBox_Cnt = 0 ) THEN
          Form_Vars.CheckBox_Cnt  := Form_Vars.CheckBox_Cnt  + 1;
       ELSE
          /* it's assumed the value is greater than 0 */
          Message('Please uncheck selec ted record before choosing a new record.');
          RAISE Form_Trigger_Failure;
       END IF;
    END;Hope this helps,
    Craig B-)
    If someone's response is helpful or correct, please mark it accordingly.
    Edited by: CraigB on Feb 3, 2011 10:15 AM

  • I'm trying to update my Photoshop CS5, but continue to receive the same problem every time. The application manager update dialogue box simply states "some updates failed to install." There's no specific error code, but a link to contact support for furth

    I'm trying to update my Photoshop CS5, but continue to receive the same problem every time. The application manager update dialogue box simply states "some updates failed to install." There's no specific error code, but a link to contact support for further assistance. It doesn't take me to customer support, but does take me to a screen which states. "Error "This serial number is not for a qualifying product." I've checked my account and the product serial number is associated with my account., so I don't see any problem.  I have not been able to find a resolution to this problem, so I hope that someone can point me in the right direction.  Thank you!

    update directly, Product updates

  • Newtab question: How do I ''input'' the nine (yes 3X3) boxes to be my specific permanent sites exactly the same each time I hit the newtab+?

    Newtab question: How do I ''input'' the nine (yes 3X3) boxes to be my specific permanent sites exactly the same each time I hit the newtab+? I know that I can hit the 'save' button but I want it to be MY selection before the save. Evert time I hit the newtab it seems to use my history to keep moving them up the line.
    I have used google.com/ig as my home for years. In November the sites that are my personal choices will be gone as Google has decided to eliminate "IG"!
    For example the NYTimes (with about 5-6 daily lead articles) appear in my upper left of the personalized home site. I would at least like to see that summary. At least with Newtab I can save it.
    Is there a program step in FF that I can achieve my results and put nine sites into it and click them to be permanent as well as being able to edit them in the future?

    You can change the order of the boxes on the about:newtab page and drag an item to a different slot to pin it to that position or you can remove a website by clicking the close X to block that URL.
    You can drag a bookmark or history item and drop them in a slot on the about:newtab page to pin them and have your own favorites sites showing.
    Changes made manually on the about:newtab page are stored in the browser.newtabpage.pinned (default = [null]) and browser.newtabpage.blocked prefs that you can check/modify on the about:config page.

  • Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

  • My business is buying ipads for our technicians.  They all need the same app.  If I buy one app, can more than one user use it at the same time if they have the same apple id?

    My business is buying ipads for our technicians.  How many users can share one apple id & how many users with the same apple id can use the same app at the same time?

    Use VPP.  Select an MDM.  Read the Google doc below and nsdjoey write up.
    IT Resources -- ios & OS X -- This is a fantastic web page.  I like the education site over the business site.
    View documentation, video tutorials, and web pages to help IT professionals develop and deploy education solutions.
        http://www.apple.com/education/ipad/resources/
        scroll down after all the pretty picture.  Click on the words "For It".
        business site is:
        http://www.apple.com/lae/ipad/business/#browse-it-resources
        If necessary, scroll down until you see the Browse IT Resources button.  Click on button.
    Joe Rowe's Excellent guides
    IT managers who are new to configurator and managing a cart of ios devices:
          https://docs.google.com/document/d/1SMBgyzONxcx6_FswgkW9XYLpA4oCt_2y1uw9ceMZ9F4/ edit?pli=1
             [ original announcement  -- https://discussions.apple.com/thread/4256735?tstart=0 ]
    Quick help presentation for students:
         https://docs.google.com/presentation/d/18937JdleX2gymtSb8zfbDczV-76BdR2DIfCV9eJi yOE/edit#slide=id.g1b776944_0_224
    good tips for initial deployment:
    https://discussions.apple.com/message/18942350#18942350
    https://discussions.apple.com/thread/3804209?tstart=0
    See nsdjoey writeup.  See third post.
    https://discussions.apple.com/message/22286109#22286109
    Institutions in the USA and other countries can use the App Store Volume Purchase Program (VPP) to buy Apps.
    https://support.assistiveware.com/index.php?pg=kb.page&id=54
    "Deploying a great quantity of iOS devices means creating a great quantity of Apple IDs. This script allows automated Apple ID creation from a spreadsheet."
    http://www.enterpriseios.com/wiki/Apple_ID_Automation_Builder

  • My husband has an iPad and I just got one for me.  We both have the same e-mail address.  The message I get when I try to set my new one up is that the Apple ID is already in use.  How do I set up with our shared e-mail account

    My husband has an iPad and I just got one for me.  We both have the same e-mail address.  The message I get when I try to initiate setup is that the Apple ID is already in use.  Any ideas on how to complete the setup of the new iPad since we both share the e-mail account?

    If you selected open a new Apple ID account, go back a step and enter use existing Apple ID.
    You will have to set up a separate iCloud account or your iPads will mirror each other.

  • My family shares one apple id. Is there any way to make an apple id for each member of my family and have it all connected to the same credit card and have the same previous downloads open to download by signing in to each members personal apple id?

    My family shares one apple id. Is there any way to make an apple id for each member of my family and have it all connected to the same credit card and have the same previous downloads open to download by signing in to each members personal apple id?

    Hi cindy,
    If you all have individual Apple IDs, then you would be able to dowload music from a shared iTunes library on a computer, but you would not be able to sign on each individual ID on an iOS device in order to download music purchased under the original Apple ID without a 90-day waiting period between sign-ons.
    Here's what I mean:
    If you were to sign on a new Apple ID on, say, an iPhone, and then were to purchase and download some music from iTunes, then you would have to wait 90 days before you could sign on the old Apple ID to that iPhone in order to download previously purchased material (and vice versa).
    However, if all of the music purchased by that origjnal Apple ID is in an iTunes library on a shared computer, then you can hook up the device and selectively sync any music in that library to the device. You can also sign on any of the Apple IDs to that shared iTunes library and purchase music to be added to the library.
    You would need to authorize the computer for each of the new Apple IDs.
    Each of the Apple IDs would also be able to download that music purchased either by syncing to the iTunes library on the computer or by downloading it OTA on the device.
    So, each Apple ID can download music, movies, etc. purchased with that Apple ID OTA to the device. Also each Apple ID can sync any music, movies, etc. that are in the iTunes library on the computer regardless of who purchased them.
    The only other thing you would need to remember is that if an App needed to be updated, then the original Apple ID that was used to purchase that App would come up, and the password that goes with that Apple ID would be required to do the update.
    Hope that helps,
    GB

  • If I have two appointments at the same time, they overlap in the iOS 7 calendar rather then appearing side-by-side so that I can't read one of them due to the identical colors of the two appointments.  Is there any way to fix this with a setting?

    If I have two appointments at the same time, they overlap in the iOS 7 calendar rather than appearing side-by-side in the daily view, so that I can' read both of them due to the same background color.  Is there a way to change this via a settings change?

    I fyou have "all day" event that are taking up the entire day, check the event. All day event only appear at the top of the time line (and just below the week view). I suspect they are not actually set up as all day, but have specific time frames assigned.
    In teh screen shot below, "Sample" is an all day event; NFL: CAR@SF is not.

  • HT1725 In a download of an entire album, one song download was interrupted.  I have followed the instructions for resuming the download, but each time I attempt to resume the download the same error message appears saying the download was interrupted. Ans

    While downloading an album in from the Store, one song was interrupted.  I have followed the instructions from apple about resuming the download, but every time I do so the same error message appears saying the download was interrupted.  I am having no connection problems, have rebooted my computer, downloaded the lates version of iTunes, etc., yet nothing changes.  Has anyone else experienced this, and are there any workarounds.  Sadly the problem hit on one of the best songs of the album.

    I had the same problem so (assuming under the Purchased items in the Store you have a song stuck at 'Downloading'):
    I went to Music, then Artists.
    From there I chose the album.
    The song that failed to download had the cloud symbol next to it.
    I clicked the cloud symbol and the song completed the download for me.
    (Please note this was in iTunes for Windows - I expect it to be similar in iTunes for Apple)
    Message was edited by: UbergeekRFC - parenthetical note added
    Message was edited by: UbergeekRFC - added note about song stuck as downloading

  • How do I delete duplicate songs in my iTunes? I have hundreds and I don't want to delete them one by one. They were all added on the same date, so sorting by the date won't help.

    How do I delete duplicate songs in my iTunes? I have hundreds and I don't want to delete them one by one. They were all added on the same date, so sorting by the date won't help.

    Hi, if this is in regards to your library simply open up itunes and do the following steps:
    Click File
    Scroll down to "show duplicates"
    A list will then appear of your duplicate song titles.
    Be sure to CAREFULLY review each song to make sure it is a duplicate ( as I have some music that is the same song but live, acoustic etc...)
    Proceed to manually delete each song from the list and leave alone any song that you wish to keep.
    Best of luck,
    Cait

Maybe you are looking for