Skip to Content
author's profile photo Former Member
Former Member

error while passing parameter fot class method

Hi abapers,

i am trying to do alv grdi dispaly using class cl_gui_alv_grid. i am getting error "ITAB1" is not type-compatible with formal parameter 'IT_OUTTAB'.

i attached code here.

  • Internal Tables

types: begin of itab,

matnr type mara-matnr,

maktx type makt-maktx,

end of itab.

data: itab1 like itab.

DATA: alvgrid type ref to cl_gui_alv_grid.

CALL METHOD ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY

EXPORTING

  • I_BUFFER_ACTIVE =

  • I_BYPASSING_BUFFER =

  • I_CONSISTENCY_CHECK =

I_STRUCTURE_NAME = 'ITAB'

  • 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 = itab1.

  • IT_FIELDCATALOG =

  • IT_SORT =

  • IT_FILTER =

  • EXCEPTIONS

  • INVALID_PARAMETER_COMBINATION = 1

  • PROGRAM_ERROR = 2

  • TOO_MANY_LINES = 3

  • others = 4

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

please help me.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 04:35 AM

    Hai,

    I think internal table is not matching with method.

    Try like this..

    DATA: itab1 like TABLE OF ITAB.

    and...continue..

    regards

    ambichan.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 12, 2005 at 04:52 AM

    Try this -

    CALL METHOD ALVGRID->SET_TABLE_FOR_FIRST_DISPLAY

    EXPORTING

    • I_BUFFER_ACTIVE =

    • I_BYPASSING_BUFFER =

    • I_CONSISTENCY_CHECK =

    I_STRUCTURE_NAME = 'ITAB'

    • 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 = <b>itab1[].</b>

    • IT_FIELDCATALOG =

    • IT_SORT =

    • IT_FILTER =

    • EXCEPTIONS

    • INVALID_PARAMETER_COMBINATION = 1

    • PROGRAM_ERROR = 2

    • TOO_MANY_LINES = 3

    • others = 4

    Cheers

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.