Jul 23 2010

Copy data from one table to another with the help of APIs

VN:F [1.9.22_1171]
Rating: 2.7/5 (3 votes cast)

There are many requirements where data from One table needs to be copied to another. There are also various ways available. But there are some APIs which provide this functionality in very optimum way. e.g. JDEDM_LoadDSfromTableRecord, JDEDM_LoadTableRecordfromDS.

Take example where one table contains 200 fields and due to interoperability one more table (Z-table) needs to be maintained with few extra fields. Now for doing this you need to assign each and every field before it gets updated to New table which is very time consuming and error prone activity and which also affect the performance. Not only this, table may contains different types of data types e.g. String, Numbers, characters etc.

Above mentioned APIs provide the functionality, which takes data from table and store it to Data Structure and vice versa. It basically checks the DD item for Copying the data from one to another as we know there can be only one unique DD item in Table.


  1. Consider there are two tables F01301D and F60098Z and most of the Data(Same Alias) needs to be copied from F01301D to F60098Z.
    First Data From F1301D(lpF01301D) is fetched and stored in D6001301D (dsD6001301D) data structure thru following code.
  2. JDEDM_LoadDSfromTableRecord( (hUser),NID_F01301D,(LPVOID)lpF01301D,_J("D6001301D"), &dsD6001301D);

  3. After that Data Structure D6001301D(dsD6001301D) can be copied to F60098Z(dsF60098Z) table stucture thru following code
  4. JDEDM_LoadTableRecordfromDS((hUser),NID_F60098Z,(LPVOID)&dsF60098Z,_J("D6001301D"), (LPVOID)&dsD6001301D);

  5. After this procedure, All fields with similar aliases are copied to destined Table structure and then Other fields also can be assigned and finally same structure can be used for inserting the data to destined Table.

Let me know for further information.

Published under the license.

VN:F [1.9.22_1171]
Rating: 2.7/5 (3 votes cast)
Copy data from one table to another with the help of APIs, 2.7 out of 5 based on 3 ratings
(Visited 385 times, 1 visits today)

About the author

Swapnil Ingale

Swapnil Ingale is a very experienced Technical Consultant in Oracle JD Edwards EnterpriseOne and has worked on quite implementations, Upgrade and other support projects. He hold a Master's Degree in computer science (M.Tech CSE) from Nirma University,Ahmedabad and very keen to share the knowledge and help others.


  1. Dan

    Does the datastructure need to have same table prefix too?
    Like f0101 has aban8, will the datastructure too need fields as aban8?

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  2. Swapnil Ingale

    Data structure parameters doesn’t have any prefix and you can have same DD item multiple times in same data structure.So while using these APIs one need to take care that Data structure also has same unique DD item as of respective table.

    In addition, this data stucture need to be “typedef” in to the BSFN header.

    VN:F [1.9.22_1171]
    Rating: 0 (from 0 votes)
  3. Anand

    Nice Information.

    VA:F [1.9.22_1171]
    Rating: 0 (from 0 votes)

Leave a Reply