ALV:amout becomes positive in output, y?

Hello Friends,
I am doing on ALV report using classes and methods.
Here i am populting one internal table (which is my output table) and passing to ALV function to display.
But, In my internal table there is oane field BSEG-ERFMG (Quan 13)
before passing to ALV function, its value is '25.000-'.
While i m getting results, it shows '25'.
How it can be possible?
I want my Negetive value in my report.
Is it possible in ALV with class n method process?
Points rewarded soon, if useful
Regards,
RH

Hi,
Try using gs_fieldcat-datatype = 'QUAN', while building fieldcatalog for quantity field.
Thanks,
Sriram Ponna.

Similar Messages

  • The keyboard has become positioned near the top of the screen. How can I put it back down the bottom ?, The keyboard has become positioned near the top of the screen. How can I put it back down the bottom ?

    My keypad has become positioned at the top of the screen,hiding the text I am writing. How can I reposition it at the bottom of the screen?

    Hold down on the button iwht the keyboard on it (lower right of hte keyboard), after a few seconds a dialogue box will pop up offering you to redock the keyboard. choose it and it moves back where it was.

  • ALV IDA Column Position Change

    Hi Folks,
    Is it possible to change column position in ALV IDA programmatically if possible then how?
    Regards,
    Amol

    Hello Amol,
    you can influence the order of the displayed fields using the SET_AVAILABLE_FIELDS method of the IDA ALVs field catalog instance.
    Following you see a little example for the company code table T001. I changed the order of the fields that the company code text is displayed in front of the company code ID. The order in which you pass the fields to the method defines the order for the output.
    Best Regards,
    Florian
    " create IDA ALV
    DATA(lo_ida_alv) = cl_salv_gui_table_ida=>create( iv_table_name = 'T001' ).
    " set available fields
    lo_ida_alv->field_catalog( )->set_available_fields( its_field_names = VALUE if_salv_gui_types_ida=>yts_field_name( ( CONV fieldname('BUKRS') )
                                                                                                                       ( CONV fieldname('BUTXT') ) ) ).
    " set display order of fields
    lo_ida_alv->default_layout( )->set_visible_fields( it_visible_fields = VALUE if_salv_gui_types_ida=>yt_field_name( ( CONV fieldname('BUTXT') )
                                                                                                                       ( CONV fieldname('BUKRS') ) ) ).
    " output
    lo_ida_alv->fullscreen( )->display( ).

  • Getting dump when using do_sum in alv field cat in the output of the report

    Dear Freinds,
                 Iam getting the alv report when i click on the segma field (Sum) on my salary
    field iam getting dump. and also if i try to print my alv output iam getting dump , only
    happening to my custom report.
    i have used the following code pleae correct me .
    This perform is used for Layout settings
      perform st_layout_build  using gs_layout.
    form st_layout_build  using  st_ls_layout type slis_layout_alv.
       st_ls_layout-no_input          = 'X'.
      st_ls_layout-colwidth_optimize = 'X'.
    st_ls_layout-zebra             = 'X'.
    st_ls_layout-detail_popup      = 'X'.
    endform.                    " st_layout_build
    Field Catalog details
    perform st_fieldcat_init changing gt_fieldcat.
    form st_fieldcat_init  changing  fp_i_fieldcat type slis_t_fieldcat_alv.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'ORGUNIT'.
      ls_fieldcat-seltext_l    = 'Orgunit'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 2.
      ls_fieldcat-fieldname    = 'ORGTEXT'.
      ls_fieldcat-seltext_l    = 'Orgdesc'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'SALARY'.
      ls_fieldcat-seltext_l    = 'Salary'.
      ls_fieldcat-col_pos      = 3.
      ls_fieldcat-outputlen   = 15.
      ls_fieldcat-do_sum       = 'X'.
      ls_fieldcat-datatype     = 'CURR'.    "CURR
      append ls_fieldcat to fp_i_fieldcat.
    endform.
    Variant
      perform st_variant_init  using gs_variant g_repid.
    form st_variant_init   using  st_gs_variant type disvariant
                                 st_repid      like sy-repid.
      clear st_gs_variant.
      st_gs_variant-report = st_repid.
    endform.                    " st_variant_init
      g_repid = sy-repid.
      perform st_comment_build  using gt_list_top_of_page[].
    form st_comment_build  using   st_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.
    Listenüberschrift: Typ H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-000.
      append ls_line to st_lt_top_of_page.
    endform.                    " st_comment_build
         call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
             i_buffer_active        = 'X'
            i_callback_top_of_page = 'TOP_OF_PAGE'
            i_callback_program     = g_repid
            is_layout              = gs_layout
            it_fieldcat            = gt_fieldcat[]
           i_structure_name       = 'i_final'   "c_i_final "'objec'
           i_save                 = g_save
            is_variant             = gs_variant
          tables
            t_outtab               = fp_i_pyrol_final
          exceptions
            program_error          = 1
            others                 = 2.
        if sy-subrc ne 0.
          message e018. " Displaying the ALV GRID has failed
        endif.
    Please could any  one let me know why iam getting dump when iam clicking for total
    on my salary field.
    Regards
    latha

    Dear Chandu,
    my code iam giving in details
    types : begin of ty_output_data,
            staffno     type pernr_d,
            staffname   type emnam,
            grade       type stell,
            orgunit     type orgeh,
            orgtext     type hr_mcstext,
            psgroup     type trfgr,      " Pay Scale Group
            salary      type maxbt,       "PAD_AMT7S,
            rrefunded   type pad_amt7s,
            leavepay    type pad_amt7s,
            mshortfal   type pad_amt7s,   " Medical Shortfall
            echkshfal   type pad_amt7s,   " Execute checkup shortfall
            ofindeduc   type pad_amt7s,   " Other Finance Deduction
            mtyprem     type pad_amt7s,   " maternity premium
            vpbonus     type pad_amt7s,   " VP/Bonus
            gratuity    type pad_amt7s,   " Gratuity
            vpay        type pad_amt7s,   " Variable pay
            mallowance  type pad_amt7s,   " Meal Allowance
            overtime    type pad_amt7s,   " overtime
            other       type  pad_amt7s,  "  OTHER
            pfundeecon  type pad_amt7s,   " PFund Employee's Contribution
            banktrnsfer type pad_amt7s,   " Bank Transfer
            count       type i,
            end of ty_output_data.
    data : i_final         type standard table of ty_output_data.
    iam getting all my data in the internal table  I_FINAL.
    perform get_final_alv  using  i_final.
    form get_final_alv  using   fp_i_pyrol_final type ty_t_output_data.
    *local variable declarations
      data : l_v_idx      type sy-tabix.
    *local work areas
      data : l_wa_final type ty_output_data.
      g_save = 'A'.
    This perform is used for Layout settings
      perform st_layout_build  using gs_layout.
    Field Catalog details
      perform st_fieldcat_init changing gt_fieldcat.
    Variant
      perform st_variant_init  using gs_variant g_repid.
      g_repid = sy-repid.
      perform st_comment_build  using gt_list_top_of_page[].
      if not fp_i_pyrol_final is initial.
        delete adjacent duplicates from fp_i_pyrol_final comparing all fields.
        call function 'REUSE_ALV_GRID_DISPLAY'
          exporting
             i_buffer_active        = 'X'
            i_callback_top_of_page = 'TOP_OF_PAGE'
            i_callback_program     = g_repid
            is_layout              = gs_layout
            it_fieldcat            = gt_fieldcat[]
           i_structure_name       = 'i_final'   "c_i_final "'objec'
           i_save                 = g_save
            is_variant             = gs_variant
          tables
            t_outtab               = fp_i_pyrol_final
          exceptions
            program_error          = 1
            others                 = 2.
        if sy-subrc ne 0.
          message e018. " Displaying the ALV GRID has failed
        endif.
      endif.
    endform.                    " get_final_alv
    form st_layout_build  using  st_ls_layout type slis_layout_alv.
       st_ls_layout-no_input          = 'X'.
      st_ls_layout-colwidth_optimize = 'X'.
    st_ls_layout-zebra             = 'X'.
    st_ls_layout-detail_popup      = 'X'.
    endform.                    " st_layout_build
    form st_fieldcat_init  changing  fp_i_fieldcat type slis_t_fieldcat_alv.
      data: ls_fieldcat type slis_fieldcat_alv.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 1.
      ls_fieldcat-fieldname    = 'ORGUNIT'.
      ls_fieldcat-seltext_l    = 'Orgunit'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 2.
      ls_fieldcat-fieldname    = 'ORGTEXT'.
      ls_fieldcat-seltext_l    = 'Orgdesc'.
    ls_fieldcat-no_out       = 'X'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 5.
      ls_fieldcat-fieldname    = 'STAFFNAME'.
    ls_fieldcat-no_out       = 'X'.
      ls_fieldcat-seltext_l    = 'StaffName'.
      append ls_fieldcat to fp_i_fieldcat.
       clear ls_fieldcat.
      ls_fieldcat-col_pos      = 4.
      ls_fieldcat-fieldname    = 'STAFFNO'.
    ls_fieldcat-no_out       = 'X'.
      ls_fieldcat-seltext_l    = 'StaffNo.'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 6.
      ls_fieldcat-fieldname    = 'GRADE'.
      ls_fieldcat-seltext_l    = 'Grade'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 3.
      ls_fieldcat-fieldname    = 'COUNT'.
      ls_fieldcat-seltext_l    = 'Headcount'.
      append ls_fieldcat to fp_i_fieldcat.
    if the field name is 'Salary' then do a sum on this field.
    IF  fp_fname = c_betrg.
        l_wa_fieldcat-do_sum    = c_x.
    ENDIF.
    NOTE : IAM GETTING PROBLEM IN THE BELOW SALARY.
    IAM JUST CHECKING ITSELF NOT ALLOWING ME TO EXECUTE
      clear ls_fieldcat.
      ls_fieldcat-fieldname    = 'SALARY'.
      ls_fieldcat-seltext_l    = 'Salary'.
      ls_fieldcat-col_pos      = 7.
      ls_fieldcat-outputlen   = 20.
      ls_fieldcat-do_sum       = 'X'.
      ls_fieldcat-datatype     = 'CURR'.    "CURR
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 9.
      ls_fieldcat-fieldname    = 'LEAVEPAY'.
      ls_fieldcat-seltext_l    = 'Leave Pay'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 10.
      ls_fieldcat-fieldname    = 'MSHORTFAL'.
      ls_fieldcat-seltext_l    = 'Med.Sfall'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 11.
      ls_fieldcat-fieldname    = 'ECHKSHFAL'.
      ls_fieldcat-seltext_l    = 'EX.Chckup.Sfall'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 12.
      ls_fieldcat-fieldname    = 'OFINDEDUC'.
      ls_fieldcat-seltext_l    = 'Oth.Fin.Deduction'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 13.
      ls_fieldcat-fieldname    = 'MTYPREM'.
      ls_fieldcat-seltext_l    = 'Mat.Premium'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 14.
      ls_fieldcat-fieldname    = 'VPBONUS'.
      ls_fieldcat-seltext_l    = 'VP/Bonus'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 15.
      ls_fieldcat-fieldname    = 'GRATUITY'.
      ls_fieldcat-seltext_l    = 'Gratuity'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 16.
      ls_fieldcat-fieldname    = 'VPAY'.
      ls_fieldcat-seltext_l    = 'Variable Pay'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 17.
      ls_fieldcat-fieldname    = 'MALLOWANCE'.
      ls_fieldcat-seltext_l    = 'Meal.Allowance'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 18.
      ls_fieldcat-fieldname    = 'OVERTIME'.
      ls_fieldcat-seltext_l    = 'Overtime'.
      append ls_fieldcat to fp_i_fieldcat.
        clear ls_fieldcat.
      ls_fieldcat-col_pos      = 19.
      ls_fieldcat-fieldname    = 'OTHER'.
      ls_fieldcat-seltext_l    = 'Other'.
      append ls_fieldcat to fp_i_fieldcat.
    pfundeecon
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 20.
      ls_fieldcat-fieldname    = 'P FUND EMPLOYEES CONTRIBUTION'.
      ls_fieldcat-seltext_l    = 'P.Fund.Emp.Contrib'.
      append ls_fieldcat to fp_i_fieldcat.
      clear ls_fieldcat.
      ls_fieldcat-col_pos      = 21.
      ls_fieldcat-fieldname    = 'BANKTRNSFER'.
      ls_fieldcat-seltext_l    = 'Payment'.
      append ls_fieldcat to fp_i_fieldcat.
    endform.                    " st_fieldcat_init
    form st_variant_init   using  st_gs_variant type disvariant
                                 st_repid      like sy-repid.
      clear st_gs_variant.
      st_gs_variant-report = st_repid.
    endform.                    " st_variant_init
    form st_comment_build  using   st_lt_top_of_page type slis_t_listheader.
      data: ls_line type slis_listheader.
    Listenüberschrift: Typ H
      clear ls_line.
      ls_line-typ  = 'H'.
    LS_LINE-KEY:  not used for this type
      ls_line-info = text-000.
      append ls_line to st_lt_top_of_page.
    endform.                    " st_comment_build
          FORM TOP_OF_PAGE                                              *
    form top_of_page.
      data: l_i_detailheader type slis_t_listheader.
    To get the header for ALV
      perform detail_header changing l_i_detailheader.
      call function 'REUSE_ALV_COMMENTARY_WRITE'
        exporting
          it_list_commentary = l_i_detailheader.
    endform.                    "top_of_page
    form detail_header  changing fp_i_detailheader type slis_t_listheader.
      data: l_wa_header       type slis_listheader,
            l_v_time         type slis_edit_mask,
            l_v_date         type slis_edit_mask,
            l_v_abkrs        type char5,
            l_v_pabrj        type char8,
            l_v_pagno        type char10.
    Local Constants
      constants: l_c_h type char1 value 'H',
                 l_c_1  type i     value '1',
                 l_c_edit type char10 value '__.__.____',
                 l_c_slash  type c value '/'. " constant for slash
    To display the report Header
      l_wa_header-typ = l_c_h.
    WRITE sy-repid TO l_wa_header-info LEFT-JUSTIFIED.
      write text-014  to l_wa_header-info left-justified.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
    To display the Page no
      l_v_pagno =   sy-pagno + l_c_1.
      l_wa_header-typ = c_s.
      l_wa_header-key = text-008. " Page No:
      l_wa_header-info =  l_v_pagno.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
    To Display the User ID
      l_wa_header-typ = c_s.
      l_wa_header-key = text-009. " User ID
      l_wa_header-info = sy-uname.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
    To Display the Date/Time
      l_wa_header-typ = c_s.
      l_wa_header-key = text-010. " Date/Time:
      l_v_time = sy-uzeit.
      l_v_date = sy-datum.
      write: sy-uzeit to l_v_time.
      write sy-datum to l_v_date using edit mask l_c_edit.
      concatenate l_v_date
                  l_c_slash
                  l_v_time into l_wa_header-info+0(25) separated by space.
      append l_wa_header to fp_i_detailheader.
      clear: l_wa_header, l_v_date.
    To Display the Report Description
      l_wa_header-typ = c_s.
      l_wa_header-key = text-011.                " Report Description
      l_wa_header-info = text-012.
      append l_wa_header to fp_i_detailheader.
      clear l_wa_header.
      append l_wa_header to fp_i_detailheader.
    endform.                    " detail_header
    I will be greatful if any one can please help me in removing me the dump.
    REGARDS
    LATHA.

  • How to restrict the user to change ALV layout for Standard Report Output

    Dear All,
    How can i restict the Users to change Output layout of Standard ALV reports,
    kindly suggest to solve the issue.
    Regards,
    Niranjan.G

    Hi NIranjan,
    In the ALV function module , the i_save can have the below paramater values.
    You can add based on your requirement.
    I_SAVE = SPACE Layouts cannot be saved.
    I_SAVE = 'U' Only user-defined layouts can be saved.
    I_SAVE = 'X' Only global layouts can be saved.
    I_SAVE = 'A' Both user-defined and global layouts can be saved.
    Check the Authorization Object - S_ALV_LAYO  in SUIM (Objects by Complex Search)
    Activity -23.
    Edited by: Raj on Jul 13, 2010 3:05 PM

  • ALV ( How to save the output as Excel file whenever we runs the Report )

    Hi,
          Can any one please let me know , how we can automatically save a ALV Grid Display report in Excel Format in presentation server whenever we execute the Report.
    Regards
    Avi.

    Hi,
    This report demonstrates how to send some ABAP data to an
    EXCEL sheet using OLE automation.
    INCLUDE OLE2INCL.
    handles for OLE objects
    DATA: H_EXCEL TYPE OLE2_OBJECT,        " Excel object
          H_MAPL TYPE OLE2_OBJECT,         " list of workbooks
          H_MAP TYPE OLE2_OBJECT,          " workbook
          H_ZL TYPE OLE2_OBJECT,           " cell
          H_F TYPE OLE2_OBJECT.            " font
    TABLES: SPFLI.
    DATA  H TYPE I.
    table of flights
    DATA: IT_SPFLI LIKE SPFLI OCCURS 10 WITH HEADER LINE.
    *&   Event START-OF-SELECTION
    START-OF-SELECTION.
    read flights
      SELECT * FROM SPFLI INTO TABLE IT_SPFLI UP TO 10 ROWS.
    display header
      ULINE (61).
      WRITE: /     SY-VLINE NO-GAP,
              (3)  'Flg'(001) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (4)  'Nr'(002) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Von'(003) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (20) 'Nach'(004) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP,
              (8)  'Zeit'(005) COLOR COL_HEADING NO-GAP, SY-VLINE NO-GAP.
      ULINE /(61).
    display flights
      LOOP AT IT_SPFLI.
      WRITE: / SY-VLINE NO-GAP,
               IT_SPFLI-CARRID COLOR COL_KEY NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CONNID COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYFROM COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-CITYTO COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP,
               IT_SPFLI-DEPTIME COLOR COL_NORMAL NO-GAP, SY-VLINE NO-GAP.
      ENDLOOP.
      ULINE /(61).
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-007
           EXCEPTIONS
                OTHERS     = 1.
    start Excel
      CREATE OBJECT H_EXCEL 'EXCEL.APPLICATION'.
    PERFORM ERR_HDL.
      SET PROPERTY OF H_EXCEL  'Visible' = 1.
    CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING #1 = 'c:\kis_excel.xls'
    PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-008
           EXCEPTIONS
                OTHERS     = 1.
    get list of workbooks, initially empty
      CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP.
      PERFORM ERR_HDL.
    tell user what is going on
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - start
    CALL METHOD OF H_EXCEL 'Workbooks' = H_MAPL.
      CALL METHOD OF H_EXCEL 'Worksheets' = H_MAPL." EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    add a new workbook
      CALL METHOD OF H_MAPL 'Add' = H_MAP  EXPORTING #1 = 2.
      PERFORM ERR_HDL.
    tell user what is going on
      SET PROPERTY OF H_MAP 'NAME' = 'COPY'.
      CALL FUNCTION 'SAPGUI_PROGRESS_INDICATOR'
         EXPORTING
              PERCENTAGE = 0
               TEXT       = TEXT-009
           EXCEPTIONS
                OTHERS     = 1.
    output column headings to active Excel sheet
      PERFORM FILL_CELL USING 1 1 1 'Flug'(001).
      PERFORM FILL_CELL USING 1 2 0 'Nr'(002).
      PERFORM FILL_CELL USING 1 3 1 'Von'(003).
      PERFORM FILL_CELL USING 1 4 1 'Nach'(004).
      PERFORM FILL_CELL USING 1 5 1 'Zeit'(005).
      LOOP AT IT_SPFLI.
    copy flights to active EXCEL sheet
        H = SY-TABIX + 1.
        PERFORM FILL_CELL USING H 1 0 IT_SPFLI-CARRID.
        PERFORM FILL_CELL USING H 2 0 IT_SPFLI-CONNID.
        PERFORM FILL_CELL USING H 3 0 IT_SPFLI-CITYFROM.
        PERFORM FILL_CELL USING H 4 0 IT_SPFLI-CITYTO.
        PERFORM FILL_CELL USING H 5 0 IT_SPFLI-DEPTIME.
      ENDLOOP.
    changes by Kishore  - end
    disconnect from Excel
         CALL METHOD OF H_EXCEL 'FILESAVEAS' EXPORTING  #1 = 'C:\SKV.XLS'.
      FREE OBJECT H_EXCEL.
      PERFORM ERR_HDL.
          FORM FILL_CELL                                                *
          sets cell at coordinates i,j to value val boldtype bold       *
    FORM FILL_CELL USING I J BOLD VAL.
      CALL METHOD OF H_EXCEL 'Cells' = H_ZL EXPORTING #1 = I #2 = J.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_ZL 'Value' = VAL .
      PERFORM ERR_HDL.
      GET PROPERTY OF H_ZL 'Font' = H_F.
      PERFORM ERR_HDL.
      SET PROPERTY OF H_F 'Bold' = BOLD .
      PERFORM ERR_HDL.
    ENDFORM.
    *&      Form  ERR_HDL
          outputs OLE error if any                                       *
    -->  p1        text
    <--  p2        text
    FORM ERR_HDL.
    IF SY-SUBRC <> 0.
      WRITE: / 'Fehler bei OLE-Automation:'(010), SY-SUBRC.
      STOP.
    ENDIF.
    ENDFORM.                    " ERR_HDL
    Please note that this example maybe slow at filling the excel table
    (perhaps four fields per second on a 900 MHz machine - almost 30 seconds
    for a short example).
    To get the data on properties and methods - there is a bit of smoke and mirrors
    going on here; they are EXCEL properties and methods, not sap ones - so you need
    to look at excel help to determine how a particular function is structured. then
    build the block in sap, as shown in the example.
    If you only want to transfer the data to Excel like when you transfer the data from
    ALV to Excel simply use the Function Modules:
    XXL_SIMPLE_API
    If you want more modifications when you transfer it to Excel use:
    XXL_FULL_API
    Hope this helps.
    Reward if helpful.
    Regards,
    Sipra

  • Alv date format error in output report

    Hello All,
    I'm new to ABAP
    I have requirement in alv report shows wrong characters in date field.
    Input : - 27.04.2015
    Output: - 20.4..01.0
    i want to shows output as same as i am fetching from database table.
    plz give details to achieve this requirement. i have tried CONVERT_DATE_TO_INTERNAL  fm but dont know how to use

    hi yogesh,
    Declare ur date filed of Sy-datum type,
    or u cane also give the refrence of ANY table and there DATE type field while building Field Catalog,
    for Example,
    wa_fieldcat-ref_tabname = 'MARA',
    wa_filedcat-ref_fieldname = 'ERSDA'
    regards,

  • Superscript becomes # in CONVERT_OTF output PDF

    Hello,
    As the subject says, units of m2 (2 in superscript) becomes m# when converting OTF to PDF.
    Does anyone have an idea how to fix this, I looked into note 1012515, but it's already implemented.
    Thanks!

    Hello, Märten,
    you might need to look at the note 1561554. As I understand, this note corrects superscripts and subscripts symbols also. Maybe I'm wrong.
    Therefore, you want the system to also use these Adobe fonts to output the special characters during the PDF conversion for Unicode/cascading fonts (see Note 999712)

  • Help on ALV with multiple header/item output

    Dear all:
    Below is the actual working code on a multiple header/item display. The alv is supposed to output the details differently in each list. But somehow it only display the last i_tab I gave in all the list(they all look the same). Please help me out here how I can change my code to work properly. Thanks...
    *& Report  ZTEST2
    REPORT  ZTEST2.
    type-pools: slis.
    data : NUM1 type I,
           NUM type I,
           begin of str,
           client like mara-mandt,
           mat like mara-matnr,
           end of str,
           tab like standard table of str.
    data :wa2 type slis_alv_event ,
          tab2 like standard table of wa2,
          wa1 type   slis_layout_alv,
          wa type line of slis_t_fieldcat_alv,
           tab1 like standard table of wa.
           wa-reptext_ddic = 'Client Num'.
           wa-fieldname = 'CLIENT'.
           wa-tabname = 'TAB'.
           wa-ref_fieldname = 'MANDT'.
           wa-ref_tabname = 'MARA'.
           wa-seltext_l = 'CLIENT'.
           append wa to tab1.
           wa-reptext_ddic = 'Mat Number'.
           wa-fieldname = 'MAT'.
           wa-tabname = 'TAB'.
           wa-ref_fieldname = 'MATNR'.
           wa-ref_tabname = 'MARA'.
           wa-seltext_l = 'MATERIAL'.
           append wa to tab1.
          wa1-no_colhead = 'X'.
           wa2-NAME = SLIS_EV_TOP_OF_PAGE.
           wa2-FORM = 'WRITE_TOP_PAGE'.
           APPEND wa2 TO tab2.
    NUM = 0.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
      EXPORTING
        I_CALLBACK_PROGRAM             = sy-cprog.
    do 2 times.
    NUM1 = NUM1 + 10.
    refresh: tab.
    select mandt matnr up to NUM1 rows from mara into table tab.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
      EXPORTING
        IS_LAYOUT                        = wa1
        IT_FIELDCAT                      = tab1
        I_TABNAME                        = 'TAB'
        IT_EVENTS                        = tab2
      TABLES
        T_OUTTAB                         = tab.
    enddo.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    FORM WRITE_TOP_PAGE.
      NUM = NUM + 1.
      WRITE: / ,
             / 'TABLE NUMBER :', NUM.
    ENDFORM.

    Hi Jim,
    yes for some reason ALV expects you to be using different tables. It seems that it does not save the contents of the tables at each call of 'append' rather it waits until 'display' to deal with the table contents at that time, which in your case is the 20 items.
    What you can do is use dynamic tables. check this out:
    REPORT  ZNRW_ALV_BLOCK                          .
    type-pools: slis.
    data : NUM1 type I,
    NUM type I.
    types:
    begin of str,
    client like mara-mandt,
    mat like mara-matnr,
    end of str.
    data
    tab type standard table of str.
    data :wa2 type slis_alv_event ,
    tab2 like standard table of wa2,
    wa1 type slis_layout_alv,
    wa type line of slis_t_fieldcat_alv,
    tab1 like standard table of wa.
    wa-reptext_ddic = 'Client Num'.
    wa-fieldname = 'CLIENT'.
    wa-tabname = 'TAB'.
    wa-ref_fieldname = 'MANDT'.
    wa-ref_tabname = 'MARA'.
    wa-seltext_l = 'CLIENT'.
    append wa to tab1.
    wa-reptext_ddic = 'Mat Number'.
    wa-fieldname = 'MAT'.
    wa-tabname = 'TAB'.
    wa-ref_fieldname = 'MATNR'.
    wa-ref_tabname = 'MARA'.
    wa-seltext_l = 'MATERIAL'.
    append wa to tab1.
    wa1-no_colhead = 'X'.
    wa2-NAME = SLIS_EV_TOP_OF_PAGE.
    wa2-FORM = 'WRITE_TOP_PAGE'.
    APPEND wa2 TO tab2.
    NUM = 0.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_INIT'
    EXPORTING
    I_CALLBACK_PROGRAM = sy-cprog.
    DATA tabDREF TYPE REF TO DATA.
    FIELD-SYMBOLS <tab> TYPE table.
    do 2 times.
    CREATE DATA tabdref TYPE table of str.
    ASSIGN tabDREF->* TO <tab>.
    NUM1 = NUM1 + 10.
    refresh: tab.
    select mandt matnr up to NUM1 rows from mara into table <tab>.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_APPEND'
    EXPORTING
    IS_LAYOUT = wa1
    IT_FIELDCAT = tab1
    I_TABNAME = 'TAB'
    IT_EVENTS = tab2
    TABLES
    T_OUTTAB = <tab>.
    enddo.
    CALL FUNCTION 'REUSE_ALV_BLOCK_LIST_DISPLAY'.
    FORM WRITE_TOP_PAGE.
    NUM = NUM + 1.
    WRITE: / ,
    / 'TABLE NUMBER :', NUM.
    ENDFORM.

  • Position sensitive output prints differently on different printers

    Post Author: dev elopment
    CA Forum: .NET
    .NET 2003
    I am trying to print some text on an Avery 5260  (3 labels wide by 10 labels tall sheet).  I have positioned 3 text fields in the report Details section (for a row of labels) so that they print perfectly on my HP LaserJet 1100 and then set the height of the Details section so that all 10 labels high print correctly as well.  However when the same report is generated and printed on another printer (tried 4 different ones so far) the output no longer stays in the proper position.  Some printers only print 9 rows per page and the 10th row ends up on the next page.  Other printers start printing over the label edges after the 1st 3 rows of labels.
    Is there a way to make the position of the output stay the same based on the design of the report for all printers?

    Post Author: quafto
    CA Forum: .NET
    This is expected behavior with Crystal Reports because the position of all objects is determined from the printer drivers. Your best bet is to go into the printer options and select the "No Printer" checkbox. This will for the print engine to use a generic print driver and it should produce consistent results.

  • ALV Grip show in Excel output by default.

    Hi all,
       I know that in ALV Grip output when we click the "Excel" layout button on my report  the layout will change from alv to excel layout.
       How about if i want to set the excel layout is my default layout when display the ALV Grip report. Any code i need to add in the ALV setting?
    THanks.

    Hi all ,
        i want to create the ALV Grip format like tcode F.01  grip alv report show the output in excel format in default?
        i did the alv grip report and only can show the excel format once i click the excel format button but i cannt make it as default.
        Any ideas ?
    Thanks

  • How to initialize alv's cursor position?

    Hi experts,
        when alv report display, the default cursor line is 1. Now i want to set it to 0, pls tell me how to do it.
        Thanks.
        qiuguo

    Hi Prasad,
    Create custom button in ALV Toolbar and clear values with USER COMMAND Event.
    Check this sample code:
    methods HANDLE_TOOLBAR_ALV
         for event TOOLBAR of CL_GUI_ALV_GRID
         importing
           !E_OBJECT
           !SENDER .
       methods HANDLE_USER_COMMAND
         for event USER_COMMAND of CL_GUI_ALV_GRID
         importing
           !E_UCOMM
           !SENDER .
    method HANDLE_TOOLBAR_ALV.
    DATA:  lst_toolbar       TYPE stb_button.
       MOVE 'CLEAR_ALL_VALUES'      TO  lst_toolbar-function.
       MOVE ICON_INITIAL                    TO  lst_toolbar-icon.
       MOVE 'Clear Values'                    TO  lst_toolbar-quickinfo.
       MOVE 'Clear Values'                    TO  lst_toolbar-text.
       APPEND lst_toolbar                        TO  e_object->mt_toolbar.
       CLEAR lst_toolbar.
    endmethod.
    method HANDLE_USER_COMMAND.
    CASE e_ucomm.
         WHEN 'CLEAR_ALL_VALUES'.
    *Clear Procedures
              CALL METHOD refresh_table_display.
    ENDCASE.
    endmethod.
    Regards,
    Angelo.

  • How to use TDSCRNPOS in ITCPO structure for positioning the output screen?

    Hi Guys,
        I am having a requirement to display the form as pop up window.
        I think for that I have to use TDSCRNPOS from ITCPO structure.
        But I don't know how to use this option.
       <b>I need to display the print preview as pop up window</b>

    Hi,
    Please check out the below link.
    http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60b33a28-dca2-2d10-f3b2-d2096b460b1e&overridelayout=true
    Hope it suffice your requirement.
    Regards,
    AL

  • Unable to download data in ALV output with local file option

    Hi,
    I am displaying ouput in ALV grid display.Its showing output fine.When i am trying to down load the data into Excel file from ALV ouput .when i am downloaded the data by using Local file option,its down loading the data but its not downloading all the fields.
    Could you plz provide me solution.Thanks!

    Just Check that one of your parameters is defined in lower case letters.
    Earlier it used to give dump on execution but now if you download then it will give ABAP dump.
    I have seen this problem many times.
    Regards,
    Gaurav Sood

  • Problem while placing a button in the Output using ALV OOPs

    Hi,
    I am using ALV OOPs to display  report output.
    In the toolbar i have to palce an update button  and if i click on that update it should then call the selection screen 500 .
    So,please  help me to achieve this using ALV OOPs.
    THANKS & REGARDS,
    Kiranmai.

    Hi,
    you can use set pf-status statement with the OOPs' concept where in you will have to give this in the events table and pass it to the method to display the alv ...
    Regards,
    Siddarth

Maybe you are looking for

  • Mass change of output condition record :Billing (VV32)

    Hi All          I have a requirement wherein I need to chnage the printer destination to LOCL . I need to do this for atleast 10 output types and with key Sales Org/Customer. I tried doing the same through LSMW but its not happening as in the recordi

  • DMS interface program required

    Dear all, We are implenting DMS in our organisation for which , I have a requirement where in I need to make a program (interface) which can attach & send  the scanned image of objects (Ex: Invoice) to a specific location on DMS server. The data on D

  • OVD database adapter

    Hi, I have created two database adapters and one join view adapter to combine the data from the two adapters in OVD. Now i have written a custom authentication plugin in C for OAM 10g, wherein i am doing an ldap search on the join view adapter. When

  • I can't connect to itunes after trying to download ios 6

    I was trying to download the new ios 6 update into my iphone 4s, when there was an error, then I was ejected from itunes, my phone is frozen , I turned off  & nothing happens, what I can do now?

  • Sound deactivated when first boot-up

    Hi, Whenever i first boot-up mu iMac, the speaker or sound is deactivated. i need to restart it to make it appear and function normally. Pls. help! thanks