Wednesday 15 May 2024

Oracle Apps : Global Descriptive Flexfield not enabling for Malaysia on AR Transaction Form

For one of our customers, we enabled the Global Descriptive Flexfield (GDFF) for India and Malaysia.  The GDFF appeared successfully for India responsibility, but was not enabled for Malaysia responsibility. All the needed configurations were correctly done for both countries.

Configurations at a high level.

  • Added 2 contexts (and the needed segments) for the DFF JG_RA_CUSTOMER_TRX as below 
    • JA.IN.ARXTWMAI.RA_CUSTOMER_TRX
    • JA.MY.ARXTWMAI.RA_CUSTOMER_TRX
  • Set the following profiles under Profile Options:
    • JG: Applications
    • JG: Product 
    • JG: Territory
  • Added the function JG_ENABLE_GLOBAL_FLEX to the root menu of both country responsibilities

Upon conducting extensive investigation, we discovered that the 'JA.pll' was not getting called when the form was opened from the Malaysia responsibility.  This pll is supposed to be opened for the Asia Pacific countries, which includes both India and Malaysia.

Further investigation revealed that 'GLOBE.pll' was being called, but there was a code in that PLL which was missing Malaysia (MY) in the list within the procedure 'GET_PRODUCT_FROM_COUNTRY'.

So, the solution was to modify 'GLOBE.pll' and add the country code 'MY' to the list.

The modified code looks like below:



After compiling the modified PLL in the server, the GDFF started appearing in the AR Transaction Form.




Note: If your version of PLL is a higher version, then this may not be an issue for you.



Feel free to point out if anything is missing/wrong in this blog.

Saturday 11 May 2024

PL/SQL: Sample code for submitting a DBMS_SCHEDULER jobs

 In this post I will provide a sample simple code to submit a dbms_scheduler job.

  • Create a procedure. You can create a procedure inside a package also if needed.
 --create table   
 CREATE TABLE xxaj_debug (  
              ,id         NUMBER  
              ,msg        VARCHAR2(4000)  
              ,call_stack VARCHAR2(4000)  
              ,date_stamp DATE  
             );  
 --create sequence   
 CREATE SEQUENCE xxaj_seq  
  START WITH 1  
  INCREMENT BY 1; 
  
 --create procedure   
 CREATE OR REPLACE PROCEDURE xxaj_proc (msg VARCHAR2)  
 IS  
  PRAGMA autonomous_transaction;  
 BEGIN  
   INSERT INTO xxaj_debug  
   VALUES ( xxaj_seq.NEXTVAL  
           ,msg  
           ,dbms_utility.format_call_stack  
           ,SYSDATE);  
   COMMIT;  
 END xxaj_proc;   

You can execute the below code to submit the above procedure as a dbms job.
            Parameters
                job_name      : you can give any name. Give something meaningful so that you can filter with 
                                        the  name when trouble shooting
                job_type        : in this case it is a stored procedure
                job_action     : in this case we are executing a stored procedure, so specify the procedure                                                  name
                enabled         : we want the job to run straight away, so set to true  

 BEGIN  
   dbms_scheduler.create_job (job_name   => 'XXAJ_JOB_'||TO_CHAR(SYSDATE, 'DDMMHH24MI')  
                             ,job_type   => 'STORED_PROCEDURE'  
                             ,job_action => 'xxaj_proc'  
                             ,enabled    => TRUE);  
 END;   

There are lot more options on the job submission. I will create a separate blog with different variances. 

You can also refer the below oracle site for the details.

Refer:Scheduler (DBMS_SCHEDULER) in Oracle Database 10g Onward



Feel free to point out if anything is missing/wrong in this blog.