2007 Dec 05 7:29 AM
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.
2007 Dec 05 7:32 AM
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
Plz make the Internal table as TYPE of Table Type
and Work area as Like Line of Table type.
it will solve ur problem
Regards,
Preeti
2007 Dec 05 7:32 AM
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
2007 Dec 05 8:16 AM
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
2007 Dec 05 8:30 AM
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.
2007 Dec 05 8:33 AM
Hi Rainer,
what about
it type table-type.
wa <b>type</b> line of table-type.
Regards,
Clemens
2007 Dec 05 9:42 AM
hi
Plz make the Internal table as TYPE of Table Type
and Work area as Like Line of Table type.
it will solve ur problem
Regards,
Preeti
| User | Count |
|---|---|
| 6 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |