cancel
Showing results for 
Search instead for 
Did you mean: 

upgradin from 4.6 c to ecc 6.0

Former Member
0 Kudos

HI all,

We are upgrading our sap 4.6 c to ecc 6.0. In 4.6 c we have used alv-report catelog for reporting. In ecc 6.0 whats the new methodolgy that we can use instead of alv-report-catelogue. can any one help me in this regard.

Thanks in advance.

G. moorthy

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you can use the slis format.

REPORT ZTRIAL .

*report sy-repid.

type-pools : slis.

*ALV Formatting tables /structures

data: gt_fieldcat type slis_t_fieldcat_alv.

data: gt_events type slis_t_event.

data: gs_layout type slis_layout_alv.

data: gt_page type slis_t_listheader.

data: gs_page type slis_listheader.

data: v_repid like sy-repid.

*ALV Formatting work area

data: w_fieldcat type slis_fieldcat_alv.

data: w_events type slis_alv_event.

data: gt_bsid type table of bsid with header line.

start-of-selection.

select * from bsid into table gt_bsid up to 10 rows.

*perform populate_for_fm using '1' '3' 'BUKRS' '8' 'GT_BSID' 'Whee'.

*USING = Row, Column, Field name, display length, table name, heading

*OR

perform build_fieldcat.

gs_layout-zebra = 'X'.

*top of page event does not work without I_callback_program

v_repid = sy-repid.

call function 'REUSE_ALV_GRID_DISPLAY'

exporting

i_callback_program = v_repid

i_structure_name = 'BSID'

  • i_background_id = 'ALV_BACKGROUND'

i_grid_title = 'This is the grid title'

  • I_GRID_SETTINGS =

is_layout = gs_layout

it_fieldcat = gt_fieldcat[]

tables

t_outtab = gt_bsid.

************************************************************************

  • Form..............: populate_for_fm

  • Description.......: Populates fields for function module used in ALV

************************************************************************

form populate_for_fm using p_row

p_col

p_fieldname

p_len

p_table

p_desc.

w_fieldcat-row_pos = p_row. "Row Position

w_fieldcat-col_pos = p_col. "Column Position

w_fieldcat-fieldname = p_fieldname. "Field name

w_fieldcat-outputlen = p_len. "Column Lenth

w_fieldcat-tabname = p_table. "Table name

w_fieldcat-reptext_ddic = p_desc. "Field Description

w_fieldcat-input = '1'.

append w_fieldcat to gt_fieldcat.

clear w_fieldcat.

endform. " populate_for_fm

&----


*& Form build_fieldcat

&----


*Many and varied fields are available here. Have a look at documentation

*for FM REUSE_ALV_LIST_DISPLAY and REUSE_ALV_FIELDCATALOG_MERGE

----


form build_fieldcat.

w_fieldcat-fieldname = 'BUDAT'.

w_fieldcat-seltext_m = 'Dte pst'.

w_fieldcat-ddictxt(1) = 'M'.

  • Can change the position of fields if you do not want them in order

  • of the DDIC or itab

  • w_fieldcat-row_pos = '1'.

  • w_fieldcat-col_pos = '10'.

append w_fieldcat to gt_fieldcat.

clear w_fieldcat.

endform. " build_fieldcat

Reward pts if useful.

Regards,

Dhan

Answers (4)

Answers (4)

former_member181995
Active Contributor
0 Kudos

Guru,

no issues you can work with same FM which you had in 4.7.

Amit.

Former Member
0 Kudos

Hi,

While upgrading are you getting any error message, if you are using?

If you don;t get any error better not to change anything in it.

Thanks,

Sriram Ponna.

Former Member
0 Kudos

HI,

Use the OOPs ALV ......................

MODULE status_0100 OUTPUT.
  SET PF-STATUS 'STANDARD'.
* Optimizing the column width of the layout and hiding
* the default row selection
  vs_layout_grid-no_rowmark = 'X'.
  vs_layout_grid-cwidth_opt = 'X'.
  IF v_custom_container IS INITIAL.

* Create the Container to hold the Grid
    IF cl_gui_alv_grid=>offline( ) IS INITIAL.
      CREATE OBJECT v_custom_container
        EXPORTING
          container_name = 'CONTAINER'.
    ENDIF.                             " IF cl_gui_alv_grid=>offline...

* Create the Grid to display the data
    CREATE OBJECT v_grid
      EXPORTING
        i_parent = v_custom_container.


* Displaying the output in ALV Grid
    CALL METHOD v_grid->set_table_for_first_display
      EXPORTING
        is_layout                     = vs_layout_grid
      CHANGING
        it_outtab                     = i_output[]
        it_fieldcatalog               = i_fcat[]
      EXCEPTIONS
        invalid_parameter_combination = 1
        program_error                 = 2
        too_many_lines                = 3
        OTHERS                        = 4.
    IF sy-subrc NE 0.
    ENDIF.                             " IF sy-subrc NE 0
  ELSE.                                " IF w_custom_container...
* Refresh the container if it already exists
    CALL METHOD v_grid->refresh_table_display
      EXCEPTIONS
        finished = 1
        OTHERS   = 2.
    IF sy-subrc NE 0.
    ENDIF.                             " IF sy-subrc NE 0
  ENDIF.                               " IF v_custom_container...
ENDMODULE.

Regards,

Vamshidhar.

Former Member
0 Kudos

use this

REUSE_ALV_GRID_DISPLAY_LVC

this will improve the performance

Regards

Anbu