0 Replies Latest reply: Jul 22, 2013 9:51 AM by 3a66780d-d813-49de-b3d8-67cfc6acee19 RSS

    APEX_PLSQL_JOBS PARAMETERS

    3a66780d-d813-49de-b3d8-67cfc6acee19

      Hi,

       

      I am unable to get the control enter the Procedure mentioned.

       

      Any suggestions as to how i can get it working??

       

      Regards,

      Pavithra

      DECLARE
      l_sql    VARCHAR2(10000);
      l_job    NUMBER;
      x_status VARCHAR2(100);
      x_msg    VARCHAR2(4000);
      BEGIN
      
      IF :P20000_BROWSE IS NOT NULL THEN
         INSERT INTO ren_FILEUPLOAD(FILENAME,FILECONTENT,fname,doc_size,mimetype) 
      select filename,blob_content,name,doc_size,mime_type 
      from apex_application_files 
      where name = :P20000_BROWSE ;
      delete apex_application_files where name = :P20000_BROWSE ;
      
      IF :P20000_VENDOR='HP'  THEN
      
      l_sql := 'BEGIN REN_HP_LOAD_PKG.REN_HP_VENDORFILELOADER(:P20000_BROWSE,:P20000_VENDOR,'||NULL||',''Y'','||x_status||','||x_msg||','||NULL||',:P20000_HPFILETYPE,:P20000_HPUPLOADTYPE,:APP_JOB); END;';
      
      l_job := APEX_PLSQL_JOB.SUBMIT_PROCESS( p_sql => l_sql, p_status => 'Staging');
       IF x_status = 'S' THEN
               apex_application.g_print_success_message := '<span style="color:green">'||x_msg||'</span>';
            ELSE
               apex_application.g_print_success_message := '<span style="color:red">Upload Failed - '||x_msg||'</span>';
       END IF;
       :P20002_JOBID:=l_job;
       END IF;
      END IF;
      END;