Table function in other languages.

In a table, I have a column of numbers that have been typed in Arabic (So I can type in arabic no problems). 
However, in the very bottom cell, I'd like to put a fucntion such as 'sum'. it doesn't work unless I write all the numbers in English.
Is there anything I can do about this?
Thank you.

If you are talking about numbers like ١٢٣٤٥٦٧٨٩٠, I don't think any functions work with those.

Similar Messages

  • Using Pipeline Table functions with other tables

    I am on DB 11.2.0.2 and have sparingly used pipelined table functions but am considering it for a project that has some fairly big (lots of rows) sized tables. In my tests, selecting from just the pipelined table perform pretty well (whether it is directly from the pipleined table or the view I created on top of it). Where I start to see some degregation when I try to join the pipelined tabe view to other tables and add where conditions.
    ie:
    SELECT A.empno, A.empname, A.job, B.sal
    FROM EMP_VIEW A, EMP B
    WHERE A.empno = B.empno AND
          B.mgr = '7839'
    I have seen some articles and blogs that mention this as a cardinality issue, and offer some undocumented methods to try and combat.
    Can someone please give me some advice or tips on this. Thanks!
    I have created a simple example using the emp table below to help illustrate what I am doing.
    DROP TYPE EMP_TYPE;
    DROP TYPE EMP_SEQ;
    CREATE OR REPLACE TYPE EMP_SEQ AS OBJECT
           ( EMPNO                                         NUMBER(10),
             ENAME                                         VARCHAR2(100),
             JOB                                           VARCHAR2(100));
    CREATE OR REPLACE TYPE EMP_TYPE AS TABLE OF EMP_SEQ;
    CREATE OR REPLACE FUNCTION get_emp return EMP_TYPE PIPELINED AS
    BEGIN
      FOR cur IN (SELECT
                    empno,
                    ename,
                    job
                  FROM emp
             LOOP
               PIPE ROW(EMP_SEQ(cur.empno,
                                cur.ename,
                                cur.job));
             END LOOP;
             RETURN;
    END get_emp;
    create OR REPLACE view EMP_VIEW as select * from table(get_emp());
    SELECT A.empno, A.empname, A.job, B.sal
    FROM EMP_VIEW A, EMP B
    WHERE A.empno = B.empno AND
          B.mgr = '7839'

    I am on DB 11.2.0.2 and have sparingly used pipelined table functions but am considering it for a project that has some fairly big (lots of rows) sized tables
    Which begs the question: WHY? What PROBLEM are you trying to solve and what makes you think using pipelined table functions is the best way to solve that problem?
    The lack of information about cardinality is the likely root of the degradation you noticed as already mentioned.
    But that should be a red flag about pipelined functions in general. PIPELINED functions hide virtually ALL KNOWLEDGE about the result set that is produced; cardinality is just the tip of the iceberg. Those functions pretty much say 'here is a result set' without ANY information about the number of rows (cardinality), distinct values for any columns, nullability of any columns, constraints that might apply to any columns (foreign key, primary key) and so on.
    If you are going to hide all of that information from Oracle that would normally be used to help optimize queries and select the appropriate execution plan you need to have a VERY good reason.
    The use of PIPELINED functions should be reserved for those use cases where ordinary SQL and PL/SQL cannot get the job done. That is they are a 'special case' solution.
    The classic use case for those functions is for the transform stage of ETL where multiple pipelined functions are chained together: one function feeds its rows to the next function which feeds its rows to another and so on. Each of those 'chained' functions is roughly analogous to a full table scan of the data that often does not need to be joined to other data except perhaps low volumn lookup tables where the data may even be cached.
    I suggest that any exploratory or prototyping work you do use standard relational tables until such point as you run into a problem whose solution might require PIPELINED functions to solve.

  • Maintain table TVZBT in other languages (payment terms)

    Hi All,
    I try to maintain the table TVZBT (languages of payment terms) using the OBB8 transaction.
    I do log on in spanish, go to OBB8 and try to maintain the description in portuguese (in GO TO, TRADUCTION) and I maintain PT languages.
    But when I save it, the table was not maintained.
    If I do log on in portuguese, and go to OBB8 to maiantain this description, then this will be maintained in PT in the table TVZBT.
    Someone know how to maintain the languages in this table??  I can't install all the languages in SAP to do log on in all of them.
    Regards,
    Ale.

    I don't think with above steps you can updated language in Table TVZBT. Through those steps you will update this in Table T052U - Own Explanations for Terms of Pay, which you can use in respective outputs.
    Refer following SAP Notes, which talks about a SAP Report RVZTERM(Match Terms of Payment TVZB/T vs. T052) which compares above mention tables & creates missing texts in the TVZBT.
    - 6571 - Compare payment terms in TVZB/T with T052
    - 131999 - RVZTERM only selects customers
    If that does help you, better raise a ticket with SAP.
    Thanks, JP

  • Proposal to extend dialer functionality (english and other language for T9 search in dialer)

    Hello.
    Here is a proposal to extend functionality of dialer.
    In current version T9 dialer language is set to english (always) + some other language (optional ONLY IF menu's language is different fron english).
    For example.
    Menu language - english, dialer T9 - english.
    Menu language - russian, dialer T9 - english + russian,
    Please add possibility to choose language for T9 dialer with menu's language set to english. It is usual option to other dialers.
    I want to use english language for phone, but i need both english and russian for T9 dialer. 
    You need just to add option to dialer's preferences to add T9 language independently to menu's language.
    Can you do it in further updates?
    Thanks.

    There is no settings for this as standard in the phone. 
    I will pass your feedback on internally. 
    For more information about language specific questions I suggest that you contact your local support: 
    http://www.sonymobile.com/global-en/support/contact-us/
    What are your thoughts about this forum? Let us know by doing this short survey.

  • How get list of tables/functions/other objects used in a mapping?

    Hi,
    I would like to know list of objects such as tables, views, functions, procedures and table functions of all mappings in a module.
    Could any one please explain me, how can I do this using OMB+ scripting.
    Thank you,
    Regards,
    Gowtham Sen.

    OMBRETRIEVE MAPPING 'MAP_NAME' GET TABLE OPERATORS
    OMBRETRIEVE MAPPING 'MAP_NAME' GET VIEW OPERATORS
    OMBRETRIEVE MAPPING 'MAP_NAME' GET TRANSFORMATION OPERATORS
    OMBRETRIEVE MAPPING 'MAP_NAME' GET TABLE_FUNCTION OPERATORS
    Alternative variant (and maybe more simple) - use dictionary view DBA_DEPENDENCIES (or all_dependencies):
    select * from dba_dependencies where owner='MAP_OWNER' and type in ('PACKAGE','PACKAGE_BODY') and name='MAP_NAME'
    Oleg

  • Table names and column names defined by other languages, not English.

    Hi, everyone.
    I am wondering if there are any possible problems or any inconvenience
    when I define table names and column names by Japanese, not English.
    Currently, we are using SQL server 2000 as a db and windows as a operating
    system. In the near future, we have the plan to change the database software
    and operating system to "Oracle 10g" and "Linux O/S".
    I have not experienced the oracle database, which has table names and column
    names defined by other languages, not English.
    Personally, I would like to use English as table names and column names.
    In this case, I might have to provide appropriate reasons.
    Are there any possible problems or any "inconvenience" in terms of
    system maintenance, development, or something else ?
    What could be pros and cons in this case?
    Thanks in advance.
    Have a nice day.
    Best Regards.
    Ho.

    First you need to make sure your database has character set that support Japanese.
    Choosing a Character Set
    http://download-west.oracle.com/docs/cd/B19306_01/server.102/b14225/ch2charset.htm#i1007681
    The main "inconvenience" you will have is if the client doesn't support Japanese or unicode, it will have trouble to access the table.
    And say in future after the application been developed, you want to implement the schema in some English environment, you will have hard time to do it.
    My point is English tablename and column names doesn't prevent you use it in Japanese environment and save Japanese data but not vice-versa. Hope you understand.

  • Problem in sending the smartform as email for other language except english

    Hi Experts,
    I could not send the smartform as an attachment for other languages, but where as i could send it in english.
    The program is working fine with print priview but not when sending the SF as an attachment
    (in other languages except english).
    Please do find the below code which i used to send the smartform as an attachment.
    Please let me know if there is any mistake in the code.
        wa_ctrlop-LANGU = nast-spras.
        wa_ctrlop-getotf = 'X'.
        wa_ctrlop-no_dialog = 'X'.
        wa_compop-tdnoprev = 'X'.
        CALL FUNCTION lf_fm_name                  "'/1BCDWB/SF00000197'
          EXPORTING
            control_parameters = wa_ctrlop
            output_options     = wa_compop
            user_settings      = 'X'
            is_ekko            = l_doc-xekko
            is_pekko           = l_doc-xpekko
            is_nast            = l_nast
            iv_from_mem        = l_from_memory
            iv_druvo           = iv_druvo
            iv_xfz             = iv_xfz
          IMPORTING
            job_output_info    = wa_return
          TABLES
            it_ekpo            = l_doc-xekpo[]
            it_ekpa            = l_doc-xekpa[]
            it_pekpo           = l_doc-xpekpo[]
            it_eket            = l_doc-xeket[]
            it_tkomv           = l_doc-xtkomv[]
            it_ekkn            = l_doc-xekkn[]
            it_ekek            = l_doc-xekek[]
            it_komk            = l_xkomk[]
          EXCEPTIONS
            formatting_error   = 1
            internal_error     = 2
            send_error         = 3
            user_canceled      = 4
            OTHERS             = 5.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
    *Convert the data from OTF to PDF format
        it_otf[] = wa_return-otfdata[].
        CALL FUNCTION 'CONVERT_OTF'
          EXPORTING
            format                = 'PDF'
            max_linewidth         = 132
          IMPORTING
            bin_filesize          = l_len_in
            bin_file              = lp_xcontent
          TABLES
            otf                   = it_otf
            lines                 = it_tline
          EXCEPTIONS
            err_max_linewidth     = 1
            err_format            = 2
            err_conv_not_possible = 3
            OTHERS                = 4.
        IF sy-subrc <> 0.
          MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                  WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
        ENDIF.
        TRY.
      ---------- create persistent send request ----------------------
            send_request = cl_bcs=>create_persistent( ).
            len = XSTRLEN( lp_xcontent ).
    transform to solix tab
            lt_solix =
              cl_document_bcs=>xstring_to_solix(
                ip_xstring = lp_xcontent ).
    Create Body to the E-mail.
            APPEND Text-005 TO l_text.
    Attachment Name
            l_ponumber = text-004.
            CONCATENATE l_ponumber l_doc-xekko-ebeln INTO l_ponumber.
    Subject for the E-Mail.
            l_subject = text-001.
            CONCATENATE l_subject l_doc-xekko-ebeln INTO l_subject.
    *create document E-Mail.
    *TRY.
    CALL METHOD cl_document_bcs=>create_document
      EXPORTING
        i_type        = 'RAW'
        i_subject     = l_subject
        i_length      = '13'
        i_language    = nast-spras
       i_importance  =
       i_sensitivity =
        i_text        = l_text
       i_hex         =
       i_header      =
       i_sender      =
      receiving
        RESULT        = l_email_object
    CATCH cx_document_bcs .
    *ENDTRY.
           CALL METHOD cl_document_bcs=>create_document
             EXPORTING
               i_type    = 'RAW'
               i_subject = l_subject
               i_length  = '13'
               i_text    = l_text
             RECEIVING
               result    = l_email_object.
    *Create PDF Document
            bcs_doc =  cl_document_bcs=>create_document(
                                            i_type     = 'PDF'
                                            i_subject  = l_ponumber
                                            i_length   = len
                                            i_language = nast-spras
                                            i_hex     = lt_solix
    *Type casting
            obj_pdf_file ?= bcs_doc.
    Add PDF document as an attachment
            CALL METHOD l_email_object->add_document_as_attachment
              EXPORTING
                im_document = obj_pdf_file.

    hi,
    i tried with ur problem.but i am able send mail in other languages also.actaullly i wrote a msg whether the mail has been sent or not.i got success message. i am placing my code here please go thorugh it,and do relavant modifications.
    *& Report  ZPPS_SMARTFORM_TO_PDF
    REPORT  ZPPS_SMARTFORM_TO_PDF.
    PARAMETER: p_date LIKE sy-datum.
    PARAMETER: p_rea TYPE char255.
    DATA: t_otfdata TYPE ssfcrescl,
          t_lines LIKE tline OCCURS 0 WITH HEADER LINE,
          t_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
          t_RECORD LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE.
    Objects to send mail.
    DATA:T_OBJPACK LIKE SOPCKLSTI1 OCCURS 0 WITH HEADER LINE,
         T_OBJTXT LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
         T_OBJBIN LIKE SOLISTI1 OCCURS 0 WITH HEADER LINE,
         T_RECLIST LIKE SOMLRECI1 OCCURS 0 WITH HEADER LINE.
    DATA: w_filesize TYPE i,
          w_bin_filesize TYPE i,
          wa_ctrlop TYPE ssfctrlop,
          wa_outopt TYPE ssfcompop,
          WA_BUFFER TYPE STRING,          "To convert from 132 to 255
          WA_OBJHEAD TYPE SOLI_TAB,
          WA_DOC_CHNG TYPE SODOCCHGI1,
          W_DATA TYPE SODOCCHGI1.
    DATA: form_name TYPE rs38l_fnam,
          V_LINES_TXT TYPE I,
          V_LINES_BIN TYPE I,
          nast-spras type sy-langu value 'DE'.
    CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'
      EXPORTING
        FORMNAME                 = 'ZSR_DEMO1'
      VARIANT                  = ' '
      DIRECT_CALL              = ' '
    IMPORTING
       FM_NAME                  = form_name
    EXCEPTIONS
       NO_FORM                  = 1
       NO_FUNCTION_MODULE       = 2
       OTHERS                   = 3
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    wa_ctrlop-LANGU = nast-spras.
    wa_ctrlop-getotf = 'X'.
    wa_ctrlop-no_dialog = 'X'.
    wa_outopt-tdnoprev = 'X'.
    CALL FUNCTION form_name
      EXPORTING
      ARCHIVE_INDEX              =
      ARCHIVE_INDEX_TAB          =
      ARCHIVE_PARAMETERS         =
       CONTROL_PARAMETERS         = wa_ctrlop
      MAIL_APPL_OBJ              =
      MAIL_RECIPIENT             =
      MAIL_SENDER                =
       OUTPUT_OPTIONS             = wa_outopt
       USER_SETTINGS              = 'X'
        MYDATE                     = p_date
        REASON                     = p_rea
    IMPORTING
      DOCUMENT_OUTPUT_INFO       =
       JOB_OUTPUT_INFO            = t_otfdata
      JOB_OUTPUT_OPTIONS         =
    EXCEPTIONS
       FORMATTING_ERROR           = 1
       INTERNAL_ERROR             = 2
       SEND_ERROR                 = 3
       USER_CANCELED              = 4
       OTHERS                     = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    t_otf[] = t_otfdata-otfdata[].
    CALL FUNCTION 'CONVERT_OTF'
    EXPORTING
       FORMAT                      = 'PDF'
       MAX_LINEWIDTH               = 132
      ARCHIVE_INDEX               = ' '
      COPYNUMBER                  = 0
      ASCII_BIDI_VIS2LOG          = ' '
      PDF_DELETE_OTFTAB           = ' '
    IMPORTING
       BIN_FILESIZE                = w_bin_filesize
      BIN_FILE                    =
      TABLES
        OTF                         = t_otf
        LINES                       = t_lines
    EXCEPTIONS
       ERR_MAX_LINEWIDTH           = 1
       ERR_FORMAT                  = 2
       ERR_CONV_NOT_POSSIBLE       = 3
       ERR_BAD_OTF                 = 4
       OTHERS                      = 5
    IF SY-SUBRC <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    loop at t_lines.
    TRANSLATE t_lines USING '~'.
      CONCATENATE WA_BUFFER T_LINES INTO WA_BUFFER.
    ENDLOOP.
    TRANSLATE WA_BUFFER USING '~'.
    DO.
      t_RECORD = WA_BUFFER.
      APPEND t_RECORD.
      SHIFT WA_BUFFER LEFT BY 255 PLACES.
      IF WA_BUFFER IS INITIAL.
        EXIT.
      ENDIF.
    ENDDO.
    Attachment
    REFRESH: T_RECLIST,
    T_OBJTXT,
    T_OBJBIN,
    T_OBJPACK.
    CLEAR WA_OBJHEAD.
    T_OBJBIN[] = T_RECORD[].
    Create Message Body Title and Description
    T_OBJTXT = 'test with pdf-Attachment!'.
    APPEND T_OBJTXT.
    DESCRIBE TABLE T_OBJTXT LINES V_LINES_TXT.
    READ TABLE T_OBJTXT INDEX V_LINES_TXT.
    WA_DOC_CHNG-OBJ_NAME = 'smartform'.
    WA_DOC_CHNG-EXPIRY_DAT = SY-DATUM + 10.
    WA_DOC_CHNG-OBJ_DESCR = 'smartform'.
    WA_DOC_CHNG-SENSITIVTY = 'F'.
    WA_DOC_CHNG-DOC_SIZE = V_LINES_TXT * 255.
    Main Text
    CLEAR T_OBJPACK-TRANSF_BIN.
    T_OBJPACK-HEAD_START = 1.
    T_OBJPACK-HEAD_NUM = 0.
    T_OBJPACK-BODY_START = 1.
    T_OBJPACK-BODY_NUM = V_LINES_TXT.
    T_OBJPACK-DOC_TYPE = 'RAW'.
    APPEND T_OBJPACK.
    Attachment (pdf-Attachment)
    T_OBJPACK-TRANSF_BIN = 'X'.
    T_OBJPACK-HEAD_START = 1.
    T_OBJPACK-HEAD_NUM = 0.
    T_OBJPACK-BODY_START = 1.
    DESCRIBE TABLE T_OBJBIN LINES V_LINES_BIN.
    READ TABLE T_OBJBIN INDEX V_LINES_BIN.
    T_OBJPACK-DOC_SIZE = V_LINES_BIN * 255 .
    T_OBJPACK-BODY_NUM = V_LINES_BIN.
    T_OBJPACK-DOC_TYPE = 'PDF'.
    T_OBJPACK-OBJ_NAME = 'smart'.
    T_OBJPACK-OBJ_DESCR = 'test'.
    APPEND T_OBJPACK.
    CLEAR T_RECLIST.
    T_RECLIST-RECEIVER = 'MAIL-ID'.
    T_RECLIST-REC_TYPE = 'U'.
    APPEND T_RECLIST.
    CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
      EXPORTING
        DOCUMENT_DATA              = WA_DOC_CHNG
        PUT_IN_OUTBOX              = 'X'
        COMMIT_WORK                = 'X'
      TABLES
        PACKING_LIST               = T_OBJPACK
        OBJECT_HEADER              = WA_OBJHEAD
        CONTENTS_BIN               = T_OBJBIN
        CONTENTS_TXT               = T_OBJTXT
        RECEIVERS                  = T_RECLIST
      EXCEPTIONS
        TOO_MANY_RECEIVERS         = 1
        DOCUMENT_NOT_SENT          = 2
        DOCUMENT_TYPE_NOT_EXIST    = 3
        OPERATION_NO_AUTHORIZATION = 4
        PARAMETER_ERROR            = 5
        X_ERROR                    = 6
        ENQUEUE_ERROR              = 7
        OTHERS                     = 8.
    IF SY-SUBRC <> 0.
      WRITE:/ 'Error When Sending the File', SY-SUBRC.
    ELSE.
      WRITE:/ 'Mail sent'.
    ENDIF.
    and i thought of one more soluyion u can write
    wa_ctrlop-langu = T002-spras. i think it will also help for u.
    revert back if any questions.
    please reward me if helpful.
    gupta.pullipudi

  • Field or table alias is not allowed as an input of table functions

    Hi,
    I am trying to invoke a user defined table function through a SQL snippet like below.
    SELECT (SELECT * FROM PKG_ORG_ORG_HAS_CHILDREN(org_id)) has_child
    from PA_ORG_OWNER
    where stud_id = 'np1';
    But for some reason it will not accept column name as an IN parameter
    Could not execute 'SELECT (SELECT * FROM PKG_ORG_ORG_HAS_CHILDREN(org_id)) has_child from PA_ORG_OWNER os where ...' in 2 ms 451 µs .
    SAP DBTech JDBC: [7] (at 47): feature not supported: field or table alias is not allowed as an input of table functions: line 1 col 48 (at pos 47)
    In general our product has a LOT of small Oracle PL/SQL functions that are invoked from SQL within application code. This is a huge bottleneck while migrating to HANA. Any best practice anyone can recommend for this issue?
    -Thanks
    nphana

    Hi nphana,
    Instead of using single function, you can create another function and Invoke the function and can use IN parameter.
    Here is the example:
    CREATE FUNCTION RAJ.MY_FUNC (I_VKORG NVARCHAR (4), I_VTWEG NVARCHAR (2), 
                 I_SPART NVARCHAR (2),  I_PARVW NVARCHAR (2), I_PARZA NVARCHAR (3) )
    RETURNS TABLE (KUNNR NVARCHAR (10))
    LANGUAGE SQLSCRIPT AS
    BEGIN
      RETURN
      SELECT "ECC2HANA"."KNVP".KUNNR FROM  "ECC2HANA"."KNVP"
       WHERE "ECC2HANA"."KNVP".VKORG = :I_VKORG
         AND "ECC2HANA"."KNVP".VTWEG = :I_VTWEG
         AND "ECC2HANA"."KNVP".SPART = :I_SPART
         AND "ECC2HANA"."KNVP".PARVW = :I_PARVW
         AND "ECC2HANA"."KNVP".PARZA = :I_PARZA
    END
    SELECT * FROM RAJ.MY_FUNC('7500','10','00','AG','000');
    Result is shown below:
    Now I created another function so that I can use the result set of above function which is used as criteria for some other table.
    I not used any input parameter for second function but can be used if required.
    CREATE FUNCTION RAJ.FUNC_MY_FUNC ( )
    RETURNS TABLE (NAME1 NVARCHAR (35))
    LANGUAGE SQLSCRIPT AS
    BEGIN
    RETURN 
    SELECT "ECC2HANA"."KNA1".NAME1 FROM "ECC2HANA"."KNA1"
      WHERE "ECC2HANA"."KNA1".KUNNR IN (SELECT * FROM RAJ.MY_FUNC('7500','10','00','AG','000'));
    END;
    Result is shown below:
    Similarly you can do for your requirement.
    Regards
    Raj

  • How to use the Table Function defined  in package in OWB?

    Hi,
    I defined a table function in a package. I am trying to use that in owb using Table function operator. But I came to know that, owb R1 supports only standalone table functions.
    Is there any other way to use the table function defined in a package. As like we create synonyms for functions, is there any other way to do this.
    I tryed to create synonyms, it is created. But it is showing compilation error. Finally I found that, we can't create synonyms for functions which are defined in packages.
    Any one can explain it, how to resolve this problem.
    Thank you,
    Regards
    Gowtham Sen.

    Hi Marcos,
    Thank you for reply.
    OWB R1 supports stand alone table functions. Here what I mean is, the table fucntion which is not inculded in any package is a stand alone table function.
    for example say sample_tbl_fn is a table function. It is defined as a function.It is a stand alone function. We call this fucntion as "samp_tbl_fn()";
    For exampe say sample_pkg is a package. say a function is defined in a package.
    then we call that function as sample_pkg.functionname(); This is not a stand alone function.
    I hope you understand it.
    owb supports stand alone functions.
    Here I would like to know, is there any other way to use the functions which are defined in package. While I am trying to use those functions (which are defined in package -- giving the name as packagename.functionname) it is throwing an error "Invalid object name."
    Here I would like know, is there any other way to use the table functions which are defined in a package.
    Thank you,
    Regards,
    Gowtham Sen.

  • Table function on a collection in Dynamic SQL

    Hello,
    I am trying to create a refcursor by selecting from a collection using table function.
    If I use the Select statement the query executes, but if I put the Select statement in a string
    the collection variable does not get resolved. The resaon I am putiing it in a string is because the
    WHERE clause will be passed a parameter. The code below is an anonymous block but will be changed to a
    procedure once I get it to work.
    I have tried many different ways but was unsuccessful.
    Please see if anybody cann assist or what I am trying to achive is not possible, so provide an alternative.
    The error I am getting is
    ORA-00904: "V_ALARM_REC_TABLE": invalid identifier
    ORA-06512: at line 50
    Thanks.
    Bimal
    DECLARE
    TYPE c_refcurtype IS REF CURSOR;
    x c_refcurtype;
    p_recordset c_refcurtype;
    v_rec mc2_dev2.mc2_alarm_rec_type := mc2_dev2.mc2_alarm_rec_type(null,null,null,null,null,null,null,null,
    null,null,null,null,null,null,null,null,
    null,null,null,null,null,null,null);
    v_alarm_rec_table mc2_dev2.mc2_alarm_rec_table := mc2_dev2.mc2_alarm_rec_table();
    v_select varchar2(200) := 'select a.* from ';
    v_table varchar2(200) := 'table(v_alarm_rec_table) a ';
    v_where varchar2(200) := 'where a.alarm_rule_def_uid = 9';
    v_query varchar2(32000);
    BEGIN
    MC2_ALARM.create_mc2_alarm(x, 1); --- ( X is a refcursor, which I will use to populate v_alarm_rec_table a (nested table collection)
    LOOP
    FETCH x INTO v_rec.record_cnt,
    v_rec.rn,
    v_rec.alarm_precision_order,
    v_rec.alarm_rule_def_uid,
    v_rec.alarm_type_def_uid,
    v_rec.alarm_rule_scope_uid,
    v_rec.trigger_tpl_master_uid,
    v_rec.alarm_scope_def_uid,
    v_rec.alarm_object_uid,
    v_rec.error_type,
    v_rec.all_error_codes,
    v_rec.enabled,
    v_rec.start_hour,
    v_rec.end_hour,
    v_rec.day_type,
    v_rec.alarm_severity_def_uid,
    v_rec.on_watch_duration,
    v_rec.update_on_status_change,
    v_rec.log_ind,
    v_rec.email_to,
    v_rec.email_from,
    v_rec.send_email,
    v_rec.stale_period;
    EXIT WHEN x%NOTFOUND;
    v_alarm_rec_table.extend;
    v_alarm_rec_table(v_alarm_rec_table.last) := v_rec;
    END LOOP;
    CLOSE x;
    v_query := v_select||v_table||v_where; -- ERROR OCCURS AT THIS LINE as it cannot resolve the TABLE name  v_alarm_rec_table)
    dbms_output.put_line('sql: '||v_query);
    OPEN p_recordset FOR v_query;
    LOOP
    FETCH p_recordset INTO v_rec.record_cnt,
    v_rec.rn,
    v_rec.alarm_precision_order,
    v_rec.alarm_rule_def_uid,
    v_rec.alarm_type_def_uid,
    v_rec.alarm_rule_scope_uid,
    v_rec.trigger_tpl_master_uid,
    v_rec.alarm_scope_def_uid,
    v_rec.alarm_object_uid,
    v_rec.error_type,
    v_rec.all_error_codes,
    v_rec.enabled,
    v_rec.start_hour,
    v_rec.end_hour,
    v_rec.day_type,
    v_rec.alarm_severity_def_uid,
    v_rec.on_watch_duration,
    v_rec.update_on_status_change,
    v_rec.log_ind,
    v_rec.email_to,
    v_rec.email_from,
    v_rec.send_email,
    v_rec.stale_period;
    EXIT WHEN p_recordset%NOTFOUND;
    some dbms_output statements...
    END LOOP;
    END;
    The error I am getting is
    ORA-00904: "V_ALARM_REC_TABLE": invalid identifier
    ORA-06512: at line 50

    Thanks Timur/Solomon,
    mc2_dev2 is the schema name.
    mc2_alarm_rec_table is a SQL type.
    Here are the scripts:
    CREATE OR REPLACE TYPE MC2_DEV2.mc2_alarm_rec_type IS OBJECT
    ( record_cnt NUMBER,
    rn number,
    alarm_precision_order NUMBER(6),
    alarm_rule_def_uid NUMBER(6),
    alarm_type_def_uid NUMBER(6),
    alarm_rule_scope_uid NUMBER(6),
    trigger_tpl_master_uid NUMBER(6),
    alarm_scope_def_uid NUMBER(6),
    alarm_object_uid NUMBER(6),
    error_type VARCHAR2(1),
    all_error_codes VARCHAR2(1),
    enabled VARCHAR2(1),
    start_hour NUMBER(2),
    end_hour NUMBER(2),
    day_type NUMBER(2),
    alarm_severity_def_uid NUMBER(6),
    on_watch_duration NUMBER(6),
    update_on_status_change VARCHAR2(1),
    log_ind VARCHAR2(1),
    email_to VARCHAR2(128),
    email_from VARCHAR2(128),
    send_email VARCHAR2(1),
    stale_period          NUMBER(6)
    CREATE OR REPLACE TYPE MC2_DEV2.MC2_ALARM_REC_TABLE IS TABLE OF MC2_DEV2.mc2_alarm_rec_type;
    If I popoulate the cursor with the following code:
    OPEN p_recordset FOR
    select a.* from table (v_alarm_rec_table) a where a.alarm_rule_def_uid = 9;
    there is no issue it works just fine.
    But when when I use
    OPEN p_recordset FOR v_query; ---- where v_query := v_select||v_table||v_where;
    the variable v_alarm_rec_table does not get resolved.
    Regards,
    Bimal

  • Performance issues with pipelined table functions

    I am testing pipelined table functions to be able to re-use the <font face="courier">base_query</font> function. Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? The <font face="courier">processor</font> function is from [url http://www.oracle-developer.net/display.php?id=429]improving performance with pipelined table functions .
    Edit: The underlying query returns 500,000 rows in about 3 minutes. So there are are no performance issues with the query itself.
    Many thanks in advance.
    CREATE OR REPLACE PACKAGE pipeline_example
    IS
       TYPE resultset_typ IS REF CURSOR;
       TYPE row_typ IS RECORD (colC VARCHAR2(200), colD VARCHAR2(200), colE VARCHAR2(200));
       TYPE table_typ IS TABLE OF row_typ;
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ;
       c_default_limit   CONSTANT PLS_INTEGER := 100;  
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY);
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ);
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ);
    END pipeline_example;
    CREATE OR REPLACE PACKAGE BODY pipeline_example
    IS
       FUNCTION base_query (argA IN VARCHAR2, argB IN VARCHAR2)
          RETURN resultset_typ
       IS
          o_resultset   resultset_typ;
       BEGIN
          OPEN o_resultset FOR
             SELECT colC, colD, colE
               FROM some_table
              WHERE colA = ArgA AND colB = argB;
          RETURN o_resultset;
       END base_query;
       FUNCTION processor (
          p_source_data   IN resultset_typ,
          p_limit_size    IN PLS_INTEGER DEFAULT c_default_limit)
          RETURN table_typ
          PIPELINED
          PARALLEL_ENABLE(PARTITION p_source_data BY ANY)
       IS
          aa_source_data   table_typ;-- := table_typ ();
       BEGIN
          LOOP
             FETCH p_source_data
             BULK COLLECT INTO aa_source_data
             LIMIT p_limit_size;
             EXIT WHEN aa_source_data.COUNT = 0;
             /* Process the batch of (p_limit_size) records... */
             FOR i IN 1 .. aa_source_data.COUNT
             LOOP
                PIPE ROW (aa_source_data (i));
             END LOOP;
          END LOOP;
          CLOSE p_source_data;
          RETURN;
       END processor;
       PROCEDURE with_pipeline (argA          IN     VARCHAR2,
                                argB          IN     VARCHAR2,
                                o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT /*+ PARALLEL(t, 5) */ colC,
                      SUM (CASE WHEN colD > colE AND colE != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD != '0' THEN '1' END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM TABLE (processor (base_query (argA, argB),100)) t
             GROUP BY colC
             ORDER BY colC
       END with_pipeline;
       PROCEDURE no_pipeline (argA          IN     VARCHAR2,
                              argB          IN     VARCHAR2,
                              o_resultset      OUT resultset_typ)
       IS
       BEGIN
          OPEN o_resultset FOR
               SELECT colC,
                      SUM (CASE WHEN colD > colE AND colE  != '0' THEN colD / ColE END)de,
                      SUM (CASE WHEN colE > colD AND colD  != '0' THEN colE / ColD END)ed,
                      SUM (CASE WHEN colD = colE AND colD  != '0' THEN 1 END) de_one,
                      SUM (CASE WHEN colD = '0' OR colE = '0' THEN '0' END) de_zero
                 FROM (SELECT colC, colD, colE
                         FROM some_table
                        WHERE colA = ArgA AND colB = argB)
             GROUP BY colC
             ORDER BY colC;
       END no_pipeline;
    END pipeline_example;
    ALTER PACKAGE pipeline_example COMPILE;Edited by: Earthlink on Nov 14, 2010 9:47 AM
    Edited by: Earthlink on Nov 14, 2010 11:31 AM
    Edited by: Earthlink on Nov 14, 2010 11:32 AM
    Edited by: Earthlink on Nov 20, 2010 12:04 PM
    Edited by: Earthlink on Nov 20, 2010 12:54 PM

    Earthlink wrote:
    Contrary to my understanding, the <font face="courier">with_pipeline</font> procedure runs 6 time slower than the legacy <font face="courier">no_pipeline</font> procedure. Am I missing something? Well, we're missing a lot here.
    Like:
    - a database version
    - how did you test
    - what data do you have, how is it distributed, indexed
    and so on.
    If you want to find out what's going on then use a TRACE with wait events.
    All nessecary steps are explained in these threads:
    HOW TO: Post a SQL statement tuning request - template posting
    http://oracle-randolf.blogspot.com/2009/02/basic-sql-statement-performance.html
    Another nice one is RUNSTATS:
    http://asktom.oracle.com/pls/asktom/ASKTOM.download_file?p_file=6551378329289980701

  • Interactive report on view based on pipelined table function.

    Hi,
    I want to build an Interactive Report on a view.
    The view definition contains a select on a pipelined table function. I use context functionality to pass paramaters to the pipelined table function.
    A plain select * from #my_view# in SqlPlus results in 121 different rows.
    However, If I base my Interactive report on this view, I get 15 repeated rows (all the same).
    Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working.
    If I use the following approach (http://rakeshjsr.blogspot.nl/2010/10/oracle-apex-interactive-report-based-on.html) I do get results, but I can't use this solution for a reason that's not relevant.

    Hello,
    Is it possible to use pipelined table functionality on an Interactive report? I can't seem to get it working. I have used it in one instance and it works fine. However I was passing the values to pipe-lined function directly.
    IR Query..
    SELECT * FROM TABLE(fn_pipeline(:P1_ITEM_NAME))Call pipe-lined function from IR query directly (instead of using view)
    Try sending values to Pipe-lined function directly. In-case if the problem is with setting and getting values from the context?
    Regards,
    Hari

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • Drop default constraint on a table function

    I need to drop some default constraints that appear to be tied to table functions (and not actual tables).  This means when I try the ALTER TABLE DROP CONSTRAINT command it fails with the error, "unable to drop constraint because object is not
    a table" or something similar.
    My question is: how do I drop a constraint on a table function?

    I suggest you review the documentation for TVFs and how they are (and can be) used.  The table returned by a TVF (and in this case I refer specifically to multistatement TVFs) are defined using a subset of the create table syntax.  They can be
    created with constraints of different types - not just defaults.  Why?  Because it suits the logic of the developer and (perhaps) because it assists the database engine or the logic that depends on the output of the function.  
    Below is one example that I used (written by Steve Kass) from a LONG time ago.  Notice the primary key.
    CREATE FUNCTION [dbo].[uf_sequence] (@N int)
    RETURNS @T TABLE (
    seq int not null primary key clustered
    AS
    ** 04/21/05.sbm - Bug #306. Initial version.
    ** Code provided by Steve Kass - MS .programming newsgroup
    BEGIN
    DECLARE @place int
    SET @place = 1
    INSERT INTO @T (seq) VALUES (0)
    WHILE @place <= @N/2 BEGIN
    INSERT INTO @T (seq)
    SELECT @place + Seq FROM @T
    SET @place = @place + @place
    END
    INSERT INTO @T (seq)
    SELECT @place + Seq FROM @T
    WHERE Seq <= @N - @place
    RETURN
    END
    go
    For your particular case, the choice of a default constraint is likely due to the implementation of the logic in the function.  Perhaps there are multiple insert statements and it was simpler/easier/more robust to use a default constraint rather than
    repeatedly hard-code the value in each statement.  By choosing a default constraint, the developer need only alter the constraint (once) if the value needs to be changed rather than finding and changing each statement that inserts or updates the table.
    As you've have already discerned, you can simply ignore any constraints that are defined on the tables returned by a TVF.  

  • How to find out the Area Menu for a Report/ Table/Function Module

    Hi,
    Is there any procedure to find out the <b>"AREA MEANU"</b> for a Report/Table/Function Module...
    Or is there any Transaction code / Report is available to find out all the report for a particular "AREA MENU".
    Thank you for your quick response...
    Regards,
    Thiru
    <b></b>

    Hi,
    Check these below threads:
    user log in & log out time SAO
    How to find user log-out time ?
    Regards,
    Nitin

Maybe you are looking for