ALV LIST with few checkboxes fields

Hi everyone,
I want to create an ALV with 2 fields that are checkboxes.
I am succeeding to create an ALV with one checkbox field.
How do we do in order to create an ALV with 2 checkboxes fields using ALV LIST ?
I know that we have to specify in the layout of the ALV the name of the field we want it to be checkbox.
For example :
  gs_layout-box_fieldname   = 'FLAG'.            
But, how do we specify a second checkbox field ?
Thanks.
Regards.

Slight modification to my earlier post. this is with 2 checkboxes.
REPORT  ztest_alv_checkbox.
TYPE-POOLS: slis.
DATA: it_fcat TYPE  slis_t_fieldcat_alv,
      wa_cat LIKE LINE OF it_fcat.
DATA: BEGIN OF it_alv OCCURS 0,
       check1(1),
       check2(1),
       carrid LIKE sflight-carrid,
       connid LIKE sflight-connid,
      END OF it_alv.
DATA:it_events TYPE slis_t_event,
     wa_events LIKE LINE OF it_events.
SELECT carrid
       connid
  FROM sflight
  INTO CORRESPONDING FIELDS OF TABLE it_alv
  UP TO 20 ROWS.
wa_cat-fieldname = 'CHECK1'.
wa_cat-input = 'X'.
wa_cat-edit = 'X'.
wa_cat-checkbox = 'X'.
wa_cat-seltext_l = 'Check'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
CLEAR wa_cat.
wa_cat-fieldname = 'CHECK2'.
wa_cat-input = 'X'.
wa_cat-edit = 'X'.
wa_cat-checkbox = 'X'.
wa_cat-seltext_l = 'Check'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
CLEAR wa_cat.
wa_cat-fieldname = 'CARRID'.
wa_cat-seltext_l = 'Carrid'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
CLEAR wa_cat.
wa_cat-fieldname = 'CONNID'.
wa_cat-seltext_l = 'Connid'.
wa_cat-tabname = 'IT_ALV'.
APPEND wa_cat TO it_fcat.
wa_events-name = slis_ev_end_of_list.
wa_events-form = 'MODIFY_LIST'.
APPEND wa_events TO it_events.
CLEAR wa_events.
CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
  EXPORTING
    i_callback_program = sy-repid
    it_fieldcat        = it_fcat
    it_events          = it_events
  TABLES
    t_outtab           = it_alv
  EXCEPTIONS
    program_error      = 1
    OTHERS             = 2.
IF sy-subrc NE 0.
ENDIF.
"After The list display i am modifying the report output
"using the END_OF_LIST event of ALV
"here conditionally i can make the cell input off
*&      Form  MODIFY_LIST
*       text
FORM modify_list.
  DATA: l_lines TYPE i,
        l_index TYPE i.
  l_lines  = l_lines + 3.
  "because we have 3 lines extra occupied by lables.
  "if we have header,i mean top of page add the no.of lines
  "how many ever top of page have + 3 for labels.
  DESCRIBE TABLE it_alv LINES l_lines.
  l_lines  = l_lines + 3.
  "understnad this part alone.
  DO l_lines TIMES.
    IF sy-index GT 3.
      l_index = sy-index - 3.
      READ TABLE it_alv INDEX l_index.
      "this is my condition..
      IF sy-subrc = 0 .
        IF it_alv-carrid <> 'AA'.  "place your condition here.
          "accordingly you can disable the checkbox
          "use the below logic
          READ LINE sy-index INDEX sy-lsind.
          IF sy-subrc = 0.
            MODIFY LINE sy-index INDEX sy-lsind
                       FIELD FORMAT  it_alv-check1 INPUT OFF
                                     it_alv-check2 INPUT OFF.
          ENDIF.
        ENDIF.
      ENDIF.
    ENDIF.
  ENDDO.
ENDFORM.                    "MODIFY_LIST

