We have an application that runs both in RealTime and Batch.
We are phasing out the Batch one in favour of RealTime.
RealTime application means that data is sent from one pc to another in
a single click of a button instantly.
Batch application waits for CRON job to run to send it across to the other pc.
How this system works? Under the hood we have a function that checks if the job
is realtime or batch (FUNCTION CheckRealTimeASCJob)
If the job is RealTime then it sets the url (basically i need not thouch this code)
If the job is Batch then Instead of follwing the url set by ReturnURL function, i
need to display a popup message That shows "INVALID USER, CONTACT ADMINISTRATOR"
I have done that here, but however, i get this popup each time i navigate.
i need this popup only once when the user chooses ASC Order link. How to do this?
Planning_Menu procedure calls ReturnURL function.
ReturnURL sets the URL page depending on job is realtime or batch.
PROCEDURE PLANNING_MENU (P_JOB_NUMBER IN JOBS.JOB_NUMBER%TYPE)
htp.tabledata(htf.em('<FONT SIZE = 4 >'||
FUNCTION ReturnURL(p_job_number IN jobs.job_number%TYPE)
bRealtimeOuc := CheckRealTimeASCJob(p_job_number) ;
--Checks and returns if the job is realtime or batch job.
IF bRealtimeEstimate = 1 THEN
--RealTime job. Do nothing. Follow the URL returned by the function
sURL := htf.anchor
||p_job_number,cText=>htf.strong(htf.em('<FONT SIZE = 4 >' ||'ASC Order'||'</FONT>')),
ELSE --batch job.
--Comment setting of url, instead popup the message and freeze the screen.
/*sURL := htf.anchor(cURL=>'nim2204w$o_hdrs.forminsert?P_JOB_NUMBER='
--if the user is batch user then this alert is shown on every time on navigation
--from one screen to another. I want that it should be shown only once when the user
--presses the link "ASC Order"
asck_utility.showalert('Invalid User: Please Call Administrator');
WHEN OTHERS THEN