1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

Need help to find the logic to disable date in calender which popups in a forms field

Discussion in 'Oracle Apps Technical' started by RG Hegde, May 8, 2015.

  1. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Hello ,

    We are facing one problem in forecast seeded form MRPFFDIF.fmb

    There are 2 fields Bucket and Date ,

    Bucket field has the lists 'Days', 'Weeks' And 'Periods'.

    If we select Bucket as Days , the calender in the date field allows to select all dates.

    If we select Bucket as Periods , the calender in the date fields allows to select only few dates . Remaining dates has been disables .

    Could you please help me to find the Logic behind this .
     
  2. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Re: Need help to find the logic to disable date in calender which popups in a forms f

    Hello ,

    I have taken the MRPFFDIF.fmb and manually traced the logic .

    Using calendar.setup it is setting up the dates and the main tables for date reference are BOM_CALENDAR_DATES and BOM_PERIOD_START_DATES
     
  3. RG Hegde

    RG Hegde Forum Advisor

    Messages:
    185
    Likes Received:
    35
    Trophy Points:
    310
    Location:
    Pune
    Re: Need help to find the logic to disable date in calender which popups in a forms f

    Logic to display the Calender dates
    1)Depending on the Bucket Type it sets up the valid_bucket_dates using calender.setup
    2)To get the valid bucket dates for periods it has used below logic from the tables BOM_CALENDAR_DATES and BOM_PERIOD_START_DATES
    Code (SQL):
    SELECT calendar_date LOW_DATE, calendar_date HIGH_DATE
             FROM BOM_CALENDAR_DATES cal, mtl_parameters param
             WHERE  param.organization_id = :org_id
             AND   param.calendar_exception_set_id = cal.exception_set_id
             AND   param.calendar_code = cal.calendar_code
             minus
               (SELECT period_start_date LOW_DATE, period_start_date HIGH_DATE
              FROM BOM_PERIOD_START_DATES cal2, mtl_parameters param
              WHERE param.organization_id = :org_id
            AND   cal2.exception_set_id = param.calendar_exception_set_id
              AND   cal2.calendar_code = param.calendar_code)
    3) Then it will calculate the next_work_day using the procedure mrp_calendar.next_work_day
    4) Finally it will popup the calender using calendar.show(next_work_day);