Similar Messages

  • ALV list with only 1 field

    Hi guru's,
    I want to create an ALV list with only a char255 field.
    <all_table> contains data of sflight and is of type sflight(dynamically).
    I want to show the data as one line.
    CALL FUNCTION 'DDIF_FIELDINFO_GET'
           EXPORTING
                tabname   = 'TPPARFIL'
                fieldname = 'LINE'
          TABLES
                dfies_tab = it_dfies.
      READ TABLE it_dfies INDEX 1.
      IF sy-subrc IS INITIAL.
      MOVE-CORRESPONDING it_dfies TO wa_fieldcat.
      wa_fieldcat-scrtext_s = 'Results:'.
        APPEND wa_fieldcat TO gt_fieldcat.
      ENDIF.
    t_output[] = <all_table>.
      CALL FUNCTION 'LVC_TRANSFER_TO_SLIS'
           EXPORTING
                it_fieldcat_lvc = gt_fieldcat
           IMPORTING
                it_fieldcat_alv = it_fieldcat_alv.
      PERFORM fill_alv_layout.
    * Show list
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
           EXPORTING
                i_callback_program = lv_repid
                i_grid_title       = sy-title
                 is_layout          = gs_layout
                it_fieldcat        = it_fieldcat_alv[]
           TABLES
                t_outtab           = t_output
           EXCEPTIONS
                program_error      = 1
                OTHERS             = 2.
    *&      Form  fill_alv_layout
      FORM fill_alv_layout.
        CLEAR: gs_layout.
        gs_layout-max_linesize         = 160.
        gs_layout-min_linesize         = 160.
        gs_layout-detail_initial_lines = 'X'.
        gs_layout-zebra                = 'X'.
        gs_layout-edit_mode            = 'A'.
        gs_layout-numc_sum             = 'X'.
        gs_layout-colwidth_optimize    = 'X'.
        gs_layout-window_titlebar      = sy-title.
        gs_layout-totals_only          = 'X'.
      ENDFORM.                    " fill_alv_layout
    When I run this it only gives an empty view of the fields with type char255.
    Regards,
    Wim

    hi,
    As per your code I think your internal table is empty. Please set debugger after internal table fill and check. If the data is there then please check your field catalog entry.
    Regards,
    Sachin

  • Printing ALV list with ADS (pdf printer) in non-english charset

    Hello!
    I have an issue about printing alv list with pdf printer in non-english charset. We have two printers. One for alv lists (SWINCF: Casc.Fonts SAPWIN Unicode) and one for pdf forms(adobe document service). I want to use one printer for any documents. But PDF printer prints non-english charset like ########.
    What can I do ?

    Hi, Roman!
    I want to use PDF printer for both types of output. I have a dedicated java instance for ADS.
    There is a device type for our Kyocera Printer. My pdf printer prints ALV list good exept russian charset.
    It prints like #####

  • ALV Tree with editable checkbox

    Hi all,
    I have a ALV Tree with editable checkbox (for all the parent & leaf  nodes) , as one of the column.On clicking of a button in toolbar , i should get the nodes which are checked in checkbox.
    But the problem is i am not able to get the nodes which are checked through checkbox in the PAI of the screen,when the button is clicked.
    I tried using    
    CALL METHOD wf_tree->get_checked_items             
                           IMPORTING
                           et_checked_items = lint_selected_node.
    but the return table is not containing any entries , even if check boxes are checked in ALV tree.I tried the GET_CHECKED_ITEMS method in event handler method of AFTER_USER_COMMAND and also CHECKBOX_CHANGE , but no success.
    lfs_item_layout-fieldname = 'CHECK'.
      lfs_item_layout-class = cl_gui_column_tree=>item_class_checkbox.
      lfs_item_layout-editable = 'X'.
      lfs_item_layout-CHOSEN = 'X'.
      APPEND lfs_item_layout TO lint_item_layout.
    CALL METHOD wf_tree->add_node
        EXPORTING
          i_relat_node_key = p_lfs_final_key
          i_relationship   = cl_gui_column_tree=>relat_last_child
          i_node_text      = l_node_text
          is_outtab_line   = p_gfs_final
          is_node_layout   = lfs_node
          it_item_layout   = lint_item_layout
        IMPORTING
          e_new_node_key   = p_loc_qmnum_key.
    Friends ,if you can suggest something.
    Thanks
    Abhijeet

    hi ,
    i have written below code for registering the CHECKBOX_CHANGE event of CL_GUI_ALV_TREE.
    APPEND lfs_event TO lint_events.
        lfs_event-eventid = cl_gui_column_tree=>eventid_CHECKBOX_CHANGE.
      APPEND lfs_event TO lint_events.
      CALL METHOD wf_tree->set_registered_events
        EXPORTING
          events                    = lint_events
        EXCEPTIONS
          cntl_error                = 1
          cntl_system_error         = 2
          illegal_event_combination = 3.
      IF sy-subrc EQ 0.
    *    MESSAGE X208(00) WITH 'ERROR'.                          "#EC NOTEXT
      ENDIF.
          SET HANDLER lo_event_receiver->handle_checkbox_change FOR wf_tree.
    *      SET HANDLER lo_event_receiver->handle_button_click FOR wf_tree.
        ENDIF.
    Also according to below code , i have put a break point in the event handler method of CHECKBOX_CHANGE event , so that control shall come here when check box is checked on ALV tree ...
    CLASS lcl_event_receiver DEFINITION.
      PUBLIC SECTION.
        METHODS:
    *      handle_checkbox_change FOR EVENT checkbox_change OF cl_gui_alv_tree,
    *              importing fcode.
    *      handle_button_click FOR EVENT AFTER_USER_COMMAND OF cl_gui_alv_tree
    *        IMPORTING ucomm,
          handle_CHECKBOX_CHANGE for event checkbox_change of cl_gui_alv_tree
            importing CHECKED
                      FIELDNAME
                      NODE_KEY.
    ENDCLASS.                    "lcl_event_receiver DEFINITION
    *       CLASS lcl_event_receiver IMPLEMENTATION
    CLASS lcl_event_receiver IMPLEMENTATION.
      METHOD handle_checkbox_change.
        data : lint_selected_node TYPE LVC_T_CHIT.
        BREAK abhijeetg.
    *   CHECKED
    *   FIELDNAME
    *   NODE_KEY
    *    case fcode.
    *      when 'SELALL'.
    *        perform select_all.
    *    CALL METHOD WF_TREE->GET_OUTTAB_LINE
    *      EXPORTING
    *        I_NODE_KEY     =
    **      IMPORTING
    **        e_outtab_line  =
    **        e_node_text    =
    **        et_item_layout =
    **        es_node_layout =
    **      EXCEPTIONS
    **        node_not_found = 1
    **        others         = 2
    *    IF SY-SUBRC <> 0.
    **     MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    **                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    *    ENDIF.
    *    call method cl_gui_cfw=>dispatch.
        CALL METHOD wf_tree->get_checked_items
          IMPORTING
            et_checked_items = lint_selected_node.
        break abhijeetg.
      ENDMETHOD.         
    ENDCLASS.
    So according to you , I should get the control in the break point , but its not happening with this .. any thing missing ???
    Edited by: abhijeet_7013 on Jun 21, 2011 10:31 PM

  • ALV List with checkboxes

    Hello experts,
    I'm working on an object where in I need to display an ALV List (using Funct Modules) with checkboxes.
    When I select the checkboxes,and click on a button (Eg.Refresh Button) , I need to get all the details of the selected rows (checked rows) in a seperate ALV List (in a Dailog).
    Could any one of u please suggest me about selecting the row which has been checked(Checkboxes in ALV ).
    Thanks in advance.
    Sanghamitra

    Hi sangha,
    1. To get a taste of it,
       just copy paste this program.
    2. It will display alv (t001)
       It will show CHECKBOXES (besides every row)
       TICK some rows,
      and DOUBLE-CLICK ON any row.
    3.  It will display all the row numbers which have been checked/ticked.
    4.
    report abc.
    TYPE-POOLS : slis.
    Data
    DATA : BEGIN OF itab OCCURS 0.
            INCLUDE STRUCTURE t001.
    DATA : flag tyPE c,
           END OF itab.
    DATA : alvfc TYPE slis_t_fieldcat_alv.
    DATA : alvly TYPE slis_layout_alv.
    Select Data
    SELECT * FROM t001 INTO TABLE itab.
    *------- Field Catalogue
    CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
      EXPORTING
        i_program_name         = sy-repid
        i_internal_tabname     = 'ITAB'
        i_inclname             = sy-repid
      CHANGING
        ct_fieldcat            = alvfc
      EXCEPTIONS
        inconsistent_interface = 1
        program_error          = 2
        OTHERS                 = 3.
    Display
    alvly-box_fieldname = 'FLAG'.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
      EXPORTING
        it_fieldcat             = alvfc
        i_callback_program      = sy-repid "<-------Important
        i_callback_user_command = 'ITAB_USER_COMMAND' "<------ Important
        is_layout               = alvly
      TABLES
        t_outtab                = itab
      EXCEPTIONS
        program_error           = 1
        OTHERS                  = 2.
    CALL BACK FORM
    FORM itab_user_command USING whatcomm TYPE sy-ucomm whatrow TYPE
    slis_selfield.
      data : msg(100) type c.
      LOOP AT itab.
        if itab-flag = 'X'.
          msg = sy-tabix.
          condense msg.
          concatenate 'Row Number ' msg ' ' into msg
          separated by space.
          message msg type 'I'.
        endif.
      ENDLOOP.
    ENDFORM. "ITAB_user_command
    regards,
    amit m.

  • ALV list with empty data - What could have gone wrong?

    Dear experts,
    I'm currently working on some codes to display data (the tables involved really do contain data), but when the codes are executed, the ALV list does not contain any data in it (only the column headers are fine).
    What could have gone wrong? I've been staring at the codes for hours now. Please help. Appreciate any help at all. 
    Displaying ALV data with REUSE_ALV_LIST_DISPLAY:
    form display_alv_data .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
    *     I_INTERFACE_CHECK              = ' '
    *     I_BYPASSING_BUFFER             =
    *     I_BUFFER_ACTIVE                = ' '
          I_CALLBACK_PROGRAM             = w_prog
    *     I_CALLBACK_PF_STATUS_SET       = ' '
    *     I_CALLBACK_USER_COMMAND        = ' '
    *     I_STRUCTURE_NAME               =
    *     IS_LAYOUT                      =
          IT_FIELDCAT                    = gt_field_cat[]
    *     IT_EXCLUDING                   =
    *     IT_SPECIAL_GROUPS              =
    *     IT_SORT                        =
    *     IT_FILTER                      =
    *     IS_SEL_HIDE                    =
    *     I_DEFAULT                      = 'X'
    *     I_SAVE                         = ' '
    *     IS_VARIANT                     =
    *     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
    *     IR_SALV_LIST_ADAPTER           =
    *     IT_EXCEPT_QINFO                =
    *     I_SUPPRESS_EMPTY_DATA          = ABAP_FALSE
    *   IMPORTING
    *     E_EXIT_CAUSED_BY_CALLER        =
    *     ES_EXIT_CAUSED_BY_USER         =
        TABLES
          T_OUTTAB                       = gt_final
        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.                    " display_alv_data
    Retrieving data from the database tables into the internal table:
    form retrieve_data .
      " For internal table 1
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             lfa1~name1
      FROM ekbe INNER JOIN mseg ON ekbe~ebeln = mseg~ebeln
                INNER JOIN lfa1 ON mseg~lifnr = lfa1~lifnr
      INTO CORRESPONDING FIELDS OF TABLE gt_1
      WHERE mseg~bwart = '101' AND      " Movement type: Goods Receipt
            ekbe~vgabe = '2' AND        " Transaction / event type for Invoice Verification Number
            ekbe~matnr IN s_m_num AND
            mseg~lifnr IN s_v_num.
      " For internal table 2
      SELECT ekbe~ebeln
             makt~maktx
             eket~eindt                 
      FROM ekbe INNER JOIN makt ON ekbe~matnr = makt~matnr
                INNER JOIN eket ON ekbe~ebeln = eket~ebeln
      INTO CORRESPONDING FIELDS OF TABLE gt_2
      WHERE eket~eindt IN s_d_date.
      " For internal table 3
      SELECT ekbe~ebeln
             ekko~bedat
             ekko~ekorg
             ekko~ekgrp
             ekko~bukrs
      FROM ekbe INNER JOIN ekko ON ekbe~ebeln = ekko~ebeln
      INTO CORRESPONDING FIELDS OF TABLE gt_3
      WHERE ekko~bedat IN s_p_date AND
            ekko~ekorg IN s_p_org AND
            ekko~ekgrp IN s_p_grp.
      " For the final internal table
      SORT: gt_1, gt_2, gt_3.
      LOOP AT gt_1.
        MOVE-CORRESPONDING gt_1 TO gt_final.
        READ TABLE gt_2 WITH KEY gfs_ebeln = gt_1-gfs_ebeln BINARY SEARCH.
        MOVE-CORRESPONDING gt_2 TO gt_final.
        READ TABLE gt_3 WITH KEY gfs_ebeln = gt_1-gfs_ebeln BINARY SEARCH.
        MOVE-CORRESPONDING gt_3 TO gt_final.
        APPEND gt_final.
      ENDLOOP.
    endform.                    " retrieve_data

    Dear forumers,
    I apologize for the rather late reply. The SAP server that I've been working on was down since Thursday evening and I wasn't able to debug much into the codes. Nevertheless, I really do appreciate all of your inputs and help here.
    Rob,
    I've just debugged my codes again and found out that in the first place, there is no data contained in the internal table gt_1 at all. My rough guess is because I've misused the INNER JOIN wrongly here (see code comments below):-
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             lfa1~name1  " this line should probably be commented out
      FROM ekbe INNER JOIN mseg ON mseg~ebeln = ekbe~ebeln
                        INNER JOIN lfa1 ON lfa1~lifnr = mseg~lifnr   " this line should probably be commented out - the table join here is not based on table ekbe at all
      INTO CORRESPONDING FIELDS OF TABLE gt_1
      WHERE mseg~bwart = '101' AND     
            ekbe~vgabe = '2' AND 
            ekbe~matnr IN s_m_num AND
            mseg~lifnr IN s_v_num.
    Next, I commented out certain lines further and found that there is still no data contained in the internal table gt_1 again, as follows:-
      SELECT ekbe~ebeln
             mseg~mblnr
             ekbe~belnr
             ekbe~ebelp
             ekbe~matnr
             ekbe~menge
             ekbe~dmbtr
             ekbe~werks
             mseg~lgort
             mseg~lifnr
             " lfa1~name1
      FROM ekbe INNER JOIN mseg ON mseg~ebeln = ekbe~ebeln
                        " INNER JOIN lfa1 ON lfa1~lifnr = mseg~lifnr
      INTO CORRESPONDING FIELDS OF TABLE gt_1.
      " WHERE mseg~bwart = '101' AND     
            " ekbe~vgabe = '2' AND 
            " ekbe~matnr IN s_m_num AND
            " mseg~lifnr IN s_v_num.
    There should be data contained in table ekbe here. What could have really gone wrong now?

  • ALV list with 2 header lines

    Dear gurus,
    Need help in displaying ALV list report. the below report is an example of AR aging report. The report output is as below:
    DEC
    NOV
    OCT
    SEP
    0-30
    31-60
    61-90
    90+
    xx
    xx
    xx
    xx
    SUBTOTAL
    The first 2 lines are the list header. While the 'x' is the amount.
    How can i display the above output with 2 header lines? I was thinking of using the  REUSE_ALV_FIELDCATALOG_MERGE function. But it will have 2 lines of body row too. In fact, i only one one row in the body. But if i define the header lines manually, i would not able to do the subtotal at the end of the alv list. I need to have the subtotal too.
    Thanks in advance!

    Hi,
    For this requirement you need to populate the fld catalog using row_pos and col_pos fields specifing proper position.
    See this code snippet ..... this is only possible for ALV list.
    TYPE-POOLS: slis.
    DATA: ld_fieldcat    TYPE slis_fieldcat_alv.
    DATA: t_alv_fieldcat TYPE STANDARD TABLE OF slis_fieldcat_alv.
    DATA : it_fld TYPE slis_t_fieldcat_alv,
           wa_fld TYPE slis_fieldcat_alv.
    data: BEGIN OF itab OCCURS 0,
            carrid    like sflight-carrid,
            connid    like sflight-connid,
            planetype like sflight-planetype,
            seatsmax  like sflight-seatsmax,
          END OF itab.
    START-OF-SELECTION.
    SELECT carrid connid planetype seatsmax
           FROM sflight
           INTO TABLE itab.
      CLEAR: ld_fieldcat.
      ld_fieldcat-row_pos       = '1'.
      ld_fieldcat-col_pos       = '1'.
      ld_fieldcat-tabname       = 'ITAB'.
      ld_fieldcat-fieldname     = 'CARRID'.
      ld_fieldcat-ref_tabname   = 'SFLIGHT'.
      ld_fieldcat-outputlen     = '10'.
      APPEND ld_fieldcat TO t_alv_fieldcat.
      CLEAR ld_fieldcat.
      CLEAR: ld_fieldcat.
      ld_fieldcat-row_pos       = '1'.
      ld_fieldcat-col_pos       = '2'.
      ld_fieldcat-tabname       = 'ITAB'.
      ld_fieldcat-fieldname     = 'CONNID'.
      ld_fieldcat-ref_tabname   = 'SFLIGHT'.
      ld_fieldcat-outputlen     = '10'.
      APPEND ld_fieldcat TO t_alv_fieldcat.
      CLEAR ld_fieldcat.
      CLEAR: ld_fieldcat.
      ld_fieldcat-row_pos       = '2'.
      ld_fieldcat-col_pos       = '1'.
      ld_fieldcat-tabname       = 'ITAB'.
      ld_fieldcat-fieldname     = 'PLANETYPE'.
      ld_fieldcat-ref_tabname   = 'SFLIGHT'.
      ld_fieldcat-outputlen     = '10'.
      APPEND ld_fieldcat TO t_alv_fieldcat.
      CLEAR ld_fieldcat.
      CLEAR: ld_fieldcat.
      ld_fieldcat-row_pos       = '2'.
      ld_fieldcat-col_pos       = '2'.
      ld_fieldcat-tabname       = 'ITAB'.
      ld_fieldcat-fieldname     = 'SEATSMAX'.
      ld_fieldcat-ref_tabname   = 'SFLIGHT'.
      ld_fieldcat-outputlen     = '10'.
      APPEND ld_fieldcat TO t_alv_fieldcat.
      CLEAR ld_fieldcat.
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          it_fieldcat        = t_alv_fieldcat[]
        TABLES
          t_outtab           = ITAB. "internal table
      IF SY-SUBRC <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Regards,
    Amitava

  • ALV report with internal in field symbol

    Hi Shifu ABAP,
    I have ALV report.
    My problem is when I tried to do sum using the sum icon. I got a message 'desired operation cannot be performed for column 'Dignostic delay'. Is it because I used field symbol, then when I clicked on the column it didn't recorgnise the field.
    FYI.
    1)The internal table for my ALV report is stored in field symbol.
    2)I dont have a problem to display the report.
    3)I had to set 'do_sum' at ALV field category, still doesn't work
    My source code to define ALV category.
    loop at i_qpcd into wa_qpcd.
    CLEAR ls_fieldcat2.
    ls_fieldcat2-col_pos = pos2.
    ls_fieldcat2-fieldname = wa_qpcd-code.
    ls_fieldcat2-reptext_ddic = wa_qpcd-desc.
    ls_fieldcat2-just = 'C'.
    ls_fieldcat2-do_sum = 'X'.
    APPEND ls_fieldcat2 TO gt_fieldcat2.
    endloop.
    My source code call the ALV FM
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
         i_callback_program         = 'ZMPMR001_Q1OOT'
         i_callback_pf_status_set = 'PF_STATUS_SET'
         is_layout                        = ls_layout
         it_fieldcat                       = gt_fieldcat2[]
         is_print                          = ls_print
    TABLES
         t_outtab                         = <l_table>
    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.
    Thanks a lot in advance for your attention.

    my situation is like this, declare the internal tble
    1) data : begin of itab occurs 0,          
                code like qpcd-code,
                desc like QPCT-KURZTEXT,
              end of itab.
    2) populate the itab like this
    code           desc
    01              desc 1
    02              desc 2
    03              desc 3
    3) take the selected record converted it into new dynamic internal table using field symbol declare as table, now the component of this new table are 01, 02 and 03.
    4) populate the new table with some data, so technically my new table structure will be like this
    01         02         03
    1           0          1
    0           0          3
    2           2          2
    5) display the new table in ALV report, in ALV I tried to sum-up each of column.
    6) Question : HOW can I convert the componet 01, 02 and 03 as an integer/numeric field.
    Regards
    Nislina

  • Passing Multiple Selected List Items to a "New Item" Form in Another List with Multiselect Lookup Field

    Hi!
    Version Info:  SharePoint 2013 Server Standard (*BTW...I do not have access to Visual Studio*)
    I have two lists, let's call them
    -Assets
    -Asset Checkouts
    "Assets" is the parent list, and "Asset Checkouts" has a lookup column (multiselect) which is tied to the serial # column in the "Assets" list.
    Basically, what I need to accomplish is this:  I would like to be able to select multiple list items in the "Assets" list, and create a new item in "Asset Checkouts", and pre-fill the multiselect lookup column in the NewItem form
    for "Asset Checkouts" with the values from the selected items in "Assets".
    Any ideas or suggestions on how to do this would be most appreciated!
    Thanks!

    Hi,     
    According your description, you might want to add new item in "Asset Checkouts" list when selecting items in "Assets" list.
    If so, we can achieve it with SharePoint Client Object Model.
    We can add a button in the "Assets" list form page, when selecting items, we can take down the values of columns of the selected items, then click this button which will create
    new item in "Asset Checkouts" list with the values needed.
    Here are some links will provide more information about how to achieve it:
    Use
    SP.ListOperation.Selection.getSelectedItems() Method to get the list items being selected
    http://msdn.microsoft.com/en-us/library/ff409526(v=office.14).aspx
    How to: Create, Update, and Delete List Items Using JavaScript
    http://msdn.microsoft.com/en-us/library/office/hh185011(v=office.14).aspx
    Add ListItem with Lookup Field using Client Object Model (ECMA)
    http://notuserfriendly.wordpress.com/2013/03/14/add-listitem-with-lookup-field-using-client-object-model-ecma/
    Or if you just want to refer to the other columns in "Assets" list when add new item in "Asset Checkouts" list, we can insert the "Assets" list web part into the NewForm page
    of the "Asset Checkouts" list, then when we add new item in the "Asset Checkouts" list, we will be able to look through the "Assets" list before we select values for the Lookup column.
    To add web part into the NewForm.aspx, we need to find the button "Default New Form" from ribbon under "List" tab, then we can add web part in the NewForm.aspx.
    In the ribbon, click the button “Default New Form”:
    Then we can add web part into NewForm.aspx:
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to display ALV list with more than 1 structure?

    Hello everyone,
    I am using REUSE_ALV_LIST_DISPLAY to generate a report that displays vendor/customer items with purchases/sales total. I have 2 internal table for this. For every vendor/customer i need a total table right after, this have a different structure. I cannot use REUSE_ALV_BLOCK_LIST_ as this is not capable of calculating the subtotal per currency and from the documentation it says do not use.
    Any idea on how to proceed?
    Thanks!

    Call ALV list function module per table structure.
    Closing this thread.

  • ALV list with count of the table

    Dear all,
    My requirement is i want display the output as alv list along with the count of the table .
    i got the count  but unable to diplay the  below the list.
    please suggest me.
    Thanks& Regards,
    RP

    If you are using a custom control on the screen and then a custom container you can easily do this.
    Create a screen(Size 200 x 240), place a custom control on the screen and make it to the max size  200 x 240. Now in the attributes of the custom control, check the Resizing option for both horizontal and vertical, with some minimum numbers there.
    Now, your ALV grid automatically occupies all the space available on the screen irrespective of the size if the screen and you will have only one scroll bar.
    Regards,
    Ravi
    Note - Please mark all the helpful answers

  • GL Listing with populated plant field

    Hi all,
    In GL listing (T-code-FBL3n) for Sales account-GL there is provision to see the line items detail of Sales Account with Plant as field, but I am seeing the GL line items without Plant field populated, How this field can be automatically populated as this acounting line item automatically gets created as soon as we save Billing document(VF01) and posted to proper GL.
    Kindly help me to populate the Plant field.
    Thanks in advance....
    Raju

    Dear Raju,
    In FBL3N Report there is Change Layout Icon (Ctrl+F8) in Report Toolbar there you have to select Hidden Field Plant and add to report and press copy you will get Plant Column in your report.
    thx
    Ganpat Sundhesa

  • GL listing with populated Plant field for Sales accounts

    Hi all,
    In GL listing (T-code-FBL3n) for Sales account-GL there is provision to see the line items detail of Sales Account  with Plant as field, but I am seeing the GL line items without Plant field populated, How this field can be automatically populated as this acounting line item automatically gets created as soon as we save Billing document(VF01) and posted to proper GL.
    Kindly help me to populate the Plant field.
    Thanks in advance....
    Raju

    Dear Raju,
    In FBL3N Report there is Change Layout Icon (Ctrl+F8) in Report Toolbar there you have to select Hidden Field Plant and add to report and press copy you will get Plant Column in your report.
    thx
    Ganpat Sundhesa

  • ALV List with two rows of heading

    Hi All,
    I am working on ALV list display. I have six columns of heading in my ALV. Out of the six columns i need to display five columns in the first row and the sixth heading will be in the second row first column.
    Ex:
    A  B  C D  E F
    G
    I need to display a row of values for Column G for every row of A,B,C,D,E,F.
    How is this possible with ALV list display.
    Ex.
    A     B     C     D      E     F
    G
    v1A  v1B  v1C  v1D   v1E  v1F
    v1G
    v2A  v2B  v2C  v2D   v2E  v2F
    v2G
    v3A  v3B  v3C  v3D   v3E  v3F
    v3G
    Looking forward to ur reply.
    Regards
    Ramanan

    Hi,
    You can use a hierachial list to display your output as required.
    You can check the example program BCALV_TEST_HIERSEQ_LIST.
    Regards,
    Ankur Parab
    Edited by: Ankur Parab on Jun 15, 2009 12:33 PM

  • Select list with redirect - clearing field issue

    I'created an APEX page where there is 2 items. A Select list with redirect and a Text Field. Both have "Only when current value in session state is null" for "Source used". If some data has been written into the Text Field and I'm selecting someting from the Select List with redirect, the value of the Text Field is cleared.
    The page has no Computations, Validations, Processes or Branches.
    As you may guess, I want the the Text Field NOT be cleared.
    I know, that subject has been discussed over and over, but I'm all reading about it told me that "Source used" set to "Only when..." for the Text Field, it's suppose tol keep it's value.
    Could please someone explain me what I've not understood.
    Many thanks in advance.

    Thanks for helping me. In fact, my real problem is about a page where two select lists are needed. The first one shows CATEGORIES and the second one shows SUB-CATEGORIES, based on the value selected at the first select list. Since there is other fields on the page and the data has not been saved yet (other fields afterwards and validations anyway), data entered has to be kept until the user click "Save" button and all the validations are ok. I was expecting to solve the issue by using "Select list with redirect" for CATEGORIES (this is the only way I was able to make SUB-CATEGORIES works) and having all my fields "Source used" set to "Only when...".
    So, can someone told me if "Select list with redirect" is the way to solve my problem or should I use something else?

Maybe you are looking for

  • How can I download the trial version of Adobe Premiere Pro CS4

    Can anybody tell me how can I download Adobe premiere Pro CS4 trial version for windows 7 English.

  • Newly i-tunes purchase (movie) won't synch with I-touch

    Last night from iTunes I purchased and downloaded a movie. When I try to sync the itouch (2gen/8G), it sync's everything but the movie. Also, I purchased a music video (earlier yesterday than the movie). Although the music video did sync and I can pl

  • Parallel Refresh queries in a workbook with BI7.0

    Hi Experts, could somone tell me if is it possible to refresh IN PARALLEL all the queries in a workbook with 7.0 version? are there any differences from 3.5 Bex version from this point of view? This kind of option would be  very usefull for long run

  • Moving date is before activation date

    I am moving on the 26th of the month but my new activation date is not till the 30th due to the house we are moving to, not being disconnected from their provider till that day.  A Pain but not a problem.  The question I have is, where we are moving

  • ADF Sample application

    Hi , I have to deploy some working samples for Jdeveloper ADF demo. I am trying to use these samples : http://java.net/projects/smuenchadf/pages/ADFSamplesADFFacesUIComponents#UI_Components ; When I download some of these samples I have the source co