Oracle JD Edwards - APIs


Oracle JD Edwards - API

JDEDATECmp will compare the first parameter with the second.  If the first parameter is the same as the second, zero will be returned.  If the first is earlier than the second, a negative number will be returned the number of days between the dates. If the first is later than the second, a positive number is returned.


JDEDATECmp(Date1, Date2);

JDEDATECopy will copy second Date parameter value to First Date parameter.

JDEDATECopy(Date1, Date2);

Create a new Data Structure with three Date Fields.




Create C business Function and copy below code in Main Processing 

/************************************************************************
    * Main Processing
    ************************************************************************/
    /*Return Earlier Date */
   if (JDEDATECmp(&lpDS->jdDate1, &lpDS->jdDate2) <= 0)
   {
          /*If both are same or Date1 is less than Date2 return Date1*/
          JDEDATECopy(&lpDS->jdDate3, &lpDS->jdDate1);
   }
   else
   {
          /*If Date2 is less than Date1 return Date2*/
          JDEDATECopy(&lpDS->jdDate3, &lpDS->jdDate2);
   }



Build Business Function.

Create Interactive application - Fixed Inspect Form. 

Call your BSFN on Compare Push Button (here it is TEST Date API) - 

Save this Application and Run.

Enter different Dates in Date1 and Date2, click on Compare to get Result.



No comments:

Post a Comment