Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

ALV OO

Former Member
0 Likes
564

Dear SDN Members,

when using methods

CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

I am getting a error ' Internal table is not type compatible with formal parameter it_outtab'

How to solve this ?

Thanx in Advance.

Regards,

Johnn.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
520

give the whole body , ie sqare brackets and try

CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
      IS_LAYOUT       = WA_LAYOUT
    CHANGING
      IT_FIELDCATALOG = IT_FIELDCAT_WRT_OFF
      IT_OUTTAB       = <b>IT_WRT_OFF_FLDS[].</b>

Dear SDN Members,

when using methods

CALL METHOD GRID->SET_TABLE_FOR_FIRST_DISPLAY

I am getting a error ' Internal table is not type compatible with formal parameter it_outtab'

How to solve this ?

Thanx in Advance.

Regards,

Johnn.

4 REPLIES 4
Read only

Former Member
0 Likes
520

Check this program it may help u.

data: l_dref type ref to cl_abap_typedescr.

data: l_clref type ref to cl_abap_classdescr.

data: x_methods type abap_methdescr.

data: x_parameters type abap_parmdescr.

constants: query_class type seoclsname

value 'CL_GUI_ALV_GRID'.

  • check if query_class exists in the current system

call method cl_abap_classdescr=>describe_by_name

exporting

p_name = query_class

receiving

p_descr_ref = l_dref

exceptions

type_not_found = 1

others = 2.

if sy-subrc <> 0.

exit.

endif.

l_clref ?= l_dref.

loop at l_clref->methods into x_methods.

write:/ x_methods-name.

loop at x_methods-parameters into x_parameters.

write:/ x_parameters-length,

x_parameters-decimals,

x_parameters-type_kind,

x_parameters-name,

x_parameters-parm_kind .

endloop.

skip 3.

Regards

Read only

Former Member
0 Likes
521

give the whole body , ie sqare brackets and try

CALL METHOD W_GRID->SET_TABLE_FOR_FIRST_DISPLAY
    EXPORTING
      IS_LAYOUT       = WA_LAYOUT
    CHANGING
      IT_FIELDCATALOG = IT_FIELDCAT_WRT_OFF
      IT_OUTTAB       = <b>IT_WRT_OFF_FLDS[].</b>

Read only

0 Likes
520

hi,

chk this sample.

<b>data : gt_sbook TYPE TABLE OF sbook.</b>

CALL METHOD grid2->set_table_for_first_display

EXPORTING i_structure_name = 'SBOOK'

is_layout = gs_layout

CHANGING <b> it_outtab = gt_sbook.</b>

rgds

anver

if hlped mark points

Read only

uwe_schieferstein
Active Contributor
0 Likes
520

Hello Johnn

If you are using an itab with header line then Chandrasekhar provided the solution. However, if you want to enter the ABAP-OO world you should get rid of these nasty header lines immediately using table types or just itabs without header line. Header lines are a mess that should never (ever) enter our coding.

Regards

Uwe