EXTRACT DATA BASED ON BUDGET YEAR

I have a scenario where I need to extract data based on the users enter the budget year.
Our budget year is as follow:
September,
October,
November,
December,
January,
February,
March,
April,
May,
June,
July,
August
If the users enter the budget year as 2014, I want to extract payment records from September 2013 to August 2014.
September 2013,
October 2013,
November 2013,
December 2013,
January 2014,
February 2014,
March 2014,
April 2015,
May 2014,
June 2014,
July 2014,
August 2014
My query below only extracts payment records created for a given year which is not what I want
DECLARE @BudgetYear Datetime
SET @BudgetYear = '09/01/2014'
SELECT 'REFUND' PaymentType ,pa.CreateDate,YEAR(pa.CreateDate) CreateYear, p.PaymentAmount
FROM tblPaymentAllocation pa
INNER JOIN tblReturn r
ON r.ReturnID = pa.ReturnID
INNER JOIN tblAccount a
ON a.AccountID = r.AccountID
INNER JOIN tblCommunity c
ON a.Community = c.CommunityCode
INNER JOIN tblAccountingDate ad
ON ad.AccountingdateID = pa.AccountingDateID
INNER JOIN tblPayment p
ON pa.PaymentID=p.PaymentID
WHERE YEAR(pa.CreateDate) = YEAR(@BudgetYear )
AND p.PaymentType <> 'amended'
AND r.ReturnType = 'refund'
AND NOT (p.PaymentType = 'check'
AND pa.Status = 'reversal' AND pa.PriorCredit < 0)

Give this a go:
SELECT 'REFUND' PaymentType ,pa.CreateDate,YEAR(pa.CreateDate) CreateYear, p.PaymentAmount
FROM tblPaymentAllocation pa
INNER JOIN tblReturn r
ON r.ReturnID = pa.ReturnID
INNER JOIN tblAccount a
ON a.AccountID = r.AccountID
INNER JOIN tblCommunity c
ON a.Community = c.CommunityCode
INNER JOIN tblAccountingDate ad
ON ad.AccountingdateID = pa.AccountingDateID
INNER JOIN tblPayment p
ON pa.PaymentID=p.PaymentID
WHERE pa.CreateDate BETWEEN CASE WHEN MONTH(GETDATE()) < 9 THEN CONVERT(VARCHAR,YEAR(GETDATE())-2)+'-09-01' ELSE CONVERT(VARCHAR,YEAR(GETDATE())-1)+'-09-01'END AND CASE WHEN MONTH(GETDATE()) < 9 THEN CONVERT(VARCHAR,YEAR(GETDATE())-1)+'-08-31' ELSE CONVERT(VARCHAR,YEAR(GETDATE()))+'-08-31' END
AND p.PaymentType <> 'amended'
AND r.ReturnType = 'refund'
AND NOT (p.PaymentType = 'check'
AND pa.Status = 'reversal' AND pa.PriorCredit < 0)
It calculates what the range should be on the fly.

