Alv and checkboxs

Guys,
Ive a problem with a ALV and checkboxs. i have one with column type checkbox, i need mark rows and take them afterward using a button (in ALV) but rows arent marked when i use button. i have seen that it only happend when i use double click in grid (alv).
How could i use only button after marked my rows ?????
Thanks

        wa_fieldcat-edit = 'X'.
        modify i_fieldcat from wa_fieldcat index sy-tabix.
* Form f_alv_edit_oruser                                               *
* Form for display alv                                                 *
form f_alv_edit_oruser.
    call function 'REUSE_ALV_GRID_DISPLAY'
      exporting
        it_fieldcat                 = i_fieldcat[]
        is_layout                   = pt_grplayout2
        i_callback_program          = 'YSCCU0007'
        i_callback_html_top_of_page = p_header
        i_callback_user_command     = v_user_command1
        it_events                   = i_events[]
      tables
        t_outtab                    = i_yscchdr.
endform.                                 " F_alv_edit_oruser
* Form  f_user_command1                                                *
* This form will handle the user command from fm REUSE                 *
form f_user_command1 using p_ucomm type sy-ucomm
                     rs_selfield type  slis_selfield.
  data p_ref1 type ref to cl_gui_alv_grid.      "<<<
  call function 'GET_GLOBALS_FROM_SLVC_FULLSCR' "<<<
    importing                                   "<<< 
      e_grid = p_ref1.                          "<<
  call method p_ref1->check_changed_data.   " <<<<
  case p_ucomm.
    when '&DATA_SAVE'.
   endcase.
  rs_selfield-refresh = c_x.             " Grid refresh
endform.                                 " F_user_command1

