Max_linesize - ALV LAYOUT

What is the limit for the field max_linesize for the ALV layout?
I need to print 300 fields, but its doing a short dump for memory on the Quality ambient.. in the development Ambient, it is showing normally.
Someone knows what is this problem?

That depends on printer. If you execute your report in background this will give you only 256 char.
Well, if you want to print the 300 lines, you need to run the report in foreground and you have to choose the printer format X_65_512/2 or X_65_256/2. This will print in 2 pages.
Press properties on printer to choose the format.

Similar Messages

  • ALV layout variant missing in background job.

    hi guys,
    Having problem on getting the default ALV layout variant when run the job in backgorund. Please advise any correction needed in the following code.
    Thanks.
    *&  Include           Z_MM_KBR_AGSUBCONINV_MOD2                        *
    MODULE status_0100 OUTPUT.
      SET PF-STATUS '100'.
      SET TITLEBAR '100'.
    ENDMODULE.                 " STATUS_0100  OUTPUT
    *&      Module  display_data  OUTPUT
          text
    MODULE display_data OUTPUT.
    IF sy-batch IS INITIAL. "Foreground
      IF w_container IS INITIAL.
        IF cl_gui_alv_grid=>offline( ) IS INITIAL.
    *Creating the container
          CREATE OBJECT w_container
            EXPORTING
              container_name              = c_container
            EXCEPTIONS
              cntl_error                  = 1
              cntl_system_error           = 2
              create_error                = 3
              lifetime_error              = 4
              lifetime_dynpro_dynpro_link = 5
              OTHERS                      = 6.
          IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
          ENDIF.
        ENDIF.
    *Creating the ALV GRID
        CREATE OBJECT w_grid
          EXPORTING
            i_parent          = w_container
            i_appl_events     = c_check
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
         MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                    WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        else.
         exit.
        ENDIF.
      ELSE.
    *Creating the ALV GRID
        CREATE OBJECT w_grid
          EXPORTING
            i_parent          = go_dock_container
            i_appl_events     = c_check
          EXCEPTIONS
            error_cntl_create = 1
            error_cntl_init   = 2
            error_cntl_link   = 3
            error_dp_create   = 4
            OTHERS            = 5.
        IF sy-subrc <> 0.
          WRITE:/ 'Error in grid'.
        ENDIF.
         CREATE OBJECT w_grid
          EXPORTING  i_parent = go_dock_container.
      ENDIF.
    *getting the variant option
        wa_variant-report     = sy-repid.
        wa_variant-username   = sy-uname.
        wa_layout-grid_title  = sy-title.
        wa_layout-cwidth_opt  = c_check.
        wa_layout-zebra       = c_check.
        wa_layout-no_f4       = c_check.
        wa_layout-sel_mode    = 'D'.
    *Excluding the unwanted buttons
         PERFORM exclude_toolbar_buttons.
    build field catalog.
        CALL FUNCTION 'LVC_FIELDCATALOG_MERGE'
          EXPORTING
            i_buffer_active        = c_check
            i_structure_name       = c_fcat_str
            i_bypassing_buffer     = c_check
          CHANGING
            ct_fieldcat            = t_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.
        loop at t_fieldcat into w_fieldcat.
         if w_fieldcat-FIELDNAME = 'AGING1'.
          W_FIELDCAT-NO_ZERO = 'X'.
          MODIFY t_fieldcat FROM W_FIELDCAT INDEX SY-TABIX.
         ENDIF.
        endloop.
    Generate sort critria
        PERFORM generate_sort.
    Create object of class lcl_event_receiver.
        CREATE OBJECT w_event.
    Handler for events.
       SET HANDLER w_event->handle_top_of_page       FOR w_grid.
       SET HANDLER w_event->handle_print_top_of_page FOR w_grid.
       SET HANDLER w_event->handle_print_end_of_list FOR w_grid.
        SET HANDLER w_event->handle_hotspot_click     FOR w_grid.
    *Displaying the alv
       IF NOT sy-batch IS INITIAL.
         PERFORM create_snp.
       ENDIF.
    t_data = i_final.
        CALL METHOD w_grid->set_table_for_first_display
          EXPORTING
            i_save                        = 'A'
            is_layout                     = wa_layout
            is_variant                    = wa_variant
          CHANGING
            it_outtab                     = t_data
            it_fieldcatalog               = t_fieldcat
          EXCEPTIONS
            invalid_parameter_combination = 1
            program_error                 = 2
            too_many_lines                = 3
            OTHERS                        = 4.
        IF sy-subrc <> 0.
        ENDIF.
    ENDIF.
    ENDIF.
    ENDMODULE.                 " display_data  OUTPUT
    *&      Module  user_command_0100  INPUT
          text
    MODULE user_command_0100 INPUT.
      DATA: lt_rows TYPE lvc_t_row,
             w_rows TYPE lvc_s_row.
      CASE sy-ucomm.
        WHEN c_back.
          LEAVE TO SCREEN 0.
        WHEN c_exit.
          LEAVE TO SCREEN 0.
        WHEN c_cancel.
          LEAVE TO SCREEN 0.
       WHEN 'BILDET'.
         CALL METHOD w_grid->get_selected_rows
           IMPORTING
             et_index_rows = lt_rows.
         CALL METHOD cl_gui_cfw=>flush.
         IF sy-subrc EQ 0.
           READ TABLE lt_rows INTO w_rows INDEX 1.
           READ TABLE i_vbfa INTO w_vbfa INDEX w_rows-index.
           IF sy-subrc EQ 0.
             CLEAR i_zbw_br_nf4.
             LOOP AT i_zbw_br_nf3 INTO w_zbw_br_nf3 WHERE
                         refkey = w_vbfa-v_vbeln.
               APPEND w_zbw_br_nf3 TO i_zbw_br_nf4.
             ENDLOOP.
    call dialog screen and display new alv control
             CALL SCREEN 101 STARTING AT 10 5.
           ENDIF.
         ENDIF.
         WHEN 'NOTAF'.
         CALL METHOD w_grid->get_selected_rows
           IMPORTING
             et_index_rows = lt_rows.
         CALL METHOD cl_gui_cfw=>flush.
         IF sy-subrc EQ 0.
           READ TABLE lt_rows INTO w_rows INDEX 1.
           READ TABLE i_zbw_br_nf3 INTO w_zbw_br_nf3 INDEX w_rows-index.
           DATA docnum LIKE j_1bdydoc-docnum.
           docnum = w_zbw_br_nf3-docnum.
           SET PARAMETER ID 'JEF' FIELD docnum.
           CALL TRANSACTION 'J1B3N' AND SKIP FIRST SCREEN.
         ENDIF.
      ENDCASE.
      ENDMODULE.                 " user_command_0100  INPUT
    *&      Form  modify_col_name
          text
         -->P_<FCAT>  text
         -->P_TEXT_H01  text
    FORM modify_col_name  USING  pwa_fcat TYPE lvc_s_fcat
                                 value(pw_text) TYPE any.
      pwa_fcat-coltext   = pw_text.
      pwa_fcat-scrtext_l = pw_text.
      pwa_fcat-scrtext_m = pw_text.
      pwa_fcat-scrtext_s = pw_text.
    ENDFORM.                    " modify_col_name
          FORM display_hotspot                                          *
    FORM display_hotspot USING pw_row_id    TYPE lvc_s_row
                               pw_column_id TYPE lvc_s_col.
      FIELD-SYMBOLS <l_data> TYPE zbrforecast.
    READ TABLE t_br_nf_acum ASSIGNING <l_data> INDEX pw_row_id-index.
    CHECK sy-subrc = 0.
    IF pw_column_id = ' '.
    ENDIF.
    ENDFORM.                    "display_hotspot
    *&      Form  generate_sort
          Genereate Sort criteria
    FORM generate_sort.
    Local variables
    DATA: wal_sort TYPE lvc_s_sort,
           wl_pos   TYPE numc2.
    wl_pos = 01.
    sort ORDER
    wal_sort-spos      = wl_pos.
    wal_sort-fieldname = c_aufnr.
    wal_sort-up        = c_check.
    APPEND wal_sort TO t_sort.
    ENDFORM.                    "generate_sort
    *&      Form  f4_variant
          text
         <--PW_VARI  text
    FORM f4_variant CHANGING pw_vari TYPE disvariant-variant.
    wa_variant-report = sy-cprog.
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant    = wa_variant
          i_save        = c_u
        IMPORTING
          es_variant    = wa_variant
        EXCEPTIONS
          not_found     = 1
          program_error = 2
          OTHERS        = 3.
      IF sy-subrc IS INITIAL.
        pw_vari = wa_variant-variant.
      ELSE.
        MESSAGE s208(00) WITH text-t04.
      ENDIF.
    ENDFORM.                    " f4_variant
    *&      Form  validate_layout
    *This subroutine is to validate the layout
    No parameters are passed to this subroutine
    FORM validate_layout.
    IF NOT p_layout IS INITIAL.
      Check Layout
       wa_variant-report   = sy-repid.
       wa_variant-username = sy-uname.
       wa_variant-variant  = p_layout.
       CALL FUNCTION 'LVC_VARIANT_EXISTENCE_CHECK'
         EXPORTING
           i_save     = c_u
         CHANGING
           cs_variant = wa_variant
         EXCEPTIONS
           OTHERS     = 01.
       IF NOT sy-subrc IS INITIAL.
         SET CURSOR FIELD 'P_LAYOUT'.
         MESSAGE s001(00) WITH text-t06 p_layout.
         STOP.
       ENDIF.
    ELSE.
      clear wa_variant.
    ENDIF.
    ENDFORM.                    " validate_layout
    *&      Form  validate_data
          text
    FORM validate_data .
    PERFORM validate_layout.
    ENDFORM.                    " validate_data

    Hi,
    Before the call to method set_table_for_first_display, populate
    wa_variant-report = sy-repid.
    Best regards,
    Prashant

  • How to display long text in SAP Query ALV layout? It only show 129 char now

    I have a SAP Query which show a remark field(Max length more than 500 char), but it only show max length 129 char now. In fact, the lenght of remark field text is more than 300, and i had debug the source code, the field text value do is correct, its length do is 376.
    Do anybody can help me solve the issue, let the query ALV layout can show the long text field value?
    thanks very much in addvance.

    Hi,
    ALV can show only a restrict value length around 128 characters, many experts said that we can not extend. many suggestions is split text into some column.
    Regards,

  • Need to add Excel as option on SAP report view (currently only ALV layout)

    Some users currently have the option to view a report in either the standard ALV layout view or as Excel (example output - transaction VA05).  They also have the Excel icon on their toolbar.  Our issue is that not all users have this option in their GUI.  What do we need to do to add the Excel icon/view option to either their account or their GUI?

    Hello Ryan,
    The export option is coded into the application.
    Can you advise if all users are using the same application VA*?
    Do all users have the same Gui patch and version?

  • How to send pdf or excel attachment as saved alv layout in email

    Hi Guru,
    I am developing a report in which, i am sending report as excel attachment after clicking a button on top of alv grid, and pdf attachment after clicking another button on top of alv grid. I am sending mail by two ways they are:
    1) I am populating my internal table value in separate internal table and converting that to string and sending email as excel attachment.
    2) And am converting report as spooljob, and using abapspool 2 pdf function module i am converting spool to pdf, after that am send that pdf as mail attachment.
    Now my requirement is i need to send email attachment as layout which is displayed in the alv screen, even i hide a column and  change the  layout  it is going with all the columns. What should i do for this problem.
    Regards,
    Rithika

    Hi,
    Check if the below steps will solve the problem.
    * Get the run time ALV layout (field catalog) using the below method.
         data: r_grid TYPE REF TO cl_gui_alv_grid.
         CALL METHOD r_grid->get_frontend_fieldcatalog
              IMPORTING
                   et_fieldcatalog = t_fcat.
    * Adjust the download table according to t_fcat.

  • Webdynpro ABAP -- ALV  Layout setting

    Dear all,
    In my development with ALV in Webdynpro ABAP, I want to save the ALV layout via Setting. but it seems that the layout only can be saved as user-specific, is it any possible to use it as the gobal one?
    Please kindly provide me some hints. Thanks in Advance.
    Best Regards,

    Hi,
    Yes you can make it global in administrative level.
    1.In SE80 ,Double click on the name of  your Web Dynpro Application .
    2.Select Web Dynpro Application  Menu .
    3.Select Test->-> Execute in Administrative Mode from the menu.
    Your application opens in administrative mode .
    Go to the ALV settings make the changes and save it as some variant.
    This layout will be default and global to all the users.
    Regards
    John Paul

  • Allowing a User to choose the ALV layout format on selection-screen

    Hi all,
    I would like to know how i can add a parameter to my selection-screen which would allow the User to choose a saved ALV layout format before pressing F8 rather than after. As used in CO15 or MB51.
    Thanks  femi.

    yes , You can check the program BCALV_TEST_FULLSCREEN_LAYOUT  to check how F4 help is to be used .
    to check existene of variant is pretty simple.
    Pass the variant name in the ALV display FM .

  • ALV + layout varient on selection screen

    hiii
    with ALV list i want to know with how to allow to put the layout on the selection screen and when user press F4 he will be able to use the list of layout he has save on the ALV output
    Note for the layout button to appear i had to activate shown below:
    i_save                   = c_x
    please give me sample code where user can choose layout on selection screen and this layout will be used to display on ALV

    Hi,
    Please refer the code below for layout variants :
    DATA:   gt_rsparams  TYPE TABLE OF rsparams.
    * Data for ALV variant
    DATA  gv_repname          LIKE sy-repid.
    DATA  gv_x_variant        LIKE disvariant.
    DATA  gv_exit(1)          TYPE c.
    DATA  gv_save(1)          TYPE c.
    DATA  gv_variant          LIKE disvariant.
    PARAMETERS: sp_vari LIKE disvariant-variant.        "Dispaly Variant
    INITIALIZATION.
      gv_repname = sy-repid.
      REFRESH : gt_glacct,
                gr_rcomp,
                gt_output,
                gt_fieldcat,
                gt_sort.
    * Initialize ALV Layout variant
      PERFORM f_initialize_variant.
    FORM f_initialize_variant .
      CLEAR gv_variant.
      gv_save           = 'X'.
      gv_variant-report = gv_repname.
      gv_x_variant      = gv_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = gv_save
        CHANGING
          cs_variant = gv_x_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        sp_vari = gv_x_variant-variant.
      ENDIF.
    ENDFORM.                    " f_initialize_variant
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR sp_vari.
      PERFORM f_f4_for_variant.
    FORM f_f4_for_variant .
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
        EXPORTING
          is_variant = gv_variant
          i_save     = gv_save
        IMPORTING
          e_exit     = gv_exit
          es_variant = gv_x_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF gv_exit = space.
          sp_vari = gv_x_variant-variant.
        ENDIF.
      ENDIF.
    ENDFORM.                    " f_f4_for_variant
    AT SELECTION-SCREEN.
    *  Validating selection screen fields
      PERFORM f_at_selection_screen.
    FORM f_at_selection_screen .
    * ALV Layout variant
      IF NOT sp_vari IS INITIAL.
        MOVE gv_variant TO gv_x_variant.
        MOVE sp_vari    TO gv_x_variant-variant.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
          EXPORTING
            i_save     = gv_save
          CHANGING
            cs_variant = gv_x_variant.
        gv_variant = gv_x_variant.
      ELSE.
        PERFORM f_initialize_variant.
      ENDIF.
    FORM f_initialize_variant .
      CLEAR gv_variant.
      gv_save           = 'X'.
      gv_variant-report = gv_repname.
      gv_x_variant      = gv_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
        EXPORTING
          i_save     = gv_save
        CHANGING
          cs_variant = gv_x_variant
        EXCEPTIONS
          not_found  = 2.
      IF sy-subrc = 0.
        sp_vari = gv_x_variant-variant.
      ENDIF.
    ENDFORM.                    " f_initialize_variant
    Thanks,
    Sriram POnna.

  • Dynamic change the ALV layout

    Alle experts:
    In ALV layout report, how to dynamic change the layout int ABAP porgram?
    e.g. I have save 5 layout, I need to change them base the my selection in ABAP program? How to do this?
    Thanks in advance!

    Try to call fieldcatlog dymnamically. Refer tofollowing code. Reward if helpful.
    REPORT  zfir0001 MESSAGE-ID ztax.
                               Tables
    TABLES : glt0, t001, skat.
                          Internal Tables
    DATA: BEGIN OF itab OCCURS 0,
            racct               LIKE   glt0-racct,    "Account number
            txt20               LIKE   skat-txt20,    "G/L account short text
            co_1000          LIKE     glt0-hslvt,     "Balance carried forward for company code 1000
            co_1100          LIKE     glt0-hslvt,     "Balance carried forward for company code 1100
            co_1200          LIKE     glt0-hslvt,     "Balance carried forward for company code 1200
    DATA : BEGIN OF itab1 OCCURS 0,
             bukrs LIKE glt0-bukrs,
             waers LIKE t001-waers,
           END OF itab1.
    DATA : BEGIN OF it_itab1 OCCURS 0.
            INCLUDE STRUCTURE glt0.
    DATA : END OF it_itab1.
                          Data Declarations
    DATA : w_total   LIKE glt0-hslvt,
           w_count   LIKE glt0-bukrs,
           w_flg     TYPE c,
           lv_count  TYPE i.
          w_slash   TYPE c VALUE ' '.
                          Selection screen
    SELECTION-SCREEN BEGIN OF BLOCK b1 WITH FRAME TITLE tit1.
    SELECT-OPTIONS : s_bukrs FOR glt0-bukrs OBLIGATORY,
                     s_racct FOR glt0-racct OBLIGATORY,
                     s_ryear FOR glt0-ryear OBLIGATORY,
                     s_rldnr FOR glt0-rldnr OBLIGATORY.
    SELECTION-SCREEN END OF BLOCK b1.
    INITIALIZATION.
      tit1 = 'Please select:'(004).
      TYPE-POOLS: slis.                                 "ALV Declarations
      DATA: i_fieldcat TYPE slis_t_fieldcat_alv WITH HEADER LINE,
            gd_tab_group TYPE slis_t_sp_group_alv,
            gd_layout    TYPE slis_layout_alv,
            gd_repid     LIKE sy-repid.
    ********Geting the selected company code in table itab1****
    START-OF-SELECTION.
      IF NOT s_bukrs-high IS INITIAL.
        itab1-bukrs = s_bukrs-low.
        APPEND itab1.
        w_count = s_bukrs-low.
        DO.
          IF s_bukrs-high = w_count.
            EXIT.
          ELSE.
            w_count =  w_count + 1.
          ENDIF.
          SELECT SINGLE * FROM t001
              WHERE bukrs = w_count.
          IF sy-subrc = 0.
            itab1-bukrs = w_count.
            APPEND itab1.
            CLEAR itab1.
          ENDIF.
        ENDDO.
      ELSE.
        itab1-bukrs = s_bukrs-low.
        APPEND itab1.
      ENDIF.
      SELECT * FROM glt0 INTO CORRESPONDING FIELDS OF TABLE it_itab1
              WHERE rldnr   IN s_rldnr
              AND   bukrs   IN s_bukrs
              AND   ryear   IN s_ryear
              AND   racct   IN s_racct.
      SORT it_itab1 BY bukrs.
      LOOP AT it_itab1.
        AT END OF racct.
          w_flg = 'X'.
        ENDAT.
        SELECT SINGLE txt20 INTO (itab-txt20) FROM skat
                  WHERE spras = sy-langu
                  AND   saknr = it_itab1-racct.
        PACK it_itab1-racct TO it_itab1-racct.
        itab-racct = it_itab1-racct.
        w_total = it_itab1-hsl01 + it_itab1-hsl02 + it_itab1-hsl03 + it_itab1-hsl04 +
                  it_itab1-hsl05 + it_itab1-hsl06 + it_itab1-hsl07 + it_itab1-hsl08 +
                  it_itab1-hsl09 + it_itab1-hsl10 + it_itab1-hsl11 + it_itab1-hsl12 +
                  w_total        + it_itab1-hslvt.
        IF w_flg = 'X'.
          READ TABLE itab1 WITH KEY bukrs = it_itab1-bukrs.
          IF sy-subrc = 0.
            SELECT SINGLE * FROM t001
                WHERE bukrs = itab1-bukrs.
            IF t001-waers = 'JPY' OR
               t001-waers = 'HUF'.
              w_total =  w_total * 100.
            ENDIF.
            CASE it_itab1-bukrs.
              WHEN '1000'.
                itab-co_1000 = w_total.
              WHEN '1100'.
                itab-co_1100 = w_total.
              WHEN '1200'.
                itab-co_1200 = w_total.
            ENDCASE.
            COLLECT itab.
            CLEAR: itab, w_flg, w_total.
          ENDIF.
        ENDIF.
      ENDLOOP.
      SORT itab BY racct.
      IF NOT itab[] IS INITIAL.
        PERFORM field_cat1.
        lv_count = 1.
        LOOP AT itab1.
          PERFORM field_cat USING itab1-bukrs.
        ENDLOOP.
        PERFORM display_alv_report .
      ELSE.
        MESSAGE s000 WITH 'No records Found'(003).
      ENDIF.
    *&      Form  display_alv_report
          text
    FORM display_alv_report .
      gd_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program = gd_repid
          is_layout          = gd_layout
          it_fieldcat        = i_fieldcat[]
          i_save             = 'X'
        TABLES
          t_outtab           = itab
        EXCEPTIONS
          program_error      = 1
          OTHERS             = 2.
    ENDFORM.                    "display_alv_report
    *&      Form  field_cat1
          text
    FORM field_cat1 .
      i_fieldcat-col_pos     =  0.
      i_fieldcat-fieldname   = 'RACCT'.
      i_fieldcat-seltext_m    = 'Account'(001).
      i_fieldcat-fix_column = 'X'.
    i_fieldcat-emphasize   = 'X'.
      APPEND  i_fieldcat TO i_fieldcat.
      CLEAR  i_fieldcat.
      i_fieldcat-col_pos     =  1.
      i_fieldcat-fieldname   = 'TXT20'.
      i_fieldcat-seltext_m    = 'Description'(002).
      APPEND  i_fieldcat TO i_fieldcat.
      CLEAR  i_fieldcat.
    ENDFORM.                                                    "field_cat1
    *&      Form  field_cat
          text
         -->XV_BURKS   text
    FORM field_cat USING xv_burks TYPE char4.
      lv_count = lv_count + 1.
      i_fieldcat-col_pos     = lv_count.
      CONCATENATE 'CO_' xv_burks INTO i_fieldcat-fieldname.
      i_fieldcat-seltext_m    = xv_burks.
    i_fieldcat-just = 'C'.
    i_fieldcat-no_zero = 'X'.
    i_fieldcat-do_sum = 'X'.
      APPEND  i_fieldcat TO i_fieldcat.
      CLEAR  i_fieldcat.
    ENDFORM.   "field_cat
    Edited by: dhanashree wadkar on Apr 30, 2008 6:00 AM

  • ALV Layout on selection screen?

    Is it possible to offer the ALV Layouts on the selection screen? And how can i pass such a variant to the reuse-FM?

    Hi,
    Yes u can do it.Check this sample code
    Variant for ALV display
    SELECTION-SCREEN BEGIN OF BLOCK 0 WITH FRAME TITLE text-000.
    <b>PARAMETERS: p_varnt LIKE disvariant-variant.</b>
    DATA:      w_save(1) TYPE c,
                w_default(1) TYPE c,
                i_variant LIKE disvariant,
                i_variant1 LIKE disvariant.
    INITIALIZATION.
      i_variant-report = w_repid.
      i_variant1 = i_variant.
      CALL FUNCTION 'REUSE_ALV_VARIANT_DEFAULT_GET'
           EXPORTING
                i_save     = w_save
           CHANGING
                cs_variant = i_variant1
           EXCEPTIONS
                not_found  = 2.
      IF sy-subrc = 0.
        p_varnt = i_variant1-variant.
      ENDIF.
    Process on value request (list of possible variants)
    <b>AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_varnt.</b>
      CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
           EXPORTING
                is_variant          = i_variant
                i_save              = w_save
              it_default_fieldcat =
           IMPORTING
                e_exit              = w_exit
                es_variant          = i_variant1
           EXCEPTIONS
                not_found = 2.
      IF sy-subrc = 2.
        MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ELSE.
        IF w_exit = space.
          p_varnt = i_variant1-variant.
        ENDIF.
      ENDIF.
    <b>AT SELECTION-SCREEN.</b>
       IF NOT p_varnt IS INITIAL.
        MOVE i_variant TO i_variant1.
        MOVE p_varnt TO i_variant1-variant.
        CALL FUNCTION 'REUSE_ALV_VARIANT_EXISTENCE'
             EXPORTING
                  i_save     = w_save
             CHANGING
                  cs_variant = i_variant1.
        i_variant = i_variant1.
      ELSE.
        PERFORM variant_init.
      ENDIF.
    START_OF_SELECTION.
    Call ABAP/4 List Viewer
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_INTERFACE_CHECK           = ' '
               i_callback_program          =  w_repid
            I_CALLBACK_PF_STATUS_SET    = ' '
            I_CALLBACK_USER_COMMAND     = ' '
            I_CALLBACK_TOP_OF_PAGE      = ' '
            I_CALLBACK_HTML_TOP_OF_PAGE = ' '
            I_CALLBACK_HTML_END_OF_LIST = ' '
               i_structure_name            = 'SFLIGHT'
               i_background_id         = 'ALV_BACKGROUND'
            I_GRID_TITLE                =
            I_GRID_SETTINGS             =
               is_layout                   = i_layout
               it_fieldcat                 = i_fieldcat[]
            IT_EXCLUDING                =
               it_special_groups           = i_sp_group[]
               it_sort                     = i_sort[]
            IT_FILTER                   =
            IS_SEL_HIDE                 =
            I_DEFAULT                   = 'X'
               i_save                      = w_save
              <b> is_variant                  = i_variant</b>
               it_events                   = i_events[]
            IT_EVENT_EXIT               =
               is_print                    = i_print
            IS_REPREP_ID                =
            I_SCREEN_START_COLUMN       = 0
            I_SCREEN_START_LINE         = 0
            I_SCREEN_END_COLUMN         = 0
            I_SCREEN_END_LINE           = 0
       IMPORTING
            E_EXIT_CAUSED_BY_CALLER     =
            ES_EXIT_CAUSED_BY_USER      =
           TABLES
                t_outtab                    = i_sflight
          EXCEPTIONS
              program_error               = 1
               OTHERS                      = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    Hope u understood.
    Thanks&Regards,
    Ruthra.

  • ALV Layouts are missing in ECC6 after upgrade

    Dear Friends,
    we have an issue of missing ALV Layouts in ECC6 after upgrade of ECC6 from 4.7 version
    For example, we have a custom table ZRCILOT, data displayed using tocde se16, but when we check layout are missing in ECC6 but the same exist in 4.7 version.
    please check the attached screen-shots.
    kindly suggest, is there any possibility to retrive it.
    Thanks,
    Munvar Basha.

    Hello
    Variants should be preserved by the upgrade...
    You could export/import layout using the report from the here under note
    Regards
    551178 - FAQ ALV Layout
    During the upgrade of or when importing Support Packages?
    Answer: Layouts created by the customer are retained and you can continue to use them.
    643330 - ALV layout: Importing and exporting layouts

  • Doubt in alv layout variant.

    hi experts,
    I have a requirement that my selection screen should have 'ALV LAYOUT' as one of my parameter. I am using PNPCE LDB , now my issue is I can get the layout option when f4 is press on the alv layout parameter but the respective layout is not displaying in my output.
    ex: I have  layout A and  B .
    A have only pernr and name
    b have only pernr and address
    my normal alv layout is  pernr name and address. if i choose A in my ALV LAYOUT parameter also its displaying in default layout alv same is happening for while am choosing B. I  not getting the alv output for respective layout I chosen.
    {code}
    FORM GET_VARIANT .
    DATA: lw_variant TYPE disvariant,
       l_exit     TYPE char1.
       lw_variant-report = sy-repid.
       CALL FUNCTION 'REUSE_ALV_VARIANT_F4'
         EXPORTING
           is_variant = lw_variant
           i_save     = 'A'
         IMPORTING
           e_exit     = l_exit
           es_variant = lw_variant
         EXCEPTIONS
           not_found  = 2.
       IF sy-subrc = 2.
         MESSAGE ID sy-msgid TYPE 'S' NUMBER sy-msgno
         WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
       ELSE.
         IF l_exit EQ space.
           p_layout = lw_variant-variant.
           IF NOT p_layout IS INITIAL.
             PERFORM get_w_variant.
           ENDIF.
         ENDIF.
       ENDIF.
    ENDFORM.                    " GET_VARIANT
    *&      Form  GET_W_VARIANT
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM GET_W_VARIANT .
       DATA: lw_variant TYPE disvariant.
       lw_variant-report      = sy-repid.
       lw_variant-handle      = space.
       lw_variant-log_group   = space.
       lw_variant-username    = space.
       lw_variant-variant     = p_layout.
       lw_variant-text        = space.
       lw_variant-dependvars  = space.
    ENDFORM.                    " GET_W_VARIANT
    *&      Form  ALV_DISPLAY
    *       text
    *  -->  p1        text
    *  <--  p2        text
    FORM ALV_DISPLAY .
    *  DATA: l_table      TYPE REF TO cl_salv_table.
    *  TRY.
    *  CALL METHOD CL_SALV_TABLE=>FACTORY
    **    EXPORTING
    **      LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>FALSE
    **      R_CONTAINER    =
    **      CONTAINER_NAME =
    *    IMPORTING
    *      R_SALV_TABLE   =  L_TABLE
    *    CHANGING
    *      T_TABLE        = GT_ALV
    *   CATCH CX_SALV_MSG .
    *  ENDTRY.
    *   l_table->display( ).
       DATA: lw_variant TYPE disvariant.
    DATA:I_FIELD TYPE SLIS_T_FIELDCAT_ALV,
          iWA  TYPE SLIS_FIELDCAT_ALV.
       IWA-FIELDNAME = 'PERNR'.
       IWA-SELTEXT_L = 'EMPLOYEE ID'.
       APPEND IWA TO i_FIELD.
       IWA-FIELDNAME = 'NAME'.
       IWA-SELTEXT_L = 'NAME'.
       APPEND IWA TO I_FIELD.
       IWA-FIELDNAME = 'DEPT'.
       IWA-SELTEXT_L = 'DEPT'.
       APPEND IWA TO I_FIELD.
       IWA-FIELDNAME = 'UNION'.
       IWA-SELTEXT_L = 'UNION'.
       APPEND IWA TO I_FIELD.
    CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
       EXPORTING
         i_callback_program      = 'ZTESTPRGFOR20' "Program name
         i_callback_user_command = 'USER_COMMAND'
         it_fieldcat             = i_field
    *    it_sort                 = i_sort
         i_save                  = 'X'
         is_variant              = Lw_variant
       TABLES
         t_outtab                 = GT_ALV                       
       EXCEPTIONS
         program_error           = 1
         OTHERS                  = 2.
    *IF sy-subrc  0.
    *  MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
    *  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    *ENDIF.
    ENDFORM.                    " ALV_DISPLAY
    {code}

    hi Mohammed Quddus,
    thanks for your reply . but if you look at my code the concept are same as same as that link code.
    am getting all the things right.
    i Can able to change the layout by the button on alv and
    able to save that new layout
    the saved layout are displaying in the my parameter if I press f4. the problem is if I choose the saved layout that layout is not coming in my alv output always its showing default layout.
    if anything you find wrong in my code please let me know.

  • Display Multiple ALV layouts on one screen

    Hi,
    I have created 4 ALV Catalogues named: ALVCAT1, ALVCAT2, ALVCAT3, ALVCAT4
    I have also created the corresponding internal tables with data for each catalogue: ALVITAB1, ALVITAB2, ALVITAB3, ALVITAB4
    I have so far used the following function to generate each of the catalogues above:
      CALL FUNCTION 'REUSE_ALV_FIELDCATALOG_MERGE'
        EXPORTING
          I_PROGRAM_NAME     = SY-CPROG
          I_INTERNAL_TABNAME = 'ALVITAB1'
          I_INCLNAME         = SY-CPROG
        CHANGING
          ct_fieldcat        = ALVCAT1[].
    And I have used the following function module to display the table as ALV:-
    *DISPLAYING REPORT AS ALV GRID
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          I_CALLBACK_PROGRAM      = SY-CPROG
          I_CALLBACK_PF_STATUS_SET = 'SET_PF_STATUS'
          i_callback_user_command = 'USER_COMMAND'
          IT_FIELDCAT             = ALVCAT1[]
         i_screen_start_column = 10
         i_screen_start_line   = 15
         i_screen_end_column   = 200
         i_screen_end_line     = 20
        TABLES
          t_outtab                = ALVITAB1.
    How can I now using the above function modules or similar function modules to DISPLAY multiple ALV layouts on a single SCREEN. Each layout should be treated separately with their own ALV tool bar etc.
    In this case i need to display 4 screens but I have scenarios where i need to also display 5.
    Would be really grateful for your guidance with source code to achieve this.....
    Thnx
    Salman
    Edited by: Salman Akram on Sep 20, 2010 2:47 PM

    Hi
    Try this [Link|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=61243570] or the below program
    BCALV_TEST_GRID_DRAG_DROP
    or else
    Try to use splitter container to display multiple ALVs on one screen
    here is the demo program RSDEMO_SPLITTER_CONTROL
    the below code will help you to call grid using splitter control
         EXPORTING
            container_name = 'CUSTOM'.
        CREATE OBJECT splitter
          EXPORTING
            parent  = container
            rows    = 1
            columns = 1
            align   = 15.
        CALL METHOD splitter->set_row_height
          EXPORTING
            id     = 1
            height = 1.
        CALL METHOD splitter->get_container
          EXPORTING
            row       = 1
            column    = 1
          RECEIVING
            container = container_1.
        CREATE OBJECT grid1
          EXPORTING
            i_parent = container_1.
        CALL METHOD grid1->set_table_for_first_display
          EXPORTING
            is_layout       = gss_layout
            is_variant      = lwa_variant
            i_save          = 'A'
          CHANGING
            it_outtab       = gt_report_list
            it_fieldcatalog = gtt_fld_cat.
    Regards
    Edited by: Anesht on Sep 20, 2010 11:49 PM

  • ME57 transaction with possibility to show in ALV layout

    Hi experts,
    I need change the alv grid in  the transaction ME57. To this, I copied the program RM06BZ00 (scree, includes... )
    When I try execute the program with ALV layout the message ''Scope of list ALV not defined (please correct)" shows.
    To resolve this problem I change the parameter im_service in the ME_REP_GET_TABLE_MANAGER function (Way to function: program ZSAPFM06B / include ZFM06BF04 / Include ZFM06BF04_PRUEFEN_LSTUB)
    When I change this parameter on Debug (manual change) the ALV shows correctly, but when I change in program code the message remains.
    How the way to copy the Me57 transaction with possibility to show in ALV layout?
    Follows the code change:
        CALL FUNCTION 'ME_REP_GET_TABLE_MANAGER'
          EXPORTING
            im_service = 'RM06BZ00'
            im_scope   = l_scope
          IMPORTING
            ex_manager = gf_factory.
    Thank you!
    Edited by: Andréa Molina on Aug 4, 2011 5:12 PM
    Edited by: Rob Burbank on Aug 5, 2011 9:22 AM

    I solved my own problem...
    The change in im_service was right.
    The problem is that:
    The gf_factory back empty in some places and in standrad transaction back with values. The memory clean the gf_factory result.
    So... the only way to show ALV is fill the gf_factory in anywhere the gf_factory is check.
    The places are:
    1. sapfm06b - fm06bf04 - fm06bf04_pruefen_lstub
         Call in RM06BZ00 - perform pruefen_lstub(sapfm06b) using p_lstub.
    2. sapfm06b - fm06bfsl - fm06bfsl_ban_aufbauen
        Call in RM06BZ00 - ban_aufbauen(sapfm06b).
    3. sapfm06b - fm06bf01- fm06bf01_submit
       Call in RM06BZ00 - perform   perform submit(zgb_sapfm06b) using sucomm.
    If the gf_factory is filled in this places... The ALV will show!

  • Specific ALV layout for FBL1N

    Hi Guys,
    Any ideas how can I set the specific ALV layout fo FBL1N report in the way, that special group of users see only one/few specific document types (not all of them) for the certain supplier. I don't want to do that in ABAP.
    Regards
    Adam

    hi Adam,
    you can assign authorization to each single document type in transaction OBA7. You also have to maintain the user profiles as well (the respective auth object is F_BKPF_BLA). Of course this will be valid in the whole system, but it does not make much sense that users have limited authorization in one specific transaction only.
    hope this helps
    ec