Similar Messages

  • Extract Data Based on Year and Month

    My clients have taken an Oracle DB TimeStamp field and
    downloaded it to Access in a TEXT field format.
    Sample data: 20060401001348CS
    All I am trying to do is extract data based on year and
    month. I have equal to 200604*, 200604%. Have also tried to used
    LIKE.
    Nothing works. It just can't be that dificult. Please help.
    Thanks

    After breaking my inquiry down into bits and pieces the
    problem is not just the LIKE, it is a combination of events. The
    entire picture is this:
    User selects Year from a drop down (2006), then selects month
    from drop down (04). I then build a variable called
    EventReport Date with the statement <cfset EventReportDate
    = Session.InquiryYear & Session.InquiryMonth & "%">
    It correctly displays as 200604% - When used by itself as
    below, it works just fine.
    WORKS
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE CDTS LIKE '#EventReportDate#'
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    WORKS (additional WHERE criteria)
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    FAILS **** There is something wrong with the combination of
    the WHERE clause items
    <cquery name="GetEventCount" datasource="CountyDB">
    Select count(AD_ID) as EventCount, TYCOD, TYP_ENG, CURENT,
    CDTS
    FROM aeven
    WHERE ((AG_ID = '#Session.InquiryAgencyCode#') AND (CURENT =
    'T')
    AND (CDTS LIKE '#EventReportDate#'))
    Group By AG_ID, TYCOD, TYP_ENG, CURENT, CDTS
    </cfquery>
    NOTE: There is not an error message, it just comes back with
    zero records.
    MORE LOST THAN EVER! Thanks for your help
    Ron

  • Use ODI to Extract Data from Hyperion Planning & Budgeting report to Excel

    Hello
    Can someone tell me please how to Extract Data from (Financial Reporting in) Hyperion Planning & Budgeting into Excel Using ODI?
    Would the steps be the same as Creating an ODI Project and Interface: Exporting a Flat File to a Flat File? If not, why?
    Best Regards.
    Edited by: Saturday on May 26, 2012 9:55 PM

    Where do you think the financial reports get their data from? Financial Reports pull data from data sources such as Essbase, HFM.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Account based COPA datsource taking long time to extract data

    Hi
    We have created a Account based COPA datasource but it is not extracting data in RSA3 even though the underlying tables have data in it.
    If the COPA datasource is created using fields only from CE4 (segment ) and not CE1 (line items ) table then it extracts data but tat too after very long time.
    If the COPA datasource is created using fields from CE4 (segment ) and  CE1 (line items ) table then it does not extarct any records and RSA3 gives a time out error..
    Also job scheduled from BW side for extracting data goes on for days but does not fetch any data and neither gives any error.
    The COPA tables have huge amount of data and so performance could be a issue. But we have also created the indexes on them. Still it is not helping.
    Please suggest a solution to this...
    Thanks
    Gaurav

    Hi Gaurav
    Check this note 392635 ,,might be usefull
    Regards
    Jagadish
    Symptom
    The process of selecting the data source (line item, totals table or summarization level) by the extractor is unclear.
    More Terms
    Extraction, CO-PA, CE3XXXX, CE1XXXX, CE2XXXX, costing-based, account-based,profitability analysis, reporting, BW reporting, extractor, plug-in, COEP,performance, upload, delta method, full update, CO-PAextractor, read, datasource, summarization level, init, DeltaInit, Delta Init Cause and Prerequisites
    At the time of the data request from BW, the extractor determines the data source that should be read. In this case, the data source to be used depends on the update mode (full initialization of the deltamethod or delta update), and on the definition of the DataSources (line item characteristics (except for REC_WAERS FIELD) or calculated key figures) and the existing summarization levels.
    Solution
    The extractor always tries to select the most favorable source, that is,the one with the lowest dataset. The following restrictions apply:
    o Only the 'Full' update mode from summarization levels is
    supported during extraction from the account-based profitability
    analysis up to and including Release PI2001.1. Therefore, you can
    only everload individual periods for a controlling area. You can
    also use the delta method as of Release PI2001.2. However, the
    delta process is only possible as of Release 4.0. The delta method
    must still be initialized from a summarization level. The following
    delta updates then read line items. In the InfoPackage, you must
    continue to select the controlling area as a mandatory field. You
    then no longer need to make a selection on individual periods.
    However, the period remains a mandatory field for the selection. If
    you do not want this, you can proceed as described in note 546238.
    o To enable reading from a summarization level, all characteristics
    that are to be extracted with the DataSource must also be contained
    in this level (entry * in the KEDV maintenance transaction). In
    addition, the summarization level must have status 'ACTIVE' (this
    also applies to the search function in the maintenance transaction
    for CO-PA data sources, KEB0).
    o For DataSources of the costing-based profitability analysis,
    30.03.2009 Page 2 of 3
    SAP Note 392635 - Information: Sources with BW extraction from the CO-PA
    data can only be read from a summarization level if no other
    characteristics of the line item were selected (the exception here
    is the 'record currency' (REC_WAERS) field, which is always
    selected).
    o An extraction from the object level, that is, from the combination
    of tables CE3XXXX/CE4XXXX ('XXXX' is the name of the result area),
    is only performed for full updates if (as with summarization
    levels) no line item characteristics were selected. During the
    initialization of the delta method this is very difficult to do
    because of the requirements for a consistent dataset (see below).
    o During initialization of the delta method and subsequent delta
    update, the data needs to be read up to a defined time. There are
    two possible sources for the initialization of the delta method:
    - Summarization levels manage the time of the last update/data
    reconstruction. If no line item characteristics were selected
    and if a suitable, active summarization level (see above)
    exists, the DataSource 'inherits' the time information of the
    summarization level. However, time information can only be
    'inherited' for the delta method of the old logic (time stamp
    administration in the profitability analysis). As of PlugIn
    Release PI2004.1 (Release 4.0 and higher), a new logic is
    available for the delta process (generic delta). For
    DataSources with the new logic (converted DataSources or
    DataSources recreated as of Plug-In Release PI2004.1), the line
    items that appear between the time stamp of the summarization
    level and the current time minus the security delta (usually 30
    minutes) are also read after the suitable summarization level
    is read. The current time minus the security delta is set as
    the time stamp.
    - The system reads line items If it cannot read from a
    summarization level. Since data can continue to be updated
    during the extraction, the object level is not a suitable
    source because other updates can be made on profitability
    segments that were already updated. The system would have to
    recalculate these values by reading of line items, which would
    result in a considerable extension of the extraction time.
    In the case of delta updates, the system always reads from line
    items.
    o During extraction from line items, the CE4XXXX object table is read
    as an additional table for the initialization of the delta method
    and full update so that possible realignments can be taken into
    account. In principle, the CE4XXXX object table is not read for
    delta updates. If a realignment is performed in the OLTP, no
    further delta updates are possible as they would make the data
    inconsistent between OLTP and BW. In this case, a new
    initialization of the delta method is required.
    o When the system reads data from the line items, make sure that the
    30.03.2009 Page 3 of 3
    SAP Note 392635 - Information: Sources with BW extraction from the CO-PA
    indexes from note 210219 for both the CE1XXXX (actual data) and
    CE2XXXX (planning data) line item tables have been created.
    Otherwise, you may encounter long-running selections. For
    archiving, appropriate indexes are delivered in the dictionary as
    of Release 4.5. These indexes are delivered with the SAP standard
    system but still have to be created on the database.

  • Extract account Based COPA from R/3 using Business Object data services

    Hello,
    We have a requirement to extract Account Based COPA from SAP R/3 to Teradata using Business Objects data services.
    I have read couple of white papers which give information on Rapid Marts( which are built in packages) already available for some applications like inventory, GL, AP, AR etc. But I could not find anything for COPA.
    Would anyone give me any information on how to use BO data services for COPA?
    Also if there is no rapid mart available for COPA, does anyone know how to create custom data marts in BO Data services?
    Is there any document available on this?
    Please respond as soon as possible.
    Thanks.

    Hi,
    this forum is for the SAP Integration Kit. Would suggest you post your question into the EIM area for Data Services.
    Ingo

  • I've to extract the data based on the sysdate...like today dd is 11,

    BM_PERF is the table name and
    BM_PERF_YR,BM_PERF_MONTH,BM_NOP_CT_1........BM_NOP_CT_31 are the column names.
    I've to extract the data based on the sysdate...like today dd is 11
    so i've to get data from BM_NOP_CT_11 and the column names changes dynamically based on the sysdate. don't use any procedures and functions.

    You could always pivot it into a more convenient form for querying:
    WITH t1 AS
         ( SELECT 2008 AS yr, 4 AS mnth
                , 20 AS dy1
                , 10 AS dy2
                , 15 AS dy3
                , 1  AS dy4
                , 17 AS dy5
                , 99 AS dy6
                , 55 AS dy7
                , 45 AS dy8
                , 33 AS dy9
                , 22 AS dy10
                , 74 AS dy11
                , 35 AS dy12
                , 62 AS dy13
                , 24 AS dy14
                , 85 AS dy15
           FROM dual )
       , t2 AS
         ( SELECT yr
                , mnth
                , sys.DBMS_DEBUG_VC2COLL
                  (dy1,dy2,dy3,dy4,dy5,dy6,dy7,dy8,dy9,dy10,dy11,dy12,dy13,dy14,dy15)
                  AS day_data
           FROM   t1 )
    SELECT t2.yr, t2.mnth, sys_op_ceg(t2.day_data,5) day_value
    FROM   t2;
            YR       MNTH DAY_VALUE
          2008          4 17
    1 row selected.Note that SYS_OP_CEG (first discovered by Padders) is undocumented and unsupported - for production code you'd need to pick the collection row using a WHERE clause, and for that you'd need a custom object and collection type with an attribute to hold the day number.
    Message was edited by:
    William Robertson
    ...like this:
    CREATE TYPE id_value_ot AS OBJECT
    ( id INTEGER, val NUMBER );
    CREATE TYPE id_value_tt AS TABLE OF id_value_ot ;
    WITH t1 AS
         ( SELECT 2008 AS yr, 4 AS mnth
                , 20 AS dy1
                , 10 AS dy2
                , 15 AS dy3
                , 1  AS dy4
                , 17 AS dy5
                , 99 AS dy6
                , 55 AS dy7
                , 45 AS dy8
                , 33 AS dy9
                , 22 AS dy10
                , 74 AS dy11
                , 35 AS dy12
                , 62 AS dy13
                , 24 AS dy14
                , 85 AS dy15
           FROM dual )
       , t2 AS
         ( SELECT yr
                , mnth
                , id_value_tt
                  ( id_value_ot(1,dy1)
                  , id_value_ot(2,dy2)
                  , id_value_ot(3,dy3)
                  , id_value_ot(4,dy4)
                  , id_value_ot(5,dy5)
                  , id_value_ot(6,dy6)
                  , id_value_ot(7,dy7)
                  , id_value_ot(8,dy8)
                  , id_value_ot(9,dy9)
                  , id_value_ot(10,dy10)
                  , id_value_ot(11,dy11)
                  , id_value_ot(12,dy12)
                  , id_value_ot(13,dy13)
                  , id_value_ot(14,dy14)
                  , id_value_ot(15,dy15) )
                  AS day_data
           FROM   t1 )
    SELECT yr, mnth, dd.val
    FROM   t2, TABLE(t2.day_data) dd
    WHERE  dd.id = 5;
            YR       MNTH        VAL
          2008          4         17
    1 row selected.

  • Adding new records in output based on extracted data

    Hi Experts,
    Good day!
    I'm still having a problem with my material hitorical data project. I have a requirements in our historical data of material price which adding data that are not existing based on data extracted from standard tables such as A004 and KONP.
    Now, i need to use the VALIDFROM (DATAB) as well as VALIDTO(DATBI) value as basis for the latest price.
    To make it more clear, see the example below:
    Extracted data:
    Material Number Valid From Valid to Price
    100101 01/01/2008 02/01/2008 100.00
    100101 02/02/2008 04/02/2008 100.00
    100101 04/03/2008 08/01/2008 200.00
    100101 08/02/2008 01/31/2009 300.00
    100102 05/02/2008 07/01/2008 10.00
    100102 07/02/2008 10/31/2008 15.00
    100102 11/01/2008 01/31/2009 20.00
    Output:
    Material Number Calmonth Price
    100101 01/2008 100.00
    100101 02/2008 100.00
    100101 03/2008 100.00
    100101 04/2008 200.00
    100101 05/2008 200.00
    100101 06/2008 200.00
    100101 07/2008 200.00
    100101 08/2008 300.00
    100101 09/2008 300.00
    100101 10/2008 300.00
    100101 11/2008 300.00
    100101 12/2008 300.00
    100101 01/2009 300.00
    100102 05/2008 10.00
    100102 06/2008 10.00
    100102 07/2008 15.00
    100102 08/2008 15.00
    100102 09/2008 15.00
    100102 10/2008 15.00
    100102 11/2008 20.00
    100102 12/2008 20.00
    100102 01/2009 20.00
    Text that are in bold are the added data. What is the best code to do with this?
    How can i come up with this output? Help me please guys....
    Thanks and Godbless,
    nips
    Edited by: Nips on Jan 18, 2009 4:23 AM

    hi,
    I havenot created such program before but i think the logic shud work.
    I have refined the logic take a look at it.
    DATA: d1 like sy-datum VALUE '11012008', "dates in internal format
          d2 LIKE sy-datum VALUE '01012008', "dates in internal format
          mon TYPE i,
          v_mon TYPE i,
          v_year TYPE char4
          v_date type char6.
    CALL FUNCTION 'MONTHS_BETWEEN_TWO_DATES'
      EXPORTING
        i_datum_bis         = d1
        i_datum_von         = d2
      I_KZ_INCL_BIS       = ' '
    IMPORTING
       E_MONATE            = mon
    IF mon > 0.
    v_mon = wa1-validfrom+0(2).
    v_year = wa1-validfrom+4(4).
    ENDIF.
    do mon times.
      CONCATENATE v_mon '/' v_year INTO v_date.
    wa2-matnr = wa1-matnr.
    wa2-calmonth = v_date.
    wa2-price = wa1-price.
    append wa2 to itab2.
    v_mon = v_mon + 1.
    enddo.
    endloop.
    кu03B1ятu03B9к

  • Extracting data from multiple tables based on somelogic on each tables

    Hai
    I need to extract data from some base tables.
    1) first i need extract COMPANYCODE, PROFIT CENTER , PRODUCT from ZRLR custom Rl3-table.
    2) Then i need extract MATERIALS based on above selected COMPANY CODE , PROFIT CENTER , PRODUCT from MKAL , CRHD Base R/3-Tables.
    3) Then i need to extract the MATERIALS based on the above PROFIT CENTERS from MARC table with filters Material Type = 2P , 3P, 2N, 3N , 2S.
    How i extract like this data . Please let me know
    kumar

    Hi,
    you need to create a generic extractor using a function module for this. For some help check this: /people/siegfried.szameitat/blog/2005/09/29/generic-extraction-via-function-module
    Additionally you can get a template from me. You'll find my email in my business card.
    regards
    Siggi

  • Runtime Error while extracting data by datasource based on function module

    Hi all,
    I am facing an issue while extracting data from a customised data source based on a new function module.
    The datasource is extracting data successfully for only 15000 records but after that the runtime error is displayed.
    I am not able to extract whole data from R/3 system.
    Please take a look into the details and tell me what should I have to do.
    Details of Issue:
    Runtime Error : GETWA_NOT_ASSIGNED
    What happened?                                                                               
    Error in the ABAP Application Program                                                        
    The current ABAP program "SAPLZ_99Z_BW_SD_PRICING"had to be terminated because  it has  come across a statement that unfortunately cannot be executed.
    Error analysis                                                                               
    You attempted to access an unassigned field symbol                                          
        (data segment 32790).                                                                               
    This error may occur if                                                                   
        - You address a typed field symbol before it has been set with                               
          ASSIGN                                                                               
    - You address a field symbol that pointed to the line of an                              
          internal table that was deleted                                                          
        - You address a field symbol that was previously reset using                           
          UNASSIGN or that pointed to a local field that no                                        
          longer exists                                                                               
    - You address a global function interface, although the                                      
      respective function module is not active - that is, is                                  
          not in the list of active calls. The list of active calls                                 
          can be taken from this short dump. 
    Edited by: anshu13 on Apr 27, 2010 10:28 AM

    The code is displayed here:
    error is in line no. 625
    Source Code Extract                                                                               
    Line SourceCde                                         
      595            <fs_fldval> = l_fieldval.
      596            APPEND <fs_dyntable> TO <it_dyntable>.                               
      597            CLEAR :l_fieldval, wa_fldcat.                                                  
      598            CLEAR l_totlength.                                                             
      599            CLEAR <fs_dyntable>.                                                        
      600         ENDIF.                                                                           
      601        ENDIF.                                                                               
    602        MOVE-CORRESPONDING <dd03l_fields> TO wa_dd03l.                                    
      603        IF <dd03l_fields>-datatype EQ 'DATS'.                                             
      604          l_fieldval = 'X'.                                                                
      605       ELSE.                                                                               
    606        SHIFT <dd03l_fields>-intlen LEFT DELETING LEADING '0'.                         
      607          IF l_totlength IS INITIAL.                                                       
      608            SHIFT l_totlength LEFT DELETING LEADING '0'.                                   
      609            l_totlength = '0'.                                                            
      610          ENDIF.                                                                           
      611          l_currlength = <dd03l_fields>-intlen.                                            
      612          CONCATENATE l_totlength '('  l_currlength ') ' INTO l_fieldval .                 
      613          l_totlength = l_totlength + l_currlength.                                        
      614        ENDIF.                                                                               
    615*** Consider both field name and domian name for checking in range list:                   
      616        IF <dd03l_fields>-fieldname IN s_fieldlist.                                        
      617          wa_fldcat-fieldname = <dd03l_fields>-fieldname.                                  
      618        ELSEIF <dd03l_fields>-domname IN s_fieldlist.                                      
      619          wa_fldcat-fieldname = <dd03l_fields>-domname.                                    
      620        ELSE.                                                                               
    621          wa_fldcat-fieldname = <dd03l_fields>-fieldname.                                  
      622        ENDIF.                                                                               
    623        ASSIGN COMPONENT wa_fldcat-fieldname                                               
      624             OF STRUCTURE <fs_dyntable> TO <fs_fldval>.                                    
    >>>>|        <fsfldval> = l_fieldval._                                                             
      626        CLEAR l_fieldval.                                                                  
      627        CLEAR l_currlength.                                                                
      628      ELSE.                                                                               
    629        IF <dd03l_fields>-datatype EQ 'DATS'.                                              
      630          l_fieldval = 'X'.                                                                
      631       ELSE.                                                                               
    632          SHIFT <dd03l_fields>-intlen LEFT DELETING LEADING '0'.                           
      633          IF l_totlength IS INITIAL.                                                       
      634            SHIFT l_totlength LEFT DELETING LEADING '0'.                                   
      635           l_totlength = '0'.                                                              
      636          ENDIF.                                                                           
      637          l_currlength = <dd03l_fields>-intlen.                                            
      638          CONCATENATE l_totlength '('  l_currlength ') ' INTO l_fieldval .                 
      639         l_totlength = l_totlength + l_currlength.                                         
      640        ENDIF.                                                                               
    641*** Consider both field name and domian name for checking in range list:                   
      642        IF <dd03l_fields>-fieldname IN s_fieldlist.                                        
    643        wa_fldcat-fieldname = <dd03l_fields>-fieldname.                                   
      644       ELSEIF <dd03l_fields>-domname IN s_fieldlist.         
    Edited by: anshu13 on Apr 27, 2010 11:33 AM

  • Data Load into the Cube based on Fiscal Year

    Hi All,
    I was told to load the data into the cube coming from 3 different datasources, but based on fiscal year. I was told to load the data for 2010, 2009 and so on.
    Any suggestions please...

    Hi Dear,
                Write the following code in start Routine of Update Rule:-
    In BI 3.x
                   Delete DATA_Package where calday lt '20090101' and calday gt '20091231'.
               to load data onlyfor 2009.
              same thing for 2010.
    In BI 7.0
               Start Routine of Transformation:-
              delete source_package where calday lt  '20090101' and calday gt '20091231'.
    Regards
    Obaid

  • Error trying to extract data via HFM objects

    I've written a program to extract selected data from HFM (version 11.1.1.3.500) using the API objects. The program (shown at the bottom of this post) is failing on the 2nd of the following 2 lines:
    oOption = oOptions.Item(HSV_DATAEXTRACT_OPT_SCENARIO_SUBSET)
    oOption.CurrentValue = lBudgetScenario
    where oOption is a data load/extract object previously initialized and lBudgetScenario is the long internal ID for our budget scenario.
    The error is usually "COM Exception was unhandled" with a result code of "0x800456c7", but, mysteriously, even with no code changes, it sometimes throws the error "FileNotFoundException was not handled", where it says that it could not load "interop.HSXServerlib or one of its dependencies". The second error occurs even though HSXServer was previously initialized in the program and used in conjunction with the login.
    I've carefully traced through the VB.NET 2010 code and find that all relevant objects are instantiated and variables correctly assigned. It also occurred to me that the data load DLLs might have been updated when the 11.1.1.3.50 and 500 patches were applied. For that reason, I removed the references to those DLLs, deleted the interop files in the debug and release folders and copied the server versions of those DLLs to my PC. I then restored the DLL references in Visual Studio which recreated the interops. However, the error still occurs.
    The ID I'm using (changed to generic names in the code below) has appropriate security and, for example, can be used to manually extract data for the same POV via the HFM client.
    I've removed irrelevant lines from the code and substituted a phony ID, password, server name and application name. The line with the error is preceded by the comment "THE LINE BELOW IS THE ONE THAT FAILS".
    Imports HSVCDATALOADLib.HSV_DATAEXTRACT_OPTION
    Module Module1
    Public lActualScenario, lBudgetScenario As Long
    Public oClient As HSXCLIENTLib.HsxClient
    Public oDataLoad As HSVCDATALOADLib.HsvcDataLoad
    Public oOptions As HSVCDATALOADLib.IHsvLoadExtractOptions
    Public oOption As HSVCDATALOADLib.IHsvLoadExtractOption
    Public oSession As HSVSESSIONLib.HsvSession
    Public oServer As HSXSERVERLib.HsxServer
    Sub Main()
    'Create a client object instance, giving access to
    'the methods to logon and create an HFM session
    oClient = New HSXCLIENTLib.HsxClient
    'Create a server object instance, giving access to
    'all server-based methods and properties
    oServer = oClient.GetServerOnCluster("SERVERNAME")
    'Establish login credentials
    oClient.SetLogonInfoSSO("", "MYID", "", "MYPASSWORD")
    'Open the application, which will initialize the server
    'and session instances as well.
    oClient.OpenApplication("SERVERNAME", "Financial Management", "APPLICATION", oServer, oSession)
    'Instantiate a data load object instance, which will be used to extract data from
    'FRS.
    oDataLoad = New HSVCDATALOADLib.HsvcDataLoad
    oDataLoad.SetSession(oSession)
    'Initialize the data load options interface.
    oOptions = oDataLoad.ExtractOptions
    'Find the internal ID numbers for various scenarios and years.
    'These are required for HFM API function calls.
    lActualScenario = GetMemberID(DIMENSIONSCENARIO, "Actual")
    lBudgetScenario = GetMemberID(DIMENSIONSCENARIO, "Budget")
    'Construct file names for open data.
    strFileName = "c:\Temp\FEWND_BudgetData.dat"
    strLogFileName = "c:\Temp\FEWND_BudgetData.log"
    'Extract data for the current open cycle.
    ExtractData("Budget", BudgetYear, "Dec", strFileName, strLogFileName)
    End Sub
    Sub ExtractData(ByVal strScenario As String, ByVal strYear As String, ByVal strPeriod As String, _
    ByVal strFileName As String, ByVal strLogFileName As String)
    'Populate the Scenario element.
    oOption = oOptions.Item(HSV_DATAEXTRACT_OPT_SCENARIO_SUBSET)
    If strScenario = "Actual" Then
    oOption.CurrentValue = lActualScenario
    Else
    'THE LINE BELOW IS THE ONE THAT FAILS
    oOption.CurrentValue = lBudgetScenario
    End If
    End Sub
    Function GetMemberID(ByVal lDimID As Long, ByVal strMemLabel As String) As Long
    Dim oMetaData As HSVMETADATALib.HsvMetadata
    oMetaData = oSession.Metadata
    oEntityTreeInfo = oMetaData.Dimension(lDimID)
    GetMemberID = oEntityTreeInfo.GetItemID(strMemLabel)
    End Function
    End Module

    I stumbled upon the solution to my problem. The documentation for extracting data via objects defines member ID variables as Longs. In fact, I've always defined such variables as longs in previous object programs and had no problems. It appears that the datal load/extract "option" property of "Currentvalue" is defined as integer. When I changed all of my member ID items (such as the "lBudgetScenario" variable that was the right-side of the failing assignment statement) to be integers, the program worked.

  • Open Hub: How-to doc "How to Extract data with Open Hub to a Logical File"

    Hi all,
    We are using open hub to download transaction files from infocubes to application server, and would like to have filename which is dynamic based period and year, i.e. period and year of the transaction data to be downloaded. 
    I understand we could use logical file for this purpose.  However we are not sure how to have the period and year to be dynamically derived in filename.
    I have read in sdn a number of posted messages on a similar topic and many have suggested a 'How-to' paper titled "How to Extract data with Open Hub to a Logical Filename".  However i could not seem to be able to get document from the link given. 
    Just wonder if anyone has the correct or latest link to the document, or would appreciate if you could share the document with all in sdn if you have a copy.
    Many thanks and best regards,
    Victoria

    Hi,
    After creating open hub press F1 in Application server file name text box from the help window there u Click on Maintain 'Client independent file names and file paths'  then u will be taken to the Implementation guide screen > click on Cross client maintanance of file name > create a logical file path by clicking on new entiries > after creating logical file path now go to Logical file name definition there give your Logical file , name , physical file (ur file name followed by month or year what ever is applicable (press f1 for more info)) , data format (ASC) , application area (BW) and logical path (choose from F4 selection which u have created first), now goto Assignment of  physical path to logical path > give syntax group >physical path is the path u gave at logical file name definition.
    however we have created a logical path file name to identify the file by sys date but ur requirement seems to be of dynamic date of tranaction data...may u can achieve this by creating a variable. U can see the help from F1 that would be of much help to u. All the above steps i have explained will help u create a dynamic logical file.
    hope this helps u to some extent.
    Regards

  • Currency type 10,30 and 00 need to extract data from R/3 to BI

    Hi Experts,
    I am working ECC6.0 version with BI 7.0,
    I have a issue, when I extracting data from R/3 data source (0FI_AP_3) only currency type 10 comming but I need currency type 30 and 00 also....
    when I check in data source abap code it was hard coaded with 10 currenly only,
    can any help me to provide your inputs how currecy type 10, 30 and 00 also come to BI.
    Regards,
    Vijay

    Hi Vijay,
    0FI_AP_3 is Account payable -Actual line item data source, which was used for fetch actual vendor posting data.
    If you are looking for planning and budgeting data then you sud go for 0FI_AP_1 / 0FI_AP_6 / 0FI_AP_7 based on your requirement.
    Kindly let me know if you have any question on this.
    Regards,
    Ashish

  • SAP ECC 6.0 - Using BAPIs for C# to extract data out

    I have had a client recommend a strategy of extracting data usin C# (Visual Studio 2005) to extract data from SAP ECC using BAPIs.
    We do have an existing methodology in place using flat files to extract data to non SAP systems
    We have purchase XI which we intend to implement next year.
    I basically wanted to keep things tidy and continue with the flat file interface strategy just to keep things simple going forward to XI.
    THen there is also the security piece, the developer has had to slowly build a profile / roles that alows him to come in thru visual studio to access these BAPIs
    I am looking for anyone who has had experience with this and what your experiences are.  As well, what are the SAP best practicies concerning this strategy
    Thank YOU ALL who will reply

    I think that SAP's strategy toward exposing BAPI is leaning toward leveraging their AS-JAVA stack.  With the AS-JAVA Enterprise Services and standard delivered web content, SAP is already exposing many existing BAPI/Business Functionality outside of the ABAP world.   However, that's not saying that traditional flat files have no place in the future.  Matter of fact, I don't see flat/delimited files going away any time soon.
    It all really comes down to what you are doing, you may even end up with a landscape that's a mix of files/RFCs.  Here inhouse, we leverage file based transfers for large data sets such as SAP BI OHS extracts, and daily R/3 FI extracts.  Why file?  because it's simple, easy to control, and you can see the data being transferred.  A file can be "hold in my hands" if you will, at best there's just a few characters in-flight.
    As for RFCs, any type of RFCs in fact (Anything from sap .net connector to AS-JAVA ESOA Based ES), are basically designed for transactional data.  Here, you are looking at things that are high in transactional count but small in individual size.  Your client's call using C#, it all really depends on how you are doing it.  MOST IMPORTANTLY:  Make sure you are using a proven, standarized, and SAP supported way, PERIOD.  NEVER EVER go into production with a "hack".
    For the high-transactional-count-small-individual transactions, we leverage BizTalk Server (BTS) here.  I'll be frank, we are not using BTS because we wrote it.  We are using BTS because it just works better for us, in our environment.  BTS now support SAP 2.0 connector (registered program ID) and SAP 3.0 (WCF based, direct SAP RFC call, supported by Microsoft AND SAP).  We are leveraging these adapters and BTS (as distribution and transformation) in our environment more and more.
    So, long story short:  Determine the transaction type, multiple solutions is ok, make sure the solution is supported!

  • SSIS 2014 - Best way to use parameters to extract data from sources

    Hi,
    Is there any way besides SQL COMMAND FROM VARIABLE that I could use to extract data from Oracle \ SQL Server tables that filters the amount of data?
    For instance, I want to extract in all sources data beyond 2007 so I wanted to use this year as a parameter in all OLEDB sources I will be using.
    Thank you

    Hi Pedro,
    Based on my research, the Microsoft OLE DB provider for Oracle and Oracle Provider for OLEDB does not allow parameterized queries in OLE DB Source. So the best method to achieve your requirement is still using SQL COMMAND FROM VARIABLE option as Data access
    mode.
    Considering construct your query in a variable which you can include your parameter dynamically with another variable and set the variable properties "EvaluateAsExpression" to true. In the Expression Property set the value to:
     "select * from test
    where Col1='" + (DT_WSTR,100) @[User::para]  +"'"
    The following two similar threads are for your references:
    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/97f23ef5-35ac-466e-87d9-69edac2525f9/ssis-oledb-source-problem
    https://social.msdn.microsoft.com/forums/sqlserver/en-US/32a70752-adab-4180-8b6d-f6100b3e356c/pass-variable-for-ole-db-source-with-connection-to-oracle
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

Maybe you are looking for

  • How to remove duplicate phone numbers under iMessage settings?

    I've been using iMessage for a while now and a lot of my friends have brought to my attention that every iMessage I sent showed it came from my email rather than my phone number. So I signed out of iMessage and tried logging back in using my phone nu

  • Connecting hudl tablet to imac

    Hi, Just trying to connect my kids Hudl to my imac to transfer music/films accross but having no success.The imac wont recognise the Hudl, using a USB cable. any ideas? cheers Duncs

  • RE order related

    Hi All, Scenario 1: RE order should create with ref to or order and Re billing create with ref to RE order and  overall status should be complete. Scenario 2 : Same RE order If user check field in Additional data tab A in condition group- if they put

  • Airplay on iPad mini with new iOS7?

    where is the location of the icon for airplay on the ipad mini with new iOS&?

  • LR2 64-bit slower than 32-bit (Mac)

    I ran a test a while back with Lightroom 1.3.1, generating 1:1 previews on a test directory of images: http://www.rassoc.com/gregr/weblog/2008/02/24/mac-pro-performance/ On a Mac pro 2.8 GHz 8-core machine with 12GB of RAM, I found I could generate 2