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

Reading 'table type' in program

Former Member
0 Likes
1,261

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.

1 ACCEPTED SOLUTION
Read only

former_member386202
Active Contributor
0 Likes
897

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

5 REPLIES 5
Read only

former_member386202
Active Contributor
0 Likes
898

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

Read only

Clemenss
Active Contributor
0 Likes
897

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

Read only

rainer_hbenthal
Active Contributor
0 Likes
897

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.

Read only

0 Likes
897

Hi Rainer,

what about

it type table-type.

wa <b>type</b> line of table-type.

Regards,

Clemens

Read only

Former Member
0 Likes
897

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