7 Replies Latest reply: Dec 29, 2012 12:14 AM by 963717 RSS

    Multi Org Error

    963717
      Hi,
      procedure get_invoices(cur out t_cursor) -- t_cursor is a ref cursor
      as
      begin
      apps.mo_global.set_policy_context('S',82);

      open for cur
      select * from ap_invoices_all;


      end;

      when i call this procedure it is throwing error. {table and view dose not exist }
      please anybody guide me how can i use view in procedure.

      It's urgent.

      Thanks,
      GreenX
        • 1. Re: Multi Org Error
          yoonas
          Hi,

          In which shcema are you creating this procedure and where are you calling this procedure? When you compiled the procedure it got compiled successfully?

          Regards
          yoonas
          • 2. Re: Multi Org Error
            963717
            Yes,
            i have a custom scheme and no complied error and i calling this procedure through .Net C#.

            Regards,
            Tariq
            • 3. Re: Multi Org Error
              AlexAnd
              >
              procedure get_invoices(cur out t_cursor) -- t_cursor is a ref cursor
              as
              begin
              apps.mo_global.set_policy_context('S',82);

              open for cur
              select * from ap_invoices_all;

              end;
              >
              why you can try to use multi-org by mo_global if you aren't using it in your procedure?

              >
              select * from ap_invoices_all
              >
              this code doesn't use moac

              if you want moac use
              select * from ap_invoices;
              also example Re: When to use MO_GLOBAL.INIT and MO_GLOBAL.SET_POLICY_CONTEXT.


              >
              i have a custom scheme and no complied error and i calling this procedure through .Net C#.
              >
              why do you think what's error of Multi Org?
              why not
              >
              open for cur
              select * from ap_invoices_all;
              >
              ?

              try
              procedure get_invoices(cur out t_cursor) -- t_cursor is a ref cursor
              as
              begin
              
              -- init org_id
              begin
               apps.mo_global.set_policy_context('S',82);
              end;
              
              --open for cur
              open cur for
              select * from ap_invoices;
              
              end;
              --add
              as example using c# to ebs
              https://andyblg.wordpress.com/2012/06/27/c-to-ebs-r12/

              Edited by: AlexAnd on Dec 27, 2012 1:40 AM
              • 4. Re: Multi Org Error
                yoonas
                Grant privilege on ap_invoices_all to your custom scheme and use apps.ap_invoices_all in your query
                • 5. Re: Multi Org Error
                  AlexAnd
                  >
                  Grant privilege on ap_invoices_all to your custom scheme and use apps.ap_invoices_all in your query
                  >
                  not quite true for moac

                  ap_invoices_all not use moac
                  for moac use ap_invoices

                  about privilege
                  it's may be true but
                  >
                  i have a custom scheme and no complied error
                  >

                  looks like OP is lying ;)
                  also based on
                  >
                  open for cur
                  • 6. Re: Multi Org Error
                    yoonas
                    Thanks Alex for pointing out that, i will have to read more on moc :)

                    Regards
                    Yoonas
                    • 7. Re: Multi Org Error
                      963717
                      Thanks very much AlexAnd.