Using a function to create a report

Hi,
I have a report created with a select statement, I would like to create a function which will return the result of the select statement and use this function to create the report ?
Does anybody know how I can do it ? I mean how to create a function returning a select statement, something like :
function return_table(){ return (select * from emp;)}
And how to use this function to generate a report ?
Benn

There is an application report that give you a listing of your region source and allows you to search the source and gives you links to edit it.
Application Reports>Page Components>Search Region Source
So you shouldn't have to keep it in a separate file.

Similar Messages

  • Is there a common RFC/BAPI so that using it I can create multi report in EP

    Hi,
    I am new to EP ..
    I have to generate some 25 reports of R3 systems which shoudl be exposed to EP. After going thru the docs on EP..
    It says that for every reports I need to create either an RFC or a BAPI. But It is a tedious job to create RFC functions for every report. Since these report is already there(Written) in the R3 System. I hate to convert these again as an RFC for every report.
    Is there a common RFC /BAPI where I need to pass required parameters and the transaction code for a specific report instead of creating a new RFC for every reports. so that that specific RFC will do the job for me.
    Is there a better/intelligent way to accomplish this task.
    Please do not say use SAP trasnational iViews ... As this expose the SAP GUI directly to the user..thru this one can trigger new transactions ... Correct me if I am wrong.
    thanks
    Pkiran

    thanks mario,
    very helpful answer
    pkiran

  • Report template 101 - Comment Bubbles (used during creating SQL Report)

    Hi,
    There is a Report template type - Comment Bubbles [ Theme - 24, 25, 26 ]
    Has anyone ever tried using this template while creating SQL Report.
    OR if anyone knows how to use this and what should be the syntax of SQL query for using this template.
    Thanks,
    Deepak

    Hi Deepak.
    I assume you're running APEX 4.2
    There is a packaged application included with 4.2 which is called "Customer Tracker"
    On page 50 you find a rewgion where these comment bubles are used ( unlock the application to view the source ).
    Regards
    Bas

  • Create SSRS report using DMV for querying SSAS cube.

    I am trying to create a SSRS Report to find the Cube/Dimension Status (when was Cube/Dimension last processed and is Failed/Success), for example I have below DMV query for the same.
    SELECT CUBE_NAME, LAST_DATA_UPDATE FROM $System.MDSCHEMA_CUBES
    When i execute the above query in MDX query window it comes up with results, when i try to create a data using the above query in report server its coming up with error.
    Error : Please verify that the query is an MDX one and not DMX. (Microsoft.AnalysisServices.Controls)
    Can we use DMV querys for createing SSRS report and what should be the datasource.
    Thank You.
    Praveen

    Hi Praveen,
    Glad to hear that the issue had been solved. Thank you for sharing the useful information.
    Regards,
    Charlie Liao
    If you have any feedback on our support, please click
    here.
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to use email function in crystal report ?

    Post Author: kudo
    CA Forum: .NET
    Hi I'm a novice by touching .net not more than 2 months. Can somebody guide me how to use email function provided in crystal report components?(Better put a sample code so that I can understand well.)  ps: I'm using VS2005 VB.net.Thanks.

    Post Author: mewdied
    CA Forum: .NET
    'EXPORT to EMAIL        ''' Code for exporting the report to Mapi (.Net Windows application)        ''' *For a Web application you must export to disk as a PDF file first.
            crReportDocument.Load(Application.StartupPath + "\World Sales Report.rpt")        crMicrosoftMailDestinationOptions = New MicrosoftMailDestinationOptions        With crMicrosoftMailDestinationOptions            .MailCCList = "[email protected]"            .MailToList = "[email protected]"            .MailSubject = "Attached exported report"            .UserName = "admin"            .Password = "password"        End With
            crExportOptions = crReportDocument.ExportOptions        With crExportOptions            .DestinationOptions = crMicrosoftMailDestinationOptions            .ExportDestinationType = ExportDestinationType.MicrosoftMail            .ExportFormatType = ExportFormatType.PortableDocFormat        End With
            'Add some error handling        Try            crReportDocument.Export()            MsgBox("Report exported successfully.")        Catch err As Exception            MessageBox.Show(err.ToString())        End Try
    Hope this helps

  • Difficulty in creating a chart by using a function with a returned value

    Hi,
    I am having a problem in using own function to create chart a with a returned value as the chart. If not using the returned value, it works fine.
    Is this a known issue?

    If you share some code, we might be able to help you.

  • Not using substitute material while creating sales order with function?

    hi experts.
    I use SD_SALESDOCUMENT_CREATE function to create a sales order.
    Material A has a substitute material B with substitute reason 0005.
    So if I use material A when creating sales order with SD_SALESDOCUMENT_CREATE, the order is created with material B.
    I don't want to substitute the material automatically. I want to create the sales order with material A.
    What should I do? Help me please.
    Edited by: Ji Yeob Kim on Nov 19, 2009 11:34 AM

    Hi Kim,
    I also have same requirement. Please suggest how you resolved this?
    Thanks
    bvrnreddy

  • Create CVC using Standard Function /SAPAPO/TS_PLOB_CREATE

    Hello All,
    please can you explain me in detail how the Function /SAPAPO/TS_PLOB_CREATE work to create the CVC.
    we have a custom program that use this function to create the CVC for Italy Project, we have copied this program to use it for a roll out project in brasile, my client is asked me for the new project brasile should we create new tables?
    my interest is to now if this function need a custom table to work? or we can use it in various program without needing different
    tables?
    if we use this function on the same system to create CVC for different area Italy/brasile will we have some problem on the data?
    for our brasile project we have created new custom master data  tables.
    thanks for All
    Bilal

    Hi Bilal ,
    Function /SAPAPO/TS_PLOB_CREATE - Create Single characteristic combination, is nothing but a program  called internally in standard TCode: /sapapo/mc62 for CVC creation. This function is used specifically when you want to create single CVC based on the individually/interactively entered characteristics combination.
    Whereas there is a similar function /SAPAPO/TS_PLOB_MAINTAIN-Create Characteristic combinations (again a part of standard TCode/SAPAPO/MC62 called internally) which is used for multiple CVC creation based on the characteristic data either from MPOS, Info provider, external file or BAdI.
    As understand from your requirement that you want to roll out the CVC creation process based on the table entries, we have similar setup in which we have following process which is working very fine u2026
    -We have created a Z Table where the new characteristic combinations are entered globally -for all four regions
    -Based on entries in that Z table as a data source we have built a Info provider(Cube) and then
    -This Info provider is used in function /SAPAPO/TS_PLOB_MAINTAIN (as a part of scheduled jobs running with some frequency) to create multiple CVC combinations across regions.
    Hope this helps youu2026
    Regards,
    Digambar

  • Error in XXL_FULL_API function module for download report to excel

    Hi all,
    I am using XXL_FULL_API function module for download report to excel, In this FM we have to fill a table called sema        = t_gxxlt_s. in this table we have a fields called
    i_sema-col_no  = 19.
      i_sema-col_src = 19.
      i_sema-col_typ = 'STR'.
      i_sema-col_ops = 'DFT'
    here in 'col_typ' if we put STR in excel it will come as a text but i wnat the time field what i have to pass ?
    and for filed 'col_ops' also ??
    Thaks,
    Sridhar

    Hi sridhar joshi,
    Please check this program
    REPORT Excel.
    TABLES:
      sflight.
    * header data................................
    DATA :
      header1 LIKE gxxlt_p-text VALUE 'Suresh',
      header2 LIKE gxxlt_p-text VALUE 'Excel sheet'.
    * Internal table for holding the SFLIGHT data
    DATA BEGIN OF t_sflight OCCURS 0.
            INCLUDE STRUCTURE sflight.
    DATA END   OF t_sflight.
    * Internal table for holding the horizontal key.
    DATA BEGIN OF  t_hkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_h.
    DATA END   OF t_hkey .
    * Internal table for holding the vertical key.
    DATA BEGIN OF t_vkey OCCURS 0.
            INCLUDE STRUCTURE gxxlt_v.
    DATA END   OF t_vkey .
    * Internal table for holding the online text....
    DATA BEGIN OF t_online OCCURS 0.
            INCLUDE STRUCTURE gxxlt_o.
    DATA END   OF t_online.
    * Internal table to hold print text.............
    DATA BEGIN OF t_print OCCURS 0.
            INCLUDE STRUCTURE gxxlt_p.
    DATA END   OF t_print.
    * Internal table to hold SEMA data..............
    DATA BEGIN OF t_sema OCCURS 0.
            INCLUDE STRUCTURE gxxlt_s.
    DATA END   OF t_sema.
    * Retreiving data from sflight.
    SELECT * FROM sflight
             INTO TABLE t_sflight.
    * Text which will be displayed online is declared here....
    t_online-line_no    = '1'.
    t_online-info_name  = 'Created by'.
    t_online-info_value = 'KODANDARAMI REDDY'.
    APPEND t_online.
    * Text which will be printed out..........................
    t_print-hf     = 'H'.
    t_print-lcr    = 'L'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the header'.
    APPEND t_print.
    t_print-hf     = 'F'.
    t_print-lcr    = 'C'.
    t_print-line_no = '1'.
    t_print-text   = 'This is the footer'.
    APPEND t_print.
    * Defining the vertical key columns.......
    t_vkey-col_no   = '1'.
    t_vkey-col_name = 'MANDT'.
    APPEND t_vkey.
    t_vkey-col_no   = '2'.
    t_vkey-col_name = 'CARRID'.
    APPEND t_vkey.
    t_vkey-col_no   = '3'.
    t_vkey-col_name = 'CONNID'.
    APPEND t_vkey.
    t_vkey-col_no   = '4'.
    t_vkey-col_name = 'FLDATE'.
    APPEND t_vkey.
    * Header text for the data columns................
    t_hkey-row_no = '1'.
    t_hkey-col_no = 1.
    t_hkey-col_name = 'PRICE'.
    APPEND t_hkey.
    t_hkey-col_no = 2.
    t_hkey-col_name = 'CURRENCY'.
    APPEND t_hkey.
    t_hkey-col_no = 3.
    t_hkey-col_name = 'PLANETYPE'.
    APPEND t_hkey.
    t_hkey-col_no = 4.
    t_hkey-col_name = 'SEATSMAX'.
    APPEND t_hkey.
    t_hkey-col_no = 5.
    t_hkey-col_name = 'SEATSOCC'.
    APPEND t_hkey.
    t_hkey-col_no = 6.
    t_hkey-col_name = 'PAYMENTSUM'.
    APPEND t_hkey.
    * populating the SEMA data..........................
    t_sema-col_no  = 1.
    t_sema-col_typ = 'STR'.
    t_sema-col_ops = 'DFT'.
    APPEND t_sema.
    t_sema-col_no = 2.
    APPEND t_sema.
    t_sema-col_no = 3.
    APPEND t_sema.
    t_sema-col_no = 4.
    APPEND t_sema.
    t_sema-col_no = 5.
    APPEND t_sema.
    t_sema-col_no = 6.
    APPEND t_sema.
    t_sema-col_no = 7.
    APPEND t_sema.
    t_sema-col_no = 8.
    APPEND t_sema.
    t_sema-col_no = 9.
    APPEND t_sema.
    t_sema-col_no = 10.
    t_sema-col_typ = 'NUM'.
    t_sema-col_ops = 'ADD'.
    APPEND t_sema.
    CALL FUNCTION 'XXL_FULL_API'
      EXPORTING
    *   DATA_ENDING_AT          = 54
    *   DATA_STARTING_AT        = 5
       filename                = 'TESTFILE'
       header_1                = header1
       header_2                = header2
       no_dialog               = 'X'
       no_start                = ' '
        n_att_cols              = 6
        n_hrz_keys              = 1
        n_vrt_keys              = 4
       sema_type               = 'X'
    *   SO_TITLE                = ' '
      TABLES
        data                    = t_sflight
        hkey                    = t_hkey
        online_text             = t_online
        print_text              = t_print
        sema                    = t_sema
        vkey                    = t_vkey
    EXCEPTIONS
       cancelled_by_user       = 1
       data_too_big            = 2
       dim_mismatch_data       = 3
       dim_mismatch_sema       = 4
       dim_mismatch_vkey       = 5
       error_in_hkey           = 6
       error_in_sema           = 7
       file_open_error         = 8
       file_write_error        = 9
       inv_data_range          = 10
       inv_winsys              = 11
       inv_xxl                 = 12
       OTHERS                  = 13
    IF sy-subrc <> 0.
      MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
              WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
    ENDIF.
    please refer this link
    http://www.thespot4sap.com/Articles/Download_to_excel.asp
    Best regards,
    raam

  • Need help in creating custom reports

    hello,
    I am using EM 10.2.0.2 on windows 32-bit.
    All EM components are installed on a single machine.
    Have installed AGENT 10.1.0.5 for managing targets which are on LINUX 2.1
    Please help me in getting the solution for the following queries:
    (a)I need to create a custom report regarding the CAPACITY MANAGEMENT .
    (b)I have some UDM defined but I am not able to use these UDM while creating custom report.
    (c)Also is there any possibility that we can use views other than REPOSITORY VIEWS. What I meant was : instead of using REPOSITORY VIEWS can we use the tables of the target instances.
    Thanks in advance.

    Same post
    Need help on repository views for creating custom capacity planning reports

  • How can HANA Server Side JavaScript use "Eval" function?

    Hi HANA Experts,
      I use EVAL function to create an object by classname in xsjs file, but it has an Error "Eval is evil". In Client javascript, we can use the Eval function. How can we use "EVAL" function in HANA server side javaScript?  Thanks a lot.

    That looks like the client side JSLint check to me.  Those can be customized or even turned off. If you truly want to use eval.
    >XSJS inherits most of the features of javascript but do not expect all of its features
    Actually that's not exactly accurate.  XSJS is standard ECMA JavaScript (Mozilla SpiderMonkey VM).  It does run in strict mode, however. This isn't a limitation of XSJS but a conscious decision to force the VM into the strict mode - which is really the recommendation for JavaScript anyway.  We also apply JSLint checks as above. Sometimes they are quite restrictive. However they can be customized or even completely turned off at the project level:
    To the point of Eval, there are some excellent articles online.
    http://javascriptweblog.wordpress.com/2010/04/19/how-evil-is-eval/
    coding style - When is JavaScript&amp;#39;s eval() not evil? - Stack Overflow
    JSLint Error Explanations - eval is evil

  • Is it possible using Analytical functions?

    Hi,
       I have the following data
        Column1      Column2
        2005            500
        2006            500
        2007            500
        2008            500
    Now, if I've some variable value as 800, then the output record should be
        Column1         Column2
        2008               500
        2007               300
        2006                  0
        2005                  0i.e. the Column2 value(order by column1 desc) is split to accommodate the variable passed.
    Right now, it's being done in PL/SQL. Is it possible to do it in SQL using Analytical function?
    Thanks,
    Sundar
    P.S: It doesnt have to be using analytical, if it can be achieved in a SQL, it's good.
    Message was edited by:
    Sundar M

    Hi, a sample using analytical function SUM:
    CREATE TABLE Source_Data
               ( Year NUMBER
               , Value NUMBER
    BEGIN
       DELETE FROM Source_Data;
       FOR v_Cycle IN 1 .. 6
       LOOP
          INSERT
            INTO Source_Data
                 Year
               , Value
          VALUES
                 2000 + v_Cycle
               , 100 * v_Cycle
       END LOOP;
       COMMIT;
    END;
    VARIABLE v_Amount NUMBER
    EXECUTE :v_Amount := 1200using the SUM, the previous values are totalized:
    so
    SELECT Year
         , Value Year_Value
         , :v_Amount Original_Amount
         , SUM(Value) OVER (ORDER BY Year DESC RANGE UNBOUNDED PRECEDING) Cumulative_Sum
         , DECODE(
                   SIGN(:v_Amount - SUM(Value) OVER (ORDER BY Year DESC RANGE UNBOUNDED PRECEDING))
                   , 1, Value              -- Positive number, more value can be subtract
                   , GREATEST(Value - (SUM(Value) OVER (ORDER BY Year DESC RANGE UNBOUNDED PRECEDING) - :v_Amount), 0)
                 )         Year_Quota
      FROM Source_Data s
    ORDER BY Year DESC
    /will give
         YEAR YEAR_VALUE ORIGINAL_AMOUNT CUMULATIVE_SUM YEAR_QUOTA
         2006        600            1200            600        600
         2005        500            1200           1100        500
         2004        400            1200           1500        100
         2003        300            1200           1800          0
         2002        200            1200           2000          0
         2001        100            1200           2100          0You can add different conditions (PARTITION BY ..)
    Hope this helps
    Max

  • Creating Report using EPM Functions with Dynamic Filters

    Hi All,
    I am new to BPC, In BPC 7.5 i seen like we can generate EPM report using EVDRE function very quickly and easy too. Is the same feature is existing in BPC 10.0 ? if no how can we create EPM reports using EPM Functions with Dynamic Filters on the Members of the dimension like in BPC 7.5.
    And i searched in SDN, there is no suitable blogs or documents which are related to generation of Reports using EPM Functions. All are described just in simple syntax way. It is not going to be understand for the beginners.
    Would you please specify in detail step by step.
    Thanks in Advance.
    Siva Nagaraju

    Siva,
    These functions are not used to create reports per se but rather assist in building reports. For ex, you want to make use of certain property to derive any of the dimension members in one of your axes, you will use EPMMemberProperty. Similary, if you want to override members in any axis, you will make use of EPMDimensionOverride.
    Also, EvDRE is not replacement of EPM functions. Rather, you simply create reports using report editor (drag and drop) and then make use of EPM functions to build your report. Forget EvDRE for now.
    You can protect your report to not allow users to have that Edit Report enabled for them.
    As Vadim rightly pointed out, start building some reports and then ask specific questions.
    Hope it clears your doubts.

  • Is it possible to use an XML Data Template to create a report in APEX?

    Hi,
    I have created an XML Data Template in BI Publisher passing one parameter and running two queries, then created an RTF Document Template to present the data.
    I can create a nice report in BI Publisher using the two elements. I have used RTF Document Templates to publish reports in APEX but the data comes from a Report region running a single query.
    I would like to run a report based in this kind of XML Data Template, in order to use several children queries related to a parent query. Is it possible to do it in APEX, or you have to use BI Publisher?
    Francisco
    ===========================
    Below is a simple data template definition:
    <dataTemplate name="cotizacion_template" description="Prueba de data template para cotizaciones" dataSourceRef="dbxprts">
         <parameters>
              <parameter name="p_id_cotizacion" dataType="character" defaultValue="1009" include_in_output="true"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="header_query">
                   <![CDATA[select id_cotizacion, fecha_cotizacion, id_clipro from f_cotizaciones where id_cotizacion = :p_id_cotizacion]]>
              </sqlStatement>
              <sqlStatement name="detail_query">
                   <![CDATA[select id_cotizacion as id_cot_child, id_detalle_cotizacion, partida, cantidad, id_producto from f_detalle_cotizaciones where id_cotizacion = :id_cotizacion]]>
              </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="F_COTIZACIONES" source="header_query">
                   <element name="ID_COTIZACION" value="ID_COTIZACION"/>
                   <element name="ID_CLIPRO" value="ID_CLIPRO"/>
                   <element name="SUMA_CANTIDAD" value="F_DETALLE_COTIZACIONES.CANTIDAD" function="SUM()"/>
                   <group name="F_DETALLE_COTIZACIONES" source="detail_query">
                        <element name="PARTIDA" value="PARTIDA"/>
                        <element name="CANTIDAD" value="CANTIDAD"/>
                        <element name="ID_PRODUCTO" value="ID_PRODUCTO"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>

    Hi,
    I have the similar question. I used data templates in BI Publisher but now I want to use the same data template in Apex to print some reports.
    I tried to some examples but these were only using report queries. I also tried with the Web Service but this didn't work for me either maybe because I didn't
    used it in the right way. When I used the WS I received the binary of the report so the WS worked it was just the how and where to use it that didn't work for me.
    Now this older entry is BUMPED maybe we find a solution for our problem this way.
    regards,
    Steven

  • Error creating Crystal Report using Stored Proc Universe

    Hi,
    I have created a stored procedure Universe, using the new feature available in XI R3.
    This connects to an Oracle database, executing a PL/SQL procedure returning ref cursor.
    I have created a WebI report using this Universe, which works fine and functions as expected.
    So there are no problems with either my Oracle stored proc or the Universe.
    However, I would like to create a Crystal report (2008) using the same Universe.
    I can create the report ok - using the SP Universe.
    When I attempt to refresh the data I get an error:
    Failed to retrieve data from the database.
    Details: ORA-06550: line 1, column 7:
    PLS-00103: Encountered the symbol "." when expecting one of the following:
    begin case declare etc etc
    .................................My Procedure ...................
    CREATE OR REPLACE PROCEDURE BIADM.Bo_Test_Report_R
    (Deposit_Cursor IN OUT SYS_REFCURSOR)
    IS
    BEGIN
    OPEN Deposit_Cursor FOR
    SELECT DISTINCT foracid "A/C"
    , acct_name "A/C Name", acct_opn_date "OP/Date", schm_code "SchmCode"
    FROM gam@finrpt
    WHERE acct_cls_flg ='N'
    AND foracid ='2252020145001';
    --AND cust_id ='CB2020145'
    END Bo_Test_Report_R;
    Please Give me solution as early as possible.
    Masud Iqubal

    Moved to Universe Design forum.

Maybe you are looking for