547: if(pi_period_code_to is not null) then
548: if(pi_organization_id_to is not null) then
549: SELECT gps.period_id
550: INTO pi_period_id_to
551: FROM gmf_period_statuses gps, hr_organization_information org
552: WHERE gps.PERIOD_CODE = pi_period_code_to
553: AND gps.CALENDAR_CODE = pi_calendar_code_to
554: AND gps.legal_entity_id = org.org_information2
555: AND org.organization_id = pi_organization_id_to
569: end if;
570:
571: SELECT gps.period_id
572: INTO pi_period_id_from
573: FROM gmf_period_statuses gps, hr_organization_information org
574: WHERE gps.PERIOD_CODE = pi_period_code_from
575: AND gps.CALENDAR_CODE = pi_calendar_code_from
576: AND gps.legal_entity_id = org.org_information2
577: AND org.organization_id = pi_organization_id_from
710: l_sql_org :=
711: 'SELECT ' ||
712: 'hoi.organization_id ' ||
713: 'FROM ' ||
714: 'hr_organization_information hoi , mtl_parameters mp ' ||
715: ' WHERE ' ||
716: 'hoi.org_information2 = :pi_all_org_id '||
717: ' AND hoi.org_information_context = ''Accounting Information'' '||
718: ' AND hoi.organization_id = mp.organization_id '||
750: if(pi_organization_id_to is not null) then
751: l_sql_periods := 'SELECT ' ||
752: 'c3.period_id ' ||
753: 'FROM ' ||
754: 'gmf_period_statuses c3, gmf_period_statuses c2, gmf_period_statuses c1, hr_organization_information d ' ||
755: 'WHERE ' ||
756: 'd.organization_id = :pi_organization_id_to AND '||
757: 'd.org_information_context = ''Accounting Information'' AND '||
758: 'c1.calendar_code = :pi_calendar_code_to AND ' ||
1968: if(pi_period_code_to is not null) then
1969: if(pi_organization_id_to is not null) then
1970: SELECT gps.period_id
1971: INTO pi_period_id_to
1972: FROM gmf_period_statuses gps, hr_organization_information org
1973: WHERE gps.PERIOD_CODE = pi_period_code_to
1974: AND gps.CALENDAR_CODE = pi_calendar_code_to
1975: AND gps.legal_entity_id = org.org_information2
1976: AND org.organization_id = pi_organization_id_to
1990: end if;
1991:
1992: SELECT gps.period_id
1993: INTO pi_period_id_from
1994: FROM gmf_period_statuses gps, hr_organization_information org
1995: WHERE gps.PERIOD_CODE = pi_period_code_from
1996: AND gps.CALENDAR_CODE = pi_calendar_code_from
1997: AND gps.legal_entity_id = org.org_information2
1998: and org.organization_id = pi_organization_id_from
2081: l_sql_org_b :=
2082: 'SELECT ' ||
2083: 'hoi.organization_id ' ||
2084: 'FROM ' ||
2085: 'hr_organization_information hoi , mtl_parameters mp ' ||
2086: ' WHERE ' ||
2087: 'hoi.org_information2 = :pi_all_org_id '||
2088: ' AND hoi.org_information_context = ''Accounting Information'' '||
2089: ' AND hoi.organization_id = mp.organization_id '||
2118: if(pi_organization_id_to is not null) then
2119: l_sql_periods_b := 'SELECT ' ||
2120: 'c3.period_id ' ||
2121: 'FROM ' ||
2122: 'gmf_period_statuses c3, gmf_period_statuses c2, gmf_period_statuses c1, hr_organization_information d ' ||
2123: 'WHERE ' ||
2124: 'd.organization_id = :pi_organization_id_to AND '||
2125: 'd.org_information_context = ''Accounting Information'' AND '||
2126: 'c1.calendar_code = :pi_calendar_code_to AND ' ||