Skip to Content
0
Former Member
Oct 16, 2006 at 03:39 AM

doubt in alv classes program

17 Views

plz check the following code using class. i want to display the output. i have declared an instance called pav1. im getting short dump. wht i have to give in 'i_parent = ' int his case.

DATA:PAV1 TYPE REF TO CL_GUI_ALV_GRID.

tables:mara.

data:begin of itab occurs 0,

matnr like mara-matnr,

mtart like mara-mtart,

matkl like mara-matkl,

end of itab.

PARAMETERS: s_matnr LIKE mara-matnr.

  • INTIALIZATION EVENT

initialization.

MOVE '38' TO S_MATNR.

*move '38' to s_matnr-low.

*append s_matnr.

*move '679' to s_matnr-high.

*append s_matnr.

*AT SELECTION SCREEN EVENT.

at selection-screen.

IF S_MATNR NE '38'.

MESSAGE i000.

ENDIF.

*START OF SELECTION EVENT

start-of-selection.

select matnr mtart matkl from mara into corresponding fields of table

itab where matnr = s_matnr.

IF SY-SUBRC NE 0.

WRITE:/ 'SORRY'.

ENDIF.

*TOP OF PAGE EVENT

top-of-page.

write:/ 'TOP OF PAGE'.

*END OF SELECTION EVENT

END-OF-SELECTION.

WRITE:/'SELECTION ENDED.'.

create object pav1 exporting i_parent = mara.

CALL METHOD PAV1->set_table_for_first_display

EXPORTING

  • I_BUFFER_ACTIVE =

  • I_BYPASSING_BUFFER =

  • I_CONSISTENCY_CHECK =

I_STRUCTURE_NAME = 'mara'

  • IS_VARIANT =

  • I_SAVE =

  • I_DEFAULT = 'X'

  • IS_LAYOUT =

  • IS_PRINT =

  • IT_SPECIAL_GROUPS =

  • IT_TOOLBAR_EXCLUDING =

  • IT_HYPERLINK =

  • IT_ALV_GRAPHICS =

  • IT_EXCEPT_QINFO =

CHANGING

it_outtab = itab[].

  • IT_FIELDCATALOG =

  • IT_SORT =

  • IT_FILTER =

  • EXCEPTIONS

  • INVALID_PARAMETER_COMBINATION = 1

  • PROGRAM_ERROR = 2

  • TOO_MANY_LINES = 3

  • others = 4

IF sy-subrc ne 0.

write:/ 'sorry u didnt call the method correctly'.

ENDIF.