Return table In bI7.0-Bit urgent

Hi All,
I Am uploading falt file which is having the values for 0fisper and fisyear but i need to fetch the values for 0calday, 0calweek and 0calquarter, i have succesfully loaded the data in bw3.5 by using the return table for Zdaily(key figure).
Can any one tell me where to use this RETURN TABLE  concept in BI.7.0..
Its bit urgent.
regards
Ram

Return Table
return table in update rules
Message was edited by:
        krish

Similar Messages

  • Issue with Case Statment Bit Urgent.

    Hi Friends,
    I am using a Case in my select statment but problem is i have used group by clause.
    This is the main query.
    SELECT   papf.employee_number OHR,
               papf.business_group_id,
               (CASE
                   WHEN (paaf.effective_start_date = Min("paaf.effective_start_date" From Below Where condition))
                   THEN
                      TO_CHAR (
                         (SELECT   ORIGINAL_DATE_OF_HIRE
                            FROM   apps.per_all_people_f p1
                           WHERE   p1.employee_number = papf.employee_number
                                   AND p1.current_employee_flag = 'Y'),
                         'DD-MON-YYYY'
                   ELSE
                      TO_CHAR (MIN (paaf.effective_start_date), 'DD-MON-YYYY')
                END)                                                                EFFECTIVE_START_DATE,
               DECODE (TO_CHAR (MAX (paaf.effective_end_date), 'DD-MON-RRRR'),
                       '31-DEC-4712', NULL,
                       TO_CHAR (MAX (paaf.effective_end_date), 'DD-MON-RRRR'))      EFFECTIVE_END_DATE,
       FROM   apps.per_all_people_f papf,
               apps.per_all_assignments_f paaf,
               apps.per_grades pg,
               apps.per_jobs pj
       WHERE       papf.person_id = paaf.person_id
               AND papf.employee_number = '2130'
               AND papf.current_employee_flag = 'Y'
               AND paaf.grade_id = pg.grade_id
               AND paaf.job_id = pj.job_id
               AND (   paaf.ass_attribute21 IS NOT NULL
                    OR paaf.ass_attribute22 IS NOT NULL
                    OR paaf.ass_attribute23 IS NOT NULL
                    OR paaf.ass_attribute24 IS NOT NULL
                    OR paaf.ass_attribute25 IS NOT NULL)
               AND EXISTS
                     (SELECT   pap.EMPLOYEE_NUMBER
                        FROM   APPS.PER_ALL_PEOPLE_F PAP
                       WHERE   TRUNC (SYSDATE) BETWEEN PAP.EFFECTIVE_START_DATE AND  PAP.EFFECTIVE_END_DATE
                               AND PAP.CURRENT_EMPLOYEE_FLAG = 'Y'
                               AND PAP.EMPLOYEE_NUMBER = PAPF.EMPLOYEE_NUMBER)
               AND PAAF.EFFECTIVE_START_DATE >
                     NVL (
                        (SELECT   MAX (PAAFA.EFFECTIVE_START_DATE)
                                     EFFECTIVE_START_DATE
                           FROM   APPS.PER_ALL_ASSIGNMENTS_F PAAFA,
                                  APPS.PER_PERIODS_OF_SERVICE PPOSA
                          WHERE   PAAFA.PERIOD_OF_SERVICE_ID =
                                     PPOSA.PERIOD_OF_SERVICE_ID
                                  AND (UPPER (PPOSA.LEAVING_REASON) NOT LIKE
                                          '%TRANSFER%')
                                  AND PPOSA.ACTUAL_TERMINATION_DATE < SYSDATE
                                  AND PAAFA.PERSON_ID IN
                                           (SELECT   DISTINCT PERSON_ID
                                              FROM   apps.per_all_people_f
                                             WHERE   employee_number =
                                                        PAPF.EMPLOYEE_NUMBER)),
                        TO_DATE ('01-JAN-1881')
    GROUP BY   papf.employee_number,
               papf.person_id,
               paaf.assignment_id,
               fnd_date.canonical_to_date (papf.ATTRIBUTE29),
               papf.business_group_id,
               TRIM(SUBSTR (PAAF.ASS_ATTRIBUTE21,
                            INSTR (PAAF.ASS_ATTRIBUTE21, '-') + 1)),
               TRIM(SUBSTR (PAAF.ASS_ATTRIBUTE22,
                            INSTR (PAAF.ASS_ATTRIBUTE22, '-') + 1)),
               UPPER (paaf.ass_attribute23),
               UPPER (paaf.ass_attribute24),
               UPPER (paaf.ass_attribute25),
               xx_ijp_get_loc (paaf.ass_attribute23),
               pg.name,
               pj.name
    ORDER BY   papf.employee_number, MIN (paaf.effective_start_date) DESC -----------------
    Output of the query
    EFFECTIVE_START_DATE     EFFECTIVE_END_DATE
    13-JAN-2010     
    15-DEC-2009          12-JAN-2010
    09-JUN-2009          14-DEC-2009
    05-JUN-2009          08-JUN-2009
    22-SEP-2008          04-JUN-2009
    21-APR-2008          21-SEP-2008
    21-JAN-2008          20-APR-2008
    01-JAN-2008          20-JAN-2008
    04-APR-2007          31-DEC-2007While using when in case statment i want to put the condition from where condition of main query and pick the min value of EFFECTIVE_START_DATE column i.e 04-APR-2007 so i can replace this with employee Date of Joining through Case condtion.
    Any solution for this.
    Please suggest it's bit urgent.
    Thanks
    Bachan.

    Bachan wrote:
    Please suggest it's bit urgent.Ok, I'll suggest it's a bit urgent...
    "it's a bit urgent"
    But only to you.
    Everybody who posts a question would like it answering as soon as possible. Do you not think it's rude of you to expect that your question demands more immediate attention than someone elses? Is that fair on all the other people who've just asked their question and are patient enough to wait for answers? Or should they be happy that you're jumping up and down saying "me first! me first!"
    What about everybody who's giving up their own time volunteering to answer questions? They have their own jobs to do as well. Do you not think it's rude to expect them to drop what they're doing to just help you because you think your question is "urgent".
    Typically, you will find that less people will come to help you if you say your question is urgent because most people will ignore it as they consider it rude. The best way to ask you question is to give as much information as possible and ensure you state what your database version is, as well as providing table structures, example data and expected output, so that the most appropriate answer can be given.
    Looking at your code, it's not clear what your problem is as we don't have the input data to try it ourselves.
    One clear issue is:
    TO_DATE ('01-JAN-1881')As you don't specify a format mask so it will rely on your NLS_DATE_FORMAT mask being set to DD-MON-YYYY which, if it's not, will cause the code to either give incorrect results or error.

  • Internal table in BI7

    Hi,
    Can some send steps to create internal table and steps for filling the table in BI7?
    Thanks and Regards,
    Pooja

    Hi Pooja,
    The IT_TEST is the internla table and WA_TEST is work area here.
    Pl go thru the Below Code.I am trying to populate Branch from Customer Table.
    $$ begin of global - insert your declaration only below this line  -
      TYPES : BEGIN OF TY_CUSTOMER,
                   /BIC/CUSTOMER TYPE /BIC/CUSTOMER-/BIC/CUSTOMER,
                   /BIC/BRANCH  TYPE /BIC/CUSTOMER-/BIC/BRANCH,
                END OF TY_CUSTOMER.
       DATA  :   IT_TEST    TYPE STANDARD TABLE OF TY_CUSTOMER,
                 WA_TEST    TYPE TY_CUSTOMER.
    $$ begin of routine - insert your code only below this line        *-
    Start Routines
        IF SOURCE_PACKAGE[] IS NOT INITIAL.
          SELECT     /BIC/BRANCH
                     INTO CORRESPONDING FIELDS OF TABLE IT_TEST
                      FROM u201CMaster Tableu201D
                      FOR ALL ENTRIES IN SOURCE_PACKAGE
                      WHERE /BIC/CUSTOMER = SOURCE_PACKAGE-/BIC/CUSTOMER AND
                      OBJVERS  = C_A.
        ENDIF.
        IF NOT IT_TEST IS INITIAL.
          SORT IT_TEST BY /BIC/CUSTOMER.
        ENDIF.
    Transfer ROutine
    Source Field = Customer
    Target Field = Branch
        READ TABLE IT_TEST INTO WA_TEST WITH KEY /BIC/CUSTOMER(Field) =
        SOURCE_FIELDS-/BIC/CUSTOMER
        BINARY SEARCH.
        IF SY-SUBRC = 0.
          RESULT = WA_TEST-/BIC/BRANCH.
        ENDIF.
    Rgds
    SVU

  • Problem with Return table

    Hi all,
    Greetings!
    I am facing a probelm with return table, i.e it is adding body record and workarea record also to the data target. so, it is adding the actual record to data target including the workarea record to with the key figure and year values as zeros and spaces. I worked with Return table one or two times, but this time amazing it is adding extra record.
    Please guide me..
    Thanks and Regards
    Chand

    Hi Chand,
    Adding extra rows is kind of strange. It must be either, the records in the data request being duplicated or the logic in the RETUN table must be messed up. If possible just have a snapshot of pseud code may be it could help analyzing the error.
    Regards,
    Praveen

  • Problem with return table(adding extra record)

    Hi,gurus,
      I am facing a probelm with return table, i.e it is adding body record and workarea record also to the data target. so, it is adding the actual record to data target including the workarea record to with the key figure and year values as zeros and spaces. It's quite strange.
    Please help me out, thanks a lot.

    Hi,
       I have an ODS with the keys fields(ZPS_TXMID,ZPS_NODE&#65292;ZPS_NODE) and data fields(ZAU_C108,ZAU_C109,0PROJECT). I have to split one record from datasource to 6 records into my ODS. I'm updating ZAU_C109 with a routine with return table. Here is the code, please check it for me:
    <i> data: prj like /BIC/PZPS_TXMID-PROJECT.
    data: ls_icube_value like ICUBE_VALUES.
    clear ls_icube_value.
    select single PROJECT into prj from /BIC/PZPS_TXMID
            where /BIC/ZPS_TXMID = COMM_STRUCTURE-/BIC/ZPS_TXMID.
    ls_icube_value-/BIC/ZPS_TXMID = COMM_STRUCTURE-/BIC/ZPS_TXMID.
    ls_icube_value-/BIC/ZAU_C108 = COMM_STRUCTURE-/BIC/ZAU_C108.
    ls_icube_value-/BIC/ZPS_NODE = '1'.
    ls_icube_value-/BIC/ZPS_SNODE = '0'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_HJHSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '1'.
    ls_icube_value-/BIC/ZPS_SNODE = '1'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_HPSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '1'.
    ls_icube_value-/BIC/ZPS_SNODE = '2'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZAU_C101.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '2'.
    ls_icube_value-/BIC/ZPS_SNODE = '0'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_TJHSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '2'.
    ls_icube_value-/BIC/ZPS_SNODE = '1'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZPS_TDSJ.
    APPEND ls_icube_value TO RESULT_TABLE.
    ls_icube_value-/BIC/ZPS_NODE = '2'.
    ls_icube_value-/BIC/ZPS_SNODE = '2'.
    ls_icube_value-PROJECT = prj.
    ls_icube_value-/BIC/ZAU_C109 = COMM_STRUCTURE-/BIC/ZAU_C102.
    APPEND ls_icube_value TO RESULT_TABLE.
    ABORT = 0.</i>
       After loading, I checked the contents of ODS, there are 6 records(0project, ZAU_C108 are blank, other fields are correct) + 1 more record(ZPS_TXMID,0project, ZAU_C108 are correct, other fields are blank), what I expect is only 6 records with all fields being filled properly, no blanks, no extra records. Is it strange? or am I doing sth. wrong?
      Your help is appreciated.

  • Currency unit in return tables

    Hi @ all,
    I'm working with a return table in the update rules to calculate a key figure. Is it possible, that the currency unit of the key figure is not filled automatically? The currency units in source system and target system are the same.
    Thank you for your help!
    Clemens

    Hallo Clemens,
    yes, you're right; are you sure as well to not have more COMP_CODES then 0009 and 0010?
    perhaps it would be wiser to lookup the comp_code-currency from the master data of 0COMP_CODE (0CURRENCY is one of its attributes) in order to avoid having it empty and always hardcode it... This is of course if you want to derive the company code currency...
    hope this helps....
    let us know if you question is answered by closing the thread!
    Olivier.

  • Return Table empty in Web Service response

    Hi All,
    My Question is more of related to Web Service. I have created a Web Service from ABAP for BAPI_PO_GETDETAIL. This BAPI is working fine in R/3.
    I am using this particular Web Service in Adobe Form (using only ADOBE LIVECYCLE Designer). It's is working fine If i pass the correct Data(Purchase order no.) I'll get the O/p. In case I put a wrong PO number I am not getting the values in return Table in response. (If i test the BAPI in R/3 i m getting a message in Return table that PO no. doesn't exist)
    Any Help will be appreciated.
    PS; I m using Adobe liveCycle designer 7.1 and Acrobat Professional 9.
    Regards,
    Sachin

    Hi,
    It is sufficient to make changes in the WebService Definition.
    I communicated wrong entries, do make changes like: follow the previous steps and goto the se80 to respective webservice and do make changes in both External View and Internal View, as when you go into these views you'll find under some node "Input" and "Output", here need to do changes in tables present in the "input" and "output" as when you go into "input" or "output" to a respective table there you'll find two sections "External" and "Abap" do edit in Section "External" as Check the checkbox "Exposed" and Uncheck the checkbox "Optional" also "Min Occurr" should be "1" and "Max occurr" should be unbounded.
    Make sure in the Adobe Form, for the button which you are calling the webservice, goto the object pallette of that button and goto execute tab and there check the checkbox "Re-merge form data" or if you are invoking the webservice through scripting then you make change the script like"......execute(1)...".
    Regards
    Pradeep Goli

  • JCo issue - return table is null

    Hi,
    I am trying to read the return table from a function module using
    JCoParameterList jplExport = function.getTableParameterList();
    This works fine in the development environment, however in QA I am getting jplExport as null.
    I have debugged it in QA using an external debugger and the return table has rows.
    We have also ruled out the possibility of it being a authorization issue after checking with the security team.
    I have debugged the FM using the JCo user and it has the return table, also if I run it from within SAP GUI it returns values in the return table.
    To re-iterate the same code works fine in Dev.
    In QA the import is good as I can see the values in the return table.
    I am unable to understand what the issue is here. Why will it return null inspite of having values ?
    Please suggest.
    Thanks,
    Veena.

    Hi Veena,
    -> Check if you can call any other function modules in the QA environment. If not, something is wrong with JCo configuration.
    ->Do you see any differences in function modules signatures from Dev and QA?
    Cheers,
    ~kranthi

  • Sort/filter datablock based on procedure that return table type

    Hi All,
    I’ve got datablock based on procedure that return table type. In the form I have to provide ‘filter and sort records’ functionality. Previously, using tables/views based datablocks, I’ve done that by using:
    -- filter
    SET_BLOCK_PROPERTY (L_BLOCK_NAME, DEFAULT_WHERE, L_WHERE_CLAUSE);
    -- sort
    SET_BLOCK_PROPERTY(L_BLOCK_NAME ,ORDER_BY, L_ORDER_BY_CLAUSE);
    -- and then
    EXECUTE_QUERY;
    It doesn’t work with procedure that return table type. How I can do that?
    Bartek

    I agree with Andreas, from the sample you have given us, I don't see any reason why you could not merge these queries into a single UNION/UNION ALL query. Also, I would add your summation query to your main query to eliminate this extra step. The result would look something like:
    SELECT DISTINCT
         pih.id
         ,d.document_id
         ,pih.doc_serial_no
         ,pih.purch_invoice_date
         ,oh.company_name
         ,(SELECT NVL(SUM(amount),0)
              FROM "YOUR TABLE HERE" yth
              WHERE yth."YOUR COLUMN HERE" = pih.id) AS sum_amount
      FROM "YOUR TABLES HERE"
    WHERE "YOUR JOIN CONDITIONS HERE"
    UNION ALL
    SELECT DISTINCT
         sih.id
         ,d.document_ind
         ,sih.doc_serial_no
         ,sih.sales_invoice_date
         ,sih.company_name
         ,(SELECT NVL(SUM(amount),0)
              FROM "YOUR TABLE HERE" yth
              WHERE yth."YOUR COLUMN HERE" = sih.id) AS sum_amount
      FROM "YOUR TABLES HERE"
    WHERE "YOUR JOIN CONDITIONS HERE"
    [/code]
    Hope this helps.
    Craig...
    +If a response is helpful or correct, please mark it accordingly+
    Edited by: CraigB on Feb 23, 2010 1:39 PM
    It appears the CODE tags are not working as well as the URL tags.  :(                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Where is the option "return table" in BW7.0

    Is it possible to have a transformation rule return a table in stead of one single record?
    I remember from teched that this option would be added in SP13, but we are at SP16 and I can't find it.

    BI 7.0 does not have Return table option till now. That has been replaced by(or rather say the functinality can be acheived by) END Routine.
    Thanks..
    Shambhu

  • Function returning table in Oracle 8i

    I have one function written in SQL server 2000. I am not getting the way to write this function in oracle so that it can return table me as an output.
    SQL server's code
    CREATE FUNCTION dbo.GetTerminalAccessPolicy4AdHocShift(@rDate datetime,@rTerminal bigint)
    RETURNS TABLE
    AS
    RETURN SELECT [EmployeeShift].[UserId], [CLSCData].[CardTagId], [Shift].[MinIn] AS FromTime, [Shift].[MaxOut] AS ToTime, 8 AS Priority, 1 AS AccessRights
    FROM (((EmployeeShift INNER JOIN SiteEmployee ON [EmployeeShift].[UserId]=[SiteEmployee].[UserId]) INNER JOIN SiteTerminal ON
    [SiteEmployee].[SiteId]=[SiteTerminal].[SiteId]) INNER JOIN Shift ON [EmployeeShift].[ShiftId]=[Shift].[ShiftId]) INNER JOIN CLSCData ON [EmployeeShift].[UserId]=[CLSCData].[UserId]
    WHERE [siteTerminal].[TerminalId]=@rTerminal And @rDate Between [SiteEmployee].[FromDate] And [SiteEmployee].[ToDate] And @rDate Between [EmployeeShift].[FromDate] And [EmployeeShift].[ToDate]
    Can any ont please help me to write this function?

    Hello,
    As previously posted you should use export and import utilities.
    To execute exp or imp statements you have just to open a command line interface, for instance,
    a DOS box on Windows.
    So you don't have to use SQL*Plus or TOAD.
    About export/import you may care on the mode, to export a single or a list of Tables the Table mode
    is enough.
    Please, find here an example to begin:
    http://wiki.oracle.com/page/Oracle+export+and+import+
    Hope this help.
    Best regards,
    Jean-Valentin

  • How to migrate sql server 2000 user defined function returns table

    Hi,
    How do I capture the SQL Server 200 user defined function that returns table? Is this supported in the current version of Oracle Migration Workbench? I am using the latest version - Release 9.2.0.1.0 with SQL SERVER 2000 plug-in.
    I was able to capture the SQL Server 2000 user defined function that returns string and smalldatetime but not the functions return table during the migrate data source stage.
    Thanks in Advance,
    Susan

    Susan,
    This is not currently supported. The next release of the Oracle Migration Workbench (due very soon), will do a better job of catching this mad reporting an error. We are looking into a suitable mapping and have created bug # 2355073 - TABLE DEFINITIONS NOT ACCEPTED FOR TABLE FUNCTIONS to track this issue.
    Once possible solution we are looking into is using the object type to emulate. Here is an example from the bug:
    Original table
    SQL> create table tabela (a number, b number, c number, d number);
    SQL> insert some values...
    SQL> select * from tabela;
    A B C D
    1 1 1 1
    2 2 2 2
    3 3 3 3
    4 4 4 4
    SQL Server 2000 code
    CREATE FUNCTION FUNCRETORNATABELA()
    RETURNS TABLE
    AS
    RETURN SELECT A,B,C,D FROM TABELA
    SELECT A,B,C,D
    FROM FUNCRETORNATABELA()
    ORDER BY A
    Oracle code (workaround)
    SQL> create or replace type MyObjType as object (
    2 a number, b number, c number, d number);
    3 /
    Type created.
    SQL> create or replace type MyTabType as table of MyObjType;
    2 /
    Type created.
    SQL> create or replace function teste return Mytabtype pipelined as
    2 aa MyObjType := MyObjType(null, null, null, null);
    3 cursor c1 is select a,b,c,d from tabela;
    4 begin
    5 open c1;
    6 loop
    7 fetch c1 into aa.a, aa.b, aa.c, aa.d;
    8 exit when c1%NOTFOUND;
    9 pipe row (aa);
    10 end loop;
    11 close c1;
    12 return;
    13 end;
    14 /
    Function created.
    SQL> select * from table(teste);
    A B C D
    1 1 1 1
    2 2 2 2
    3 3 3 3
    4 4 4 4
    SQL> select a, c from table(teste) order by c desc;
    A C
    4 4
    3 3
    2 2
    1 1
    Donal

  • WHAT IS THE USE OF RETURN TABLE IN BW

    Hi Gurus,
    I would like to know what is the use of return table in bw.. can any one give me the perfect answer....
    Ramesh

    Hii
    Imagine a situation where 1 record coming into a cube needs to be split into multiple records. Lets say you get values total values for sector in the PSA. Now you may want to partition that value based on the various sectors existing. In that case you can use a return table and split a single record into multiple records.
    return table option is available in update rules
    go thru these links
    Return table
    Return table
    Message was edited by:
            Sheeba Bhaskaran

  • Return Tables

    Hi fellow SAPians,
    what is the significance of Return tables in SAP BW. I wonder can it be used for distribution purposes similar to SEM -BPS ? Cld anybody clarify me these concepts ?
    thanking you in Advance,

    Have a look at these posts in the help: they explain pretty well what it's all about.
    " Update routines generally only have one return value. However, in the Key Figure Calculation tabstrip, you can create a routine by choosing the Return table option. The corresponding key figure routine now has a return table instead of a return value. You can now generate as many key figure values as you like from one data record."
    http://help.sap.com/saphelp_nw04/helpdata/en/21/894eeee0b911d4b2d90050da4c74dc/frameset.htm (2nd part)
    http://help.sap.com/saphelp_nw04/helpdata/en/7f/61fc37f456491ee10000009b38f8cf/frameset.htm

  • Return tables in Routines used in an Update Rule

    I previously had a routine configured as an update method in an Update Rule.  On the configuration screen where I specified the Routine name, I checked "Return Table". 
    Now I've deleted this Routine and I am using the Source Key Figure as the Update Method.  However the "Return Table" box is still checked and if I uncheck it, it goes back to "Checked" status as soon as i scroll to the next key figure and then back to the original key figure. 
    While this doesnt sound like too serious a problem, I think it's causing my Update rules to fail during activation with the message, The field "RESULT" is unknown, but there is a fiel rows 1698."  (SAP typo, not mine).
    Following the suggestions in the Help for this error do not work either.  When I try to choose Extras -> Display Activated Program, I receive a second message "Unable to find a tool to process the request".
    Can anyone help?

    Wardell,
    sounds like a bug to me. Open a message to SAP support to get a fix.
    Regards,
    Marc
    SAP NetWeaver RIG

Maybe you are looking for