2 Replies Latest reply on Nov 11, 2013 7:27 PM by Billy~Verreynne

    Calling a seeded API - APEX throws an error on the plsql.  In Toad it runs fine.

    mikez


      The developer gave me the following code to run in Toad.

      It prompts the users for specific values and then executes-building a temp table.

       

      When I run in the SQL workship in APEX I get the following error message.  It appears APEX doesnt like the & prefix.

      Is there a way around this.....thanks

      *********************************************************************************************************************

      ORA-06550: line 9, column 43:

      PLS-00103: Encountered the symbol "&" when expecting one of the following:

       

         ( - + case mod new not null <an identifier>

         <a double-quoted delimited-identifier> <a bind variable>

         continue avg count current exists max min prior sql stddev

         sum variance execute forall merge time timestamp interval

         date <a string literal with character set specification>

         <a number> <a single-quoted SQL string> pipe

         <an alternatively-quoted string literal with character set specif

       

      7.      DECLARE

      8.    --- MD50 Mapping Parameters  

      9.    p_inventory_organization_id    NUMBER:=&inventory_organization_id;                              --Inventory Organization=85 ;Mandatory

      10.    p_assembly_item_id             NUMBER:=&assembly_item_id;                                       --Assembly Item=19013   ;Mandatory

      11.    p_alternate             

      **************************************************************************************************************************

       

       

      Developer code

       

      /* --------------------------------------------------------------------------------
          We have to call this seeded API for explode an assembly item  to get details of
         child sub assemblies and raw material components .  
         ---------------------------------------------------------------------------------------*/


           DECLARE
         --- MD50 Mapping Parameters  
         p_inventory_organization_id    NUMBER:=&inventory_organization_id;                              --Inventory Organization=85 ;Mandatory
         p_assembly_item_id             NUMBER:=&assembly_item_id;                                       --Assembly Item=19013   ;Mandatory
         p_alternate                    VARCHAR2(100)  :=&alternate;                                     --Alternate ;Optional
         p_assembly_revision            MTL_ITEM_REVISIONS_B.REVISION%type:=&assembly_revision;          --Assembly Revision ;Optional
         p_effective_date               DATE:=nvl(&effective_date,sysdate);                             --Effective Date;Optional
         p_levels_to_explode            NUMBER:=nvl(&levels_to_explode,10) ;                             --Levels to Explode;Optional
         p_display_option               NUMBER:=nvl(&display_option,1)  ;                                --Display Option;Optional
         p_explosion_quantity           NUMBER:=nvl(&explosion_quantity,1) ;                             --Explosion Quantity;Optional