2006 Sep 26 9:08 AM
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.
2006 Sep 26 9:10 AM
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>
2006 Sep 26 9:10 AM
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
2006 Sep 26 9:10 AM
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>
2006 Sep 26 9:20 AM
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
2006 Sep 26 9:15 AM
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
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |