How to output % in ALV?

How to output % symbol next to the value in ALV?
Concatenate and move?
thanks
Ven

Hi Venkatabby,
use field catelog property EDIT_MASK for this...
clear ls_fieldcatalog.
ls_fieldcatalog-col_pos = pos.
ls_fieldcatalog-fieldname = 'LOSFX'.
ls_fieldcatalog-tabname = 'I_OUTPUT'.
ls_fieldcatalog-ref_field = 'LOSFX'.
ls_fieldcatalog-do_sum = 'X'.
ls_fieldcatalog-EDIT_MASK = '____/__/__'.ls_fieldcatalog-ref_table = 'MARC'.
append ls_fieldcatalog to i_fieldcatalog.
Try to do something like this...
I am not sure but try to adjust EDIT_MASK property hopefully it will work for you..
ls_fieldcatalog-EDIT_MASK = '_,_,_%'.
OR u can use concatenate statement for displaying %
Hope it will solve your problem..
Reward points if useful...
Thanks & Regards
ilesh 24x7

Similar Messages

  • How to do the ALV report output in groups and caluculate the tOTALS(URGENT

    Hi
    In my ALV report output .I have to group the output based on the DAYS field
    0-10 days in one group
    10-30 days in one group
    above 30 days one group
    There is also a field by name "AMOUNT" in my output.
    I have to calculate SUBTOTALs at the end of every group and at the end of the report i should caluculate GRAND TOTAL.
    Please remember that i should not use any any BLOCKED ALVs and for Totals i should not use the SYMBOLS provided in the application toolbar of the report
    Thanks in Advance

    Please don't repost your questions...
    Check out my answer in your other post.
    How to make the ALV report in groups  and caluculate the TOTALS
    Regards,
    Naimesh Patel

  • How to send the ALV GRID output to spool by using the print button in std t

    How to send the ALV GRID output to spool by using the print button in standard tool bar.
    We have created a button in the va02 transaction.  If user click on the button the new screen will be display on that screen we are populating the alv grid output using the oops concept.  But i am unable to send the output to spool using the print button in the standard tool bar.
    I am able to display the Print parameter dialog box but i am not able to send it to spool.
    Kindly help.
    Thanks In Advance.
    G.V.Ramana

    Hi Shaik,
    There is not properties button in my print screen.
    MODULE user_command_0900 INPUT.
        WHEN 'EXCEL'.
          PERFORM excel_download.                              
        WHEN 'PRI'.
          PERFORM print_output.
    form Print_output.
    CALL FUNCTION 'RSPO_LIST_LAYOUT_FITS'
               EXPORTING
                    columns        = 80
                    device         = 'ANY '
                    lines          = 65
                    maxpenality    = 1999
               TABLES
                    layouts        = lt_layouts1
               EXCEPTIONS
                    unknown_device = 1
                    OTHERS         = 2.
          IF sy-subrc = 0.
            LOOP AT lt_layouts1.
              IF lt_layouts1-penality < 1000        AND
                 lt_layouts1-penality < l_min_penality.
                l_layout       = lt_layouts1-layout.
                l_min_penality = lt_layouts1-penality.
              ENDIF.
            ENDLOOP.
            IF NOT l_layout IS INITIAL.
              CALL FUNCTION 'GET_PRINT_PARAMETERS'
                   EXPORTING
                        mode                   = 'CURRENT'
                        line_size              = 80             "#EC *
                new_list_id            = l_new_list_id
                        no_dialog              = l_no_dialog
                        layout                 = l_layout
                   IMPORTING
                        out_archive_parameters = rs_arc_params
                        out_parameters         = rs_pri_params
                        valid                  = l_valid
                   EXCEPTIONS
                        archive_info_not_found = 1
                        invalid_print_params   = 2
                        invalid_archive_params = 3
                        OTHERS                 = 4.
              IF sy-subrc NE 0.                                 " INS SLIN
              ENDIF.                                            " INS SLIN
              IF rs_pri_params-linsz LT 80 OR
                 rs_pri_params-linsz LT gt_stack-s_lprint-width.
                gt_stack-print_line_break = 'X'.
              ELSE.
                CLEAR gt_stack-print_line_break.
              ENDIF.
              IF l_valid NE 'X'.
                rs_pri_params = ls_pri_params_sav.
                rs_arc_params = ls_arc_params_sav.
              ENDIF.
            ENDIF.
          ENDIF.
    endform.                    " Print_output
        CALL METHOD gv_cost_tot_alv_grand->set_table_for_first_display
                EXPORTING
                   is_layout         = gs_layout_cost_tot_grand
                CHANGING
                   it_fieldcatalog   = gt_fcat_cost_tot_grand[]
                   it_outtab         = gt_cost_tot_grand[].
    Please check my code

  • How can i get the Icons in the output of ALV?

    Hi,
    I am trying to get the Icons in my report output using ALVs.
    i am adding the following line
       line_fieldcat-icon = 'ICON_GREEN_LIGHT'. in my field catalog for getting the respective Icon in the list. but the Icon is not getting displayed?
    May i know whether the above specified line is correct or not? if not, how can i get the Icons in my output using ALVs?
    Thanks and regards,
    Ramesh.

    Hi,
    take idea from this code :
    INCLUDE ICONs.
    WRITE : / icon_green_light AS ICON.
    WRITE : / icon_red_light AS ICON.
    write : / icon_yellow_light AS ICON.
    OR
    add code as per steps below in your ALV report :
    <b>FIRST :</b>
    INCLUDE ICONs.
    <b>Second :</b> in your internal table add : 
    icon type icon-id,
    <b>Third :</b>
    add this value in icon field for green light.
    itab-icon =  '@08@'.
    append itab.
    <b>Fourth :</b> display
    is_fieldcat-tabname     = 'IT_FINAL'.
    is_fieldcat-fieldname   = 'ICON'.
    is_fieldcat-col_pos     = '1'.
    is_fieldcat-outputlen   = '12'.
    is_fieldcat-seltext_l   = 'ICON'.
    APPEND is_fieldcat TO it_fieldcat.
    CLEAR is_fieldcat.
    Reward points, if helpful,
    Sandeep Kaushik
    Message was edited by:
            Sandeep Kaushik
    null

  • How to put the alv output into the spool request?

    Hi guys,
    How to put the alv output into the spool request?
    Thanks!

    Hi
    Sending an ALV List screen output to SPOOL
    Convert ALV list to PDF and send mails to respective persons
    Regards
    Pavan

  • How can we modify alv output list

    Hi
    this is fazil.
    Please tell me any body How can we modify alv output list.
    Thanks & Regards
    Fazil
    [email protected]

    Fazil,
    check the program,
    You can find the code in this program 'BCALV_FIELDCAT_TEST'
    *& Report  BCALV_FIELDCAT_TEST                                         *
    This report allows to modify the fieldcatalog of a corresponding
    output table and to view the effects of your changes directly.
    Note that for some changes you need to newly display the whole
    ALV Grid Control, e.g., DDIC-Fields are read only the first time
    you call SET_READY_FOR_FIRST_DISPLAY.
    Note also that not all scenarios can be tested since the output
    table does not comprise all fields to test available features
    of the fieldcatalog. Copy this program and extend the output
    table accordingly if you want to test such a special feature.
    (The field CARRNAME in 'gt_sflight' was added to test field REF_FIELD
    and TXT_FIELD of the fieldcatalog - see what happens if you
    calculate subtotals by carrier-id).
    report  bcalvt_fieldcatalog           .
    data: ok_code               type sy-ucomm,
          save_ok_code          type sy-ucomm,
    fieldcatalog for output table
          gt_fieldcat           type lvc_t_fcat,
    fieldcatalog for fieldcatalog itself:
          gt_fcatfcat           type lvc_t_fcat,
          gs_fcatlayo           type lvc_s_layo.
    Output table
    data: begin of gt_sflight occurs 0.
    data: carrname type s_carrname.
            include structure sflight.
    data: end of gt_sflight.
    data: g_max type i value 100.
    data: g_all type c value SPACE.
    Controls to display gt_sflight and corresponding fieldcatalog
    data: g_docking type ref to cl_gui_docking_container,
          g_alv     type ref to cl_gui_alv_grid.
    data: g_custom_container type ref to cl_gui_custom_container,
          g_editable_alv     type ref to cl_gui_alv_grid.
    LOCAL CLASS Definition
    class lcl_event_receiver definition.
      public section.
        methods handle_data_changed
          for event data_changed of cl_gui_alv_grid
          importing er_data_changed.
    endclass.
    class lcl_event_receiver implementation.
      method handle_data_changed.
    at the time being, no checks are made...
      endmethod.
    endclass.
    data: event_receiver type ref to lcl_event_receiver.
    end-of-selection.
      set screen 100.
    *&      Module  STATUS_0100  OUTPUT
          text
    module status_0100 output.
      set pf-status 'BASIC'.
      set titlebar 'BASICTITLE'.
    create ALV Grid Control in the first run
      if g_docking is initial.
        perform create_and_init_controls.
      endif.
    endmodule.                             " STATUS_0100  OUTPUT
    *&      Module  USER_COMMAND_0100  INPUT
          text
    module user_command_0100 input.
      save_ok_code = ok_code.
      clear ok_code.
      case save_ok_code.
        when 'SUBMIT'.
    set the frontend fieldcatalog
    ATTENTION: DDIC-Fields are not updated using this method!
    (see 'RESTART')
          call method g_alv->set_frontend_fieldcatalog
               exporting
                 it_fieldcatalog = gt_fieldcat.
          call method g_alv->refresh_table_display.
          call method cl_gui_cfw=>flush.
        when 'RESTART'.
    Destroy the control currently visible and display it again
    using the changed fieldcatalog.
          perform restart_sflight.
        when '&ALL'.
          perform switch_visibility.
      endcase.
    endmodule.                             " USER_COMMAND_0100  INPUT
    *&      Form  CREATE_AND_INIT_CONTROLS
          text
    -->  p1        text
    <--  p2        text
    form create_and_init_controls.
      create object g_docking
          exporting
               dynnr = '100'
               extension = 150
               side = cl_gui_docking_container=>dock_at_bottom.
      create object g_alv
          exporting
               i_parent = g_docking.
      create object g_custom_container
          exporting
               container_name = 'CC_0100_FIELDCAT'.
      create object g_editable_alv
          exporting
               i_parent = g_custom_container.
    register events
      create object event_receiver.
      set handler event_receiver->handle_data_changed for g_editable_alv.
      call method g_editable_alv->register_edit_event
                    exporting
                       i_event_id = cl_gui_alv_grid=>mc_evt_modified.
      perform build_fieldcatalogs changing gt_fieldcat gt_fcatfcat.
      perform modify_fieldcatalog changing gt_fcatfcat.
      perform select_data.                 "CHANGING gt_sflight
      call method g_alv->set_table_for_first_display
              changing
                   it_outtab       = gt_sflight[]
                   it_fieldcatalog = gt_fieldcat[].
    optimize column width of grid displaying fieldcatalog
      gs_fcatlayo-cwidth_opt = 'X'.
    Get fieldcatalog of table sflight - alv might have
    modified it after passing.
      call method g_alv->get_frontend_fieldcatalog
                importing et_fieldcatalog = gt_fieldcat[].
      call method cl_gui_cfw=>flush.
    Display fieldcatalog of table sflight:
      call method g_editable_alv->set_table_for_first_display
              exporting
                   is_layout       = gs_fcatlayo
              changing
                   it_outtab       = gt_fieldcat[]
                   it_fieldcatalog = gt_fcatfcat[].
    register events
      create object event_receiver.
      set handler event_receiver->handle_data_changed for g_editable_alv.
    endform.                               " CREATE_AND_INIT_CONTROLS
    *&      Form  restart_sflight
          text
    -->  p1        text
    <--  p2        text
    form restart_sflight.
      data: ls_fieldcat type lvc_s_fcat.
    free g_docking and thus g_alv
      call method g_docking->free.
      clear g_docking.
      clear g_alv.
    create new instances
      create object g_docking
          exporting
               dynnr = '100'
               extension = 150
               side = cl_gui_docking_container=>dock_at_bottom.
      create object g_alv
          exporting
               i_parent = g_docking.
    This is an internal method to invalidate all fields in the fieldcat
      loop at gt_fieldcat into ls_fieldcat.
        clear ls_fieldcat-tech_comp.
        modify gt_fieldcat from ls_fieldcat.
      endloop.
    Newly display the list with current fieldcatalog.
      call method g_alv->set_table_for_first_display
              changing
                   it_outtab       = gt_sflight[]
                   it_fieldcatalog = gt_fieldcat.
    Get fieldcatalog - it might be changed by ALV in the last call
      call method g_alv->get_frontend_fieldcatalog
              importing
                   et_fieldcatalog = gt_fieldcat[].
      call method g_editable_alv->refresh_table_display.
      call method cl_gui_cfw=>flush.
    endform.                               " restart_sflight
    *&      Form  select_data
          text
    -->  p1        text
    <--  p2        text
    form select_data.
      data: lt_sflight type table of sflight with header line,
            ls_scarr type scarr.
    select data of sflight
      select * from sflight into table lt_sflight up to g_max rows.
    copy data to gt_sflight and update CARRNAME
      loop at lt_sflight.
        move-corresponding lt_sflight to gt_sflight.
        select single * from scarr into ls_scarr
           where carrid = gt_sflight-carrid.
        gt_sflight-carrname = ls_scarr-carrname.
        append gt_sflight.
      endloop.
    endform.                               " select_data
    *&      Form  BUILD_FIELDCATALOGS
          text
         <--P_GT_FIELDCAT  text
         <--P_GT_FCATFCAT  text
    form build_fieldcatalogs changing p_fieldcat type lvc_t_fcat
                                      p_fcatfcat type lvc_t_fcat.
      data: ls_fcat     type lvc_s_fcat.
    Fieldcatalog for table SFLIGHT: p_fieldcat
    generate fieldcatalog automatically
      call function 'LVC_FIELDCATALOG_MERGE'
          exporting
               i_structure_name       = 'SFLIGHT'
            I_CLIENT_NEVER_DISPLAY = 'X'
           changing
                ct_fieldcat            = p_fieldcat[]
       EXCEPTIONS
            INCONSISTENT_INTERFACE = 1
            PROGRAM_ERROR          = 2
            OTHERS                 = 3
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    shift all column positions to the right except for MANDT
      loop at p_fieldcat into ls_fcat.
        if ls_fcat-fieldname ne 'MANDT'.
          add 1 to ls_fcat-col_pos.
          if ls_fcat-fieldname = 'CARRID'.
            ls_fcat-txt_field = 'CARRNAME'."link CARRNAME to CARRID
          endif.
          modify p_fieldcat from ls_fcat.
        endif.
      endloop.
    create a new line for CARRNAME in p_fieldcat
      clear ls_fcat.
      ls_fcat-fieldname = 'CARRNAME'.
      ls_fcat-ref_table = 'SCARR'.
      ls_fcat-col_pos = 1.
    insert new line before CARRID (do not forget MANDT!).
      insert ls_fcat into p_fieldcat index 1.
    Fieldcatalog for table LVC_T_FCAT:p_fcatfcat
    Generate fieldcatalog of fieldcatalog structure.
    This fieldcatalog is used to display fieldcatalog 'p_fieldcat'
    on the top of the screen.
      call function 'LVC_FIELDCATALOG_MERGE'
          exporting
               i_structure_name       = 'LVC_S_FCAT'
            I_CLIENT_NEVER_DISPLAY = 'X'
           changing
                ct_fieldcat            = p_fcatfcat[]
       EXCEPTIONS
            INCONSISTENT_INTERFACE = 1
            PROGRAM_ERROR          = 2
            OTHERS                 = 3
      if sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      endif.
    Hide all fields that are not documented (valid for release 4.6A)
      perform hide_fields changing p_fcatfcat.
    endform.                               " BUILD_FIELDCATALOGS
    *&      Module  EXIT_PROGRAM  INPUT
          text
    module exit_program input.
      leave program.
    endmodule.                             " EXIT_PROGRAM  INPUT
    *&      Form  MODIFY_FIELDCATALOG
          text
         <--P_GT_FCATFCAT  text
    form modify_fieldcatalog changing p_fcatfcat type lvc_t_fcat.
      data ls_fcat type lvc_s_fcat.
      loop at p_fcatfcat into ls_fcat.
        ls_fcat-coltext = ls_fcat-fieldname.
        ls_fcat-edit = 'X'.
        if ls_fcat-fieldname = 'COL_POS' or ls_fcat-fieldname = 'FIELDNAME'.
          ls_fcat-key = 'X'.
        endif.
        modify p_fcatfcat from ls_fcat.
      endloop.
    endform.                               " MODIFY_FIELDCATALOG
    form hide_fields changing p_fieldcat type lvc_t_fcat.
      data: ls_fcat type lvc_s_fcat.
    Only show documented fields of fieldcatalog.
    For a documentation choose "Help->Application Help" in the menu.
      loop at p_fieldcat into ls_fcat.
        if not (
             ls_fcat-fieldname eq 'CFIELDNAME'
        or   ls_fcat-fieldname eq 'COL_POS'
        or   ls_fcat-fieldname eq 'COLDDICTXT'
        or   ls_fcat-fieldname eq 'COLTEXT'
        or   ls_fcat-fieldname eq 'CURRENCY'
        or   ls_fcat-fieldname eq 'DD_OUTLEN'
        or   ls_fcat-fieldname eq 'DECIMALS_O'
        or   ls_fcat-fieldname eq 'DECMLFIELD'
        or   ls_fcat-fieldname eq 'DO_SUM'
        or   ls_fcat-fieldname eq 'DRAGDROPID'
        or   ls_fcat-fieldname eq 'EDIT_MASK'
        or   ls_fcat-fieldname eq 'EMPHASIZE'
        or   ls_fcat-fieldname eq 'EXPONENT'
        or   ls_fcat-fieldname eq 'FIELDNAME'
        or   ls_fcat-fieldname eq 'HOTSPOT'
        or   ls_fcat-fieldname eq 'ICON'
        or   ls_fcat-fieldname eq 'INTLEN'
        or   ls_fcat-fieldname eq 'INTTYPE'
        or   ls_fcat-fieldname eq 'JUST'
        or   ls_fcat-fieldname eq 'KEY'
        or   ls_fcat-fieldname eq 'LOWERCASE'
        or   ls_fcat-fieldname eq 'LZERO'
        or   ls_fcat-fieldname eq 'NO_OUT'
        or   ls_fcat-fieldname eq 'NO_SIGN'
        or   ls_fcat-fieldname eq 'NO_SUM'
        or   ls_fcat-fieldname eq 'NO_ZERO'
        or   ls_fcat-fieldname eq 'OUTPUTLEN'
        or   ls_fcat-fieldname eq 'QFIELDNAME'
        or   ls_fcat-fieldname eq 'QUANTITY'
        or   ls_fcat-fieldname eq 'REF_FIELD'
        or   ls_fcat-fieldname eq 'REF_TABLE'
        or   ls_fcat-fieldname eq 'REPREP'
        or   ls_fcat-fieldname eq 'REPTEXT'
        or   ls_fcat-fieldname eq 'ROLLNAME'
        or   ls_fcat-fieldname eq 'ROUND'
        or   ls_fcat-fieldname eq 'ROUNDFIELD'
        or   ls_fcat-fieldname eq 'SCRTEXT_L'
        or   ls_fcat-fieldname eq 'SCRTEXT_M'
        or   ls_fcat-fieldname eq 'SCRTEXT_S'
        or   ls_fcat-fieldname eq 'SELDDICTXT'
        or   ls_fcat-fieldname eq 'SELTEXT'
        or   ls_fcat-fieldname eq 'SP_GROUP'
        or   ls_fcat-fieldname eq 'SYMBOL'
        or   ls_fcat-fieldname eq 'TECH'
        or   ls_fcat-fieldname eq 'TIPDDICTXT'
        or   ls_fcat-fieldname eq 'TOOLTIP'
        or   ls_fcat-fieldname eq 'TXT_FIELD' ).
          ls_fcat-tech = 'X'.
        endif.
        modify p_fieldcat from ls_fcat.
      endloop.
    endform.
    form switch_visibility.
    data:  lt_fcatfcat type lvc_t_fcat,
            ls_fcat type lvc_s_fcat.
    call method g_editable_alv->get_frontend_fieldcatalog
                 importing ET_FIELDCATALOG = lt_fcatfcat.
    if not g_all is initial.
         perform hide_fields changing lt_fcatfcat.
         g_all = SPACE.
    else.
        loop at lt_fcatfcat into ls_fcat.
           if ls_fcat-tech eq 'X'.
               ls_fcat-tech = SPACE.
               ls_fcat-no_out = 'X'.
               modify lt_fcatfcat from ls_fcat.
           endif.
        endloop.
        g_all = 'X'.
    endif.
    call method g_editable_alv->set_frontend_fieldcatalog
                exporting it_fieldcatalog = lt_fcatfcat.
    call method g_editable_alv->refresh_table_display.
    endform.
    Don't forget to rewaard if useful..

  • How can we edit alv report output.

    hi all,
    how can we edit alv report output

    \[removed by moderator as it was just a copy and paste answer of someone else's work without giving a source\]
    Edited by: Jan Stallkamp on Aug 25, 2008 4:35 PM

  • HOW TO KEEP PUSHBUTTON IN OUTPUT SCREEN(ALV)

    HOW TO KEEP PUSHBUTTON IN OUTPUT SCREEN ( ALV FORMAT)

    Hi,
    At selection screen use this below code:
    Eg:
    *SELECTION-SCREEN FUNCTION KEY 1. "Adds button to application toolbar
    Declaration of sel screen buttons
    selection-screen begin of line.
    selection-screen pushbutton (20) w_button user-command but1.
    selection-screen pushbutton (25) w_but2 user-command but2.
    selection-screen end of line.
    Madhu
    Pls reward me if it is useful

  • How to get the output in ALV format

    Hi All,
    this is my program, in this i want to get the output in ALV, i hv created two containers and m able to get the ALV layout successfully but i am not able to fetch the correct data.
    the output it is showing is some RFC value.
    here we have used -  abaplist, soli.
    Please provide me the solution.
    SELECT * FROM varid INTO CORRESPONDING FIELDS OF TABLE t_varid WHERE report in s_report.
    LOOP AT t_varid .
      SUBMIT (t_varid-report) USING SELECTION-SET t_varid-variant
                    EXPORTING LIST TO MEMORY
                    AND RETURN.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = listtab
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
    **************Old System Entry********
      CALL FUNCTION 'Z_GET_DETAILS'
        DESTINATION 'BWDCLNT900'
        EXPORTING
          report  = t_varid-report
          variant = t_varid-variant
        TABLES
          listtab = list_tab.
      IF sy-subrc EQ 0.
        CALL FUNCTION 'LIST_TO_TXT'
          TABLES
            listtxt            = listtxt1
            listobject         = list_tab
          EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2.
      ENDIF.
      if p_flag eq 'X'.
        clear p_flag.
        write : / 'Program Name',
                  41 'Variant Name',
                  66 'Output Match'.
        endif.
      IF listtxt EQ listtxt1.
        WRITE : /   t_varid-report,
                 41 t_varid-variant,
                 66 icon_green_light AS ICON HOTSPOT.
      ELSE.
        WRITE : /   t_varid-report,
                 41 t_varid-variant,
                 66 icon_red_light AS ICON HOTSPOT.
      ENDIF.
      CLEAR : listtab,list_tab,listtxt,listtxt1.
      REFRESH : listtab[],list_tab[],listtxt[],listtxt1[].
    ENDLOOP.
    AT line-selection.
        v_report  = sy-lisel(40).
        v_variant = sy-lisel+40(14).
    call SCREEN 400.
    module STATUS_0400 output.
    SUBMIT (v_report) USING SELECTION-SET v_variant
                    EXPORTING LIST TO MEMORY
                    AND RETURN.
      CALL FUNCTION 'LIST_FROM_MEMORY'
        TABLES
          listobject = listtab
        EXCEPTIONS
          not_found  = 1
          OTHERS     = 2.
       CALL FUNCTION 'LIST_TO_TXT'
          TABLES
            listtxt            = listtxt1
            listobject         = list_tab
          EXCEPTIONS
            empty_list         = 1
            list_index_invalid = 2.
    **************Old System Entry********
      CALL FUNCTION 'Z_GET_DETAILS'
        DESTINATION 'BWDCLNT900'
        EXPORTING
          report  = v_report
          variant = v_variant
        TABLES
          listtab = list_tab.
    CREATE OBJECT CCONT1
      EXPORTING
       CONTAINER_NAME = 'C1'.
    CREATE OBJECT CCONT2
      EXPORTING
       CONTAINER_NAME = 'C2'.
    CREATE OBJECT GRID1
      EXPORTING
       I_PARENT = CCONT1.
    CREATE OBJECT GRID2
      EXPORTING
       I_PARENT = CCONT2.
    CALL METHOD GRID1->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
      I_STRUCTURE_NAME = 'abaplist'
      CHANGING
       IT_OUTTAB = list_tab.
    CALL METHOD GRID2->SET_TABLE_FOR_FIRST_DISPLAY
      EXPORTING
      I_STRUCTURE_NAME = 'abaplist'
      CHANGING
       IT_OUTTAB = listtab.
      SET PF-STATUS 'ZUTDEMO2'.
    endmodule.             
    module USER_COMMAND_0400 input.
    IF SY-UCOMM = 'EXIT'.
    LEAVE PROGRAM.
    ENDIF.
    endmodule.                 " USER_COMMAND_0400  INPUT

    solved

  • How to get the record selected in ztable based record in the output of alv

    Hi All,
    I have developed a report, it is displaying the output in ALV format.The list contained some 20 fields along with MATERIAL and BATCH. I have provided menu bar as extras -> ztable(it also contained MATERIAL and BATCH). But I have some issue when I select any record in the output then go to
    path extras -> ztable, it has to select the record in ztable based MATERIAL and BATCH which i have selected in the output, then can you please provide solution for the above problem.
    Thanks in advance

    Hi Dolly,
    you can do this by,
    data: index_rows type lvc_t_row,
          index like line of index_rows.
    * Get Selected rows from alv grid
      clear index_rows.  refresh index_rows.
    "When you choose extras->ztable
      call method alv_grid->get_selected_rows
               importing
                     et_index_rows = index_rows.
    * Now delete those rows from the ALV grid
      loop at index_rows into index.
        read table itab index index-index. "Lets say itab is the table you are displaying
        if sy-subrc = 0.
         perform bdc_sm30. "do simple bdc for sm30 with tab name and selected values
        endif.
      endloop.
    Regards,
    Manoj Kumar P
    Edited by: Manoj Kumar on Feb 23, 2009 2:49 PM

  • How to send the alv list display to spool

    Hi all,
    I am executing a program in foreground. My requirement is sending alv list output to spool. When i execute the smae program in background mode the SAP is handling the spool output in hierarchial list display. How to get the same output in foreground also.
    Thanks and Regards,
    Vijay.

    Hi max,
    I think my question is not clear.
    when I execute my report in background mode, I can able to see the output in the spool.
    But when I execute the same report in foreground no spool output is getting generated.
    To handle this I am calling some function modules like RSPO_OPEN_SPOOLREQUEST , RSPO_WRITE_SPOOLREQUEST,  RSPO_WRITE_SPOOLREQUEST. But by using this i cannot able to get the desired output in alv list display format. what to do to get my desired output.
    Thanks and Regards,
    Vijay.

  • Output of ALV report as attachment in email

    Dear all ,
    I would like to send output of ALV report as attachment in email.
    i already written code for this using FM SO_NEW_DOCUMENT_ATT_SEND_API1.
    I can able to send list output as HTM format. But I want to send ALV report output
    As a attachment. How can I do this….please explain…
    Thanks in advance…
    Regards
    Manohar

    Hello,
    U can sent like this.
    Check this report
    REPORT ZV_SEND_MAIL .
    TABLES: EKKO.
    PARAMETERS: P_EMAIL   TYPE SOMLRECI1-RECEIVER
                                      DEFAULT '[email protected]'.
    TYPES: BEGIN OF T_EKPO,
      EBELN TYPE EKPO-EBELN,
      EBELP TYPE EKPO-EBELP,
      AEDAT TYPE EKPO-AEDAT,
      MATNR TYPE EKPO-MATNR,
    END OF T_EKPO.
    DATA: IT_EKPO TYPE STANDARD TABLE OF T_EKPO INITIAL SIZE 0,
          WA_EKPO TYPE T_EKPO.
    TYPES: BEGIN OF T_CHAREKPO,
      EBELN(10) TYPE C,
      EBELP(5)  TYPE C,
      AEDAT(8)  TYPE C,
      MATNR(18) TYPE C,
    END OF T_CHAREKPO.
    DATA: WA_CHAREKPO TYPE T_CHAREKPO.
    DATA:   IT_MESSAGE TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   IT_ATTACH TYPE STANDARD TABLE OF SOLISTI1 INITIAL SIZE 0
                    WITH HEADER LINE.
    DATA:   T_PACKING_LIST LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
            T_CONTENTS LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            T_RECEIVERS LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE,
            T_ATTACHMENT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            T_OBJECT_HEADER LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
            W_CNT TYPE I,
            W_SENT_ALL(1) TYPE C,
            W_DOC_DATA LIKE SODOCCHGI1,
            GD_ERROR    TYPE SY-SUBRC,
            GD_RECIEVER TYPE SY-SUBRC.
    *START_OF_SELECTION
    START-OF-SELECTION.
    *   Retrieve sample data from table ekpo
      PERFORM DATA_RETRIEVAL.
    *   Populate table with detaisl to be entered into .xls file
      PERFORM BUILD_XLS_DATA_TABLE.
    *END-OF-SELECTION
    END-OF-SELECTION.
    * Populate message body text
      PERFORM POPULATE_EMAIL_MESSAGE_BODY.
    * Send file by email as .xls speadsheet
      PERFORM SEND_FILE_AS_EMAIL_ATTACHMENT
                                   TABLES IT_MESSAGE
                                          IT_ATTACH
                                    USING P_EMAIL
                                          'Example .xls documnet attachment'
                                          'XLS'
                                          'filename'
                                 CHANGING GD_ERROR
                                          GD_RECIEVER.
    *   Instructs mail send program for SAPCONNECT to send email(rsconn01)
      PERFORM INITIATE_MAIL_EXECUTE_PROGRAM.
    *&      Form  DATA_RETRIEVAL
    *       Retrieve data form EKPO table and populate itab it_ekko
    FORM DATA_RETRIEVAL.
      SELECT EBELN EBELP AEDAT MATNR
       UP TO 10 ROWS
        FROM EKPO
        INTO TABLE IT_EKPO.
    ENDFORM.                    " DATA_RETRIEVAL
    *&      Form  BUILD_XLS_DATA_TABLE
    *       Build data table for .xls document
    FORM BUILD_XLS_DATA_TABLE.
      CONSTANTS: CON_CRET TYPE X VALUE '0D',  "OK for non Unicode
                 CON_TAB TYPE X VALUE '09'.   "OK for non Unicode
    *If you have Unicode check active in program attributes thnen you will
    *need to declare constants as follows
    *class cl_abap_char_utilities definition load.
    *constants:
    *    con_tab  type c value cl_abap_char_utilities=>HORIZONTAL_TAB,
    *    con_cret type c value cl_abap_char_utilities=>CR_LF.
      CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
             INTO IT_ATTACH SEPARATED BY CON_TAB.
      CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.
      APPEND  IT_ATTACH.
      LOOP AT IT_EKPO INTO WA_CHAREKPO.
        CONCATENATE WA_CHAREKPO-EBELN WA_CHAREKPO-EBELP
                    WA_CHAREKPO-AEDAT WA_CHAREKPO-MATNR
               INTO IT_ATTACH SEPARATED BY CON_TAB.
        CONCATENATE CON_CRET IT_ATTACH  INTO IT_ATTACH.
        APPEND  IT_ATTACH.
      ENDLOOP.
    ENDFORM.                    " BUILD_XLS_DATA_TABLE
    *&      Form  SEND_FILE_AS_EMAIL_ATTACHMENT
    *       Send email
    FORM SEND_FILE_AS_EMAIL_ATTACHMENT TABLES PIT_MESSAGE
                                              PIT_ATTACH
                                        USING P_EMAIL
                                              P_MTITLE
                                              P_FORMAT
                                              P_FILENAME
                                              P_ATTDESCRIPTION
                                              P_SENDER_ADDRESS
                                              P_SENDER_ADDRES_TYPE
                                     CHANGING P_ERROR
                                              P_RECIEVER.
      DATA: LD_ERROR    TYPE SY-SUBRC,
            LD_RECIEVER TYPE SY-SUBRC,
            LD_MTITLE LIKE SODOCCHGI1-OBJ_DESCR,
            LD_EMAIL LIKE  SOMLRECI1-RECEIVER,
            LD_FORMAT TYPE  SO_OBJ_TP ,
            LD_ATTDESCRIPTION TYPE  SO_OBJ_NAM ,
            LD_ATTFILENAME TYPE  SO_OBJ_DES ,
            LD_SENDER_ADDRESS LIKE  SOEXTRECI1-RECEIVER,
            LD_SENDER_ADDRESS_TYPE LIKE  SOEXTRECI1-ADR_TYP,
            LD_RECEIVER LIKE  SY-SUBRC.
      LD_EMAIL   = P_EMAIL.
      LD_MTITLE = P_MTITLE.
      LD_FORMAT              = P_FORMAT.
      LD_ATTDESCRIPTION      = P_ATTDESCRIPTION.
      LD_ATTFILENAME         = P_FILENAME.
      LD_SENDER_ADDRESS      = P_SENDER_ADDRESS.
      LD_SENDER_ADDRESS_TYPE = P_SENDER_ADDRES_TYPE.
    * Fill the document data.
      W_DOC_DATA-DOC_SIZE = 1.
    * Populate the subject/generic message attributes
      W_DOC_DATA-OBJ_LANGU = SY-LANGU.
      W_DOC_DATA-OBJ_NAME  = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR = LD_MTITLE .
      W_DOC_DATA-SENSITIVTY = 'F'.
    * Fill the document data and get size of attachment
      CLEAR W_DOC_DATA.
      READ TABLE IT_ATTACH INDEX W_CNT.
      W_DOC_DATA-DOC_SIZE =
         ( W_CNT - 1 ) * 255 + STRLEN( IT_ATTACH ).
      W_DOC_DATA-OBJ_LANGU  = SY-LANGU.
      W_DOC_DATA-OBJ_NAME   = 'SAPRPT'.
      W_DOC_DATA-OBJ_DESCR  = LD_MTITLE.
      W_DOC_DATA-SENSITIVTY = 'F'.
      CLEAR T_ATTACHMENT.
      REFRESH T_ATTACHMENT.
      T_ATTACHMENT[] = PIT_ATTACH[].
    * Describe the body of the message
      CLEAR T_PACKING_LIST.
      REFRESH T_PACKING_LIST.
      T_PACKING_LIST-TRANSF_BIN = SPACE.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM = 0.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE IT_MESSAGE LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE = 'RAW'.
      APPEND T_PACKING_LIST.
    * Create attachment notification
      T_PACKING_LIST-TRANSF_BIN = 'X'.
      T_PACKING_LIST-HEAD_START = 1.
      T_PACKING_LIST-HEAD_NUM   = 1.
      T_PACKING_LIST-BODY_START = 1.
      DESCRIBE TABLE T_ATTACHMENT LINES T_PACKING_LIST-BODY_NUM.
      T_PACKING_LIST-DOC_TYPE   =  LD_FORMAT.
      T_PACKING_LIST-OBJ_DESCR  =  LD_ATTDESCRIPTION.
      T_PACKING_LIST-OBJ_NAME   =  LD_ATTFILENAME.
      T_PACKING_LIST-DOC_SIZE   =  T_PACKING_LIST-BODY_NUM * 255.
      APPEND T_PACKING_LIST.
    * Add the recipients email address
      CLEAR T_RECEIVERS.
      REFRESH T_RECEIVERS.
      T_RECEIVERS-RECEIVER = LD_EMAIL.
      T_RECEIVERS-REC_TYPE = 'U'.
      T_RECEIVERS-COM_TYPE = 'INT'.
      T_RECEIVERS-NOTIF_DEL = 'X'.
      T_RECEIVERS-NOTIF_NDEL = 'X'.
      APPEND T_RECEIVERS.
      CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
           EXPORTING
                DOCUMENT_DATA              = W_DOC_DATA
                PUT_IN_OUTBOX              = 'X'
                SENDER_ADDRESS             = LD_SENDER_ADDRESS
                SENDER_ADDRESS_TYPE        = LD_SENDER_ADDRESS_TYPE
                COMMIT_WORK                = 'X'
           IMPORTING
                SENT_TO_ALL                = W_SENT_ALL
           TABLES
                PACKING_LIST               = T_PACKING_LIST
                CONTENTS_BIN               = T_ATTACHMENT
                CONTENTS_TXT               = IT_MESSAGE
                RECEIVERS                  = T_RECEIVERS
           EXCEPTIONS
                TOO_MANY_RECEIVERS         = 1
                DOCUMENT_NOT_SENT          = 2
                DOCUMENT_TYPE_NOT_EXIST    = 3
                OPERATION_NO_AUTHORIZATION = 4
                PARAMETER_ERROR            = 5
                X_ERROR                    = 6
                ENQUEUE_ERROR              = 7
                OTHERS                     = 8.
    * Populate zerror return code
      LD_ERROR = SY-SUBRC.
    * Populate zreceiver return code
      LOOP AT T_RECEIVERS.
        LD_RECEIVER = T_RECEIVERS-RETRN_CODE.
      ENDLOOP.
    ENDFORM.
    *&      Form  INITIATE_MAIL_EXECUTE_PROGRAM
    *       Instructs mail send program for SAPCONNECT to send email.
    FORM INITIATE_MAIL_EXECUTE_PROGRAM.
      WAIT UP TO 2 SECONDS.
      SUBMIT RSCONN01 WITH MODE = 'INT'
                    WITH OUTPUT = 'X'
                    AND RETURN.
    ENDFORM.                    " INITIATE_MAIL_EXECUTE_PROGRAM
    *&      Form  POPULATE_EMAIL_MESSAGE_BODY
    *        Populate message body text
    FORM POPULATE_EMAIL_MESSAGE_BODY.
      REFRESH IT_MESSAGE.
      IT_MESSAGE = 'Please find attached a list test ekpo records'.
      APPEND IT_MESSAGE.
    ENDFORM.                    " POPULATE_EMAIL_MESSAGE_BODY
    If useful reward.
    Vasanth

  • Want to export output of alv grid to excel automatically

    hi friends.............
      i want to export output of alv grid without displaying on screen to excel file .......................
    how i m able to do it ..............................
    in the same way as after alv grid display click on LOCAL FILE-> SPREADSHEET-> ........................
    plz rply me soon if anyone of u know abt that.................
    thanks allot.............

    actually in output through 'REUSE_ALV_GRID_DISPLAY' some title is also there through TOP_OF_PAGE how can download it also and data table in excel sheet ...................
    actually when an alv output is displayed then some title data  is also displayed in alv grid then we can download it by clicking on icon 'local file--> spreadsheet........and soon ' ..........
    my req. is download it automatically without doing this process and without displaying it on screen......... it means i want to interrupt to alv grid output to only download without displaying it in output screen............
    if u clear my question then reply me.............

  • Need to Add field EKET-EINDT and EKET-SLFDT to ME2M Report output in ALV

    Hi All,
    I need to add fields EKET-EINDT and EKET-SLFDT to the output of program ME2M Transaction.
    I have appended the structure MEREP_OUTTAB_PURCHDOC with these fields. and it is coming in the ALV output field catalog.
    I need these fields output only for ALV display only.
    Please let me know which enhancement i need to write code to enhance the output with these filed values added to the ALV internal table
    Thanks in Advance
    Arun

    Hi All,
    I am able to get the field EINDT and SLFDT into the structure using Append structure and is also getting displayed in the output in ALV.
    But i need to know how to add code for filling these fields and passing into ALV. I need to know the Enhancement spot.
    Please let me know how to achieve this scenario
    Thanks
    Arun

  • How to refresh the ALV Tree

    Hi,
    I have an ALV Tree report developed using the OOPS. In my ALV Tree output, I have some buttons which will update the database after clicking. The data is correctly updating in the database. But, it is not getting updated in the ALV Tree display. That means, it is not REFRESHing the ALV Tree display. We have to again execute the program in order to see the updated output.
    Could anyone please suggest me how to Refresh the ALV Tree display..?
    We can't use the method 'REFRESH_TABLE_DISPLAY' as it is a PRIVATE method is the class CL_GUI_ALV_TREE.
    Please share your valuable thoughts.
    Thanks & Regards,
    Paddu.

    Hi paddu.
    please check out the link mentioned below,this will help u.
    How to Refresh data on ALV tree
    Regards
    Theres

Maybe you are looking for

  • Exception in ESB Header Functions (ehdr:getRequestHeader)

    Hi, I was working on the context based routing in the ESB. My scenario is a simple File to File scenario where I want to make some changes in the Filter Expressions in the Routing service part. I want to include the Header functions in order to route

  • How to sort items in a page of labels

    I have entered company names and addresses onto a Pages label template. They are not from my contacts or address book. They were copied from hard copy documents as I came across them. I want to now have them rearranged on the label template alphabeti

  • PR Release Notification thru Mail

    Hi, Whenever  a Purchase Requisition is created it follows the defined release strategy. 1) The issue is we want to notify the person concerned to release next, thru Email(Outlook or to SAP Inbox atleast). 2)And when the final PR release is done noti

  • Iphone 4 16gb on verizon is sending blank texts and receiving symbols instead of letters from only certain people

    so i have had an iphone for a year ish and recently replaced it. on both phones from my boyfriend and my grandma (the only ones who have had this problem) i will receive their texts as a bunch of random symbols or gibberish every so often and again e

  • Need Help on Caching Issue !

    Hi all, I am having some issue in my application like sometimes one popup windows is not opening up properly even waiting for 1-2 minutes. What I found is the pop-up window functionality is using 15 frame htmls which is getting loaded from server for