How to identify the modified rows in ALV grid in OO

Hello All,
I have strange problem and i don't know how to solve it?
I have ALV grid and in that ALV grid i have two buttons 'CONT' and 'ALLOC', when the user press 'ALLOC' button i will give a popup to make the user to enter some value.
After entering the value i will do some calicualtions and i will distribute the amount in the fields of ALV grid and i should update the ALVGRID.
Normally we can use CALL METHOD ME->REFRESH_TABLE_DISPLAY.( I have already checked by using this method and it worked fine)
Here is the way my program look like
ALVTREE1
ALVTREE2
             |----
ALVGRID
The problem is when i press the other button CONT i am unable to know what values exist in ALVGRID.
How can i find these distributed amount in ALV?
I hope i am clear while explaining problem.
Here is  the required code:
  method handle_user_command.
    data: lt_fields       type table of sval,
          ls_field        type sval,
          ls_fieldcatalog type lvc_s_fcat,
          ls_merkpl       type zvhf_merkpl,
          lv_month(2)     type n ,
          lv_year(4)      type n ,
          lv_spmon        type zvhf_allocation-spmon,
          lv_value        type p.
    field-symbols: <fs> type any,
                   <ls_merkpl> type zvhf_merkpl.
    case  e_ucomm.
      when 'CNT'.
        call method gcl_gui_alv_grid->check_changed_data.
        call method dailogbox_container->set_visible
          exporting
            visible = space.
        call method gcl_gui_alv_tree2->frontend_update.
        call method gcl_gui_alv_tree2->update_calculations.
        clear: gt_merkpl.
      when 'ALCT'.
Popup to get the values enterd by the user
        ls_field-tabname   = 'DD02V'.
        ls_field-fieldname = 'DDTEXT'.
        append ls_field to lt_fields.
        call function 'POPUP_GET_VALUES'
          exporting
            popup_title     = 'Enter value'
            start_column    = '1'
            start_row       = '1'
          tables
            fields          = lt_fields
          exceptions
            error_in_fields = 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.
        elseif sy-subrc = 0.
          read table lt_fields into ls_field index 1.
          if sy-subrc = 0.
            gv_value = ls_field-value.
Read the table zvhf_allocation with nodekey  in order to get percentages
            select * from zvhf_allocation into table gt_allocation
                               where dvkbur = gs_node_info-nodename.
Read gt_merkpl in order to get existing line in ALV grid
            loop at  gt_merkpl into ls_merkpl.
*Read FCAT inorder to find the field and move proprtinate value
              loop at gt_fieldcatlog3 into ls_fieldcatalog.
*Split is required to match ZVHF_ALLOCATION-SPMON  with screen text and to proprtinate the value
                split ls_fieldcatalog-scrtext_l at '.' into
                      lv_month lv_year.
                concatenate lv_year lv_month into lv_spmon.
Check whether an entry exist or not in ZVHF_allocation
                read table gt_allocation into gs_allocation
                                          with key spmon = lv_spmon binary search.
*If an entry exist proprtinate the value as enterd in table
                if sy-subrc = 0.
                  lv_value  = gv_value * gs_allocation-prozent.
                  lv_value = lv_value / 100.
                  perform assign_value using     ls_fieldcatalog-fieldname lv_value
                                       changing  ls_merkpl.
                  modify gt_merkpl from ls_merkpl.
                endif.
              endloop.
             CALL METHOD gcl_gui_alv_grid->frontend_update.
              call method gcl_gui_alv_grid->refresh_table_display
                exceptions
                  finished = 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.
            endloop.
          endif.
        endif.
    endcase.
  endmethod.                    "handle_user_command
If you have any further questions please let me know.
Regards,
Lisa

Hello Vijay,
Thanks for you reply,
The event data_changed is not working because i called method refresh_table_display. So the event changed will not be raised after i press button CONT
If i didn't call this method then i can see the value enterd by the user in ALV grid.
So, do you have an more ideas.
Regards,
Lisa

