Results 1 to 2 of 2

Thread: Basic Code 8 advanced pricing business function

  1. #1
    New Member
    Join Date
    Feb 2001
    London, United Kingdom

    Talking Basic Code 8 advanced pricing business function

    Hi all,

    As per Oracles instructions and other threads on here to use P4072 ‘Object Library’ (stored in F4072.ADFRMN) to specify a custom business function we must use the data structure D4500210.
    This data structure passes into the function “idF4211RowPtr” which is a pointer to the F4211 record in cache.

    The only way I can see to use this value is the JDE standard API “jdeRetrieveDataPtr”
    Called something like this..
    lpdsF4211 = jdeRetrieveDataPtr(hUser,lpDS->idF4211RowPtr);

    This is fine and works but most the fields it returns are blank? It returns the key fields and some pricing columns but most are blank (even though they were entered into the F4211 Edit Line and end up on the Sales Order).

    Is there a way of getting the rest of the fields? I particularly need another order number to store like RORN or OORN.

    Thanks a lot!
    OneWorld XE SP22, Unix Enterprise servers, Oracle 9i, Citrix Metaframe 1.8

  2. #2
    Senior Member
    Join Date
    Mar 2004
    Fort Worth, Texas
    Quote Originally Posted by sysmk View Post
    lpdsF4211 = jdeRetrieveDataPtr(hUser,lpDS->idF4211RowPtr);
    jdeStoreDataPtr, jdeRetreiveDataPtr, jdeRemoveDataPtr are all platform independent ways to pass pointers around between C BSFNs.

    In this particular case, the BSFN is expecting a handle returned by a call to jdeStoreDataPtr on a pointer to a F4211 record in caller allocated memory (not "cache"). This is all done in C, so you need to have a fairly strong understanding of C and C BSFNs. You also need to really understand how jdeStoreDataPtr, jdeRetrieveDataPtr and jdeRemoveDataPtr work or you can leak handles, leak memory, dereference null pointers or pointers to previously free'd memory, etc. all of which can crash your entire call object kernel.

    Here is the generic pseudo code for this pattern:

    BSFN: GetSalesDetailRecord
    F4211  *pRecSalesDetail = (F4211 *)NULL;
    pRecSalesDetail= jdeAlloc(COMMON_POOL, sizeof(F4211), MEM_ZEROINIT);
    //JDEBASE code that gets the F4211 record and stores in the memory buffer pointed to by pRecSalesDetail
    lpDS->idF4211RowPtr = jdeStoreDataPtr(hUser, pRecSalesDetail);
    BSFN: what ever BSFN needs a F4211 record
    F4211  *pRecSalesDetail = (F4211 *)NULL;
    pRecSalesDetail = jdeRetrieveDataPtr(hUser, lpDS->idF4211RowPtr); //gets the pointer but doesn't release the handle
    BSFN: FreeSalesDetailRecord
    F4211  *pRecSalesDetail = (F4211 *)NULL;
    pRecSalesDetail = jdeRemoveDataPtr(hUser, lpDS->idF4211RowPtr); //gets the pointer AND releases the handle
    You might be able to find a BSFN that returns a handle/pointer to a F4211 record and one that releases the returned handle and allocated memory in which case you won't need to write any C code but just glue everything together with ER code.
    Last edited by BOster; 07-11-2019 at 10:45 AM.
    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

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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.