CREATE OR REPLACE FUNCTION APPS.GRCPCG_TWOGLPER
-- v_period_name IN VARCHAR2)
RETURN NUMBER
IS
v_period_cnt NUMBER;
BEGIN
SELECT COUNT (*)
INTO v_period_cnt
FROM (SELECT RPAD (
fat.application_name,
(20 - LENGTH (fat.application_name))
+ LENGTH (fat.application_name),
' ')
application_name,
gps.show_status,
gps.period_name
FROM gl_period_statuses_v gps,
fnd_application_tl fat,
gl_sets_of_books gsb
WHERE 1 = 1
--AND gps.period_name = v_period_name
AND fat.application_id = gps.application_id
AND gps.set_of_books_id = gsb.set_of_books_id
AND gps.application_id IN (0000)
AND gps.set_of_books_id = 0000) test
WHERE bmstest.show_status = 'Open';
IF v_period_cnt > 2
THEN
RETURN (v_period_cnt);
ELSE
RETURN (0);
END IF;
END;
------------------------------------------------
GRANT ALL ON apps.GRCPCG_TWOGLPER TO XXLAAPPS
-------------------------------------------------
-- v_period_name IN VARCHAR2)
RETURN NUMBER
IS
v_period_cnt NUMBER;
BEGIN
SELECT COUNT (*)
INTO v_period_cnt
FROM (SELECT RPAD (
fat.application_name,
(20 - LENGTH (fat.application_name))
+ LENGTH (fat.application_name),
' ')
application_name,
gps.show_status,
gps.period_name
FROM gl_period_statuses_v gps,
fnd_application_tl fat,
gl_sets_of_books gsb
WHERE 1 = 1
--AND gps.period_name = v_period_name
AND fat.application_id = gps.application_id
AND gps.set_of_books_id = gsb.set_of_books_id
AND gps.application_id IN (0000)
AND gps.set_of_books_id = 0000) test
WHERE bmstest.show_status = 'Open';
IF v_period_cnt > 2
THEN
RETURN (v_period_cnt);
ELSE
RETURN (0);
END IF;
END;
------------------------------------------------
GRANT ALL ON apps.GRCPCG_TWOGLPER TO XXLAAPPS
-------------------------------------------------
Hi,
ReplyDeletePlease revert on my mail.
Sudhir D
Himachal Pradesh Board of School Education releases the class 10th model question papers 2021 in the online mode. HP board 10th model papers 2021 plays a very important role in the analysis of a candidate's preparation level. HP Board 10th Model Paper 2021 Presently the board examines 10th class examinations. Annually, 5 lakhs of candidates appear in the examination conducted by the HP board.
ReplyDeleteThank you for sharing information with us ! These quadcopters drones may seem like toys, however they're a significant investment, GPS Drone and one in all the best ways that to point out off a brand new location for a travel video or filmmaker's production Quadcopter Drone.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteCopyCat is a great Figma Plugin Development tool to quickly get started with development. It's simple to use and install, and it comes with a wide range of features that make developing for Figma much easier.
ReplyDeleteLoved It Thanks a alot for sharing
ReplyDeleteoracle fusion scm online training
excellent
ReplyDeleteThis function is really helpful! Can you explain the purpose of RPAD here?
ReplyDeletePharmacy franchise
Dust collector in Delhi
Why is v_period_name commented out? Is it optional for this function?
ReplyDeleteCyclone Dust Collector Delhi
Axial Flow Fans in delhi
Great post! Can this function be used for multi-currency periods in Oracle Financials?
ReplyDeleteIndustrial Exhaust Fan Manufacturer
Steel Mezzanine Floor in Delhi
It seems like the RETURN NUMBER is for the count of open periods. Is that correct?
ReplyDeleteWarehouse Racking System in delhi
Modular Mezzanine Floor Jaipur
Thanks for the detailed explanation! I’m trying to understand why the COUNT is necessary.
ReplyDeletelong span rack in ahmedabad
drum storage rack
Can you go over the AND gps.application_id IN (0000) part? Is this specific to your application?
ReplyDeletemezzanine floor gurgaon
cable tray manufacturer
I noticed RPAD is used to pad application_name — very clever for consistent formatting!
ReplyDeletedisplay rack manufacturer
industrial mezzanine floor
Any specific reason for setting gps.set_of_books_id
ReplyDeletewarehouse rack in noida
heavy duty rack faridabad
What exactly does fnd_application_tl contain? Is it Oracle-specific?
ReplyDeleteAmazing post! Can this be modified to check statuses other than 'Open'?
industrial storage rack in ghaziabad
metal storage system in delhi
Is v_period_cnt checked for any reason other than open periods? Would love more details!
ReplyDeleteFranchise Event Delhi
Distributors
Could you share more examples of using this function within an Oracle package?
ReplyDeleteCookies Distributorship
Serenoa Repens Oil Manufacturer in Korea
How efficient is this function? Any tips for optimizing Oracle PL/SQL functions?
ReplyDeleteSparsh Bagga
Automatic web Sealer
Thanks! Can we use this with dynamic parameters for set_of_books_id?
ReplyDeletePickle Distributorship
Centrifugal Blowers manufacturers
Awesome work! I’m interested in knowing more about gl_period_statuses_v views.
ReplyDeletePallet rack manufacturer in delhi
Industrial rack manufacturer in Noida
Thanks! This will help a lot in managing GL periods. Will try it out soon.
ReplyDeleteManual Dust Collector Delhi
Induced Draft Fan in Delhi
Does GRANT ALL give full access to XXLAAPPS? What does this mean in terms of security?
ReplyDeleteShrink packing delhi
Sparsh Bagga
I noticed there’s a hardcoded value of 0000 for application_id. Is there a specific reason for that?
ReplyDeleteIndustrial Storage rack India
multi tier rack in India