Maybe you are looking for

  • JTable, JScrollPane, and JinternalFrame problems.

    I have this internal frame in my application that has a scrollpane and table in it. Some how it won't let me selelct anything in the table. Also it scrolls really weird. There's a lot of chopping going on. Here's my code for the internal frame: publi

  • Can't Log in from out side the network

    FCS loaded onto an xserve, running 10.5.2. I can connect to FCS when I am on the network, but when I am outside of the network, I can get the "Welcome to Final Cut Server" page. I can open the log in screen, but when I try to log in, I get "Connect T

  • Why can't iMovie be updated from App Store or from updater?

    In 2011 I purchased the iLife '11 package on CD for $80 directly from Apple. Since then I've updated the various iLife Apps without incident, until yesterday. I  downloaded the iMoved 9.0.6 Updater and attempted to update v 9.0.4 to 9.0.6. The Update

  • I often lose my connection when playing bridge on Bridge Base on Line

    I often lose my connection when playing bridge on Bridge Base on Line == URL of affected sites == http://www.bridgebase.com

  • TDS Certificate Error

    Dear ALL, The Client have done TDS Remmittance for Mar'2008(FISCAL-2007),but the actual payment was done in the month of April 2008(FISCAL - 2008). Now when they are going for TDS Printout the TDS Certificate(for mar-2008) number of Fiscal year 2008