Results 1 to 7 of 7

Thread: JDEDM_LoadDSfromDS

  1. #1


    I'm trying to create F47011/12 records from F4201/F4211.

    Being lazy - I thought I'd copy most of the fields with the following:

    JDEDM_LoadDSfromDS( (HUSER)hUser, _J("F4201"),

    But it gives me a memory error. I'm guessing it only works on JDE data structures??? (clue is in the name...)


  2. #2
    I found these 2 apis on JDESource (thanks)


    However it still looks like I might need to create a DS that matches either the source or destination table.

    I could roll my own code - coping alot of the column mappings from B4201540.

    Does anyone have a more intellegent way of doing it?

  3. #3
    Join Date
    Mar 2002
    Minneapolis, MN
    How are you defining lpdsF47011? And lpdsF4201?

    I'm assuming you already have the lpdsF4201 structure populated and that you're trying load lpdsF47011.

    I would think you'd probably want to try something like the following:
    F47011 dsF47011 = {0};

    Then your API call for the F47011 line would like the following:

    If you defined lpdsF47011 as: LPF47011 lpdsF47011 = NULL; (or similar... as a pointer instead of a structure), then you would need to allocate memory for that pointer before you can reference it in the API call. Without doing so would cause a memory violation.
    E1 Consultant
    Minneapolis, MN

  4. #4
    Senior Member
    Join Date
    Mar 2004
    Fort Worth, Texas
    I have used these quite a bit. JDEDM_LoadDSfromDS is for loading from a BSFN DS and if memory serves, I don't think it will work with tables (as you found out). I don't think there is one for table to table data structs oddly enough.
    Brian Oster
    Application Development Manager
    E1: 9.0 (TR9.1.5.1) / 9.2 (TR9.2.2.2)
    JAS/BSSV: Weblogic 12.1.2 / Weblogic 12.2
    ES: Win2008 / Win2016
    DB: MSSQL 2014 / 2016
    WebDev Client: Win7Pro / Win10Pro

  5. #5
    Thank guys.
    @JMR - I'm allocating memory in pretty much that way.

    From my testing, the clue is in the name. A JDE data structure is required when it is mentioned in the API.

    I've ended up using the 2 api's below and created 2 new DS's to match F47011/F47012 (copied from D4202034/40 and enhanced).


  6. #6
    Ball's. I replied to this thread but it's disappeared.

    Ended up using the 2 API's below. Had to create 2 custom DS's to be the middle man.


  7. #7
    Senior Member craig_welton's Avatar
    Join Date
    Oct 2000
    Litchfield, CT
    We have done something generic using JDBRS_GetTableSpecsFromHandle on the source and destination tables. You can examine each of the columns in the tablecache structure of each handle. If they exist in both tables, the data can be copied to the destination using JDB_GetTableColValue and JDB_AssignColumnValue.

    Craig Welton
    PatWel Group Inc.
    Home of the FREE JDE Object Browser, JDETrace, NERDup and BusBuild+ Tools

    E1 9.0 Wintel SQL 2008
    E1 9.2 iSeries

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
The legal restrictions and terms of use applicable to this site are available here.
Use of this site signifies your agreement to the terms of use.
JDELIST is NOT affiliated with JD Edwards® & Company, Oracle or Peoplesoft. Contents of this site are neither endorsed nor approved by JD Edwards® & Company and, or Oracle.