Oracle JD Edwards - API
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