Similar Messages

  • ALV and checkbox display

    hi all, i have a few problems here.
    Firstly, i need to display records in an ALV from an internal table.
    Secondly, i need to include checkboxes beside each and every records for the user to choose which records he wants to see.
    Thirdly, after the user has checked the fieldss that he wants, i need to display the details of all the records based on the ticked checkboxes in another screen.
    please help me if anyone knows.
    thx!

    Hi Meei,
    Thats very simple ....
    1 . In the internal table where you are displaying declare some thing like below.
    Data : begin of i_department occurs 0,
             vbeln  like ztmsh-vbeln,   "Sales and Distribution Docu No
             deprt  like ztmsh-deprt,   "Department
             meala  like ztmsd-meala,   "Meal Allowance
             sitea  like ztmsd-sitea,   "Site Allowance($)
             CHECKBOX(1) TYPE C,declare some thing here for creating check box
           end of i_department.
    2. Build a field catlog for the check box something like below..
    i_temp-fieldname = 'CHECKBOX'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-col_pos = 1.
      i_temp-CHECKBOX = 'X'.
      i_temp-outputlen = 4.
      i_temp-seltext_l = 'Flag'.
      i_temp-input = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    3. Now u can see the checkbox in the output once you select it will automatically flag in your internal table.and using the USer-command u can play around.
                  I have pasted a entire coding here pls check the flow.
    REPORT  Z_TIME_SHEET_REPT.
    TABLES
    Tables : ztmsh, "Time Sheet Header
             ztmsd, "Time Sheet Data
             zempy. "Employee
    Data Definations
    Internal Table for Employee input data
    Data : begin of i_employee occurs 0,
             vbeln  like ztmsh-vbeln,   "Sales and Distribution Document Number
             deprt  like ztmsh-deprt,   "Department
             tmsdt  like ztmsh-tmsdt,   "Date
             jbcpl  like ztmsh-jbcpl,   "Job Complete
             empid  like zempy-empid,   "Employee ID
             empnam(50) type c ,        "Employee Name
             nmltm  like ztmsd-nmltm,   "Normal Time
             ovrtm  like ztmsd-ovrtm,   "Over Time
             meala  like ztmsd-meala,   "Meal Allowance
             sitea  like ztmsd-sitea,   "Site Allowance($)
           end of i_employee.
    Internal Table For Department Input Data
    Data : begin of i_department occurs 0,
             vbeln  like ztmsh-vbeln,   "Sales and Distribution Document Number
             deprt  like ztmsh-deprt,   "Department
             tmsdt  like ztmsh-tmsdt,   "Date
             jbcpl  like ztmsh-jbcpl,   "Job Complete
             nmltm  like ztmsd-nmltm,   "Normal Time
             ovrtm  like ztmsd-ovrtm,   "Over Time
             hlftm  like ztmsd-hlftm,                           "1.5 Time
             dbltm  like ztmsd-dbltm,   "Double Time
             meala  like ztmsd-meala,   "Meal Allowance
             sitea  like ztmsd-sitea,   "Site Allowance($)
             CHECKBOX(1) TYPE C,
           end of i_department.
    Temp Internal tablee for holding department values
    Data : begin of i_t_dept occurs 0,
            vbeln  like ztmsh-vbeln,   "Sales and Distribution Document Number
            deprt  like ztmsh-deprt,   "Department
            tmsdt  like ztmsh-tmsdt,   "Date
            jbcpl  like ztmsh-jbcpl,   "Job Complete
            nmltm  like ztmsd-nmltm,   "Normal Time
            ovrtm  like ztmsd-ovrtm,   "Over Time
          end of i_t_dept.
    internal table for detailed data
    data : begin of i_detail occurs 0 ,
             vbeln  like ztmsh-vbeln,   "Sales and Distribution Document Number
             deprt  like ztmsh-deprt,   "Department
             tmsdt  like ztmsh-tmsdt,   "Date
             jbcpl  like ztmsh-jbcpl,   "Job Complete
             nmltm  like ztmsd-nmltm,   "Normal Time
             ovrtm  like ztmsd-ovrtm,   "Over Time
             cadsv  like ztmsh-cadsv,   "CAD Services
             stsvy  like ztmsh-stsvy,   "SiteSurvey
             cstdw  like ztmsh-cstdw,   "Construction Drawing
             sppln  like ztmsh-sppln,   "Space Planning
             dsndw  like ztmsh-dsndw,   "Design Drawings
             drw3d  like ztmsh-drw3d,   "3D Drawings
             dwplt  like ztmsh-dwplt,   "Drawing Plots
             otamt  like ztmsh-otamt,   "Others
             inact  like ztmsh-inact,   "In store Activity type
             ictnq  like ztmsh-ictnq,   "In store Activity Quantity
             inctn  like ztmsh-inctn,   "In store Activity Loading
             mitim  like ztmsh-mitim,   "Movement Volume in Type
             mivlm  like ztmsh-mivlm,   "Movement Volume in Loading
             motim  like ztmsh-motim,   "Movement Volume Out Type
             movlm  like ztmsh-movlm,   "Movement Volume Out Loading
             outtm  like ztmsh-outtm,   "Out of Store Activity Type
             outact like ztmsh-outact,  "Out of Store Activity Loading
             frklft like ztmsh-frklft,  "Forklift
             strpt  like ztmsh-strpt,   "Storage Protection
             rbbsh  like ztmsh-rbbsh,   "Rubbish
             crtes  like ztmsh-crtes,   "Crates
             vhlhr  like ztmsh-vhlhr,   "Vechile
             toll   like ztmsh-toll,    "Toll
             park   like ztmsh-park,    "Parking
             hrdwr  like ztmsh-hrdwr,   "Hardware
             trlly  like ztmsh-trlly,   "# of Trollys
             dolly  like ztmsh-dolly,   "# of Dollies
             oepno  like ztmsh-oepno,   "# of Other Equipment
             oteqp  like ztmsh-oteqp,   "Other Eqipment
           end of i_detail.
    ALV Field Catlog declaration
    TYPE-POOLS : slis.
    data : i_depart TYPE slis_t_fieldcat_alv,
           i_emp TYPE slis_t_fieldcat_alv,
           i_design TYPE slis_t_fieldcat_alv,
           i_warehouse TYPE slis_t_fieldcat_alv,
           i_transport TYPE slis_t_fieldcat_alv,
           i_install TYPE slis_t_fieldcat_alv,
           i_temp TYPE slis_fieldcat_alv,
           l_layout TYPE slis_layout_alv.
    Events
    DATA: v_events TYPE slis_t_event,
          wa_event TYPE slis_alv_event.
    Tempary Variables
    data: wa_nmltm type p decimals 2,
          wa_ovrtm type p decimals 2,
          wa_meala type p decimals 2,
          wa_sitea type p decimals 2,
          wa_HLFTM type p decimals 2,
          wa_DBLTM type p decimals 2,
          w_nmltm(5) type c,
          w_ovrtm(5) type c,
          w_meala(5) type c,
          w_sitea(5) type c,
          wa_first(25) type c,
          wa_last(25)  type c.
    data : repid type sy-repid.
    Selection Screen
    *Select options
    selection-screen begin of block blk1.
    select-options :  s_vbeln for ztmsh-vbeln,
                      s_tmsdt for ztmsh-tmsdt.
    selection-screen end of block blk1.
    Radio Buttons
    selection-screen begin of block blk2 WITH FRAME TITLE TLT1.
    Parameters: dept radiobutton GROUP SX,
      emp radiobutton GROUP SX.
    selection-screen end of block blk2.
    Intialization
    INITIALIZATION.
      TLT1 = 'Time Sheet Summary Report'.
      repid = sy-repid.
      s_tmsdt-low = sy-datum.
      s_tmsdt-high = sy-datum.
      append s_tmsdt.
    START-OF-SELECTION.
    START-OF-SELECTION.
      if dept = 'X'.
        perform 100_time_sheet.
        perform 200_build_field_catlog.
        perform 400_ALV_Display.
      elseif emp = 'X'.
        perform 100_time_sheet.
        perform 500_build_field_catlog.
        Perform 600_ALV_display.
      endif.
    *&      Form  100_time_sheet
         text
    FORM 100_time_sheet.
      select * from ztmsh
           where vbeln in s_vbeln
             and tmsdt in s_tmsdt.
        if ztmsh-vbeln ne space.
          perform empl_calcuation .
          if emp = 'X'.
            clear i_employee.
          elseif dept = 'X'.
            clear i_department.
          endif.
        ENDIF.
      endselect.
    ENDFORM.                    " 100_time_sheet
    *&      Form  200_build_field_catlog
         Department Wise Summary Report
    FORM 200_build_field_catlog .
      refresh i_depart.
      i_temp-fieldname = 'CHECKBOX'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-col_pos = 1.
    i_temp-fix_column = 'X'.
      i_temp-CHECKBOX = 'X'.
      i_temp-outputlen = 4.
      i_temp-seltext_l = 'Flag'.
      i_temp-input = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'VBELN'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'VBELN'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Work Order No'.
      i_temp-col_pos = 2.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'DEPRT'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'DEPRT'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Department'.
      i_temp-col_pos = 3.
      i_temp-outputlen = 15.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'TMSDT'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'TMSDT'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Time Sheet Date'.
      i_temp-col_pos = 4.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'JBCPL'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'JBCPL'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Time Sheet Status'.
      i_temp-col_pos = 5.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'NMLTM'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'NMLTM'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Total NH'.
      i_temp-col_pos = 6.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'OVRTM'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'OVRTM'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Total AH'.
      i_temp-col_pos = 7.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'HLFTM'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'HLFTM'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Total 1.5 Time'.
      i_temp-col_pos = 8.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'DBLTM'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'DBLTM'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Total 2.0 Time'.
      i_temp-col_pos = 9.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'MEALA'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'MEALA'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Tot Meal Allowence'.
      i_temp-col_pos = 10.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'SITEA'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'SITEA'.
      i_temp-tabname = 'I_DEPARTMENT'.
      i_temp-seltext_l = 'Tot Site Allowence($)'.
      i_temp-col_pos = 11.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_DEPART.
      CLEAR i_temp.
    ENDFORM.                    " 200_build_field_catlog
    *&      Form  300_populate_events
          Top Of Page Events for Warehouse Report
    FORM 300_populate_events .
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type = 0
        IMPORTING
          et_events   = v_events.
      READ TABLE v_events
              INTO wa_event
              WITH KEY name = 'TOP_OF_PAGE'.
      IF sy-subrc EQ 0.
        wa_event-form = 'TOP_OF_PAGE'.
        MODIFY v_events
        FROM wa_event TRANSPORTING form
              WHERE name = wa_event-form.
      endif.
    ENDFORM.                    " 300_populate_events
    *&      Form  400_ALV_Display
          Department ALV Display
    FORM 400_ALV_Display .
      sort i_department by vbeln deprt tmsdt.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         I_CALLBACK_PROGRAM             = repid
         I_CALLBACK_PF_STATUS_SET       = 'PO_STATUS '
         I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
         I_STRUCTURE_NAME               = 'i_department'
         IS_LAYOUT                      = l_layout
         IT_FIELDCAT                    = i_depart
        IT_EVENTS                      = v_events
        TABLES
          T_OUTTAB                       = i_department
       EXCEPTIONS
         PROGRAM_ERROR                  = 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.
    ENDFORM.                    " 400_ALV_Display
    *&      Form  500_build_field_catlog
          Employee wise Summary Report
    FORM 500_build_field_catlog .
      refresh i_depart.
    i_temp-ref_fieldname = 'VBELN'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'VBELN'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Work Order No'.
      i_temp-col_pos = 1.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'DEPRT'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'DEPRT'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Department'.
      i_temp-col_pos = 2.
      i_temp-outputlen = 15.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'TMSDT'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'TMSDT'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Time Sheet Date'.
      i_temp-col_pos = 3.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'JBCPL'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'JBCPL'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Time Sheet Status'.
      i_temp-col_pos = 4.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'EMPID'.
    i_temp-ref_tabname = 'ZEMPY'.
      i_temp-fieldname = 'EMPID'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Employee ID'.
      i_temp-col_pos = 5.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'JBCPL'.
    i_temp-ref_tabname = 'ZTMSH'.
      i_temp-fieldname = 'EMPNAM'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Employee Name'.
      i_temp-col_pos = 6.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'NMLTM'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'NMLTM'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Total NH'.
      i_temp-col_pos = 7.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'OVRTM'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'OVRTM'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Total AH'.
      i_temp-col_pos = 8.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'MEALA'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'MEALA'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Tot Meal Allowence'.
      i_temp-col_pos = 9.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    i_temp-ref_fieldname = 'SITEA'.
    i_temp-ref_tabname = 'ZTMSD'.
      i_temp-fieldname = 'SITEA'.
      i_temp-tabname = 'I_EMPLOYEE'.
      i_temp-seltext_l = 'Tot Site Allowence($)'.
      i_temp-col_pos = 10.
    i_temp-fix_column = 'X'.
      APPEND i_temp TO i_emp.
      CLEAR i_temp.
    ENDFORM.                    " 500_build_field_catlog
    *&      Form  600_ALV_display
          Employee Wise ALV Display
    FORM 600_ALV_display .
      sort i_employee by vbeln deprt tmsdt.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
         EXPORTING
           I_CALLBACK_PROGRAM             = repid
        I_CALLBACK_PF_STATUS_SET       = 'PO_STATUS '
        I_CALLBACK_USER_COMMAND        = 'USER_COMMAND'
           I_STRUCTURE_NAME               = 'i_employee'
           IS_LAYOUT                      = l_layout
           IT_FIELDCAT                    = i_emp
        IT_EVENTS                      = v_events
          TABLES
            T_OUTTAB                       = i_employee
         EXCEPTIONS
           PROGRAM_ERROR                  = 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.
    ENDFORM.                    " 600_ALV_display
    *&      Form Po-Status.
    FORM po_status  USING rt_extab TYPE slis_t_extab.
      SET PF-STATUS 'ZBUTTON' EXCLUDING rt_extab.
    ENDFORM.                    "po_status
    *&      Form User_command.
    FORM user_command USING ucomm LIKE sy-ucomm
                                selfield TYPE slis_selfield.
      data : valid type i,
             cnt like ztmsh-deprt.
      clear i_department.
      loop at i_department where CHECKBOX = 'X'.
        on change of i_department-deprt.
    if cnt ne space.
          if valid ne 0.
            message 'Please select same department' type 'I'.
            valid = 2.
            exit.
            cnt = i_department-deprt.
          endif.
        endon.
        valid = 1.
      endloop.
      if valid = 1.
        case ucomm.
          when 'DESIGN'  .
            perform transfer_table.
            perform design_report.
            perform des_build_field_catlog.
            Perform design_ALV_display.
          when 'WAREHOUSE'.
            perform transfer_table.
            perform design_report.
            perform war_build_field_catlog.
            perform 300_populate_events.
            perform warehouse_ALV_display.
          when 'TRANSPORT'.
            perform transfer_table.
            perform design_report.
            perform tran_build_field_catlog.
         perform top_of_page.
            perform Transport_ALV_display.
          when 'INSTALLAT'.
            perform transfer_table.
            perform design_report.
            perform inst_build_field_catlog.
            perform Install_ALV_display.
        endcase.
      elseif valid = 0.
        message 'Please select a department' type 'I'  .
      endif.
    endform.                    "user_command
    *&      Form  empl_calcuation
         Employee total hours calculation
    FORM empl_calcuation  .
      data : w_hours(3)   type C,
             w_min(3)     type c,
             w_hours1(3)  type c,
             w_min1(3)    type c,
             w_hours2(3)  type c,
             w_min2(3)    type c,
             w_hours3(3)  type c,
             w_min3(3)    type c,
             w_hours4(3)  type c,
             w_min4(3)    type c,
             t_nmltm(5)   type c,
             t_ovrtm(5)   type c,
             t_meala(5)   type c,
             t_sitea(5)   type c,
             t_HLFTM(5)   type c,
             t_DBLTM(5)   type c,
             temp         type i.
      clear :wa_nmltm,
             wa_ovrtm,
             wa_meala,
             wa_sitea,
             wa_HLFTM,
             wa_DBLTM.
    To convert into Minutes
      select * from ztmsd
               where vbeln = ztmsh-vbeln
                 and tmsdt = ztmsh-tmsdt
                 and deprt = ztmsh-deprt.
    *uncommenting the below code between the select and endselect will work
    *for normal time scenario (eg: 2.55+3.55 =6.50)                                                                     *
    Normal Time
        t_nmltm = ztmsd-nmltm.
       SPLIT t_nmltm at '.' into w_hours w_min.
       temp = w_hours.
       w_hours = temp.
       w_hours = w_hours * 60.
        wa_nmltm = wa_nmltm + t_nmltm.
    Over Time
        t_ovrtm = ztmsd-ovrtm.
       SPLIT t_ovrtm at '.' into w_hours1 w_min1.
       temp = w_hours1.
       w_hours1 = temp.
       w_hours1 = w_hours1 * 60.
        wa_ovrtm = wa_ovrtm + t_ovrtm.
    Meal Allowence
        t_meala = ztmsd-meala.
       SPLIT t_meala at '.' into w_hours2 w_min2.
       temp = w_hours2.
       w_hours2 = temp.
       w_hours2 = w_hours2 * 60.
        wa_meala = wa_meala + t_meala .
    Site Allowence
        t_sitea = ztmsd-sitea.
        wa_sitea = wa_sitea + t_sitea.
        if dept = 'X'.
    1.5 Time
          t_HLFTM = ztmsd-HLFTM.
       SPLIT t_HLFTM at '.' into w_hours3 w_min3.
       temp = w_hours3.
       w_hours3 = temp.
       w_hours3 = w_hours3 * 60.
          wa_HLFTM = wa_HLFTM +  t_hlftm.
    Double Time
          t_DBLTM = ztmsd-DBLTM.
       SPLIT t_DBLTM at '.' into w_hours4 w_min4.
       temp = w_hours4.
       w_hours4 = temp.
       w_hours4 = w_hours4 * 60.
          wa_DBLTM = wa_DBLTM +  t_dbltm.
        endif.
      endselect.
      if sy-subrc = 0.
    uncommenting the below will work for normal time scenario
          (eg: 2.55+3.55 =6.50)
    and change in the appending coloum wa_ to t_
      to convert into Hours
       perform min_to_hrs_nmltm using wa_nmltm changing t_nmltm.
       perform min_to_hrs_ovrtm using wa_ovrtm changing t_ovrtm.
       perform min_to_hrs_meala using wa_meala changing t_meala.
       perform min_to_hrs_sitea using wa_sitea changing t_sitea.
        if emp = 'X'.  "Report By Employee
        Employee Id
          select single empid deprt into ztmsd
             from ztmsd
             where vbeln = ztmsh-vbeln.
          if sy-subrc = 0.
        Employee Name
            select single empye_f empye_l
             into (wa_first,wa_last )
              from zempy
               where empid = ztmsd-empid.
            if sy-subrc = 0 .
              concatenate wa_first
                          wa_last
                          into i_employee-empnam.
              Appending To internal Table
              i_employee-empid = ztmsd-empid.
              i_employee-deprt = ztmsh-deprt.
              i_employee-nmltm = wa_nmltm.
              i_employee-ovrtm = wa_ovrtm.
              i_employee-meala = wa_meala.
              i_employee-sitea = wa_sitea.
              i_employee-vbeln = ztmsh-vbeln.
              i_employee-tmsdt = ztmsh-tmsdt.
              i_employee-jbcpl = ztmsh-jbcpl.
              APPEND i_employee.
            endif.
          endif.
        elseif dept = 'X'.    "Report By  Department
    uncommenting the below will work for normal time scenario
          (eg: 2.55+3.55 =6.50)
    and change in the appending coloum wa_ to t_
          perform min_to_hrs_HLFTM using wa_HLFTM changing t_HLFTM.
          perform min_to_hrs_DBLTM using wa_DBLTM changing t_DBLTM.
              Appending To internal Table
          i_department-deprt = ztmsh-deprt.
          i_department-nmltm = wa_nmltm.
          i_department-ovrtm = wa_ovrtm.
          i_department-meala = wa_meala.
          i_department-sitea = wa_sitea.
          i_department-vbeln = ztmsh-vbeln.
          i_department-tmsdt = ztmsh-tmsdt.
          i_department-jbcpl = ztmsh-jbcpl.
          i_department-hlftm = t_hlftm.
          i_department-dbltm = t_dbltm.
          APPEND i_department.
        endif.
      endif.
    ENDFORM.                    " empl_calcuation
    *&      Form  min_to_hrs_nmltm
          text
         -->P_WA_NMLTM  text
    FORM min_to_hrs_nmltm  USING    P_WA_NMLTM
                           CHANGING P_T_nmltm.
      data : hours(2)     type c,
             minutes_n(2) type c,
             nmltm(10)    type c.
      if p_wa_nmltm >= 60.
        hours = P_WA_NMLTM / 60.
      endif.
      minutes_n = P_WA_NMLTM MOD 60.
      concatenate hours
                   minutes_n
                   into P_T_nmltm.
    ENDFORM.                    " min_to_hrs_nmltm
    *&      Form  min_to_hrs_ovrtm
          text
    FORM min_to_hrs_ovrtm  USING    P_WA_OVRTM
                           CHANGING P_T_OVRTM.
      data : hours(2)     type c,
             minutes_n(2) type c.
      if p_wa_ovrtm >= 60.
        hours = P_WA_OVRTM / 60.
      endif.
      minutes_n = P_WA_OVRTM MOD 60.
      concatenate hours
                   minutes_n
                   into P_T_OVRTM.
    ENDFORM.                    " min_to_hrs_ovrtm
    *&      Form  min_to_hrs_meala
    FORM min_to_hrs_meala  USING    P_WA_meala
                           CHANGING P_T_MEALA.
      data : hours(2)     type c,
             minutes_n(2) type c.
      if p_wa_meala >= 60.
        hours = P_WA_meala / 60.
      endif.
      minutes_n = P_WA_meala MOD 60.
      concatenate hours
                  minutes_n
                  into P_T_meala.
    ENDFORM.                    " min_to_hrs_meala
    *&      Form  min_to_hrs_sitea
    FORM min_to_hrs_sitea  USING    P_WA_sitea
                           CHANGING P_T_SITEA.
      data : hours(2)     type c,
             minutes_n(2) type c.
      if p_wa_sitea >= 60.
        hours = P_WA_sitea / 60.
      endif.
      minutes_n = P_WA_sitea MOD 60.
      concatenate hours
                  minutes_n
                  into P_T_sitea.
    ENDFORM.                    " min_to_hrs_sitea
    *&      Form  min_to_hrs_HLFTM
    FORM min_to_hrs_HLFTM  USING    P_WA_HLFTM
                           CHANGING P_T_HLFTM.
      data : hours(2)     type c,
             minutes_n(2) type c.
      if p_wa_hlftm >= 60.
        hours = P_WA_HLFTM / 60.
      endif.
      minutes_n = P_WA_HLFTM MOD 60.
      concatenate hours
                  minutes_n
                  into P_T_HLFTM.
    ENDFORM.                    " min_to_hrs_HLFTM
    *&      Form  min_to_hrs_DBLTM
    FORM min_to_hrs_DBLTM  USING    P_WA_DBLTM
                           CHANGING P_T_DBLTM.
      data : hours(2)     type c,
             minutes_n(2) type c.
      if p_wa_dbltm >= 60.
        hours = P_WA_DBLTM / 60.
      endif.
      minutes_n = P_WA_DBLTM MOD 60.
      concatenate hours
                  minutes_n
                  into P_T_DBLTM.
    ENDFORM.                    " min_to_hrs_DBLTM
    *&      Form  design_report
    FORM design_report .
      select * into corresponding fields of table i_detail
            from ztmsh for all entries in i_t_dept
            where vbeln = i_t_dept-vbeln
              and deprt = i_t_dept-deprt
              and tmsdt = i_t_dept-tmsdt .
      loop at i_detail.
        read table i_t_dept with key vbeln = i_detail-vbeln
                                     deprt = i_detail-deprt
                                     tmsdt = i_detail-tmsdt .
        if sy-subrc = 0.
          i_detail-nmltm = i_t_dept-nmltm.
          i_detail-ovrtm = i_t_dept-ovrtm.
          modify i_detail.
        endif.
      endloop.
    ENDFORM.                    " design_report
    *&      Form  transfer_table
    Doin some operation using the checkbox
    FORM transfer_table .
      clear i_t_dept[].
      loop at i_department where checkbox = 'X'.
        move-corresponding : i_department to i_t_dept.
        append i_t_dept.
      endloop.
    ENDFORM.                    " transfer_table
    Regards,
    karthik.
    Edited by: karthikeyan sukumar on Jan 3, 2008 9:46 AM

  • ALV and CheckBoxes

    Hi everyone,
    I created checkboxes in my ALV.
    The problem is when I double click on a checkbox, I get a dump.
    Here is the code.
    REPORT  ztestdfalv1                             .
    *Data Declaration
    DATA: BEGIN OF t_ekko,
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF t_ekko.
    DATA: BEGIN OF it_ekko OCCURS 0.
            INCLUDE STRUCTURE t_ekko.
    DATA: END OF it_ekko.
    *ALV data declarations
    TYPE-POOLS: slis.                                 "ALV Declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  build_fieldcatalog
    *       text
    FORM build_fieldcatalog.
      REFRESH fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname   = 'Select'.
      fieldcatalog-seltext_m   = 'Select please'.
      fieldcatalog-checkbox     = 'X'.
      fieldcatalog-edit     = 'X'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-hotspot     = 'X'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      "Permet d'ajuster les colonnes au text
    *  gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program        = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_pf_status_set  = 'SET_PF_STATUS'
                i_callback_user_command   = 'USER_COMMAND'
    *            i_grid_title             = 'My Title'
                is_layout                 = gd_layout
                it_fieldcat               = fieldcatalog[]
                i_save                    = 'X'
           TABLES
                t_outtab                  = it_ekko
           EXCEPTIONS
                program_error             = 1
                OTHERS                    = 2.
      IF sy-subrc <> 0.
        WRITE:/ sy-subrc.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp
       UP TO 10 ROWS
        FROM ekpo
        INTO TABLE it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *                      FORM SET_PF_STATUS                              *
    FORM set_pf_status USING rt_extab   TYPE  slis_t_extab.
      SET PF-STATUS 'STANDARD_FULLSCREEN1'.
    ENDFORM.                    "set_pf_status
    *&      Form  user_command
    *       text
    *      -->R_UCOMM    text
    *      -->RS_SELFIELDtext
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          CHECK rs_selfield-tabindex > 0.
          IF rs_selfield-value EQ '6000000001'.
            CALL TRANSACTION 'ZDF2'.
          ENDIF.
        WHEN 'REFRESH'.
          PERFORM data_retrieval.
          rs_selfield-refresh = 'X'.
      ENDCASE.
    ENDFORM.                    "user_command
    Here is the Dum.
    This error may occur for any of the following reasons:
    - You address a typed field symbol before it is set using ASSIGN
    - You address a field symbol that points to a line in an internal table
      that has been deleted
    - You address a field symbol that had previously been reset using
      UNASSIGN, or that pointed to a local field that no longer exists
    - You address a global function interface parameter, even
      though the relevant function module is not active,
      that is it is not in the list of active calls. You can get the list
      of active calls from the this short dump.
    Thanks for the help !
    Best Regards.

    Hi David,
    First of all you need to have the field "SELECT" as part of the internal table that you pass to the fm REUSE_ALV_GRID_DISPLAY.
    Here,
    DATA: BEGIN OF t_ekko,
    <b>        select,</b>
            ebeln TYPE ekpo-ebeln,
            ebelp TYPE ekpo-ebelp,
          END OF t_ekko.
    And then in your field catalog prepare logic, give the field name in BOLD,
    FORM build_fieldcatalog.
    REFRESH fieldcatalog.
    CLEAR fieldcatalog.
    <b> fieldcatalog-fieldname   = 'SELECT'.</b>
    fieldcatalog-seltext_m   = 'Select please'. 
    Hope this helps..
    Sri

  • ALV and Checkbox : retrieving what we select

    Hi everyone,
    I created checkoxes in an ALV.
    I am trying to retrieve what lines I selected from the ALV.
    Thanks in advance.

    Hi everyone,
    The scenario is :
    I added a button (refresh) in the ALV. When I click on it I want to know which lines I selected via the checkboxes.
    I am using normal ALV (no classes).
    If I click on my refresh button my internal table has no flag = 'X'.
    But if I click on a row (after selecting the checkbox) I do see the flag='X'.
    So it works when I click on the row of the ALV but does not work if I click on the refresh button that I added.
    Here is the code.
    REPORT  ztestdfalv1                             .
    *Data Declaration
    DATA: BEGIN OF t_ekko,
      select(1),
      ebeln TYPE ekpo-ebeln,
      ebelp TYPE ekpo-ebelp,
    END OF t_ekko.
    DATA: BEGIN OF it_ekko OCCURS 0.
            INCLUDE STRUCTURE t_ekko.
    DATA: END OF it_ekko.
    *ALV data declarations
    TYPE-POOLS: slis.                                 "ALV Declarations
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    *Start-of-selection.
    START-OF-SELECTION.
      PERFORM data_retrieval.
      PERFORM build_fieldcatalog.
      PERFORM build_layout.
      PERFORM display_alv_report.
    *&      Form  build_fieldcatalog
    *       text
    FORM build_fieldcatalog.
      REFRESH fieldcatalog.
      CLEAR fieldcatalog.
      fieldcatalog-fieldname   = 'SELECT'.
      fieldcatalog-seltext_m   = 'Select please'.
      fieldcatalog-checkbox    = 'X'.
      fieldcatalog-edit        = 'X'.
      fieldcatalog-input       = 'X'.
      fieldcatalog-col_pos     = 1.
      APPEND fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELN'.
      fieldcatalog-seltext_m   = 'Purchase Order'.
      fieldcatalog-hotspot     = 'X'.
      fieldcatalog-col_pos     = 2.
      APPEND fieldcatalog.
      CLEAR  fieldcatalog.
      fieldcatalog-fieldname   = 'EBELP'.
      fieldcatalog-seltext_m   = 'PO Item'.
      fieldcatalog-col_pos     = 3.
      APPEND fieldcatalog.
      CLEAR  fieldcatalog.
    ENDFORM.                    " BUILD_FIELDCATALOG
    *&      Form  BUILD_LAYOUT
    *       Build layout for ALV grid report
    FORM build_layout.
      "Permet d'ajuster les colonnes au text
    *  gd_layout-colwidth_optimize = 'X'.
      gd_layout-totals_text       = 'Totals'(201).
    *  gd_layout-box_fieldname = 'SELECT'.
    *  gd_layout-box_tabname   = 'IT_EKKO'.
    ENDFORM.                    " BUILD_LAYOUT
    *&      Form  DISPLAY_ALV_REPORT
    *       Display report using ALV grid
    FORM display_alv_report.
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
           EXPORTING
                i_callback_program        = gd_repid
    *            i_callback_top_of_page   = 'TOP-OF-PAGE'
                i_callback_pf_status_set  = 'SET_PF_STATUS'
                i_callback_user_command   = 'USER_COMMAND'
    *            i_grid_title             = 'My Title'
                is_layout                 = gd_layout
                it_fieldcat               = fieldcatalog[]
                i_save                    = 'X'
           TABLES
                t_outtab                  = it_ekko
           EXCEPTIONS
                program_error             = 1
                OTHERS                    = 2.
      IF sy-subrc <> 0.
        WRITE:/ sy-subrc.
      ENDIF.
    ENDFORM.                    " DISPLAY_ALV_REPORT
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM data_retrieval.
      SELECT ebeln ebelp
       UP TO 10 ROWS
        FROM ekpo
        INTO CORRESPONDING FIELDS OF TABLE  it_ekko.
    ENDFORM.                    " DATA_RETRIEVAL
    *                      FORM SET_PF_STATUS                              *
    FORM set_pf_status USING rt_extab   TYPE  slis_t_extab.
      SET PF-STATUS 'STANDARD_FULLSCREEN1'.
    ENDFORM.                    "set_pf_status
    *&      Form  user_command
    *       text
    *      -->R_UCOMM    text
    *      -->RS_SELFIELDtext
    FORM user_command  USING r_ucomm LIKE sy-ucomm
                             rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          CHECK rs_selfield-tabindex > 0.
          IF rs_selfield-value EQ '6000000001'.
            CALL TRANSACTION 'ZDF2'.
          ENDIF.
        WHEN 'REFRESH'.
          LOOP AT it_ekko WHERE select = 'X'.
          ENDLOOP.
          PERFORM data_retrieval.
          rs_selfield-refresh = 'X'.
      ENDCASE.
    ENDFORM.                    "user_command
    Thanks.
    Message was edited by: David Fryda

  • Is it possible to have sorting by group and checkboxes in the same ALV

    Hi there,
    Does anyone know whether it is possible to have sorting and group on one field in ALV and checkboxes set on another field in ALV?
    eg.
    Fieldname
    ===========
    Name----
    Text
    Allowance----
    Numeric -> Sort & Group
    Verified----
    Checkbox
    How do I code it if it is possible to have grouping and check box all in one ALV.  Meaning I want some data that are the same to merge using sort, while still having the checkbox available for my other field (Verified).
    Thanks in advance.
    Lawrence

    hi,
    GROUP BY clause is used on database tables with select statement.
    sort is used on internal tables.
    can u clearly explain y u need group by and sort on the same field.
    if u are extracting from dbtable using grou by clause on a field, then no need to sort it again.
    if u want sort u can do it by giveing "sort itab by field". thats not a problem.
    now coming to check box.instead of using SLIS type field catalog, u use LVC type.
    in LVC_S_LAYO, u can fine box_fname.
    while defining layout, u declare a variable of type LVC_S_LAYO
    AND GIVE BOX_FNAME = internal table field name

  • Which are the standard classes for events in ALV and explain each class pls

    which are the standard classes for events in ALV and explain each class pls
    POINTS WILL BE AWARDED,
    REGARDS,
    jagrut bharatkumar Shukla

    hi,
    some links.
    www.sapgenie.com
    www.abap4u.com
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5e/88d440e14f8431e10000000a1550b0/frameset.htm
    download the PDF from following link.
    http://help.sap.com/printdocu/core/Print46c/en/data/pdf/BCSRVALV/BCSRVALV.pdf
    The ALV object Grid methods allow the same functionality as ALV grid report function modules but are displayed within
    a screen (dialog program). SAP has provided a suit of programs which demonstrate how to For examples see standard SAP
    programs as detailed below:
    BCALV_EDIT_01 This report illustrates the simplest case of using an editable/noneditable ALV Grid Control.
    BCALV_EDIT_02 This report illustrates how to set chosen cells of an ALV Grid Control editable.
    BCALV_EDIT_03 In this example the user may change values of fields SEATSOCC (occupied seats) and/or PLANETYPE.
    The report checks the input value(s) semantically and provides protocol messages in case of error
    BCALV_EDIT_04 This report illustrates how to add and remove lines to a table using the ALV Grid Control and how to
    implement the saving of the new data.
    BCALV_EDIT_05 This example shows how to use checkboxes within an ALV Grid Control. You learn:
         (1) how to define a column for editable checkboxes for an attribute of your list
         (2) how to evaluate the checked checkboxes
         (3) how to switch between editable and non-editable checkboxes
    BCALV_EDIT_06 This example shows how to define a dropdown listbox for all cells of one column in an editable ALV
    Grid Control.
    BCALV_EDIT_07 This example shows how to define dropdown listboxes for particular cells of your output table.
    BCALV_EDIT_08 This report implements an ALV Grid Control with an application specific F4 help. The following aspects
    are dealt with:
         (1) how to replace the standard f4 help
         (2) how to pass the selected value to the ALV Grid Control
         (3) how to build an f4 help, whose value range depend on a value of another cell.
    Rgds
    Anversha

  • What are the function modules used in interactive ALV and parameters?

    what are the function modules used in interactive ALV and parameters?

    hi sunil
    check these links,
    About ALV:
    http://www.geocities.com/mpioud/Abap_programs.html
    ALV Group Heading
    http://www.sap-img.com/fu037.htm
    and few more,
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    also run the folowing code and see
    check this sample code.you will be well versed with all the events of a interactive alv report.mark points if useful.
    *& Report ZALV4_INTERACTIVE *
    *& interactive alvs *
    REPORT ZALV4_INTERACTIVE NO STANDARD PAGE HEADING
    MESSAGE-ID ZMSG
    LINE-COUNT 37(3)
    LINE-SIZE 134.
    TYPE-POOLS : SLIS.
    TABLES DECLARATION ********************
    TABLES : VBRK, " BILLING MASTERS TABLE
    VBRP. " BILLING ITEM TABLE
    TYPES DECLARATION ********************
    TYPES : BEGIN OF TY_VBRK, " types for billing masters table
    VBELN TYPE VBRK-VBELN, " billing document
    WAERK TYPE VBRK-WAERK, " document currency
    VKORG TYPE VBRK-VKORG, " sales organization
    FKDAT TYPE VBRK-FKDAT, " billing date
    BUKRS TYPE VBRK-BUKRS, " company code
    BUTXT TYPE T001-BUTXT, " company name
    NETWR TYPE VBRK-NETWR, " net currency value
    LINE_COLOR(4) TYPE C,
    END OF TY_VBRK.
    TYPES : BEGIN OF TY_VBRP, " types for billing document item data
    POSNR TYPE VBRP-POSNR, " billing item
    FKIMG TYPE VBRP-FKIMG, " actual invoiced quantitty
    VRKME TYPE VBRP-VRKME, " sales unit
    NETWR TYPE VBRP-NETWR, " net currency value
    MATNR TYPE VBRP-MATNR, " material number
    ARKTX TYPE VBRP-ARKTX, " short text for sales order item
    END OF TY_VBRP.
    FIELD CATALOG ********************
    DATA : WA_FIELDCAT TYPE SLIS_FIELDCAT_ALV,
    WA_FIELDCAT1 TYPE SLIS_FIELDCAT_ALV.
    LAYOUT DECLARATION ********************
    DATA : WA_LAYOUT TYPE SLIS_LAYOUT_ALV,
    WA_LAYOUT1 TYPE SLIS_LAYOUT_ALV.
    EVENTS DECLARATION ********************
    DATA : TY_EVENTS TYPE SLIS_ALV_EVENT,
    IT_EVENTS TYPE SLIS_T_EVENT.
    PF STATUS ********************
    DATA : PF_STATUS TYPE SLIS_FORMNAME VALUE 'SET_PF_STATUS'.
    USER COMMAND ********************
    DATA : USER_COMMAND TYPE SLIS_FORMNAME VALUE 'SET_USER_COMMAND',
    R_UCOMM LIKE SY-UCOMM.
    INTERNAL TABLES ********************
    DATA : IT_VBRK TYPE TABLE OF TY_VBRK, "internal table for billing master
    IT_VBRP TYPE TABLE OF TY_VBRP, "internal table for billing item
    *internal table for field catalog
    IT_FIELDCAT TYPE SLIS_T_FIELDCAT_ALV,
    IT_FIELDCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    WORK AREA ********************
    DATA : WA_VBRK LIKE LINE OF IT_VBRK, "work area for billing master
    WA_VBRP LIKE LINE OF IT_VBRP. "work area for billing item
    VARIABLE DECLARATION ********************
    DATA : V_DATE TYPE SY-DATUM, " variable to store date values
    V_VBELN TYPE VBRK-VBELN, " variable for billing document
    V_FKDAT TYPE VBRK-FKDAT, " variable for billing date
    V_FLAG(1). " variable for flag
    SELECTION SCREEN ********************
    SELECT-OPTIONS : S_VBELN FOR VBRK-VBELN , " Billing document
    S_FKDAT FOR VBRK-FKDAT, " Billing date
    S_MATNR FOR VBRP-MATNR. " Material number
    PARAMETERS : R1 RADIOBUTTON GROUP G1, "whole item details
    R2 RADIOBUTTON GROUP G1. "selected item details
    INITIALIZATION ********************
    INITIALIZATION.
    V_FLAG = 'X'.
    V_DATE = SY-DATUM - 20.
    S_FKDAT-SIGN = 'I'.
    S_FKDAT-OPTION = 'EQ'.
    S_FKDAT-LOW = V_DATE.
    S_FKDAT-HIGH = SY-DATUM.
    APPEND S_FKDAT.
    SELECTION SCREEN VALIDATION ********************
    AT SELECTION-SCREEN.
    PERFORM CONVERSION. " performs data conversion for input
    PERFORM VBELN_VALIDATE. " validating the billing document
    PERFORM FKDAT_VALIDATE. " validating the billing date
    START OF SELECTION ********************
    START-OF-SELECTION.
    SET TITLEBAR 'AAAA'.
    PERFORM VBRK_POPULATE. " populating the billing master detais
    PERFORM FIELDCATALOG. " designing the field catalog
    PERFORM EVENTS. " performing the events for top of page
    PERFORM DISP_BASICLIST." displaying the basic list
    *& Form VBELN_VALIDATE
    text validating the billing document
    --> p1 text
    <-- p2 text
    FORM VBELN_VALIDATE .
    IF S_VBELN IS INITIAL.
    MESSAGE E000 WITH 'Make entries in all required fields'.
    ELSE.
    SELECT SINGLE VBELN
    FROM VBRK
    INTO V_VBELN
    WHERE VBELN IN S_VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH 'BILLING DOCUMENT DOESNT EXIST'.
    ENDIF.
    ENDIF.
    ENDFORM. " VBELN_VALIDATE
    *& Form FKDAT_VALIDATE
    text validating the billing date
    --> p1 text
    <-- p2 text
    FORM FKDAT_VALIDATE .
    SELECT SINGLE FKDAT
    FROM VBRK
    INTO V_FKDAT
    WHERE FKDAT IN S_FKDAT.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH 'BILLING DATE DOESNT EXIST'.
    ENDIF.
    ENDFORM. " FKDAT_VALIDATE
    *& Form VBRK_POPULATE
    text populating the billing master details
    --> p1 text
    <-- p2 text
    FORM VBRK_POPULATE .
    DATA : LD_COLOR(1) TYPE C.
    LD_COLOR = 5.
    SELECT VBRK~VBELN
    VBRK~WAERK
    VBRK~VKORG
    VBRK~FKDAT
    VBRK~BUKRS
    VBRK~NETWR
    T001~BUTXT
    FROM VBRK INNER JOIN T001
    ON VBRKBUKRS = T001BUKRS
    INTO CORRESPONDING FIELDS OF TABLE IT_VBRK
    WHERE VBRK~VBELN IN S_VBELN AND
    VBRK~FKDAT IN S_FKDAT.
    LOOP AT IT_VBRK INTO WA_VBRK.
    LD_COLOR = LD_COLOR + 1.
    IF LD_COLOR = 8.
    LD_COLOR = 1.
    ENDIF.
    CONCATENATE 'C' LD_COLOR '10' INTO WA_VBRK-LINE_COLOR.
    MODIFY IT_VBRK FROM WA_VBRK.
    ENDLOOP.
    ENDFORM. " VBRK_POPULATE
    *& Form CONVERSION
    text data conversion to take leading zeroes into account
    --> p1 text
    <-- p2 text
    FORM CONVERSION .
    CALL FUNCTION 'CONVERSION_EXIT_ALPHA_INPUT'
    EXPORTING
    INPUT = S_VBELN
    IMPORTING
    OUTPUT = S_VBELN.
    ENDFORM. " CONVERSION
    *& Form DISP_BASICLIST
    text displaying the basic list
    --> p1 text
    <-- p2 text
    FORM DISP_BASICLIST .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = PF_STATUS
    I_CALLBACK_USER_COMMAND = USER_COMMAND
    I_STRUCTURE_NAME =
    IS_LAYOUT = WA_LAYOUT
    IT_FIELDCAT = IT_FIELDCAT
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = 'X'
    IS_VARIANT =
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRK
    EXCEPTIONS
    PROGRAM_ERROR = 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.
    ENDFORM. " DISP_BASICLIST
    *& Form FIELDCATALOG
    text designing the field catalog
    --> p1 text
    <-- p2 text
    FORM FIELDCATALOG .
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'VBELN'.
    WA_FIELDCAT-SELTEXT_L = 'BILLING DOCUMENT'.
    WA_FIELDCAT-COL_POS = 1.
    WA_FIELDCAT-EMPHASIZE = 'C610'.
    WA_FIELDCAT-KEY = 'X'.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'WAERK'.
    WA_FIELDCAT-SELTEXT_L = 'DOCUMENT CURRENCY'.
    WA_FIELDCAT-COL_POS = 2.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'VKORG'.
    WA_FIELDCAT-SELTEXT_L = 'SALES ORGANIZATION'.
    WA_FIELDCAT-EMPHASIZE = 'C610'.
    WA_FIELDCAT-COL_POS = 3.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'FKDAT'.
    WA_FIELDCAT-SELTEXT_L = 'BILLING DATE'.
    WA_FIELDCAT-COL_POS = 4.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'BUKRS'.
    WA_FIELDCAT-SELTEXT_L = 'COMPANY CODE'.
    WA_FIELDCAT-COL_POS = 5.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'BUTXT'.
    WA_FIELDCAT-SELTEXT_L = 'COMPANY NAME'.
    WA_FIELDCAT-COL_POS = 6.
    WA_FIELDCAT-OUTPUTLEN = 25.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_FIELDCAT-TABNAME = 'IT_VBRK'.
    WA_FIELDCAT-FIELDNAME = 'NETWR'.
    WA_FIELDCAT-SELTEXT_L = 'NET CURRENCY VALUE'.
    WA_FIELDCAT-COL_POS = 7.
    WA_FIELDCAT-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT TO IT_FIELDCAT.
    CLEAR WA_FIELDCAT.
    WA_LAYOUT-ZEBRA = 'X'.
    WA_LAYOUT-INFO_FIELDNAME = 'LINE_COLOR'.
    ENDFORM. " FIELDCATALOG
    *& Form SET_PF_STATUS
    text set the pf status
    FORM SET_PF_STATUS USING EXTAB TYPE SLIS_T_EXTAB.
    SET PF-STATUS 'Z50658_PFSTATUS' EXCLUDING EXTAB.
    ENDFORM. "SET_PF_STATUS
    *& Form SET_USER_COMMAND
    text set the user command
    FORM SET_USER_COMMAND USING R_UCOMM
    RS_SELFIELD TYPE SLIS_SELFIELD.
    CASE R_UCOMM.
    WHEN 'CLICK'.
    IF R1 = 'X'.
    IF NOT IT_VBRK IS INITIAL.
    SELECT POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO CORRESPONDING FIELDS OF TABLE IT_VBRP
    FOR ALL ENTRIES IN IT_VBRK
    WHERE VBELN = IT_VBRK-VBELN.
    IF SY-SUBRC <> 0.
    MESSAGE I000 WITH ' NO BILLING DETAILS FOUND'.
    ELSE.
    IF V_FLAG = 'X'.
    PERFORM DET_FIELDCATALOG.
    V_FLAG = ''.
    ENDIF.
    PERFORM DET_LISTDISPLAY.
    ENDIF.
    ENDIF.
    ENDIF.
    IF R2 = 'X'.
    READ TABLE IT_VBRK INTO WA_VBRK INDEX RS_SELFIELD-TABINDEX.
    IF SY-SUBRC = 0.
    SELECT SINGLE POSNR
    FKIMG
    VRKME
    NETWR
    MATNR
    ARKTX
    FROM VBRP
    INTO CORRESPONDING FIELDS OF WA_VBRP
    WHERE VBELN = WA_VBRK-VBELN.
    ENDIF.
    APPEND WA_VBRP TO IT_VBRP.
    ENDIF.
    IF V_FLAG = 'X'.
    PERFORM DET_FIELDCATALOG. "designing the field catalog for items
    V_FLAG = ''.
    ENDIF.
    PERFORM DET_LISTDISPLAY. "displaying the secondary list
    WHEN 'BACK'.
    LEAVE TO SCREEN 0.
    WHEN 'UP'.
    LEAVE TO SCREEN 0.
    WHEN 'CANCEL'.
    CALL TRANSACTION 'SE38'.
    ENDCASE.
    ENDFORM. "SET_USER_COMMAND
    *& Form DET_FIELDCATALOG
    text designing the field catalog for item details
    --> p1 text
    <-- p2 text
    FORM DET_FIELDCATALOG .
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'POSNR'.
    WA_FIELDCAT1-SELTEXT_L = 'BILLING ITEM'.
    WA_FIELDCAT1-COL_POS = 1.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'FKIMG'.
    WA_FIELDCAT1-SELTEXT_L = 'INVOICE QUANTITY'.
    WA_FIELDCAT1-COL_POS = 2.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'VRKME'.
    WA_FIELDCAT1-SELTEXT_L = 'SALES UNIT'.
    WA_FIELDCAT1-COL_POS = 3.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'NETWR'.
    WA_FIELDCAT1-SELTEXT_L = 'NET CURRENCY VALUE'.
    WA_FIELDCAT1-COL_POS = 4.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'MATNR'.
    WA_FIELDCAT1-SELTEXT_L = 'MATERIAL NUMBER'.
    WA_FIELDCAT1-COL_POS = 5.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_FIELDCAT1-TABNAME = 'IT_VBRP'.
    WA_FIELDCAT1-FIELDNAME = 'ARKTX'.
    WA_FIELDCAT1-SELTEXT_L = 'SALES ORDER ITEM'.
    WA_FIELDCAT1-COL_POS = 6.
    WA_FIELDCAT1-OUTPUTLEN = 20.
    APPEND WA_FIELDCAT1 TO IT_FIELDCAT1.
    CLEAR WA_FIELDCAT1.
    WA_LAYOUT1-ZEBRA = 'X'.
    ENDFORM. " DET_FIELDCATALOG
    *& Form DET_LISTDISPLAY
    text displaying the secondary list
    --> p1 text
    <-- p2 text
    FORM DET_LISTDISPLAY .
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
    EXPORTING
    I_INTERFACE_CHECK = ' '
    I_BYPASSING_BUFFER =
    I_BUFFER_ACTIVE = ' '
    I_CALLBACK_PROGRAM = SY-REPID
    I_CALLBACK_PF_STATUS_SET = ' '
    I_CALLBACK_USER_COMMAND = ' '
    I_STRUCTURE_NAME =
    IS_LAYOUT = WA_LAYOUT1
    IT_FIELDCAT = IT_FIELDCAT1
    IT_EXCLUDING =
    IT_SPECIAL_GROUPS =
    IT_SORT =
    IT_FILTER =
    IS_SEL_HIDE =
    I_DEFAULT = 'X'
    I_SAVE = ' '
    IS_VARIANT =
    IT_EVENTS = IT_EVENTS
    IT_EVENT_EXIT =
    IS_PRINT =
    IS_REPREP_ID =
    I_SCREEN_START_COLUMN = 0
    I_SCREEN_START_LINE = 0
    I_SCREEN_END_COLUMN = 0
    I_SCREEN_END_LINE = 0
    IMPORTING
    E_EXIT_CAUSED_BY_CALLER =
    ES_EXIT_CAUSED_BY_USER =
    TABLES
    T_OUTTAB = IT_VBRP
    EXCEPTIONS
    PROGRAM_ERROR = 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.
    CLEAR IT_VBRP[].
    ENDFORM. " DET_LISTDISPLAY
    *& Form EVENTS
    text
    --> p1 text
    <-- p2 text
    FORM EVENTS .
    CLEAR TY_EVENTS.
    TY_EVENTS-NAME = SLIS_EV_TOP_OF_PAGE.
    TY_EVENTS-FORM = 'TOP_OF_PAGE'.
    APPEND TY_EVENTS TO IT_EVENTS.
    ENDFORM. " EVENTS
    *& Form TOP_OF_PAGE
    text
    FORM TOP_OF_PAGE.
    SKIP.
    ULINE.
    WRITE :/2 ' DATE :', SY-DATUM,
    45 'INTELLIGROUP ASIA PVT LTD',
    110 'TIME :', SY-UZEIT.
    WRITE : /3 'USER :', SY-UNAME,
    45 'TITLE :', SY-TITLE,
    110 'PAGE :', SY-PAGNO.
    ULINE.
    SKIP.
    ENDFORM. "TOP_OF_PAGE
    Cheers
    navjot
    Reward with points if it is helpful
    Message was edited by:
            navjot sharma

  • Using Search Help with ALV and Dynamic context node

    The topic subject already describes my situation.
    I have to create, populate and remove context nodes at runtime, and bind them to an ALV, to let user display the data or modify the data. The nodes I create are always typed with a table name, but the table name is of course, dynamic.
    This is all working: what's not working is help for entries inside the ALV; since the table has foreign keys and domains with check tables or fixed values, I expected that search helps were detected and managed by the framework.
    Instead, no help search is displayed except the input help based on data-type of the one "Date" input fields.
    I think I have to work on the dynamic node creation, and not on the ALV itself, since the latter only takes the node/attributes information, but i could be wrong. I tried with both the two following codings:
      CALL METHOD lo_nd_info_root->add_new_child_node
        EXPORTING
          static_element_type          = vs_tabname
          name                         = 'SAMPLE_NODE_NAME'
    *    is_mandatory                 = abap_false
    *    is_mandatory_selection       = abap_false
         is_multiple                  = abap_true
         is_multiple_selection        = abap_false
    *    is_singleton                 = abap_false
          is_initialize_lead_selection = abap_false
          is_static                    = abap_false
        RECEIVING
          child_node_info              = lo_nd_info_data .
    cl_wd_dynamic_tool=>create_nodeinfo_from_struct(
          parent_info = lo_nd_info_root
          node_name = 'SAMPLE_NODE_NAME'
          structure_name = vs_tabname
          is_multiple = abap_true ).
    The result is the same...is there any way to let the ALV know what search helps it has to use, and doesn't force me to manually build a VALUE_SET to be bound on the single attributes? There are many tables, with many fields, and maintaining this solution would be very costly.

    I have checked with method GET_ATTRIBUTE_VALUEHELP_TYPE of interface IF_WD_CONTEXT_NODE_INFO, on an attribute which i know to have a search help (Foreign key of a check table).
    The method returns 'N', that is the constant IF_WD_VALUE_HELP_HANDLER~CO_VH_TYPE_NO_HELP. So, the framework was not able to find a suitable search help.
    Using method GET_ATTRIBUTE_VALUE_HELP of the same interface, on the same attribute, returns me '111', which is constant C_VALUE_HELP_MODE-AUTOMATIC.
    Therefore, the WD framework knows it has to automatically detect a value help, but fails to find one.
    Also, this means in my opinion that the ALV and the dynamic external mapping are not the culprits: since node creation, no help is detected for any attribute but the date. Honestly, I don't have a clue on what's happening.

  • DIfference Between OOPS ALV and WEBDYNPRO FOR ABAP ALV?

    Hi to All,
    i want some information that What is main difference when we develop ALV Report in OOPS and WEBDYNPRO For ABAP.which is good n in what way it is good?
    In the Same way I m also want know that WHICH IS BETTER AMONG WEBDYNPRO FOR JAVA/ABAP.In which way?
    Regards,
    Ravi K

    Thanku for ur valuble Information.
    could u give me information regarding OOPS ALV and WEBDYNPRO FOR ABAP ALV?which is better?is there differences?
    Edited by: ravi k on Mar 26, 2008 12:23 PM

  • Difference between ALV and Table control

    Hi folks,
    i want to know the major differences between AlV and table controls.
    i know that table control is designed in screen painter, but i want to know the major diff between Table control and ALV.
    helpful answers will be rewarded.
    Regards,
    Naveen

    Hi Naveen,
    Basically ALV is a way to display the output and Table Control is designed in screen painter through which you can get entries in Table Control, can delete some records etc for further processing and  its not use only for Display.
    <b>ALV is Application List viewer:-</b>
    Sap provides a set of ALV (ABAP LIST VIEWER) function modules which can be put into use to embellish the output of a report. This set of ALV functions is used to enhance the readability and functionality of any report output. Cases arise in sap when the output of a report contains columns extending more than 255 characters in length. 
    In such cases, this set of ALV functions can help choose selected columns and arrange the different columns from a report output and also save different variants for report display. This is a very efficient tool for dynamically sorting and arranging the columns from a report output. 
    <b>TABLE CONTROL:-</b>
    ABAP offers two mechanisms for displaying and using table data in a screen. These mechanisms are table controls and step loops. Table controls and step loops are types of screen tables you can add to a screen in the Screen Painter.
    Rewards if useful.
    Regards,
    Shilpi

  • Commandlink and checkbox in a region(.jsff).

    Hi all,
    I have a commandlink and checkbox in a region(.jsff).
    when i tried to call a method using propertychangeListener or Actionlistener ..
    methosd is not calling ...
    Plase give any solution...

    Hi,
    not enough information - sorry
    Frank

  • Methods used in cl_gui_custom_container for ALV and for what purpose

    Methods used in cl_gui_custom_container for ALV and for what purpose and i want the exact senario for the usage of those method?
    2. What events are used in ALV?
    I anyone help me please,
    Points will be awarded.
    Thank you & Regards,
    Jagrut BharatKumar Shukla

    hey,
    look at this sample code....
    TABLES: SFLIGHT.
    G L O B A L   I N T E R N  A L   T A B L E S
    DATA: GI_SFLIGHT TYPE STANDARD TABLE OF SFLIGHT.
    G L O B A L   D A T A
    DATA: OKCODE LIKE SY-UCOMM,
          G_WA_SFLIGHT LIKE SFLIGHT.
    Declare reference variables to the ALV grid and the container
    DATA:
      GO_GRID             TYPE REF TO CL_GUI_ALV_GRID,
      GO_CUSTOM_CONTAINER TYPE REF TO CL_GUI_CUSTOM_CONTAINER.
    S T A R T - O F - S E L E C T I O N.
    START-OF-SELECTION.
      SET SCREEN '0100'.
    *&      Module  USER_COMMAND_0100  INPUT
    MODULE USER_COMMAND_0100 INPUT.
      CASE OKCODE.
        WHEN 'EXIT'.
          LEAVE TO SCREEN 0.
      ENDCASE.
    ENDMODULE.                 " USER_COMMAND_0100  INPUT
    *&      Module  STATUS_0100  OUTPUT
    MODULE STATUS_0100 OUTPUT.
    Create objects
      IF GO_CUSTOM_CONTAINER IS INITIAL.
        CREATE OBJECT GO_CUSTOM_CONTAINER
          EXPORTING CONTAINER_NAME = 'ALV_CONTAINER'.
        CREATE OBJECT GO_GRID
          EXPORTING
            I_PARENT = GO_CUSTOM_CONTAINER.
        PERFORM LOAD_DATA_INTO_GRID.
      ENDIF.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Form  load_data_into_grid
    FORM LOAD_DATA_INTO_GRID.
    Read data from table SFLIGHT
      SELECT *
        FROM SFLIGHT
        INTO TABLE GI_SFLIGHT.
    Load data into the grid and display them
      CALL METHOD GO_GRID->SET_TABLE_FOR_FIRST_DISPLAY
        EXPORTING
          I_STRUCTURE_NAME = 'SFLIGHT'
        CHANGING
          IT_OUTTAB        = GI_SFLIGHT.
    ENDFORM.                    " load_data_into_grid
    <b>* the Events are</b>
    ITEM_DATA_EXPAND, REPREP_SEL_MODIFY, CALLER_EXIT, USER_COMMAND, TOP_OF_PAGE, DATA_CHANGED, TOP_OF_COVERPAGE, END_OF_COVERPAGE, FOREIGN_TOP_OF_PAGE, FOREIGN_END_OF_PAGE, PF_STATUS_SET, LIST_MODIFY, TOP_OF_LIST, END_OF_PAGE, END_OF_LIST,AFTER_LINE_OUTPUT, BEFORE_LINE_OUTPUT, SUBTOTAL_TEXT, CONTEXT_MENU.
    <b>the methods used with the class CL_GUI_CUSTOM_CONTAINER are as follows......</b>
    IF_CACHED_PROPGET_NEXT_PROP, IF_CACHED_PROPSEEK_FIRST_PROP, IF_CACHED_PROP~SET_PROP, IS_VALID, FREE, GET_PROPERTY, SET_PROPERTY, CALL_METHOD, ASSIGN_PROPERTY, CALL_METHOD_RESULT_GUI_OBJECT, GET_PROPERTY_GUI_OBJECT, IS_CACHED_PROP, ADD_CACHE_PROP, REMOVE_CACHE_PROP, GET_CACHE_PROP, SET_CACHE_PROP, IS_CACHE_VALID, INVALIDATE_CACHE, GET_FOCUS, SET_FOCUS, SET_NAME, GET_NAME, GET_ENABLE, SET_ENABLE, DISPATCH, FINALIZE, GET_ADJUST_DESIGN, GET_GRID_HANDLE, GET_GRID_STEP, GET_HEIGHT, GET_LEFT, GET_METRIC, GET_MODE, GET_REGISTERED_EVENTS, GET_TOP, GET_VISIBLE, GET_WIDTH, IS_ALIVE, REG_EVENT_LEFT_CLICK_DESIGN, REG_EVENT_LEFT_CLICK_RUN_MODE, REG_EVENT_MOVE_CONTROL, REG_EVENT_RIGHT_CLICK, REG_EVENT_SIZE_CONTROL, SET_ADJUST_DESIGN, SET_ALIGNMENT, SET_GRID_HANDLE, SET_GRID_STEP, SET_HEIGHT, SET_LEFT, SET_METRIC, SET_MODE, SET_POSITION, SET_REGISTERED_EVENTS, SET_TOP, SET_VISIBLE, SET_WIDTH, GET_PATH, CONTROL_REGISTER_EVENT, CONTROL_UNREGISTER_EVENT, GET_EVENT_PARAMETER, GET_REGISTERED_EVENTS_EX, GET_WINDOW_PROPERTY, INIT_CONTROL, INIT_CONTROL_WITH_HWND, REGISTER_CACHED_PROPERTY, REGISTER_CACHED_W_PROPERTY, SET_REGISTERED_EVENTS_EX, SET_WINDOW_PROPERTY, UNREGISTER_CACHED_PROPERTY, UNREGISTER_CACHED_W_PROPERTY, GET_CONTAINER_TYPE, RESIZE, GET_INNER_WIDTH, LINK, GET_LINK_INFO, GET_INNER_HEIGHT, SET_MODE_FOR_ALL, GET_DYNPRO_CONTAINER, GET_FRAME_CONTAINER, GET_CHILD, ADD_CHILD, REMOVE_CHILD, REMOVE_ALL_CHILDREN, CONSTRUCTOR.

  • ALV and Crystal Reports challenge

    Hi there Gurus.
    I already have posted this question in the Crystal section.
    Maybe some of you ABAP Guys knows the answer here.
    Our Customer have  Crystal Reports Template includet so that the user can choose to display ALV in a nice Crystal Report.
    We have made changes to the Template, and have included a logo in the top right corner of the Report Header Section.
    When the report is started from ALV , a new Report Header Section is made.. and my old Report Header Section is pushed down.
    The result is that the Logo no longer is in the top right corner.
    The new section is made from ABAP maybe, and has Report Title and some information about which parameters has been used.
    I am familiar in Crystal, but not so much in ABAP.
    Any suggestions on how to solve this ?
    We want the logo to be in the top right corner of the report.
    Best Regards
    Ingrid

    Serdar Simsekler   , you seem to know a lot about ALV and what is happening there.
    Do you know anything on where the logic is hidden, in what is passed on to Crystal form ALV?
    And where it is placed in the report. ?
    Best Regards Ingrid

  • Reg. alv and interactive reports

    Hi Friends,
    What is the difference between alv and interactive reports?.
    rewards are helpful answers.

    Hi,
    ABAP List Viewer
    The common features of report are column alignment, sorting, filtering, subtotals, totals etc. To implement these, a lot of coding and logic is to be put. To avoid that we can use a concept called ABAP List Viewer (ALV).
    Using ALV, we can have three types of reports:
    1. Simple Report
    2. Block Report
    3. Hierarchical Sequential Report
    Interactive Reports
    As the name suggests, the user can Interact with the report. We can have a drill down into the report data.
    Purpose
        Interactive report provides you with comfortable functions for navigating through your data.
    Use
    Interactive report are used to display multiple list in one single report
    It has basic list and then you can  navigate to one or other screens in one single report
    Enhance the efficiency & transparency of Business Processes
    Example :  Column one of the report displays the material numbers, and the user feels that he needs some more specific data about the vendor for that material, he can HIDE that data under those material numbers.
    And when the user clicks the material number, another report (actually sub report/secondary list) which displays the vendor details.
    Advantage of ALV over Interactive:--
    1> Graphic Can be added
    2> Less Amount Of coding
    Reward If Helpful

  • ALV and POP-UP

    Hi everybody,
    I'm a very very junior developer and I'm in trouble with ALV and POP-UP.
    I'm going to explain to you my problem.
    I need to build a report that has two parameters.
    The first one helps you to choose a file from an Application server (by a match code).
    The second one shows the path you've just choose.
    When you click on the match code, the report has to do this:
    1 - a pop-up with an ALV list comes up with a list of files and subdirectories (the starting path is fixed in the code)
    2 - when i choose one of the files (double click) I need to
        - close the pop-up
        - catch the file and his path
        - put the entire path into the second parameter
    Regards
    Jampierre
    P.S: I'm sorry about my english

    Have a look at this example program.
    REPORT  zrich_0001.
    TYPE-POOLS: slis.
    TYPES : BEGIN OF lt_help,
             check TYPE c,
             file TYPE char255,
            END OF lt_help.
    DATA: idynfields TYPE TABLE OF dynpread .
    DATA: xdynfields LIKE LINE OF idynfields.
    DATA: ihelp TYPE TABLE OF lt_help.
    DATA: xhelp LIKE LINE OF ihelp.
    DATA: ifldc TYPE slis_t_fieldcat_alv .
    DATA: xfldc TYPE slis_fieldcat_alv .
    DATA: p_file TYPE localfile.
    DATA: ifile TYPE TABLE OF  salfldir.
    DATA: xfile LIKE LINE OF ifile.
    PARAMETERS: p_path TYPE salfile-longname
                        DEFAULT '\usr\sap\N4S\DVEBMGS00\work'.
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_path.
      REFRESH: ifile, ifldc.
        REFRESH idynfields.
        xdynfields-fieldname = 'P_PATH'.
        APPEND xdynfields TO idynfields.
        CALL FUNCTION 'DYNP_VALUES_READ'
          EXPORTING
            dyname             = sy-cprog
            dynumb             = sy-dynnr
          TABLES
            dynpfields         = idynfields
          EXCEPTIONS
            OTHERS             = 11.
        clear xdynfields.
        READ TABLE idynfields INTO xdynfields WITH KEY fieldname = 'P_PATH'.
        IF sy-subrc = 0.
          p_path = xdynfields-fieldvalue.
        ENDIF.
        CALL FUNCTION 'RZL_READ_DIR_LOCAL'
        EXPORTING
          name           = p_path
        TABLES
          file_tbl       = ifile
        EXCEPTIONS
          argument_error = 1
          not_found      = 2
          OTHERS         = 3.
      REFRESH ihelp.
      LOOP AT ifile INTO xfile.
        xhelp-file = xfile-name.
        APPEND xhelp TO ihelp.
      ENDLOOP.
      CLEAR xfldc.
      xfldc-reptext_ddic    = ' '.
      xfldc-fieldname  = 'CHECK'.
      xfldc-tabname   = 'IHELP'.
      xfldc-outputlen  = '1'.
      APPEND xfldc TO ifldc.
      CLEAR xfldc.
      xfldc-reptext_ddic    = 'File Name'.
      xfldc-fieldname  = 'FILE'.
      xfldc-tabname   = 'IHELP'.
      xfldc-outputlen  = '255'.
      APPEND xfldc TO ifldc.
      CALL FUNCTION 'REUSE_ALV_POPUP_TO_SELECT'
        EXPORTING
          i_checkbox_fieldname = 'CHECK'
          i_tabname            = 'IHELP'
          it_fieldcat          = ifldc
        TABLES
          t_outtab             = ihelp
        EXCEPTIONS
          program_error        = 1
          OTHERS               = 2.
      READ TABLE ihelp INTO xhelp WITH KEY check = 'X'.
      IF sy-subrc = 0.
        REFRESH idynfields.
        xdynfields-fieldname = 'P_PATH'.
        CONCATENATE p_path '\' xhelp-file INTO xdynfields-fieldvalue.
        APPEND xdynfields TO idynfields.
    * Update the dynpro values.
        CALL FUNCTION 'DYNP_VALUES_UPDATE'
          EXPORTING
            dyname     = sy-cprog
            dynumb     = sy-dynnr
          TABLES
            dynpfields = idynfields
          EXCEPTIONS
            OTHERS     = 8.
      ENDIF.
    Regards,
    Rich Heilman

Maybe you are looking for