Similar Messages

  • How to find the selected item in alv grid or table control

    can any one tell me please
    how to find the selected item in alv grid or table control

    In table control, If you goto screen painter and goto table control properties ( f2 ), there is one check-box w/selColumn check that and give column name. Then add that column to your internal table.
    IN PAI
      LOOP AT it_tkhdr.
        FIELD it_tkhdr-sel_row
          MODULE tab_tkhdr_mark ON REQUEST.
      ENDLOOP.
    MODULE tab_tkhdr_mark INPUT.
      MODIFY it_tkhdr INDEX tc_tkhdr-current_line.
    ENDMODULE.                 " tab_tkhdr_mark  INPUT
    here it_TKHDR is internal table sel_row is field for selection
    After that, you can loop at it_tkhdr where sel_row is 'X' to get selected rows.
    regards,
    Gagan

  • How to identify the Selected row number or Index in the growing Table

    Hi,
    How to find the selected Row number or Row Index of growing  Table using Javascript or Formcalc in Interactive Adobe forms
    Thanks & Regards
    Srikanth

    After using bellow script it works fine
    xfa.resolveNode("Formname.Table1.Row1["this.parent.index"].fieldname").rawValue;

  • How to save the modified rows in jspx page usind adf default commit action

    Hi,
    We are displaying some columns of the database table in jspx page. Here we are using adf commit action to save these values to database which is updating all the rows by default. In this page there are some editable columns which the user can miodify. How can we update only these modified rows using default adf commit action. Also we want to update last_updated_date column of that particular row which is modified in the UI from backing bean .
    Can anyone please help us in solving this.
    Thanks in advance

    User,
    A key question - what are you using for the model layer (ADF Business Components, JPA, EJB, etc)?
    How are you determining that a "commit" action is updating rows (even those which haven't changed)?
    If you are using ADF Business Components - have a read in the documentation about history columns - the use case you describe (updating the last_udpdated_date column) is supported "out-of-the-box" for this.
    John

  • How to detect a selected row in ALV GRID

    Hi,
    Can anyone tell me how to detect and catch an event when a row is selected in an ALV GRID?
    I would like to catch such event when the end user presses Ctrl + Shif + Space bar.
    Thank you and best regards.
    Hassane.

    Hi,
    Use this wiki link, to have a checkbox with all the records in ALV Grid and to process those selected records at a user command, as per the requirement.
    https://www.sdn.sap.com/irj/scn/wiki?path=/display/snippets/alv%252bgrid%252bdisplay%252bwith%252bcheckbox%252bto%252bprocess%252bselected%252brecords%252bat%252bruntime
    Hope this solves your problem.
    Thanks & Regards,
    Tarun Gambhir

  • How to Edit the CheckBox in Classic ALV GRID Display

    Hi,
    I want to Edit the checkbox in Grid Display.
    I have one checkbox field in my internal Table,
    Code Of the Program,
    Data :
    Begin of itab occurs 0,
    CHK type C,
    MATNR like MARA-MATNR,
    end of itab.
    Iam building the fieldcatelog using Merge Funcion module.
    After that I am chaning the properties of the field
    catelog like below,
    loop at I_FCAT assigning <FCAT>.
    Case <FCAT>-Fieldname
    When 'CHK'.
    <FCAT>-Checkbox = 'X'.
    <FCAT>-INPUT = 'X'.
    I dont have edit option in fieldcatelog.
    modify I_FCAT from <FCAT>.
    endcase.
    endloop.
    In the Layout,
    I_LAYOUT-box_fieldname = 'CHK'.
    I_LAYOUT-box_tabname = 'ITAB'.
    It is displaying the Checkbox field.but I couldnt edit the checkBox.
    I can able to edit in REUSE_ALV_LIST_DISPLAY.
    But I  have to use REUSE_ALV_GRID_DISPLAY.How to edit the checkbox.
    Thanks in Advance,
    Sumithra

    Hi vasu,
    The below procedure explains you to create a checkbox cloumn in the grid and allows you to edit i hope this will helps u.
    The ALV Grid Control displays the cells of a column as checkboxes if the column is marked as a checkbox column in the field catalog.
    •     Add another field to the output table in which you want to display checkboxes
    OR
    •     Define an existing field as a checkbox.
    Procedure
    1.     Add a field to your output table:
    Data: gt_fieldcat type lvc_t_fcat.
    Types: begin of gs_outtab.
    Types: checkbox type c. "field for checkbox
    Include structure <ABAP Dictionary structure> .
    Types: end of gs_outtab.
    Data: gt_outtab type gs_outtab occurs 0 with header line.
    2 * Add an entry for the checkbox to the field catalog
    clear ls_fcat.
    ls_fcat-fieldname = 'CHECKBOX'.
    * Essential: declare field as checkbox and
    * mark it as editable field:
    ls_fcat-checkbox = 'X'.
    ls_fcat-edit = 'X'.
    * do not forget to provide texts for this extra field
    ls_fcat-coltext = text-f01.
    ls_fcat-tooltip = text-f02.
    ls_fcat-seltext = text-f03.
    append ls_fcat to gt_fieldcat.
    regards,
    venu.

  • How to make the editable col. in alv grid scrollable?

    friends,
        i have made the last col. in my alv grid editable..even though i have declared it as char of length 255, it's showing only 50 characters in the grid..but when i try to type beyond 50 characters, it's not allowing...how to make it scrollable so that it extends beyond 50 char. and capture all the characters typed in that col.? pl suggest..thanks all..
    Sathish. R

    Hi, u can extend the length of your last field.
    LOOP AT t_fieldcat INTO ls_fcat.
        CASE ls_fcat-fieldname.
          WHEN text-001.
            ls_fcat-outputlen = c_10.                    "10
          WHEN text-002.
            ls_fcat-outputlen = c_20.                    "20
          WHEN text-003.                                  "your lastfield
            ls_fcat-outputlen = c_255.                  "255
                "do nothing
        ENDCASE.
    *fixed column
        ls_fcat-fix_column = c_x.
    *changes to take effect
        MODIFY t_fieldcat FROM ls_fcat.
        IF sy-subrc = 0.
          "do nothing
        ENDIF.
        CLEAR ls_fcat.
      ENDLOOP.

  • How to capture the checkbox status in ALV Grid display

    I need some immediate help regarding Grid ALV.
    My Requirement: I need to display an ALV grid report along with checkboxes. Further, I need to provide an option wherein the user can checkboxes and select the records that I need to process further (by clicking the process button on the ALV Report).
    My Query: The problem here is that I am not able to capture the status of the checkboxes. This means that I am not able to capture which of the records have been selected by checking their resp checkboxes.
    Solutions that I have tried: I have tried capturing the same at user command by checking the value in slis_selfield. But all the records show the value as 1 for the checkbox field.
    Kinldy suggest how to go about it.
    I am not using Object Oriented ALV. Please suggest something to be used in ALV Grid display in 4.6C version.
    Regards,
    Namrata

    Here is a Sample code , it might help you
    TABLES : sflight.
    TYPE-POOLS: slis.
    DATA : w_repid LIKE sy-repid.
    w_repid = sy-repid.
    DATA: BEGIN OF it_sflight OCCURS 0,
      checkbox(1),
      carrid LIKE sflight-carrid,
    END OF it_sflight.
    *layout
    DATA: wa_layout TYPE slis_layout_alv.
    *field catalog
    DATA: it_fieldcatalog TYPE slis_t_fieldcat_alv,
              wa_fieldcatalog TYPE slis_fieldcat_alv.
    START-OF-SELECTION.
      SELECT carrid FROM sflight
         INTO CORRESPONDING FIELDS OF TABLE it_sflight.
    END-OF-SELECTION.
      CLEAR it_fieldcatalog.
      REFRESH it_fieldcatalog.
      wa_fieldcatalog-fieldname = 'CHECKBOX'.
      wa_fieldcatalog-outputlen = '3'.
      wa_fieldcatalog-col_pos = '1'.
      wa_fieldcatalog-seltext_m = 'Chk'.
      wa_fieldcatalog-checkbox = 'X'.
      wa_fieldcatalog-edit = 'X'.
      APPEND wa_fieldcatalog TO it_fieldcatalog.
      CLEAR wa_fieldcatalog.
      wa_fieldcatalog-fieldname = 'CARRID'.
      wa_fieldcatalog-outputlen = '10'.
      wa_fieldcatalog-col_pos = '2'.
      wa_fieldcatalog-seltext_m = 'Carrid'.
      APPEND wa_fieldcatalog TO it_fieldcatalog.
      CLEAR wa_fieldcatalog.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = w_repid
          is_layout = wa_layout
          i_callback_user_command = 'USER_COMMAND'
          it_fieldcat = it_fieldcatalog
        TABLES
          t_outtab = it_sflight
        EXCEPTIONS
          program_error = 1
          OTHERS = 2.
    *& Form USER_COMMAND
    FORM user_command USING p_ucomm TYPE sy-ucomm
      p_selfld TYPE slis_selfield.
      CASE p_ucomm.
       WHEN '&DATA_SAVE'.
          DATA ref1 TYPE REF TO cl_gui_alv_grid.
          CALL FUNCTION 'GET_GLOBALS_FROM_SLVC_FULLSCR'
             IMPORTING
               e_grid = ref1.
          CALL METHOD ref1->check_changed_data.
          LOOP AT it_sflight WHERE checkbox = 'X'.
             DELETE it_sflight INDEX sy-tabix.
          ENDLOOP.
          p_selfld-refresh = 'X'.
      ENDCASE.
    ENDFORM. "user_command

  • Displaying the selected rows in ALV Grid output

    Hi Experts,
    I am developing one interactive ALV Grid report where user can process the selected records/rows from the ALV Grid output.
    for displaying the ALV Grid, I have used the class CL_GUI_ALV_GRID class. I am working on ECC 6.0 system.
    when I select any records/rows from output and then press any Application Toolbar button, PAI and then PBO modules of the screen gets executed as per the normal flow.
    however After PBO, when same ALV output comes, all the selected/highlighted rows appear as unselected, that means I want to retain the ALV
    rows selection during the round trip.
    please advise.
    Regards,
    Jagesh

    Hi,
    Feiyun Wu is correct.
    Get_selected_rows and set_selected_rows are the methods to be used .
    Some code:
    Note the sequence of code:
    FORM set_gui_alv_grid_1 .
      DATA: wa_layout TYPE lvc_s_layo ,
            wa_print TYPE lvc_s_prnt .
      DATA: it_sort TYPE lvc_t_sort ,
            wa_sort TYPE LINE OF lvc_t_sort .
      DATA: it_fieldcatalog TYPE lvc_t_fcat.
      IF gui_custom_container_1 IS INITIAL .
        CREATE OBJECT gui_custom_container_1
          EXPORTING
            container_name = 'GUI_CUSTOM_CONTAINER_1'
          EXCEPTIONS
            cntl_error                  = 1
            cntl_system_error           = 2
            create_error                = 3
            lifetime_error              = 4
            lifetime_dynpro_dynpro_link = 5
            OTHERS                      = 6 .
        IF sy-subrc <> 0.
        ENDIF.
        PERFORM get_field_catalog
          USING gc_log_group_1
          CHANGING it_fieldcatalog  .
        CREATE OBJECT gui_alv_grid_1
          EXPORTING i_parent = gui_custom_container_1.
        CREATE OBJECT ob_event_receiver_1
          EXPORTING log_group = gc_log_group_1 .
    * registers the event handlers
        SET HANDLER ob_event_receiver_1->handle_toolbar      FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->handle_user_command FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->print_top_of_page   FOR gui_alv_grid_1 .
        SET HANDLER ob_event_receiver_1->hotspot_click       FOR gui_alv_grid_1 .
        wa_layout-cwidth_opt = abap_true .
    *   wa_layout-excp_fname = gc_excp_fname .
    *   wa_layout-ctab_fname = gc_ctab_fname.
    *   wa_layout-excp_led   = abap_true .
        CALL METHOD gui_alv_grid_1->set_table_for_first_display
          EXPORTING
            is_layout       = wa_layout
            is_print        = wa_print
            i_save          = 'A'
            is_variant      = gs_disvariant_1
          CHANGING
            it_sort         = it_sort
            it_fieldcatalog = it_fieldcatalog
            it_outtab       = it_alv_grid_1.
      ELSE .
        CALL METHOD gui_alv_grid_1->refresh_table_display.
    * Restore selections
        CALL METHOD gui_alv_grid_1->set_selected_rows
          EXPORTING
            it_index_rows = ob_event_receiver_1->it_rows.
    * Restore position
        CALL METHOD gui_alv_grid_1->set_scroll_info_via_id
          EXPORTING
            is_col_info = ob_event_receiver_1->wa_col
            is_row_no   = ob_event_receiver_1->wa_roid.
      ENDIF.
    ENDFORM .                    "set_gui_alv_grid_1
    Regards.

  • How to validate the columns in dynamic alv grid

    Hi Friends,
    I want to validatethe value of all the columens (min 1 and max 40) which i create dynamically in alv grid.
    value must be between 0 and 1 only.
    Please help ,, need urgently.

    method handle_data_changed.
         data: ls_good type lvc_s_modi,
               li_diff type i,
               value type p DECIMALS 3,
               old_value type p DECIMALS 3,
               lw_outtab1 type gt_tab.
    clear value.
           loop at er_data_changed->mt_good_cells into ls_good.
           value = ls_good-value.
           old_value = ls_good-value.
            if value lt 0 or value gt 1.
               MESSAGE 'Value is out of range' TYPE 'I'.
              Read table gt_outtab1 into lw_outtab1 index ls_good-row_id .
               perform show_alv.
               clear ls_good.
            ENDIF.
          ENDCASE.
           ENDLOOP.
    I again created the table.. actually data is not changed in the internal table but still it shows the changed value in the alv grid. even in build the table again and call the refersh alv grid method..

  • How to merge the 2 field in alv gride display

    Tables for ALV display
    DATA: it_fieldcat   TYPE  slis_t_fieldcat_alv,
          wa_fieldcat   TYPE  slis_fieldcat_alv,
          wa_layout     TYPE  slis_layout_alv,
          it_exclude    TYPE  slis_t_extab,
          wa_exclude    TYPE  slis_extab,
          it_header TYPE STANDARD TABLE OF zqm_imir_hdr,
          wa_header LIKE LINE OF it_header,
          it_final TYPE STANDARD TABLE OF zqm_imir_itm,
          wa_final LIKE LINE OF it_final,
          it_vcode      TYPE RANGE OF zqm_wtr_itm-vcode,
           wa_vcode      LIKE LINE OF  it_vcode.
    DEFINE m_fieldcat.
      wa_fieldcat-fieldname = &1.
      wa_fieldcat-tabname   = &2.
      wa_fieldcat-seltext_m = &3.
      wa_fieldcat-outputlen = &4.
      wa_fieldcat-col_pos   = &5.
      append wa_fieldcat to it_fieldcat.
      clear wa_fieldcat.
    END-OF-DEFINITION.
    DEFINE m_vcode.
      wa_vcode-option   = &1.
      wa_vcode-sign     = &2.
      wa_vcode-low      = &3.
      wa_vcode-high     = ''.
      append wa_vcode to it_vcode.
      clear wa_vcode.
    END-OF-DEFINITION.
    START-OF-SELECTION.
      PERFORM data_retrival.
      PERFORM lead_time_calculation.
      IF it_final[] IS NOT INITIAL.
        PERFORM alv_display.
      ENDIF.
    Display ALV
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = sy-repid
          is_layout          = wa_layout
          it_fieldcat        = it_fieldcat
          i_save             = c_x
          it_excluding       = it_exclude
        TABLES
          t_outtab           = IT_OUTPUT[]
        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.
      m_fieldcat: 'ZIMIRNO'  'IT_OUTPUT' text-003 21  0,
                  'PRUEFLOS'  'IT_OUTPUT' text-004 21  1,
                  'ZCRDAT'    'IT_OUTPUT' text-030 9 2,
                  'INITS'     'IT_OUTPUT' text-031 6 3,
                  'SPLIT'     'IT_OUTPUT' text-005 12  4,
                  'WERK'     'IT_OUTPUT' text-006  5 5,
                  'LOSMENGE'  'IT_OUTPUT' text-007 24  6,
                  'MENGENEINH' 'IT_OUTPUT' text-008  15  7,
                  'NAMEVEND'   'IT_OUTPUT' text-009  11  8,
    *& Hypercare - 721600 - IMIR Changes - Start
                 'KONT_PSPNR' 'IT_OUTPUT' text-023  15  7,
                  'POSID' 'IT_OUTPUT' text-023  15  9,
    *& Hypercare - 721600 - IMIR Changes - End
                  'LTEX1' 'IT_OUTPUT'  text-024  24  10,
                  'EBELN'    'IT_OUTPUT' text-010  26  11,
                  'MBLNR'    'IT_OUTPUT' text-011  24  12,
                  'ANZGEB'   'IT_OUTPUT' text-012  17  13,
                  'GEBEH'    'IT_OUTPUT' text-013  4 14,
                  'MATNR'    'IT_OUTPUT' text-014  18 15,
                  'TXZ01'   'IT_OUTPUT' text-015  128 16,
                  'SPECE'    'IT_OUTPUT' text-016  23  17,
                  'VCODE'   'IT_OUTPUT' text-017 24  18,
                  'TAGNO'   'IT_OUTPUT' text-018 10  19,
                  'HEATNO'   'IT_OUTPUT' text-019  11  20,
                  'IDCODE'   'IT_OUTPUT' text-020  7 21,
                  'TCNO'   'IT_OUTPUT' text-021  9 22,
                  'REMARKS'   'IT_OUTPUT' text-022 30 23,
                  'BUDAT'   'IT_OUTPUT' text-025 30 24,
                  'CPUTM'   'IT_OUTPUT' text-026 30 25,
                  'VDATUM'   'IT_OUTPUT' text-027 30 26,
                  'VEZEITERF'   'IT_OUTPUT' text-028 30 27,
                 'ZLTIME'    'IT_OUTPUT' text-029 30 26,
                  'LEADTIME'   'IT_OUTPUT' text-029 30 28.
    DATA : v_unit like T006-MSEHI VALUE 'HR',
           v_FCALID like SCAL-FCALID,
           v_zltim TYPE f,
           v_zltime TYPE p LENGTH 8 DECIMALS 2.
    SELECT SINGLE FABKL INTO v_FCALID FROM T001W WHERE WERKS = s_werks.
    SELECT zcrdat INTO TABLE it_zqm_imir_hdr
           from zqm_imir_hdr
            FOR ALL ENTRIES IN it_final
            where zcrdat EQ it_final-zcrdat.
    SELECT mblnr mjahr budat cputm
          INTO TABLE it_mkpf
          from mkpf
            FOR ALL ENTRIES IN it_final
          where mblnr EQ it_final-mblnr
            AND mjahr EQ it_final-mjahr.
    SELECT prueflos vdatum vezeiterf
          INTO TABLE it_qave
          from qave
            FOR ALL ENTRIES IN it_final
          where prueflos EQ it_final-prueflos.
    SORT it_mkpf    BY mblnr mjahr.
    SORT it_qave    by prueflos.
    SORT it_zqm_imir_hdr  BY zcrdat.
        LOOP AT it_final into wa_final.
          CLEAR: wa_output,wa_mkpf,wa_qave,wa_zqm_imir_hdr.
          MOVE-CORRESPONDING wa_final to wa_output.
    READ TABLE it_zqm_imir_hdr INTO wa_zqm_imir_hdr WITH KEY zcrdat = wa_final-zcrdat
                                                   BINARY SEARCH.
          READ TABLE it_mkpf INTO wa_mkpf WITH KEY mblnr = wa_final-mblnr
                                                   mjahr = wa_final-mjahr
                                                   BINARY SEARCH.
          MOVE wa_zqm_imir_hdr-zcrdat TO wa_output-zcrdat.
          MOVE wa_mkpf-budat TO wa_output-budat.
          MOVE wa_mkpf-cputm TO wa_output-cputm.
          READ TABLE it_qave INTO wa_qave WITH KEY prueflos = wa_final-PRUEFLOS
                                                   BINARY SEARCH.
          MOVE wa_qave-vdatum     TO wa_output-vdatum.
          MOVE wa_qave-vezeiterf  TO wa_output-vezeiterf.
    LV_START_DATE = wa_zqm_imir_hdr-zcrdat.
    LV_START_DATE = wa_mkpf-budat.
    LV_START_TIME =  wa_mkpf-cputm.
    LV_END_TIME   = wa_qave-vezeiterf.
    LV_END_DATE   =  wa_qave-vdatum.
    IF LV_START_DATE IS NOT INITIAL.
       IF LV_END_DATE IS NOT INITIAL.
          CALL FUNCTION 'SD_CALC_DURATION_FROM_DATETIME'
            EXPORTING
              i_date1                =  LV_START_DATE
              i_time1                =  LV_START_TIME
              i_date2                =  LV_END_DATE
              i_time2                =  LV_END_TIME
           IMPORTING
             E_TDIFF                =  LV_DIFF
            E_DATE2_EARLY          =  E_DATE2_EARLY
          EXCEPTIONS
            INVALID_DATETIME       = 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.
    eNDFORM.}
    This is my code unable to merge the to tabs position is on 3rd and 4th.
    need help ......
    thanks,

    Hi,
    From Your code I saw that you called Macro of fieldcat after Calling the ALV Function Did You Check That One.
    Following links may be useful for you ,
    ALV report: How to merge 2 columns into 1 column?
    Hope this information helps You
    Regards,
    Raghava Channooru

  • HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID?

    HI.
    HOW CAN I HAVE THE NUMBER OF SELECTED ROWS IN ALV GRID????
    GABRY =)

    You need to use
    data : grid1  type ref to cl_gui_alv_grid.
      call method grid1->get_selected_rows
        importing
          et_index_rows = i_sel_alvrows[].

  • How to track modified rows in ALV list

    I need to keep track of all the rows in the ALV list that the users have modified.  When the user selects SAVE, I need to read the modified rows and save the changes to the database.  I thought I could use mp_mod_rows but I cannot get the syntax and the variable declarations correct. 
    Thanks.
    Sandy

    Hi,
    R u using FM or.............
    If u r using FM look at my example.....
    data: LC_GLAY TYPE LVC_S_GLAY.
    LC_GLAY-EDT_CLL_CB = 'X'.<<<<<------
    gt_layout-zebra = 'X'.
    gt_layout-detail_popup = 'X'.
    gt_layout-colwidth_optimize = 'X'.
    ITAB1[] = ITAB[].<<<<<-----make a copy of ITAB for further comparision.
    call function 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    i_callback_program = i_repid
    i_callback_user_command = 'USER_COMMAND1'
    it_fieldcat = header
    is_layout = gt_layout
    i_callback_top_of_page = 'TOP-OF-PAGE1'
    i_grid_title = text-h17
    it_sort = gt_sort[]
    i_default = 'X'
    i_save = 'U'
    is_variant = gt_variant
    it_events = gt_events
    I_GRID_SETTINGS = LC_GLAY<<<<<<------
    TABLES
    t_outtab = itab.
    clear itab.
    Form USER_COMMAND1
    FORM USER_COMMAND1 USING u_ucomm LIKE sy-ucomm
    us_selfield TYPE slis_selfield."#EC CALLED
    case u_ucomm.
    when '&DATA_SAVE'.<<<<<<<<----
    This will come after the data was EDITTED and when SAVE was clicked by user in output scren.
    Here now in the final internal table(ITAB) you can find the data changed in EDIT mode.
    After this you can do manipulation what ever you want.
    Thanks.
    If this helps you reward with points.

  • Deactivate the double click/ hot spot for a particular row in alv grid.

    Hello,
       As per a certain condition how to deactivate the double click/ hot spot for a particular row in alv grid.
    Regards,
    Saroj

    where u define layout there is a field hotspot.like
    data: var.
    if con is true
    var = 'X'. (show hotspot)
    else.
    var = ' '. (deactive hotspot)
    elseif ws_fieldcat-fieldname = 'DMBTR'
                    AND ws_fieldcat-tabname = 'T_MTAB'.
          ws_fieldcat-do_sum = C_X.
          <b>ws_fieldcat-hotsopts = var.</b>
          MODIFY Wt_fieldcat FROM ws_fieldcat
                  TRANSPORTING   DO_SUM.
    It is helpful for u. if any problen send me ur coding i will change it.
    Regards
    Manish Kumar

  • How to delete a particular row in ALV table

    Hi,
    How to delete a particular row in ALV table based on some condition(by checking value for one of the columns in a row)
    Thanks
    Bala Duvvuri

    Hello Bala,
    Can you please be a bit more clear as to how you intend to delete the rows from your ALV? By the way deleting rows from an ALV is no different from deleting rows from a normal table. Suppose you have enabled selection property in ALV & then select multiple rows and click up on a button to delete the rows then below would be the coding: (Also keep in mind that you would have to maintain the Selection property of the context node that you are binding to your ALV to 0..n)
    data : lr_table_settings  TYPE REF TO if_salv_wd_table_settings,
                 lr_config          TYPE REF TO cl_salv_wd_config_table.
      lr_table_settings  ?= lr_config.
    ** Setting the ALV selection to multiple selection with no lead selection
      lr_table_settings->set_selection_mode( value = cl_wd_table=>e_selection_mode-multi_no_lead ).
    Next delete the selected rows in the action triggered by the button:
    METHOD onactiondelete_rows .
      DATA:  wd_node TYPE REF TO if_wd_context_node,
             lt_node1 TYPE ig_componentcontroller=>elements_node,
             wa_temp  TYPE REF TO if_wd_context_element,
             lt_temp  TYPE wdr_context_element_set,
             row_number TYPE i VALUE 0.
      wd_node = wd_context->get_child_node( name = 'NODE' ).
      CALL METHOD wd_node->get_selected_elements
        RECEIVING
          set = lt_temp.
      LOOP AT lt_temp INTO wa_temp.
        wd_node->remove_element( EXPORTING element = wa_temp ).
      ENDLOOP.
      CALL METHOD wd_node->get_static_attributes_table
        EXPORTING
          from  = 1
          to    = 2147483647
        IMPORTING
          table = lt_node1.
      wd_node->bind_table( new_items = lt_node1 ).
    ENDMETHOD.
    If in case this isn't your requirement please do let me know so that I can try come up with another analysis.
    Regards,
    Uday

