Hi experts, I have defined the table type in the DDIC and populating it in a method of class.In my main program of se38, I created one internal table 'type standard table of' table-type and then I created workarea of table-type but when I do like
wafloc_type_tab = objzcl_tbd_model->iflot_tyr( ).
It gives the error.
The result type of the function method cannot be converted into the type of wafloc_type_tab.
Hi,
Do like thais
----
TYPES *
----
TYPES : BEGIN OF t_vbrk,
vbeln TYPE vbeln_vf,
rplnr TYPE rplnr,
bukrs TYPE bukrs,
END OF t_vbrk,
BEGIN OF t_fpltc,
fplnr TYPE fplnr,
fpltr TYPE fpltr,
ccnum TYPE ccnum,
END OF t_fpltc,
BEGIN OF t_final,
bukrs TYPE bukrs,
vbeln TYPE vbeln_vf,
rfzei TYPE rfzei_cc,
ccnum TYPE ccnum,
END OF t_final.
----
WORK AREAS *
----
DATA : wa_vbrk TYPE t_vbrk,
wa_fpltc TYPE t_fpltc,
wa_final TYPE t_final,
wa_bseg TYPE bseg.
----
INTERNAL TABLES *
----
DATA : it_vbrk TYPE STANDARD TABLE OF t_vbrk,
it_fpltc TYPE STANDARD TABLE OF t_fpltc,
it_final TYPE STANDARD TABLE OF t_final.
Regards,
Prashant
Hi Neeraj,
a tyble type is a TYPE not a data object. You can only populate data objects of that type.
And an internal table 'type standard table of table-type is a table of tables. The declaration should be TYPE table-type .
Regards,
Clemens
standard table of table type is a table holding a table.
Make your declarations like this:
it type table-type.
wa like line of table-type.
As like is an ugly keyword, dont specify table typed, instead declare structures.
it type standard table of structure.
wa type structure.
Add a comment