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

How to fill the data of two different tables into one?

Hi Experts,

I have two tables named CDHDR and CDSHW(structure). I have extracted the data from these two tables through two function modules named CHANGEDDOCUMENT_HEADER and CHANGEDOCUMENT_POSITION. Now I have the data in to different tables.

These two tables neither has relationship with each other through any field nor have any field which exist in both. Can anyone tell me in this case what should be the process to take the data of both the tables into one table. How can I match the record of one table to another?

thanks a ton in advance.

Edited by: Moni Bindal on Apr 28, 2008 4:16 PM

Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:42 PM

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

4 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 02:22 PM

    Hi,

    The table CDHDR has a relationship with table CDPOS like header and item.

    Can you use CDPOS?

    Regards,

    Fernando

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 02:22 PM

    hi with out having any relation between the data tables you cannot relate them...this is not possible..one more thing here you r relating the data base table with a structure...and you are filling the structure how..

    regards,

    venkat

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 28, 2008 at 02:31 PM

    Hye Bindal,

    without a relation, it is not possible to club the data of 2 internal tables. More over it depends on the requirement as to y u should club to non related quantities in an internal table.

    if you wish to do so, one thing is it has internal table which includes the strucute of the 2.

    data: begin of ty_out,

    first type first_structure,

    second type second_structure,

    end of ty_out.

    data: itab type standard table of ty_out.

    data: wa type ty_out.

    loop into it1 into wa1.

    move corresponding wa to wa1.

    append wa to itab.

    endloop.

    loop into it2 into wa2.

    move corresponding wa to wa2.

    append wa to itab.

    endloop.

    now the internal table itab will have all the contents of it1 and it2.

    <REMOVED BY MODERATOR>

    Thanks,

    Imran.

    Edited by: Alvaro Tejada Galindo on Apr 28, 2008 1:43 PM

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 27, 2009 at 10:54 AM

    Solved

    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.