Dynamic alv  variant or my col_pos will set the cell ?

i set dynamically the order of the column’s in the program ,
but the user Build his own variant
and now the order that i built Not set correctly,
so:
what is stronger?
my order that i set in the program or the user variant ?

In alv there is DEFAULT variant!
What I have noticed...
- If the user does save his variant as a simple variant, it means it does not overide your sequence!
- if the suer does save the variant as the DEFAULT Setting variant, it should overwrite your's sequence...
check the screenshot of save variant here<a href="http://img232.imageshack.us/img232/1018/200603021041458lq.jpg">Screenshot</a>

Similar Messages

  • How u will set the external parameters like packet size and number

    How u will set the external parameters like packet size and number of parallel process.

    Dear Karthik,
    <b>ALE:</b>    
    Use Transaction UPSC02         -      ALE Distribution Unit: Packet Types.
    Performance Optimization for <b>ODS</b> Objects:
    To ensure a good ODS object loading performance, take the following into account:
           1.      Creating SIDs
    The creation of SIDs takes a long time and can be avoided in the following cases by:
           Not setting the indicator for BEx Reporting if you are using the ODS object only as a data store. If you do set this indicator, SIDs are created for all new characteristic values.
           If you use line items (for example, document number or time stamp) as characteristics in the ODS object, in the characteristic maintenance, indicate these as Attribute Only.
    SIDs are created in parallel if <b>parallel activation</b> is switched on (see last point). They are then created with the same number of parallel processes as created for the activation.
    However, if you specify a server group or a special server in customizing, these specifications are not only valid for the activation, but also for the SID creation. The creation of SIDs runs on the application server on which the batch job also runs.
           2.      DB partitioning in active data tables (technical A table)
    By partitioning by database level, you can delete data from the ODS object much more quickly. As a partitioning criterion, choose the characteristic by which you want to delete.  For more information on partitioning database tables, see the database documentation (DBMS-CD). Partitioning is supported by the following databases: Oracle, DB2/390, Informix.
           3.      Indexing
    Use selection criteria for queries for ODS objects. If the key fields are specified, the existing primary index is used. The more frequently accessed characteristic should appear on the left-hand side.
    If you did not specify the key fields completely in the selection criteria (visible in the SQL trace), you improve the run time of the query by creating additional indexes. You can create these secondary indexes in the ODS object maintenance.
           4.      Activation of data in an ODS object
    To improve system performance when activating data in the ODS object, you can make the following entries in Customizing under SAP Customizing Implementation Guide -> SAP NetWeaver -> Business Information Warehouse -> General BW Settings ->  ODS Object Settings:
           the maximum number of parallel processes when activating data in the ODS object as when moving SIDs
           the minimum number of data records for each data package when activating data in the ODS object, meaning you define the size of the data packages that are activated
           the maximum wait time in seconds when activating data in the ODS object. This is the time when the main process (batch process) waits for the dialog process that is split before it classifies it as having failed.
           the server group that needs to be used when activating the data in ODS objects in parallel You have to create the server groups beforehand using the following path: Tools -> Administration -> Network -> RFC Destination, RFC -> RFC Groups. If you do not specify anything here, then the activation runs on the server on which the batch process was started for activation. If a server from the server group is not active, then the activation is cancelled.
           5.      Loading unique data records
    If you only load unique data records (meaning data records with nonrecurring key combinations) into the ODS object, then the loading performance is improved when you set the indicator Unique Data Records in the ODS object maintenance.
    The records are then updated more quickly because the system no longer needs to check whether the record already exists. You do have to be sure that there duplicate records are definitely not being loaded, because this will lead to termination.
    Regards,
    Naveen.

  • Metoh refresh_table_display will set the focus to the first cell

    metoh refresh_table_display will set the focus to the first cell,how i can set it back to the position before
    refresh.
    thanks.
    Message was edited by: W C

    Hi,
    The method REFRESH_TABLE_DISPLAY has the parameters, IS_STABLE. Set both ROW / COL parameters of IS_STABLE to 'X'.
    Then when you refresh the display will not shake.
    Regards,
    Ravi
    Note : Please close the thread if answered

  • Iam using a table in numbers to plot daily graph lines. If I fill a cell with a text box  at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is tho

    I am using a table in Numbers to plot daily graph lines. Mood swings of how I am on the day, i"m a depressive.
    If I fill a cell with a step box at say zero it plots the graph. I can't actually set the cell value until the actual day but the graph plots it at zero when I don't want it to plot anything. Is there a work around. so thatbgraph only plots on the day?

    The answer is (sort of) in your subject, but edited out of the problem statement in the body of your message.
    When you use a stepper or a slider, the value in the cell is always numeric, and is always placed on the chart if that cell is included in the range graphed by the chart.
    But if you use a pop-up menu cell, you can specify numeric or text values in the list of choices for in the menu. Numeric values will be shown on the chart. Text values will not.
    For the example, the values list for the pop-up menu was:
    5
    3
    1
    Choose
    -1
    -3
    -5
    The first pop-up was set to display Choose, then the cell was filled down the rest of the column. Any text value (including a single space, if you want the cell to appear blank) may be used instead of Choose.
    For charts with negative Y values, the X axis will not automatically appear at Y=0. If your value set will include negative values, I would suggest setting the Y axis maximum and minimum to the maximum and minimum values on your menu list, rather than letting Numbers decide what range to include on the chart. Place a line shape across the chart at the zero level, and choose to NOT show the X axis.
    Regards,
    Barry

  • How to set the cell size in a JFrame

    Hello. Is there any way of setting the cell size in a JFrame. The reason why I want to set the cell size is that I want to be sure of their location that when I am placing components on the JFrame. So is there any way of setting the cell size beforehand. Also for the following code.
    JFrame frame = new JFrame("Window");
    frame.setSize(100,100);is the size 100 by 100 is he size of the cell?

    smithbrian wrote:
    When I am placing a component on the grid I want to be sure the component is exactly where I place it. In order to do that I would need to know what is the size of the gird and how to change the size of the gird in the JFrame.What grid?? You're assuming that we know much more about your program than we actually do. We actually know zip. Please read this help site which will help you to avoid similar errors in posting questions here. It has helped me in the past: [smart questions|http://www.catb.org/~esr/faqs/smart-questions.html]

  • Is it possible to set the cell height in a cell style?

    In the attached screenshot, the cell height is set to exactly 0.125. I put my cursor in the cell, then opened the cell styles panel and created a new cell style based on this cell. But when I apply the cell style to other cells, it does not apply the cell height. There were no overrides or other styles applied to the other cells. I also opened up the cell style definition from the cell styles panel, but don't see anywhere to set the cell height there either. Is there another way to do this that I am missing?

    It is possible - and it's fairly simple.
    To set the row height as part of the cell style, all you have to do is use the cell inset above and below. As long as you set the style as 'At least' then this works perfectly well for having predefined cell styles.
    I have been using this successfully for large financial documents for some time without any hitches. For example I use it to get separation between sections within the tables by having a style with extra space above, and similarly for totals rows at the bottom of the table. It can of course also apply different stroke styles at the same time. Having the style set as 'At Least' also allows for multiple line entries to still have the correct spacing above and below.
    So if you spend a bit of time calculating required heights and setting up your styles, then apply a keyboard shortcut to each style, you can then save a whole lot of time when formatting the document.
    I've just finished nearly 400 pages of financials using this method over the past couple of days!
    This solution may not suit your sitation, but if you have a lot of tables to get through it's got to be worth giving it a try.

  • POI Help in setting the cell type to Integer.

    Hi,
    Iam facing problem in POI generated excel sheets.
    In some cells Iam writing numeric values.....Its writing properly...
    But Iam unable to use operations like "SUM" on these kind of cells...
    My doubt is still the cell type is being set as String....The part of code I used to set it as numeric is
    <code>
    row.createCell((short)2).setCellTypeHSSFCell.CELL_TYPE_NUMERIC);
    </code>
    Is there any more thing to do so that.....I can enjoy the default features of Excel sheets on my own generated POI excel sheets....
    PLz help me....Any help will be greatly appreciated....
    Thanks in advance,,
    PLz ask me.....If the problem is not clear........

    Can u plz send the Jakarta url for POI help u
    mentioned above............http://www.google.com/search?hl=en&q=jakarta+poi
    What a time-waster.

  • How to set the cell size in grid layout where each cell is a panel

    Hi,
    I am using a grid layout where each cell is a panel. Here I want to
    set size of each panel to be equal irrespective of any. But it is not obliging the setSize().
    no of row in grid - 4
    no of columns - 4
    each cell is a panel. each panel has a label.
    panel.setSize(parent.getWidth(), parent.getWidth()/4); // not working. Size is adjusting to the length of the label.
    I want to force the size of the panel to our preferred size.
    Note: In swing we can use JPanel.setPreferredSize(). Unfortunately I cannot use Swing components. Requirement is awt only.
    Any help in this is highly appreciated.
    Thanks
    Kishore

    I observed it is same behavior with gridbag layout. Infact it is gridbag layout only with 4 cells, where first cell should be of constant width (it is base for other cell widths) and other cells are variable (some integer*base width of first cell). I want to set the size of first cell width to be constant.
    Though it is redundant I once again say that it works perfect with setPreferredSize of JComponent.
    But I should not use any swing component/api. This is sytem requirement.
    Any help is appreciated.
    Thanks
    Kishore

  • Setting the cell width in a Tabular Form (SQL Query (updateable report) )

    version 3.2.1
    I have a Tabular Form (SQL Query (updateable report) ) and I have a column that is a VARCHAR2(4000) that when displayed extends the cell to the full length (which of course makes sense).
    How can I set the width of this cell to something like 30 or 50 and wrap the contents?
    Thanks,
    Joe

    Scott,
    Thank you for replying.
    Your suggestion kinda worked. I say kinda because when the report is first displayed the cell is the full width and appears to ignore the width setting. There is a Select List on the report to restrict some of the data that is displayed. When a selection is made from this Select List, it appears that the cell width is then adjusted to what was set, but not for every selection from this Select List.
    I made the width entry in Tabular Form Element - Element Width
    Any idea why the width setting is ignored?
    Thanks,
    Joe

  • HELP!! set the cell color in jTable

    I need to set the color of a specific cell in jTable, but, I need to retain the old color in the jTable. It must not reset the whole table.
    would anyone help me in this problem... PLSSSSS its urgent

    A flexible variation on this is to specify formatting options in the JTable's client properties:
    // Use some sort of special "key" to indicate the cell and that you want to set the background color
    String key = "background:" + row + "," + column;
    table.putClientProperty(key, Color.green);You can then write a general table cell renderer that looks for these special formatting options and it doesn't disrupt your existing TableModel in any way:
    public class FormattingTableCellRenderer extends DefaultTableCellRenderer
      public Component getTableCellRendererComponent(JTable table, Object value, int row, int column, ...)
        Component component = super.getTableCellRendererComponent(table, value, row, column, ...);
        // See if the JTable specifies any properties to override the default format
        Color backgroundColor = (Color)table.getClientProperty("background:" + row + "," + column);
        if(backgroundColor != null)
          component.setBackground(backgroundColor);
        return component;
    }Any custom cell renderers you have then simply need to extend FormatTableCellRenderer instead of DefaultTableCellRenderer.
    It's very easy to add formatting options other than background, such as font, to the list of recognised attributes. You'll probably need to make some alterations to get it to recognise selection/focus but hopefully you get the idea.
    Hope this helps.

  • JTable :Setting the cell renderer overrides default behaviour

    I have a class renderer as shown below.
    I would like to apply this renderer to my cells in my JTable (see below):
    When I use "setDefaultRenderer" I get the behaviour I expect. Fx. that number columns a right aligned, dates show as dates etc. However when I use "setCellRenderer" it eems that the functionality of the superclass is overridden ??. Any explanation - anyone ?
          TableColumnModel  tcModel;
          JTable table
          tcModel = table.getColumnModel();
          Enumeration       enum;
          enum = tcModel.getColumns();
          /* This works */     
          table.setDefaultRenderer(Object.class,new renderer()); //The renderer works for all objects.
          while ( enum.hasMoreElements() )
             tColumn = (TableColumn)enum.nextElement();
             /* But this does not !!? */
             /* tColumn.setCellRenderer(new renderer());   */
    class renderer extends DefaultTableCellRenderer
       public Component getTableCellRendererComponent(
          JTable _table,
          Object _value,
          boolean _isSelected,
          boolean _hasFocus,
          int _row, int _col)
       Component cell = super.getTableCellRendererComponent(_table,_value,_isSelected,_hasFocus,_row,_col);
       return cell ;
    }

    I have a class renderer as shown below.
    I would like to apply this renderer to my cells in my JTable (see below):
    When I use "setDefaultRenderer" I get the behaviour I expect. Fx. that number columns a right aligned, dates show as dates etc. However when I use "setCellRenderer" it eems that the functionality of the superclass is overridden ??. Any explanation - anyone ?
          TableColumnModel  tcModel;
          JTable table
          tcModel = table.getColumnModel();
          Enumeration       enum;
          enum = tcModel.getColumns();
          /* This works */     
          table.setDefaultRenderer(Object.class,new renderer()); //The renderer works for all objects.
          while ( enum.hasMoreElements() )
             tColumn = (TableColumn)enum.nextElement();
             /* But this does not !!? */
             /* tColumn.setCellRenderer(new renderer());   */
    class renderer extends DefaultTableCellRenderer
       public Component getTableCellRendererComponent(
          JTable _table,
          Object _value,
          boolean _isSelected,
          boolean _hasFocus,
          int _row, int _col)
       Component cell = super.getTableCellRendererComponent(_table,_value,_isSelected,_hasFocus,_row,_col);
       return cell ;
    }

  • Guide to set the cell background color and foreground color

    hi all,
    I am using a tool called POI for excel from java. IF any body know POI please tell me the various colors --------> equivalent Short number. I need the color and equavlent number for better usage.
    please respond as early as possible.

    Hi
    Use the class HSSFColor at org.apache.poi.hssf.util and the inner classes defined, for example (sample form jakarta.poi):
    style.setFillForegroundColor(HSSFColor.ORANGE.index);
    or for a cell
    cell.setFillForegroundColor(HSSFColor.ORANGE.index);
    If you need know what index for a color may be at source code you can see the implementation.
    Hope this helps

  • Colors in Dynamic ALV table display

    Hello All,
    I have dynamic ALV table display in which i created the columns dynamically and finally binded that created node and diplayed the table ..
    Now what i want to do is depending on some condition i need to change the colors in the table display..
    I tried to set the color in this way inside the loop .
                     if lv_phase  = '3'.
                   lr_column->set_cell_design( CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-badvalue_medium ).
                     else.
                    lr_column->set_cell_design( CL_WD_TABLE_COLUMN=>E_CELL_DESIGN-standard ).
                   endif.
    This piece of code either changes all the coloumns into one color only why it is not changing the color based upon the condition . I am unable to understand..
    Please help me in this...Do i need to some thing else..

    Solved by creating a new column called cell design ... and settign the set_cell_design_fieldname ...
    This solved my Problem ..

  • How to add Select event in dynamic ALV

    Hi,
    I have created dynamic ALV and now i want to checked the selected row value.
    If in the selected row contain 'A' value then i have to disable the Button given on the screen.
    If in the selected row contain B' value then i have to enable the Button given on the screen.
    How to add the event once I select the row.
    I have done like this . but it is not
    lw_api_2->do_dynamic_navigation(
              source_window_name          = 'ZWDCHHR_EX_TASK_DELE'
              source_vusage_name          = 'ZWDVHHR_EX_TASK_DELE_USAGE_1'
              source_plug_name            = 'TO_ALV'
              target_component_name       = 'SALV_WD_TABLE'
              target_component_usage      = 'ALV_USAGE1'
              target_view_name            = 'TABLE'
              target_plug_name            = 'DEFAULT'
              target_embedding_position   = 'ZWDVHHR_EX_TASK_DELE/VIEW_DELEG_MY_TASKS' ).
      register event handler
        lw_cmp_usage_2->add_event_handler(
           listener        =  lw_api_2
           handler_name    = 'ONSELECT_TAB1'
           controller_name = 'INTERFACECONTROLLER'
           event_name      = 'ON_SELECT' ).
    Thanks and regards
    Amita Gandhi

    Hi Amita,
    You can try fetch the number of the row which was leadselected through R_PARAM->INDEX. (This would be just a normal integer variable. You can try check this out in debugging mode. ) Now you can just read the data of this row from the context node by saying as GET_ATTRIBUTE up on the nodes reference with the index as R_PARAM->INDEX.
    Regards,
    Uday

  • Apply ALV variant before export file in background task

    Hi all,
    I'm working on an ALV report.
    As my report should deal with a great amount of data, it's sometimes running in background.
    Users want the result to be sent by mail (in .CSV format so that they can use it in excel).
    For now, the sending is OK but the file contains all fields of the internal table (no specific filter, no sort...).
    How can i apply ALV variant (i.e keeping some of the fields, filter the list an so on) to the internal table before i build the file ?
    Thanks

    Salut Jérôme,
    un vieux (très vieux) code que j'avais fait.
    le but était d'envoyer par email le résultat d'un ALV grid.
    il t'en manque une partie, mais le principal est dedans
    *   Procédure P_GEN_HTML.                                              *
    *   Génération d'un email en HTML.                                     *
    form p_gen_html.
    data : struct_zgre000_s2 type zgre000_s2 ,
            v_es_layout       type lvc_s_layo ,
            v_e_var_save(1) ,
            v_e_var_def(1) ,
            m_calculate_totals(1) value 'X' ,
            itab_mt_data      type lvc_t_data ,
            itab_mt_info      type lvc_t_info ,
            itab_mt_sort      type lvc_t_sort ,
            itab_mt_filter    type lvc_t_filt ,
            itab_mt_filter_i  type lvc_t_fidx ,
            itab_html         type swl_html_t ,
            m_cl_variant      type ref to cl_alv_variant ,
            mt_outtab         type ref to data ,
            object_hd_change  like sood1 occurs 0 with header line,
            objpara           like selc  occurs 0 with header line,
            receivers         like zbc_receivers occurs 0 with header line ,
            ms_total_options      type lvc_s_toto,
            mt_grouplevels_filter type lvc_t_grpl ,
            m_sumlevel            type i ,
            itab_lt_grouplevels type kkblo_t_grouplevels ,
            itab_lt_sort        type kkblo_t_sortinfo.
      field-symbols: <lt_ct00> type standard table,
                     <lt_ct01> type standard table,
                     <lt_ct02> type standard table,
                     <lt_ct03> type standard table,
                     <lt_ct04> type standard table,
                     <lt_ct05> type standard table,
                     <lt_ct06> type standard table,
                     <lt_ct07> type standard table,
                     <lt_ct08> type standard table,
                     <lt_ct09> type standard table.
    * Ref the field-symbols.
      data mt_ct00 type ref to data .
      data mt_ct01 type ref to data .
      data mt_ct02 type ref to data .
      data mt_ct03 type ref to data .
      data mt_ct04 type ref to data .
      data mt_ct05 type ref to data .
      data mt_ct06 type ref to data .
      data mt_ct07 type ref to data .
      data mt_ct08 type ref to data .
      data mt_ct09 type ref to data .
      v_gjahr1 = p_gjahr + 1.
      v_gjahr2 = p_gjahr + 2.
      v_gjahr3 = p_gjahr + 3.
    * Alimente la table ITAB_ZGRE000_S2.
      loop at itab_otp_grid.
        move : itab_otp_grid-astnr to struct_zgre000_s2-zdemandeur ,
               itab_otp_grid-astna to struct_zgre000_s2-zdemandeurt ,
               itab_otp_grid-pspn  to struct_zgre000_s2-zprojet ,
               itab_otp_grid-pspn2 to struct_zgre000_s2-zotp ,
               itab_otp_grid-post1 to struct_zgre000_s2-zdesotp ,
               itab_otp_grid-pspnr to struct_zgre000_s2-zotp2 ,
               itab_otp_grid-stat  to struct_zgre000_s2-zstatut ,
               itab_otp_grid-usr02 to struct_zgre000_s2-zoneutil ,
               itab_otp_grid-budgt to struct_zgre000_s2-zbudgettotal ,
               itab_otp_grid-engag to struct_zgre000_s2-zengagtotal ,
               itab_otp_grid-dispo to struct_zgre000_s2-zdispototal ,
               itab_otp_grid-depen to struct_zgre000_s2-zdepentotal ,
               itab_otp_grid-budgn to struct_zgre000_s2-zbudget ,
               itab_otp_grid-le    to struct_zgre000_s2-zlatest ,
               itab_otp_grid-depea to struct_zgre000_s2-zdepense ,
               itab_otp_grid-pourc to struct_zgre000_s2-zpourcen ,
               itab_otp_grid-budg1 to struct_zgre000_s2-zbudget1 ,
               itab_otp_grid-budg2 to struct_zgre000_s2-zbudget2 ,
               itab_otp_grid-budg3 to struct_zgre000_s2-zbudget3 ,
               itab_otp_grid-natur to struct_zgre000_s2-znature.
        append struct_zgre000_s2 to itab_zgre000_s2.
      endloop.
      refresh itab_fieldcatalog.
    * Alimentation de la table ITAB_FIELDCATALOG.
      call function 'LVC_FIELDCATALOG_MERGE'
           exporting
                i_structure_name   = 'ZGRE000_S2'
                i_bypassing_buffer = ' '
                i_buffer_active    = ' '
           changing
                ct_fieldcat      = itab_fieldcatalog.
    * Les modifications des colonnes.
      loop at itab_fieldcatalog into tmp_fieldcatalog.
        case tmp_fieldcatalog-fieldname.
          when 'ZDEMANDEUR'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Demandeur'    to tmp_fieldcatalog-scrtext_s ,
                   'Demandeur'    to tmp_fieldcatalog-scrtext_m ,
                   'Demandeur'    to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '10'           to tmp_fieldcatalog-outputlen .
          when 'ZDEMANDEURT'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Demandeur'    to tmp_fieldcatalog-scrtext_s ,
                   'Demandeur'    to tmp_fieldcatalog-scrtext_m ,
                   'Demandeur'    to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '30'           to tmp_fieldcatalog-outputlen .
          when 'ZPROJET'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Projet'       to tmp_fieldcatalog-scrtext_s ,
                   'Projet'       to tmp_fieldcatalog-scrtext_m ,
                   'Projet'       to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '10'           to tmp_fieldcatalog-outputlen .
          when 'ZOTP'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'OTP'          to tmp_fieldcatalog-scrtext_s ,
                   'OTP'          to tmp_fieldcatalog-scrtext_m ,
                   'OTP'          to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZDESOTP'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Libellé OTP'  to tmp_fieldcatalog-scrtext_s ,
                   'Libellé OTP'  to tmp_fieldcatalog-scrtext_m ,
                   'Libellé OTP'  to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZOTP2'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'OTP niveau 2' to tmp_fieldcatalog-scrtext_s ,
                   'OTP niveau 2' to tmp_fieldcatalog-scrtext_m ,
                   'OTP niveau 2' to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZSTATUT'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Statut'       to tmp_fieldcatalog-scrtext_s ,
                   'Statut'       to tmp_fieldcatalog-scrtext_m ,
                   'Statut'       to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '10'           to tmp_fieldcatalog-outputlen .
          when 'ZONEUTIL'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Zone util'    to tmp_fieldcatalog-scrtext_s ,
                   'Zone util'    to tmp_fieldcatalog-scrtext_m ,
                   'Zone util'    to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '10'           to tmp_fieldcatalog-outputlen .
          when 'ZNATURE'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   'Nature'       to tmp_fieldcatalog-scrtext_s ,
                   'Nature'       to tmp_fieldcatalog-scrtext_m ,
                   'Nature'       to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '10'           to tmp_fieldcatalog-outputlen .
          when 'ZBUDGETTOTAL'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   'Bud. total'   to tmp_fieldcatalog-scrtext_s ,
                   'Budget total' to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZENGAGTOTAL'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   'Eng. total'   to tmp_fieldcatalog-scrtext_s ,
                   'Engagement total' to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZDISPOTOTAL'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   'Disp total'  to tmp_fieldcatalog-scrtext_s ,
                   'Disponible total' to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZDEPENTOTAL'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   'Dep. total'   to tmp_fieldcatalog-scrtext_s ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Depenses totales'
                        p_perio
                        p_gjahr
                        into tmp_fieldcatalog-scrtext_l.
          when 'ZBUDGET'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                    v_zero        to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Bud '
                        p_gjahr
                        into tmp_fieldcatalog-scrtext_s
                        separated by ' '.
            concatenate 'Budget Exercice:'
                        p_gjahr
                        'Version:'
                        p_vers1
                        into tmp_fieldcatalog-scrtext_l
                        separated by ' '.
          when 'ZLATEST'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   'Latest'       to tmp_fieldcatalog-scrtext_s ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Latest Exercice:'
                        p_gjahr
                        'Version:'
                        p_vers2
                        into tmp_fieldcatalog-scrtext_l
                        separated by ' '.
          when 'ZDEPENSE'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Dep'
                        p_gjahr
                        into tmp_fieldcatalog-scrtext_s
                        separated by ' '.
            concatenate 'Depense Exercice:'
                        p_gjahr
                        into tmp_fieldcatalog-scrtext_l
                        separated by ' '.
          when 'ZPOURCEN'.
            move : ' '            to tmp_fieldcatalog-do_sum ,
                   '% Dep/LE'     to tmp_fieldcatalog-scrtext_s ,
                   'Pourcentage dépense VS LE'
                                  to tmp_fieldcatalog-scrtext_l ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
          when 'ZBUDGET1'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Bud'
                        v_gjahr1
                        into tmp_fieldcatalog-scrtext_s
                        separated by ' '.
            concatenate 'Budget Exercice:'
                        v_gjahr1
                        into tmp_fieldcatalog-scrtext_l
                        separated by ' '.
          when 'ZBUDGET2'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Bud'
                        v_gjahr2
                        into tmp_fieldcatalog-scrtext_s
                        separated by ' '.
            concatenate 'Budget Exercice:'
                        v_gjahr2
                        into tmp_fieldcatalog-scrtext_l
                        separated by ' '.
          when 'ZBUDGET3'.
            move : 'X'            to tmp_fieldcatalog-do_sum ,
                   v_zero         to tmp_fieldcatalog-no_zero ,
                   '20'           to tmp_fieldcatalog-outputlen .
            concatenate 'Bud'
                        v_gjahr3
                        into tmp_fieldcatalog-scrtext_s
                        separated by ' '.
            concatenate 'Budget Exercice:'
                        v_gjahr3
                        into tmp_fieldcatalog-scrtext_l
                        separated by ' '.
        endcase.
        move 'X' to tmp_fieldcatalog-tech_comp.
        modify itab_fieldcatalog from tmp_fieldcatalog.
      endloop.
      call function 'WS_DOWNLOAD'
        EXPORTING
          FILENAME                      =
    '\RNEMS0025BU_girodf1$Desktopit_field.txt'
          FILETYPE                      = 'DAT'
        tables
          data_tab                      = itab_fieldcatalog.
      data : begin of it_tmp_data occurs 1000 ,
               buff(136) ,
               zbudgetttotal(20) ,
               zengagtotal(20) ,
               zdispottotal(20) ,
               zdepentotal(20) ,
               zbudget(20) ,
               zlatest(20) ,
               zdepense(20) ,
               zpourcen(20) ,
               zbudget1(20) ,
               zbudget2(20) ,
               zbudget3(20) ,
               waers(5) ,
             end   of it_tmp_data.
    break girodf1.
      loop at itab_zgre000_s2 into struct_zgre000_s2.
        move struct_zgre000_s2+0(136) to it_tmp_data-buff .
        move-corresponding struct_zgre000_s2 to it_tmp_data.
        append it_tmp_data.
      endloop.
      call function 'DOWNLOAD'
        EXPORTING
    *     BIN_FILESIZE                  = ' '
    *     CODEPAGE                      = ' '
          FILENAME                      =
    '\RNEMS0025BU_girodf1$Desktopit_data.txt'
          FILETYPE                      = 'DAT'
    *     ITEM                          = ' '
    *     MODE                          = ' '
    *     WK1_N_FORMAT                  = ' '
    *     WK1_N_SIZE                    = ' '
    *     WK1_T_FORMAT                  = ' '
    *     WK1_T_SIZE                    = ' '
    *     FILEMASK_MASK                 = ' '
    *     FILEMASK_TEXT                 = ' '
    *     FILETYPE_NO_CHANGE            = ' '
    *     FILEMASK_ALL                  = ' '
    *     FILETYPE_NO_SHOW              = ' '
          SILENT                        = 'S'
    *     COL_SELECT                    = ' '
    *     COL_SELECTMASK                = ' '
    *     NO_AUTH_CHECK                 = ' '
    *   IMPORTING
    *     ACT_FILENAME                  =
    *     ACT_FILETYPE                  =
    *     FILESIZE                      =
    *     CANCEL                        =
        tables
          data_tab                      = it_tmp_data.
    *  call function 'DOWNLOAD'
    *    EXPORTING
    *      FILENAME                      =
    *'\RNEMS0025BU_girodf1$Desktopit_data.txt'
    *      FILETYPE                      = 'ASC'
    *    tables
    *      data_tab                      = itab_zgre000_s2.
    * Complete.
      call function 'LVC_FIELDCATALOG_MERGE'
           exporting
                i_structure_name   = 'ZGRE000_S2'
                i_bypassing_buffer = ' '
                i_buffer_active    = ' '
           changing
                ct_fieldcat      = itab_fieldcatalog.
      call function 'LVC_FIELDCAT_COMPLETE'
        EXPORTING
    *     I_COMPLETE             =
          IS_LAYOUT              = v_es_layout
          I_REFRESH_BUFFER       = ''
          I_BUFFER_ACTIVE        = ''
    *   IMPORTING
    *     E_EDIT                 =
        changing
          ct_fieldcat            = itab_fieldcatalog.
      call function 'LVC_SORT_COMPLETE'
        exporting
          it_fieldcat       = itab_fieldcatalog
        changing
          ct_sort           = itab_mt_sort.
      call function 'ALV_DATA_EXPORT'
        exporting
          i_report                = ''
          IT_FIELDCAT             = itab_fieldcatalog
        tables
          it_data                 = itab_zgre000_s2.
    * Recherche de la variante d'affichage.
      move : sy-repid to struct_variant-report ,
             sy-uname to struct_variant-username ,
             '2'      to struct_variant-handle.
      if p_vgrid ne space.
        move p_vgrid to struct_variant-variant.
      endif.
    * Ne pas demander d'explication, merci :)
      get reference of itab_zgre000_s2 into mt_outtab.
    * Créé l'objet variant.
      create object m_cl_variant
             exporting
               it_outtab             = mt_outtab
               it_fieldcatalog       = itab_fieldcatalog
               it_sort               = itab_mt_sort
               it_filter             = itab_mt_filter
               is_variant            = struct_variant
               is_layout             = v_es_layout
               i_variant_save        = v_e_var_save
               i_variant_default     = v_e_var_def.
      move : 'A' to v_e_var_save ,
             'X' to v_e_var_def .
      call method m_cl_variant->set_values
           exporting it_outtab             = mt_outtab
                     it_fieldcatalog       = itab_fieldcatalog
                     it_sort               = itab_mt_sort
                     it_filter             = itab_mt_filter
                     is_variant            = struct_variant
                     is_layout             = v_es_layout
                     i_variant_save        = v_e_var_save
                     i_variant_default     = v_e_var_def.
       loop at itab_fieldcatalog into tmp_fieldcatalog
            where tabname ne space.
         exit.
       endloop.
    * Recherche de la variante.
      call method m_cl_variant->load_variant
           exporting i_tabname          = tmp_fieldcatalog-tabname
                     i_bypassing_buffer = 'X'
                    i_dialog           = space.
      create data  mt_ct00 like itab_zgre000_s2.
      create data  mt_ct01 like itab_zgre000_s2.
      create data  mt_ct02 like itab_zgre000_s2.
      create data  mt_ct03 like itab_zgre000_s2.
      create data  mt_ct04 like itab_zgre000_s2.
      create data  mt_ct05 like itab_zgre000_s2.
      create data  mt_ct06 like itab_zgre000_s2.
      create data  mt_ct07 like itab_zgre000_s2.
      create data  mt_ct08 like itab_zgre000_s2.
      create data  mt_ct09 like itab_zgre000_s2.
      assign mt_ct00->* to <lt_ct00>.
      assign mt_ct01->* to <lt_ct01>.
      assign mt_ct02->* to <lt_ct02>.
      assign mt_ct03->* to <lt_ct03>.
      assign mt_ct04->* to <lt_ct04>.
      assign mt_ct05->* to <lt_ct05>.
      assign mt_ct06->* to <lt_ct06>.
      assign mt_ct07->* to <lt_ct07>.
      assign mt_ct08->* to <lt_ct08>.
      assign mt_ct09->* to <lt_ct09>.
    * Recherche des valeurs à partir de la variante sélectionnée.
      call method m_cl_variant->get_values
           importing es_variant     = struct_variant
             et_fieldcatalog        = itab_fieldcatalog
             et_sort                = itab_mt_sort
             et_filter              = itab_mt_filter
             es_layout              = v_es_layout
             et_grouplevels_filter  = mt_grouplevels_filter
             e_variant_save         = v_e_var_save
             e_variant_default      = v_e_var_def.
      call function 'LVC_SORT_APPLY'
        exporting
          it_sort         = itab_mt_sort
    *     I_AS_TEXT       = 'X'
    *     I_STABLE        = 'X'
        tables
          ct_data         = itab_zgre000_s2.
      call function 'LVC_TRANSFER_TO_KKBLO'
        exporting
          it_sort_lvc                     = itab_mt_sort
          it_grouplevels_lvc              = mt_grouplevels_filter
        importing
          et_sort_kkblo                   = itab_lt_sort
          et_grouplevels_kkblo            = itab_lt_grouplevels
        exceptions
          it_data_missing                 = 1
          it_fieldcat_lvc_missing         = 2
          others                          = 3.
      call function 'ALV_GROUPLEVELS_GET'
        exporting
          i_subtotals_only          = 'X'
          it_sort                   = itab_lt_sort
          i_subtract_counter        = 'X'
        importing
          et_groups                 = itab_lt_grouplevels
        tables
          t_outtab                  = itab_zgre000_s2.
      call function 'LVC_TRANSFER_FROM_KKBLO'
        exporting
          it_grouplevels_kkblo            = itab_lt_grouplevels
        importing
          et_grouplevels_lvc              = mt_grouplevels_filter
        exceptions
          it_data_missing                 = 1
          others                          = 2.
    * Recupération des totaux.
      call function 'LVC_TOTALS_GET'
        exporting
          it_sort                  = itab_mt_sort
          is_layout                = v_es_layout
          it_filter_index          = itab_mt_filter_i
        tables
          it_data                  = itab_zgre000_s2
          et_collect00             = <lt_ct00>
          et_collect01             = <lt_ct01>
          et_collect02             = <lt_ct02>
          et_collect03             = <lt_ct03>
          et_collect04             = <lt_ct04>
          et_collect05             = <lt_ct05>
          et_collect06             = <lt_ct06>
          et_collect07             = <lt_ct07>
          et_collect08             = <lt_ct08>
          et_collect09             = <lt_ct09>
        changing
          cs_total_options         = ms_total_options
    *      ct_fieldcat              = mt_fieldcatalog
          ct_fieldcat              = itab_fieldcatalog
          ct_grouplevels           = mt_grouplevels_filter
          c_calculate_totals       = m_calculate_totals
          c_sumlevel               = m_sumlevel .
    * Converti dans un language comprehensible par SAP.
      call function 'LVC_TABLE_FOR_DISPLAY'
        exporting
          it_fieldcat                    = itab_fieldcatalog
          it_sort                        = itab_mt_sort
          it_filter                      = itab_mt_filter
          is_total_options               = ms_total_options
          is_layout                      = v_es_layout
        importing
          et_lvc_data                    = itab_mt_data
          et_lvc_info                    = itab_mt_info
        tables
          it_data                        = itab_zgre000_s2
          it_collect00                   = <lt_ct00>
          it_collect01                   = <lt_ct01>
          it_collect02                   = <lt_ct02>
          it_collect03                   = <lt_ct03>
          it_collect04                   = <lt_ct04>
          it_collect05                   = <lt_ct05>
          it_collect06                   = <lt_ct06>
          it_collect07                   = <lt_ct07>
          it_collect08                   = <lt_ct08>
          it_collect09                   = <lt_ct09>
        changing
          ct_grouplevels                 = mt_grouplevels_filter
        exceptions
          fieldcat_not_complete          = 1
          others                         = 2.
      if sy-subrc ne space.
        write : /1 'Probleme de convertion.'.
        stop.
      endif.
    * Convertie en HTML.
      call function 'LVC_ALV_CONVERT_TO_HTML'
        exporting
          it_data                       = itab_mt_data
          it_info                       = itab_mt_info
          i_file_dialog                 = ' '
        importing
          et_html                       = itab_html.
    * Envois par email.
      move : 'HTM'  to object_hd_change-file_ext ,
             'Liste des commandes passées sur Immobilisation via PM'
                    to object_hd_change-objdes.
      append object_hd_change.
      call function 'WS_DOWNLOAD'
        EXPORTING
          FILENAME                      =
    '\RNEMS0025BU_girodf1$Desktopmt_data.txt'
          FILETYPE                      = 'DAT'
        tables
          data_tab                      = itab_mt_data.
      call function 'WS_DOWNLOAD'
        EXPORTING
          FILENAME                      =
    '\RNEMS0025BU_girodf1$Desktopmt_info.txt'
          FILETYPE                      = 'DAT'
        tables
          data_tab                      = itab_mt_info.
      data : it_var type table of disvariant with header line.
      move-corresponding struct_variant to it_var.
      append it_var.
      call function 'WS_DOWNLOAD'
        EXPORTING
          FILENAME                      =
    '\RNEMS0025BU_girodf1$Desktopit_var.txt'
          FILETYPE                      = 'DAT'
        tables
          data_tab                      = it_var.
    *stop.
    * Liste des personnes à qui on envoye le email.
      select bname
             into receivers-uname
             from usr02
             where bname in s_uname.
        append receivers.
      endselect.
    * Send mail.
      call function 'Z_BC_ENVOI_EMAIL'
           exporting
               object_hd_change           = object_hd_change
               object_type                = 'RAW'
               owner                      = sy-uname
           tables
               objcont                    = itab_html
               receivers                  = receivers
           exceptions
               others                     = 01.
    endform.                     " P_GEN_HTML.

Maybe you are looking for

  • Business partner creation - Not in sync with customer numbers -

    Hi All I am trying to do the BP conversion in collections management. The customer number range for account group ZXXX  is (80000 to 89999) and the external number range flag is not selected. I have created created a number range Y2 through BUCF, wit

  • Sender SOAP Axis adapter

    Hello Experts, my scenario is to pick the data from web service and pass it to ECC side. as i need to pick XML file from web service i used SOAP Axis adapter. configured as given in michal's blog. the channel in running no errors in RWB, still its no

  • Macbook Pro not receiving Mail

    My iPhone receives Mail, but all of a sudden my Macbook stopped receiving Mail. Everything appears to be operating fine connection-wise. Does anyone have any ideas?

  • APEX Version/Source control

    Hi, I would like to know how other people are managing this. We have developed our own way which works 99% of the time however there are some flaws. We require that more than one user be working on an application at a time and that these different pa

  • New Macbook Pro with Lion, how best to migrate?

    Hi All I'm currently running a Macbook with Snow Leopard, but tomorrow I'll be ordering a new Macbook Pro. What is the best way to migrate my old computer files over to the Macbook Pro given that it will be loaded with Lion? I will have the Macbook a