Skip to Content
author's profile photo Former Member
Former Member

Reading 'table type' in program

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.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • Best Answer
    Posted on Dec 05, 2007 at 07: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 08: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

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Dec 05, 2007 at 08: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.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2007 at 09: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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.