Maybe you are looking for

  • Index Usage from SQL query in Oracle Forms

    Would using LIKE/OR in where clause (of an indexed column) will force the the query to NOT use INDEX. We have these where clause in Oracle Forms Records Group. Below are two examples... 1. If we have a where clause with LIKE would that NOT use the in

  • IOS 8.1.2 on iphone 6 Wifi drops and doesnt reconnect

    Hi, I had the an issue with wifi dropping and not reconnecting automatically on my iphone 6 with ios 8.1.2 The wifi was disconnecting every minutes even when the screen was not locked. I had to go back to wifi settings and reselect the network I want

  • Error in getting xml output from Apps

    I have developer 10g. Whatever report (rdf) I create I face exactly the same problem. I register the report (rdf) in Apps and select xml format as the output. But when I run it to get the xml file, I get the following error The XML page cannot be dis

  • Problem when calling the XI web service

    Hi all , I have configured the XI web service and generated its WSDL file. Following is the URL generated from XI webservice creation wizard. http://server:50000/XISOAPAdapter/MessageServlet?channel=:BS_B2B_ECOMMERCE_PORTAL:CC_SOAP_SND&version=3.0&Se

  • Not able to open links to open pdf files, nothing happens, no error messages.

    work site requires pdf files to be downloaded, after updating FireFox I can't do this any longer. I have added site to "exception" for pop-ups, still nothing.