Modifying table by selecting checkboxes  in basic list

Hi
I have a basic list whose first two fields are checkboxes.
I have to select only one checkbox from first list and can have multiple selections in second checkbox.
In a row only one checkbox can be selected.
Based on these selections i have to update a table with the other entries of my basic list.
how do i do it???

Hi1
In the transaction cj20n I had been asked to create a checkbox for multi well option which I have created. At the project level as well as the WBS level they want this checkbox which I have created. Now it is required that when chech box is checked, it should validate the remote sump field and populate it with valid location based on the DLS or NTS selection as radiobutton.
If the checkbox is unchecked, it shld validate the surface location field and populate it,If DLS or NTS selected , it validates the surface loaction  with valid surface location based on DLS or NTS selection.
The coding for the screens are as follows , but I am not sure if it is correct as it dosent give the desired result.Kindly help me out a sits an urgent work given and help will be hihgly appreciated and rewarded.
As per the current functionality , if DLS or NTS selected and well ID populated, validate that the well ID adheres to the appropriate formatting.
This is for screen 600 similary I have done for screen 700 but I am not able to validate still  or get teh result. zzmulti_well is the field for new checkbox option created (multi well).
MODULE check_0600_zsurflocn INPUT.
IF proj-zzmulti_well IS  INITIAL.
  IF proj-zzsurflocn IS NOT INITIAL.
    CASE 'X'.
      WHEN proj-zzdls.
        lv_result =  zcl_well=>check_dls_sr( location_id = proj-zzsurflocn ).
        IF lv_result IS INITIAL.
          MESSAGE e003(zwell). " Not a valid DLS surface location
        ENDIF.
      WHEN proj-zznts.
        lv_result =  zcl_well=>check_nts_sr( location_id = proj-zzsurflocn ).
        IF lv_result IS INITIAL.
          MESSAGE e004(zwell). " Not a valid NTS surface location
        ENDIF.
    ENDCASE.
  ENDIF.
ENDIF.
ENDMODULE.                 " check_0600_zsurflocn  INPUT
*&      Module  check_0600_zremsump  INPUT
Remote sump validation.
MODULE check_0600_zremsump INPUT.
IF proj-zzmulti_well IS NOT INITIAL.
  IF proj-zzremsump IS NOT INITIAL.
    CASE 'X'.
      WHEN proj-zzdls.
        lv_result =  zcl_well=>check_dls_sr( location_id = proj-zzremsump ).
        IF lv_result IS INITIAL.
          MESSAGE e005(zwell).  " Not a valid DLS remote sump
        ENDIF.
      WHEN proj-zznts.
        lv_result =  zcl_well=>check_nts_sr( location_id = proj-zzremsump ).
        IF lv_result IS INITIAL.
          MESSAGE e006(zwell).  " Not a valid NTS remote sump
        ENDIF.
    ENDCASE.
  ENDIF.
ENDIF.
ENDMODULE.                 " check_0600_zremsump  INPUT
Kindly help pleaseeee.
Aarav

Similar Messages

  • Control checkbox in basic list

    I have write a checkbox in basic list and i have created a status for the list, and when i click the checkbox it doesn´t works to the event at line-selection, i have tried with the hide command too, but it doesnt goes to the event, i think that it goes before creating the status and write the checkbox, does anybody know how to resolve it?,
    Thanks in advance

    I do not believe that you can fire an event when checking a checkbox in a list display.  Please see the following program as it allows the user to click a "DISPLAY" button and then it will read all of the select lines.
    report zrich_0001 no standard page heading.
    data: begin of ivbak occurs 0,
          check type char01,
          vbeln type vbak-vbeln,
          end of ivbak.
    data: lines type i.
    select-options: s_vbeln for ivbak-vbeln.
    start-of-selection.
    set pf-status 'LIST'.
      select vbeln into corresponding fields of table ivbak
          from vbak
              where vbeln in s_vbeln.
      loop at ivbak.
        write:/ ivbak-check as checkbox, ivbak-vbeln.
      endloop.
    at user-command.
      case sy-ucomm.
        when 'DISPLAY'.
    * Mark the internal table for the checkboxes selected on list
          describe table ivbak lines lines.
          do lines times.
            read line sy-index field value ivbak-check.
            if  ivbak-check = 'X'.
              read table ivbak index sy-index.
              if sy-subrc  = 0.
                ivbak-check = 'X'.
                modify ivbak index sy-index.
              endif.
            endif.
          enddo.
    * Now display the sales order for all select SD docs
          loop at ivbak where check = 'X'.
            set parameter id 'AUN' field ivbak-vbeln.
            call transaction 'VA03' and skip first screen..
          endloop.
      endcase.
    Regards,
    Rich Heilman

  • Drill down report:hide multiple line from basic list and disp in secon list

    hi experts ,
    I was using checkbox in basic list and user is suppose to check or tick the checkbox .
    So in the secondary list I want to display only those row which which are selected (or checked) in checkbox  by the user .
    I had tried to use HIDE techineque but it is storing (or hiding) only single (the last which was checked) row and not multiple rows , thats why only single row is display on to secondary list .
    So how to hide (or store) multiple row in secondary list to solve this problem  .
    thanks and warm regards ,
    mehar .
    Edited by: MEHAR RALEKAR on Sep 24, 2008 5:37 PM

    Hi,
        You can include the Checkbox field in your Internal Table of type i and when the AT LINE-SELECTION is generated, check for those entries in your internal table with the Checkbox = 'X'. Move them into a Separate Internal Table and Display them in your Secondary List.
    Hope it was Helpful.
    Thanks and Regards,
    Venkat Phani Prasad Konduri

  • How to handle multiple selection in the Spark List control with checkbox as itemrenderer?

    Hi All,
    I am using checkbox as an ItemRenderer in spark list.
    I have a query.
    how to handle multiple selection in the Spark List control with checkbox as itemrenderer?
    how to retrieve the selected item label?
    Thank you in advance.

    Hi there, I'll tweak your code a little bit to something like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.CheckBox;
               [Bindable]
               private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
                private function onChange(e:ListEvent):void
                   if(CheckBox(e.itemRenderer).selected){
                             mySelectedIndexes.addItem(e.rowIndex);
                   }else{
                                  mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));     
                   chkList.selectedIndices=mySelectedIndexes.toArray();
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox"  itemClick="onChange(event);" allowMultipleSelection="true"/>
    </mx:Application>

  • Query to find out list of the tables getting selected frequently

    Hi All,
    Please tell me Is there any way to find out list of the tables getting selected frquently, ( please exclude the insert+updates+deletes+truncate+drop).
    Regards

    Hi Sameer
    You can check V$SQL_PLAN to see the objects being accessed by your SQL statements. If you have diagnostic licence, you can also check DBA_HIST_SQL_PLAN
    select distinct object_owner, object_name from v$sql_plan;
    select object_name, count(*) from v$sql_plan group by object_nameRemeber, this is only a crude way of finding this information.
    Regards
    Venkat

  • SAP Query: Display Selection Fields in the header page of Basic list

    Hello,
    I have to display the selection fields in the header page of the basic list and statistics
    in a SAP Query.
    I know the usage of short names for fields in the header page, but this doesn't work
    for the selection fields.
    How can I display the selection fields in header pages?
    Kind regards
    Thomas

    Try using:
    DATA: wa_lstab TYPE line
    READ LINE sy-index line value INTO wa_lstab
    Thanks,
    SKJ

  • Refresh Classical report/basic list

    Hi,
    I have created a classical report/basic list where user can select check boxes and adjacent rows should be deleted. But after the action, I wish to refresh the report and remove the selected lines from displaying.
    Please let me know how to achieve this.
    Thanks in advance.
    Nitin

    Hi Nitin,
    Check the following program.
    Here on pressing the delete push button(FCODE: DELETE) it will delete all
    rows which has adjacent checkboxes checked.
    REPORT ztest_list_processing NO STANDARD PAGE HEADING .
    TYPES: BEGIN OF ty_tab,
           delete,
           f1(3) TYPE c,
           f2(3) TYPE c,
           f3(3) TYPE c,
           END OF ty_tab.
    DATA: it_tab TYPE TABLE OF ty_tab,
          wa_tab TYPE ty_tab.
    DATA: w_delete TYPE c,
          w_lines TYPE i,
          w_ind TYPE i.
    wa_tab-f1 = '111'.
    wa_tab-f2 = 'ABC'.
    wa_tab-f3 = '123'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '222'.
    wa_tab-f2 = 'DEF'.
    wa_tab-f3 = '456'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '333'.
    wa_tab-f2 = 'GHI'.
    wa_tab-f3 = '789'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '444'.
    wa_tab-f2 = 'JKL'.
    wa_tab-f3 = '987'.
    APPEND wa_tab TO it_tab.
    wa_tab-f1 = '555'.
    wa_tab-f2 = 'MNO'.
    wa_tab-f3 = '654'.
    APPEND wa_tab TO it_tab.
    SET PF-STATUS '100'. "Contains Delete button
    PERFORM print_output.
    "Logic which you can implement
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'DELETE'.
          DESCRIBE TABLE it_tab LINES w_lines.
          DO w_lines TIMES. "To read all rows
            CLEAR: wa_tab.
            READ LINE w_ind FIELD VALUE wa_tab-delete
                                           wa_tab-f1. "Getting the values
            IF wa_tab-delete EQ 'X'. "Delete when check box is 'X'
              DELETE it_tab WHERE f1 = wa_tab-f1.
            ENDIF.
            ADD 1 TO w_ind."Index for next line
          ENDDO.
          IF it_tab IS INITIAL.
            WRITE: / 'There are no data in the table'.
          ELSE.
            PERFORM print_output. "Reprint the updated data(like refreshing)
          ENDIF.
          "Modified the existing Back button in standard Toolbar so that on
          "pressin the back button it will come to program and not to
          "previous displayed list
        WHEN '&BACK'.
          LEAVE SCREEN.
      ENDCASE.
    *&      Form  print_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM print_output.
      LOOP AT it_tab INTO wa_tab.
        WRITE:/ wa_tab-delete AS CHECKBOX INPUT ON, "Display as checkbox
              wa_tab-f1,
              wa_tab-f2,
              wa_tab-f3.
        IF sy-tabix EQ 1.
          w_ind = sy-linno. "Get the line position of first row
        ENDIF.
      ENDLOOP.
    Hope this helps you.
    Regards,
    Manoj Kumar P

  • Push button "Select Block" on the list screen?Interactive report

    Hi, i am developing a plain report(Use read data & write output, not ALV).
    And there was a checkbox(itab-chx) before each line of the output list.
    The customer wants me to add 4 buttons on the menu bar, they are 'Delete', 'Select ALL', 'Deselect all',  <b>'Select block'</b>.
    As far as i know that 'Delete' button is for the user to delete the entries which they have checked using the checkbox.
    As for 'Select ALL' is that when they push this button, all the checkbox on the output list are checked.
    As for 'Deselect all' is that ...all are unchecked.
    <b>BUT</b> i dont have any idea on 'Select Block' function?? What it is and how to program and handling with this button???
    Below is my code for those button, just dont know what 'Select block' means
    at user-command.
      case sy-ucomm.
        when 'DLT'. 'Delete
             'Do delete things...
        when 'SLL'. 'Select all     
          loop at itab.
            itab-chx = 'X'.
            modify itab index sy-tabix.
          endloop.
          sy-lsind = 0.
          perform output.
        when 'DSL'. 'Deselect all
          loop at itab.
            itab-chx = ' '.
            modify itab index sy-tabix.
          endloop.
          sy-lsind = 0.
          perform output.
        when 'SBL'.  'Select block
          '???? No idea at all!!!
      endcase.
    Great thanks!!! Any helps?
    Hoo lala 
    Message was edited by:
            Hoo lala
    Message was edited by:
            Hoo lala

    Refer this demo report, it is having 2 buttons one Call (defined in PF status) and other one PA30 one.
    u have to create a PF status, and there in Application Toolbar option i have cretaed a button Named Call. like tht u can create more buttons as per ur requirement.
    REPORT  ZGILL_CALLREPORT                        .
    DATA: L_PERNR(20).
    parameters : p_rname(20) obligatory DEFAULT 'NONE'.
    INCLUDE <icon> .
    selection-screen pushbutton 60(20) gocfg user-command amit.
    AT SELECTION-SCREEN OUTPUT.
    write icon_configuration as icon to gocfg.
    concatenate gocfg 'Go to PA30' into gocfg.
    AT SELECTION-SCREEN.
    if sy-ucomm = 'AMIT'.
    SET PARAMETER ID 'PER' FIELD '10000000'.
    call transaction 'PA30'.
    ENDIF.
    Start-of-selection.
    write: 'This Report is called by report',' ',p_rname left-justified.
    set pf-status 'TEST'.
    AT USER-COMMAND.
    CASE SY-UCOMM.
    WHEN 'CALL'.
    submit zgill_it using selection-set 'TESTING_IT'
           exporting list to memory and return.
    perform get_output.
    WHEN '&F03'.
      LEAVE SCREEN.
    WHEN '&F15'.
      LEAVE PROGRAM.
    ENDCASE.
    *&      Form  get_output
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form get_output .
    data : listobject like abaplist occurs 0.
    CALL FUNCTION 'LIST_FROM_MEMORY'
      TABLES
        listobject       = listobject
    * EXCEPTIONS
    *   NOT_FOUND        = 1
    *   OTHERS           = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    CALL FUNCTION 'DISPLAY_LIST'
    * EXPORTING
    *   FULLSCREEN                  =
    *   CALLER_HANDLES_EVENTS       =
    *   STARTING_X                  = 10
    *   STARTING_Y                  = 10
    *   ENDING_X                    = 60
    *   ENDING_Y                    = 20
    * IMPORTING
    *   USER_COMMAND                =
      TABLES
        listobject                  = listobject
    * EXCEPTIONS
    *   EMPTY_LIST                  = 1
    *   OTHERS                      = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    refresh listobject.
    endform.                    " get_output

  • Check box in basic list

    Hi frieds,
    I wants to display a list of record in basic list and also one chek box for every record.
    Then based on selected check box i want to cancel that record in database means i want to set it's flag. also in application toolbar of basic list display cancel button.
    can  any one gives me code for this.
    Thank you.
    Regards,
    Virat

    Hi
    See the sample example code
    and do accordingly
    TABLES:MARA.
    DATA:BEGIN OF GT_MARA OCCURS 0,
    MATNR LIKE MARA-MATNR,
    END OF GT_MARA,
    GV_CB,
    GV_CBV,
    GV_LINES TYPE I,
    INDEX TYPE I,
    SY_INDEX TYPE I,
    GV_LINES1 TYPE I,
    MATNR LIKE MARA-MATNR.
    SELECT-OPTIONS:S_MATNR FOR MARA-MATNR.
    SELECT
    MATNR FROM MARA
    INTO TABLE GT_MARA
    WHERE MATNR IN S_MATNR.
    IF SY-SUBRC = 0.
    DESCRIBE TABLE GT_MARA LINES GV_LINES.
    ENDIF.
    LOOP AT GT_MARA.
    WRITE:/ GV_CB AS CHECKBOX,
    GT_MARA-MATNR.
    ENDLOOP.
    CLEAR GT_MARA.
    WRITE:'Total num of records is ',GV_LINES.
    SET PF-STATUS 'DEL'.
    AT USER-COMMAND.
    IF SY-UCOMM = 'DEL' OR SY-UCOMM = 'PICK'.
    DO 50 TIMES.
    SY_INDEX = SY-INDEX.
    READ LINE SY_INDEX FIELD VALUE GV_CB
    GT_MARA-MATNR INTO MATNR.
    IF GV_CB = 'X'." AND MATNR IS NOT INITIAL.
    LOOP AT GT_MARA." WHERE MATNR = MATNR.
    DELETE GT_MARA.
    CLEAR GT_MARA.
    ENDLOOP.
    delete gt_mara index sy_index.
    ENDIF.
    ENDDO.
    DESCRIBE TABLE GT_MARA LINES GV_LINES1.
    WRITE:'Total num of records is ',GV_LINES1.
    CLEAR:GV_LINES .
    LOOP AT GT_MARA.
    WRITE:/ GT_MARA-MATNR.
    ENDLOOP.
    ENDIF.
    Reward points for useful Answers
    Regards
    Anji

  • Button in basic list

    Hi
    I want to set a button in basic list of a transaction,not an ALV.
    I don't want to see the button in the detail list. How should i set this and where. Ideally where should  pf-status  be set in ?.
    Answers will be  rewarded.
    Thanks
    Varun Mathur
    Edited by: Varun Mathur on Feb 12, 2008 7:42 AM

    HI,
       check this program. in this the basic list has the gui and not the detail list...here the detail list is done using alv..dont worry abt that.
    report  z_banks1_rp1.
    TABLE
    tables : zacc_master2.
    TYPE-POOLS
    type-pools slis.
    *INTERNAL TABLE
    data : itab like zacc_master2 occurs 0 with header line.
    data : itab1 like zacc_master2 occurs 0 with header line.
    DATA
    data : gt_fcat type slis_t_fieldcat_alv,
           fcat like line of gt_fcat.
    data : check type c length 1,
           wa type c length 20.
    select * from zacc_master2 into table itab.
    write : '       ACCOUNT NUMBER' intensified color 3.
    loop at itab.
    write: / check as checkbox, itab-zaccno.
    endloop.
    hide : itab.
    START OF SELECTION
    start-of-selection.
    set pf-status 'ZMBANKS1'.
    AT LINE SELECTION
    at line-selection.
    AT USER-COMMAND
    at user-command.
    case sy-ucomm.
    when 'SUBMIT'.
    do.
    read line sy-index field value check itab-zaccno into wa.
    if sy-subrc <> 0.
    exit.
    elseif check = 'X'.
    read table itab with key zaccno = wa.
    if sy-subrc eq 0.
    move-corresponding itab to itab1.
    append itab1.
    endif.
    endif.
    enddo.
    CALLING SUB-ROUTINE
    perform fieldcatalog.
    CALLING FUNCTION MODULE
    call function 'REUSE_ALV_LIST_DISPLAY'
    exporting
    it_fieldcat = gt_fcat[]
    tables
    t_outtab = itab1.
    when 'BACK'.
    call screen 0002.
    *WHEN 'BACK1'.
    *CALL SCREEN 0002.
    endcase.
    SUB ROUTINE DECLARATION
    form fieldcatalog.
    fcat-seltext_l = 'ACCOUNT NUMBER'.
    fcat-fieldname = 'ZACCNO'.
    fcat-tabname = 'ITAB1'.
    append fcat to gt_fcat.
    fcat-seltext_l = 'CUSTOMER ID'.
    fcat-fieldname = 'ZCUSTID'.
    fcat-tabname = 'ITAB1'.
    append fcat to gt_fcat.
    fcat-seltext_l = 'ACCOUNT TYPE'.
    fcat-fieldname = 'ZACCTYPE'.
    fcat-tabname = 'ITAB1'.
    append fcat to gt_fcat.
    fcat-seltext_l = 'ACCOUNT BALANCE'.
    fcat-fieldname = 'ZBAL'.
    fcat-tabname = 'ITAB1'.
    append fcat to gt_fcat.
    fcat-seltext_l = 'ACCOUNT CREATED DATE'.
    fcat-fieldname = 'ZACCDATE'.
    fcat-tabname = 'ITAB1'.
    append fcat to gt_fcat.
    fcat-seltext_l = 'STATUS'.
    fcat-fieldname = 'ZSTAT'.
    fcat-tabname = 'ITAB1'.
    append fcat to gt_fcat.
    endform.
    Please reward if it is helpful.
    regards,
    sri

  • Capture the Selected Checkboxes on the Outoput(Resolved)

    Hi
    I have a Requirement to display some order numbers on the basic list( out put).First column of  each record is a check box .( create using as check box in write statement). and  i have a button on the application tool bar. <b>Now if the user selects some of those records</b> ( any number and at any place ) and press the process button  then  <b>i need to capture those records in the program for further processing.</b> Can anybody help me  how to capture the selected check box records on the output to program..??Thanks a lot.
    Message was edited by: Deadlock1

    Hi,
      Check this below program for your reference.
    This is SAP example.
    REPORT demo_list_read_line NO STANDARD PAGE HEADING.
    TABLES: sflight.
    DATA: box(1) TYPE c, lines TYPE i, free TYPE i.
    START-OF-SELECTION.
      SET PF-STATUS 'CHECK'.
    GET sflight.
      WRITE: box AS CHECKBOX, sflight-fldate.
      HIDE: sflight-fldate, sflight-carrid, sflight-connid,
            sflight-seatsmax, sflight-seatsocc.
    END-OF-SELECTION.
      lines = sy-linno - 1.
    TOP-OF-PAGE.
      WRITE: 'List of flight dates'.
      ULINE.
    TOP-OF-PAGE DURING LINE-SELECTION.
      WRITE:  'Date:', sflight-fldate.
      ULINE.
    AT USER-COMMAND.
      CASE sy-ucomm.
        WHEN 'READ'.
          box = space.
          SET PF-STATUS 'CHECK' EXCLUDING 'READ'.
          DO lines TIMES.
            READ LINE sy-index FIELD VALUE box.
            IF box = 'X'.
              free = sflight-seatsmax - sflight-seatsocc.
              IF free > 0.
                NEW-PAGE.
                WRITE: 'Company:', sflight-carrid,
                       'Connection: ',sflight-connid,
                     / 'Number of free seats:', free.
              ENDIF.
            ENDIF.
          ENDDO.
      ENDCASE.
    Hope it serves your purpose.
    Regards,
    Vara

  • How can I retrieve selected checkboxes by user into a JPA application?

    Hello, I'm developing an app in JPA, still learning this, I'm displaying some checkboxes which I save into a List, then I separate the selections and put them into an Array, which I convert into String and that's what I store into MySQL table, this is what I have on the index.xhtml file:
    <h:selectManyCheckbox value="#{employee.selectedItems}">
    <f:selectItems var="checkList" value="#{employee.checkboxList()}" itemValue="#{checkList.idTechnology}" itemLabel="#{checkList.name}"></f:selectItems>
    </h:selectManyCheckbox>
    The method checkboxList is in charge of generating the checkboxes and assign a value and name, and the method "selectedItems" is the List<String> that stores the selected checkboxes values, so what I save into the table is something like this: "1,4,6,7" but I don't know how to retrieve the selections and check the checxkboxes according the what the user have on the table:
    This is the method that I use to select all the records from the selected user, this fills all the textfields so I can edit the user, but not the checkboxes, and that's what I need to do:
    public void seleccionarEmpleado(int id_empleado){
    Query q = em.createNamedQuery("Employee.findByIdEmployee");
    q.setParameter("IdEmployee", IdEmployee);
    List<Empleado> listaEmple = q.getResultList();
    for(IdEmployee emple1 : listaEmple){
    emp.setIdEmployee(emple1 .getIdEmployeeo());
    emp.setName(emple1 .getName());
    emp.setLname(emple1 .getLname());
    emp.setTel(emple1 .getTel());
    emp.setAddress(emple1 .getDir());
    emp.setTech(emple1 .getTecha());
    Variable Tech is the one who gets the numbers like "2,3,4" etc, but how can I make the checkboxes to be checked according to these numbers? my english is not so good, thanks in advanced, have a nice day!

    Hello, I'm developing an app in JPA, still learning this, I'm displaying some checkboxes which I save into a List, then I separate the selections and put them into an Array, which I convert into String and that's what I store into MySQL table, this is what I have on the index.xhtml file:
    <h:selectManyCheckbox value="#{employee.selectedItems}">
    <f:selectItems var="checkList" value="#{employee.checkboxList()}" itemValue="#{checkList.idTechnology}" itemLabel="#{checkList.name}"></f:selectItems>
    </h:selectManyCheckbox>
    The method checkboxList is in charge of generating the checkboxes and assign a value and name, and the method "selectedItems" is the List<String> that stores the selected checkboxes values, so what I save into the table is something like this: "1,4,6,7" but I don't know how to retrieve the selections and check the checxkboxes according the what the user have on the table:
    This is the method that I use to select all the records from the selected user, this fills all the textfields so I can edit the user, but not the checkboxes, and that's what I need to do:
    public void seleccionarEmpleado(int id_empleado){
    Query q = em.createNamedQuery("Employee.findByIdEmployee");
    q.setParameter("IdEmployee", IdEmployee);
    List<Empleado> listaEmple = q.getResultList();
    for(IdEmployee emple1 : listaEmple){
    emp.setIdEmployee(emple1 .getIdEmployeeo());
    emp.setName(emple1 .getName());
    emp.setLname(emple1 .getLname());
    emp.setTel(emple1 .getTel());
    emp.setAddress(emple1 .getDir());
    emp.setTech(emple1 .getTecha());
    Variable Tech is the one who gets the numbers like "2,3,4" etc, but how can I make the checkboxes to be checked according to these numbers? my english is not so good, thanks in advanced, have a nice day!

  • A report for MM where basic list will contain the material no and material

    how to develop a report for MM where basic list will contain the material no and material description for the range of material no chosen by user. ...plz help me...how to do this step by step..

    Hi Raja,
    Firstly declare a select-option for material number.
    write a select query specifying the required field and specify a where clause
    as
    WHERE MATNR IN S_MATNR.
    Obviously you will select the records into internal table and so loop that internal table and display the records...
    The records will be displayed on the basic list.
    Hope this will solve your problem.
    Regards,
    Narin Nandivada

  • LINKING BETWEEN FUNCTION MODULE AND INTERACTIVE NO. OF BASIC LIST

    Dear Mates,
    Iam preparing Z report for BOM display of FG and SFG materials.
    Iam displaying the Basic List using the MAST table. Here i double click on the material no.
    Here iam using the function module :CS_BOM_EXPL_MAT_V2 for fetching the data from STPOX structure ,here i want to link material no. which has been from basic list and the above said function module. 
    Can anybody provide the solution for the above said linking in ALV interactive report.
    Please treat it very urgent as this report is to be presented on high priority.
    Thanks in advance
    Subbu

    Hi
    use the Function module REUSE_ALV_POPUP_TO_SELECT.
    check the below example:
    REPORT ZSR_ALV_INTERACTIVE.
    TABLES : LFA1,EKKO,EKPO.
    SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
    DATA : BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    END OF ITAB.
    DATA : BEGIN OF JTAB OCCURS 0,
    EBELN LIKE EKKO-EBELN,
    AEDAT LIKE EKKO-AEDAT,
    END OF JTAB.
    DATA : BEGIN OF KTAB OCCURS 0,
    EBELP LIKE EKPO-EBELP,
    MATNR LIKE EKPO-MATNR,
    END OF KTAB.
    TYPE-POOLS : SLIS.
    DATA : REPID LIKE SY-REPID.
    DATA :LFA1_B TYPE SLIS_T_FIELDCAT_ALV,
    LFA1_W TYPE SLIS_FIELDCAT_ALV,
    EKKO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKKO_W TYPE SLIS_FIELDCAT_ALV,
    EKPO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKPO_W TYPE SLIS_FIELDCAT_ALV,
    EVENTS_B TYPE SLIS_T_EVENT,
    EVENTS_W TYPE SLIS_ALV_EVENT.
    PERFORM GET_VAL.
    REPID = SY-REPID.
    SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN VENDOR.
    *perform val USING USER_COMMAND sel.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    IT_FIELDCAT = LFA1_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = ITAB.
    *& Form GET_VAL
    text this is to put column headings
    FORM GET_VAL.
    LFA1_W-FIELDNAME = 'LIFNR'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'LIFNR'.
    APPEND LFA1_W TO LFA1_B.
    LFA1_W-FIELDNAME = 'NAME1'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'NAME1'.
    APPEND LFA1_W TO LFA1_B.
    EKKO_W-FIELDNAME = 'EBELN'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'EBELN'.
    APPEND EKKO_W TO EKKO_B.
    EKKO_W-FIELDNAME = 'AEDAT'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'AEDAT'.
    APPEND EKKO_W TO EKKO_B.
    EKPO_W-FIELDNAME = 'EBELP'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'EBELP'.
    APPEND EKPO_W TO EKPO_B.
    EKPO_W-FIELDNAME = 'MATNR'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'MATNR'.
    APPEND EKPO_W TO EKPO_B.
    EVENTS_W-NAME = 'USER_COMMAND'.
    EVENTS_W-FORM = 'VAL'.
    APPEND EVENTS_W TO EVENTS_B.
    ENDFORM. "GET_VAL
    *& Form VAL
    text
    -->USER_COMMANtext
    -->SEL text for retrieving data
    FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.
    DATA : VEN(10) TYPE N,
    PO(10) TYPE N.
    DATA : MAT(10) TYPE C.
    IF SEL-FIELDNAME = 'LIFNR'.
    VEN = SEL-VALUE.
    SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = VEN.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    I_STRUCTURE_NAME = EKKO_B
    IT_FIELDCAT = EKKO_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = JTAB.
    ENDIF.
    IF SEL-FIELDNAME = 'EBELN'.
    PO = SEL-VALUE.
    SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = PO.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
    I_TITLE = 'ITEM DETAILS'
    I_TABNAME = 'EKPO'
    IT_FIELDCAT = EKPO_B
    I_CALLBACK_PROGRAM = REPID
    IMPORTING
    ES_SELFIELD = SEL
    TABLES
    T_OUTTAB = KTAB.
    ENDIF.
    logic to select a record
    IF SEL-FIELDNAME = 'MATNR'.
    MAT = SEL-VALUE.
    SET PARAMETER ID 'MAT' FIELD MAT.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDFORM. "VAL
    check my example:
    REPORT ZSR_ALV_INTERACTIVE.
    TABLES : LFA1,EKKO,EKPO.
    SELECT-OPTIONS : VENDOR FOR LFA1-LIFNR.
    DATA : BEGIN OF ITAB OCCURS 0,
    LIFNR LIKE LFA1-LIFNR,
    NAME1 LIKE LFA1-NAME1,
    END OF ITAB.
    DATA : BEGIN OF JTAB OCCURS 0,
    EBELN LIKE EKKO-EBELN,
    AEDAT LIKE EKKO-AEDAT,
    END OF JTAB.
    DATA : BEGIN OF KTAB OCCURS 0,
    EBELP LIKE EKPO-EBELP,
    MATNR LIKE EKPO-MATNR,
    END OF KTAB.
    TYPE-POOLS : SLIS.
    DATA : REPID LIKE SY-REPID.
    DATA :LFA1_B TYPE SLIS_T_FIELDCAT_ALV,
    LFA1_W TYPE SLIS_FIELDCAT_ALV,
    EKKO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKKO_W TYPE SLIS_FIELDCAT_ALV,
    EKPO_B TYPE SLIS_T_FIELDCAT_ALV,
    EKPO_W TYPE SLIS_FIELDCAT_ALV,
    EVENTS_B TYPE SLIS_T_EVENT,
    EVENTS_W TYPE SLIS_ALV_EVENT.
    PERFORM GET_VAL.
    REPID = SY-REPID.
    SELECT LIFNR NAME1 FROM LFA1 INTO TABLE ITAB WHERE LIFNR IN VENDOR.
    *perform val USING USER_COMMAND sel.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    IT_FIELDCAT = LFA1_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = ITAB.
    *& Form GET_VAL
    text this is to put column headings
    FORM GET_VAL.
    LFA1_W-FIELDNAME = 'LIFNR'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'LIFNR'.
    APPEND LFA1_W TO LFA1_B.
    LFA1_W-FIELDNAME = 'NAME1'.
    LFA1_W-REF_TABNAME = 'LFA1'.
    LFA1_W-REF_FIELDNAME = 'NAME1'.
    APPEND LFA1_W TO LFA1_B.
    EKKO_W-FIELDNAME = 'EBELN'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'EBELN'.
    APPEND EKKO_W TO EKKO_B.
    EKKO_W-FIELDNAME = 'AEDAT'.
    EKKO_W-REF_TABNAME = 'EKKO'.
    EKKO_W-REF_FIELDNAME = 'AEDAT'.
    APPEND EKKO_W TO EKKO_B.
    EKPO_W-FIELDNAME = 'EBELP'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'EBELP'.
    APPEND EKPO_W TO EKPO_B.
    EKPO_W-FIELDNAME = 'MATNR'.
    EKPO_W-REF_TABNAME = 'EKPO'.
    EKPO_W-REF_FIELDNAME = 'MATNR'.
    APPEND EKPO_W TO EKPO_B.
    EVENTS_W-NAME = 'USER_COMMAND'.
    EVENTS_W-FORM = 'VAL'.
    APPEND EVENTS_W TO EVENTS_B.
    ENDFORM. "GET_VAL
    *& Form VAL
    text
    -->USER_COMMANtext
    -->SEL text for retrieving data
    FORM VAL USING USER_COMMAND LIKE SY-UCOMM SEL TYPE SLIS_SELFIELD.
    DATA : VEN(10) TYPE N,
    PO(10) TYPE N.
    DATA : MAT(10) TYPE C.
    IF SEL-FIELDNAME = 'LIFNR'.
    VEN = SEL-VALUE.
    SELECT EBELN AEDAT FROM EKKO INTO TABLE JTAB WHERE LIFNR = VEN.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = REPID
    I_STRUCTURE_NAME = EKKO_B
    IT_FIELDCAT = EKKO_B
    IT_EVENTS = EVENTS_B
    TABLES
    T_OUTTAB = JTAB.
    ENDIF.
    IF SEL-FIELDNAME = 'EBELN'.
    PO = SEL-VALUE.
    SELECT EBELP MATNR FROM EKPO INTO TABLE KTAB WHERE EBELN = PO.
    CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
    EXPORTING
    I_TITLE = 'ITEM DETAILS'
    I_TABNAME = 'EKPO'
    IT_FIELDCAT = EKPO_B
    I_CALLBACK_PROGRAM = REPID
    IMPORTING
    ES_SELFIELD = SEL
    TABLES
    T_OUTTAB = KTAB.
    ENDIF.
    logic to select a record
    IF SEL-FIELDNAME = 'MATNR'.
    MAT = SEL-VALUE.
    SET PARAMETER ID 'MAT' FIELD MAT.
    CALL TRANSACTION 'MM02' AND SKIP FIRST SCREEN.
    ENDIF.
    ENDFORM. "VAL

  • Interactive report basic list concept

    Suppose in a basic list i have 7 parallel detail list.i am in basic list is there any way to go directly to 7 th detail list from basiclist or from 1st detail list to 7 th detail list vice-versa.
    plz tell me..i am waiting.. for reply
    thanx
    arya

    Hi...
        Just go through following code.... its for normal interactive reports...
    TYPES : BEGIN OF st_kna1,
    kunnr TYPE kna1-kunnr, "CUSTOMER NUMBER
    name1 TYPE kna1-name1, "CUSTOMER NAME
    END OF st_kna1.
    TYPES : BEGIN OF st_vbak,
    kunnr TYPE kna1-kunnr,
    vbeln TYPE vbak-vbeln, "SALES DOCUMENT NUMBER
    erdat TYPE vbak-erdat, "DATE ON WHICH THE RECORD WAS CREATED
    audat TYPE vbak-audat, "DOCUMENT DATE
    auart TYPE vbak-auart, "SALES DOCUMENT TYPE
    ernam TYPE vbak-ernam, "NAME OF PERSON WHO CREATED THE OBJECT.
    augru TYPE vbak-augru, "ORDER REASON
    END OF st_vbak.
    TYPES : BEGIN OF st_vbap,
    vbeln TYPE vbak-vbeln,
    posnr TYPE vbap-posnr, "SALES DOCUMENT ITEM
    matnr TYPE vbap-matnr, "MATERIAL NUMBER
    charg TYPE vbap-charg, "BATCH NUMBER
    matkl TYPE vbap-matkl, "MATERIAL GROUP
    posar TYPE vbap-posar, "ITEM TYPE
    END OF st_vbap.
    DATA : it_kna1 TYPE STANDARD TABLE OF st_kna1,
    it_vbak TYPE STANDARD TABLE OF st_vbak,
    it_vbap TYPE STANDARD TABLE OF st_vbap,
    wa_kna1 TYPE st_kna1,
    wa_vbak TYPE st_vbak,
    wa_vbap TYPE st_vbap.
    DATA : v_fld(15),
    v_kunnr TYPE kna1-kunnr,
    v_vbeln TYPE vbak-vbeln.
    SELECT-OPTIONS
    PARAMETERS
    SELECT-OPTIONS so_kunnr FOR v_kunnr. "CUSTOMER NUMBER
    PARAMETERS : p_max TYPE i. "NUMBER OF HITS
    START-OF-SELECTION
    START-OF-SELECTION.
    PERFORM get_customerdata.
    SET PF-STATUS 'MENU1'.
    AT LINE-SELECTION
    AT LINE-SELECTION.
    IF sy-lsind = 1.
    PERFORM get_salesheader.
    ELSEIF sy-lsind = 2.
    PERFORM get_salesitemdata.
    ENDIF.
    AT USER-COMMAND
    AT USER-COMMAND.
    CASE sy-ucomm.
    WHEN 'DISP'.
    PERFORM get_salesheader.
    WHEN 'ITEM'.
    PERFORM get_salesitemdata.
    WHEN 'VA03'.
    SET PARAMETER ID 'AUN' FIELD wa_vbak-vbeln.
    CALL TRANSACTION 'VA03' AND SKIP FIRST SCREEN.
    ENDCASE.
    TOP-OF-PAGE
    TOP-OF-PAGE.
    ULINE AT /1(56).
    WRITE : /1 sy-vline ,
    2(15) text-004 COLOR 1 ,
    sy-vline ,
    20(35) text-005 COLOR 1 ,
    sy-vline.
    ULINE AT /1(56).
    TOP-OF-PAGE DURING LINE-SELECTION.
    TOP-OF-PAGE DURING LINE-SELECTION.
    CASE sy-lsind.
    WHEN 1.
    PERFORM get_topofpage1.
    WHEN 2.
    PERFORM get_topofpage2.
    ENDCASE.
    FORM GET_CUSTOMERDATA
    FORM get_customerdata.
    SELECT kunnr name1
    FROM kna1
    INTO TABLE it_kna1
    UP TO p_max ROWS
    WHERE kunnr IN so_kunnr.
    IF sy-subrc EQ 0.
    LOOP AT it_kna1 INTO wa_kna1.
    WRITE : / sy-vline,
    2(15) wa_kna1-kunnr ,
    sy-vline ,
    20 wa_kna1-name1,
    sy-vline.
    HIDE : wa_kna1-kunnr , wa_kna1-name1.
    CLEAR wa_kna1.
    ENDLOOP.
    ULINE AT : /1(56).
    ELSE.
    MESSAGE w000(z50871msg).
    ENDIF.
    ENDFORM. "GET_CUSTOMERDATA
    FORM GET_SALESHEADER
    FORM get_salesheader.
    SET PF-STATUS 'MENU2'.
    GET CURSOR FIELD v_fld VALUE v_kunnr.
    IF v_fld = 'WA_KNA1-KUNNR'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_kunnr
    IMPORTING
    output = v_kunnr.
    SELECT kunnr vbeln erdat audat auart ernam augru
    FROM vbak
    INTO TABLE it_vbak
    WHERE kunnr = v_kunnr.
    IF sy-subrc EQ 0.
    LOOP AT it_vbak INTO wa_vbak.
    WRITE : / sy-vline ,
    2(22) wa_vbak-vbeln ,
    sy-vline,
    27(25) wa_vbak-erdat ,
    sy-vline ,
    55(15) wa_vbak-audat ,
    sy-vline ,
    73(15) wa_vbak-auart ,
    sy-vline,
    91(16) wa_vbak-ernam ,
    sy-vline,
    109(13) wa_vbak-augru,
    123 sy-vline.
    HIDE : wa_vbak-vbeln.
    CLEAR wa_vbak.
    ENDLOOP.
    ULINE AT : /1(123).
    ELSE.
    MESSAGE i015(z50871msg).
    ENDIF.
    ELSE.
    MESSAGE i013(z50871msg).
    ENDIF.
    ENDFORM. "GET_SALESHEADER
    FORM GET_SALESITEMDATA
    FORM get_salesitemdata.
    SET PF-STATUS space.
    GET CURSOR FIELD v_fld VALUE v_vbeln.
    IF v_fld = 'WA_VBAK-VBELN'.
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    input = v_vbeln
    IMPORTING
    output = v_vbeln.
    SELECT vbeln posnr matnr charg matkl posar
    FROM vbap
    INTO TABLE it_vbap
    WHERE vbeln = v_vbeln.
    LOOP AT it_vbap INTO wa_vbap.
    WRITE : /1 sy-vline,
    2(13) wa_vbap-posnr ,
    sy-vline,
    18(18) wa_vbap-matnr ,
    sy-vline,
    40(13) wa_vbap-charg ,
    sy-vline,
    56(16) wa_vbap-matkl ,
    sy-vline,
    75 wa_vbap-posar,
    112 sy-vline.
    CLEAR wa_vbap.
    ENDLOOP.
    ULINE AT : /1(112).
    ELSE.
    MESSAGE i014(z50871msg).
    ENDIF.
    ENDFORM. "GET_SALESITEMDATA
    FORM GET_TOPOFPAGE1
    FORM get_topofpage1.
    ULINE AT : /1(123).
    WRITE : / sy-vline ,
    2 text-000 ,
    wa_kna1-kunnr ,
    75 text-001 ,
    wa_kna1-name1,
    123 sy-vline.
    ULINE AT : /1(123).
    WRITE : / sy-vline ,
    2(22) text-006 COLOR 1,
    sy-vline,
    27(25) text-007 COLOR 1 ,
    sy-vline ,
    55(15) text-008 COLOR 1 ,
    sy-vline ,
    73(15) text-009 COLOR 1 ,
    sy-vline,
    91(16) text-010 COLOR 1 ,
    sy-vline,
    109(13) text-011 COLOR 1,
    123 sy-vline.
    ULINE AT : /1(123).
    ENDFORM. "GET_TOPOFPAGE1
    FORM GET_TOPOFPAGE2
    FORM get_topofpage2.
    ULINE AT : /1(112).
    WRITE : / sy-vline ,
    2 text-000 ,
    wa_kna1-kunnr ,
    35 text-001 ,
    wa_kna1-name1 ,
    85 text-003 ,
    wa_vbak-vbeln ,
    112 sy-vline.
    ULINE AT : /1(112).
    WRITE : /1 sy-vline,
    2(13) text-012 COLOR 1,
    sy-vline,
    18(18) text-013 COLOR 1 ,
    sy-vline,
    40(13) text-014 COLOR 1 ,
    sy-vline,
    56(16) text-015 COLOR 1 ,
    sy-vline,
    75 text-016 COLOR 1 ,
    112 sy-vline.
    ULINE AT : /1(112).
    ENDFORM. "GET_TOPOFPAGE2
    Thanks,
    Naveen.I

Maybe you are looking for

  • My ipod does not apprear in itunes with windows 7

    my ipod does not apprear in itunes with windows 7 any ideas

  • HP Laserjet 3600 Series Printer with a blank or incorrect colour column down left side of page

    Have a HP3600 Series Laserjet that has started to show a definite column (about 1/2" wide) of incorrect colour down the lefthand side of the page. Narrowed it down to the Magenta Cartridge after printing a diagnostics page.  Have replaced the Magenta

  • Exporting Crystal Report 2008 under java

    I'm in the process of converting a desktop application from VB6 to Java I am also upgrading Crystal Reports from version CR10 to CR2008. The application executes and exports the report to a PDF file. I cannot get past the error : .getPrintOutputContr

  • How do I burn a CD in Elements 11?

    I understand I can't do so directly.  FYI that I don't want to permanently move the images; just to make copies on the CD.  Many thanks.

  • Zen Neeon "Deleting" H

    Hi, I have a Zen Neeon, 5GB, and was trying to delete?one track, selected delete on the menu, which asked me to delete again, and I said yes. However, I am not sure if I have deleted my whole music library or not. The problem is that the player scree