IMPORTANT! ZXRSAU01 for 0FI_GL_40-Select closed period-last month on BUDAT

Hello Everybody,
I want to use Exit: ZXRSAU01 for 0FI_GL_40 : I need to Select data on closed period (last month) in ECC for BI7, with field BUDAT.
Please, did somebody have any ABAP Code to do this?
Thanks in advance.

so, i don't know how to determine the last month, but if you know this your coding should look like this:
field-symbols: <fld> type extractstructure of Datasource (you find the extractStructure in RSA6 when ds is activated)
data: lc_tabix type sytabix.
data: budat_low type sydatum,
        budat_high type sydatum.
.... here you have to determine low and high date for your period you want to select...
case i_datasource.
when '0FI_GL_40'.
loop at c_t_data assigning <fld>.
  lc_tabix = sy-tabix.
  if not <fld>-budat between budat_low and budat_high.
    delete c_t_data index lc_tabix.
  endif.
endloop.
endcase.
So somewhere you have to determine the month you want to bring to BW.
But remember  - its not a good idea to select data first and then delete it in this exit. The better way would be not to select them with selection in you Infopackage.
Br
M.

Similar Messages

  • Process chain for updating a cube with last month's data everyday.

    Hi everybody,
    I need a suggestion on designing the process chain. I have the cube Zxx_xx. I will explain my requirement with an example. Suppose I uploaded the cube with data up to 201103. Each night in May, I want to upload the cube with April's data. So each night the previous request should be deleted. When May finishes, this time, each night I need to upload the cube with May's data. I handled everything except deleting the data from PSA. I need the data loaded in the cube stay at PSA. In this case the request including data till 201103,  the request loaded for April, and finally in June, I need to see the request loaded for May. In the last step of the process chain I added the process for deleting PSA data choosing my infosource, but I have no option for deleting the requests where I have uploaded from same infopackage with same selections. Please help handling this situation.
    thanks in advance.
    Yasemin.

    hi,
    You can achieve this by loading the cube through two different DTP's.
    DTP1 to have in the routine to pick data for month-2 i.e. in june it picks up April data.
    DTP2 to restrict the month in routine to month-1 i.e. in june it picks up May data.
    Now the design of process chain will be as follows:
    process chain to have an step "Decision Between Multiple Alternatives "
    in this decision step you can write formula to check if sy-datum is 01, first of every month.
    if step: formula
    ( RIGHT( 2, Current Date ) = '01' )
    On first of every month load for month-2 as well as month-1 and delete overlapping request for month-1. Variant described below.  DTP1, DTP2 and then Delete overlapping request step
    Else part of Decision Between Multiple Alternatives will be executed for all other days
    load only month-1 and delete overlapping request from cube. DTP2 and then Delete overlapping request step.
    in the pc there is variant "Delete overlapping request"
    in that choose variant type DTP, give the technical name of DTP2 and save it.
    this way the whole data loading will be automated and you need not intervene to delete data manually,
    regards,
    Arvind.

  • MacBook Pro Battery: How can I protect my battery when not using computer for a long time period 3-months ?

    Hello,
    In 2014, I am expecting to be out of the states for a long period of time which is over 3 months. I am not planning of bringing my MacBook Pro with me. As a result, what would be the correct procedure for the battery in order to preserve it in the best condition when I return back and use the battery normally.
    Many thanks for your assistance!

    This is the article for non-Retina systems.  Not sure what to do fro Retina units:
    http://www.apple.com/batteries/notebooks.html
    I would also keep it with a friend/familymember you can trust to not take it out during that time and play frisbee with it to control humidity levels and temperature and access while unattended.

  • 0FISCPER3 - Default to last closed period in Report Variable

    Hi all,
    We have a requirement in our reports to default the Posting Period to last closed period.
    In the InfoCube we have 0CALMONTH (In Period) and also 0FISCPER3 (Posting Period). The values for Posting Period varies from 1 to 16.
    What is the functionality behind Posting Period ?
    How can we find the last closed period as months are 12 and Posting period are 16 ?
    Kindly clarify.
    Thanks!

    Hello,
    The fiscal year variant contains the number of posting periods in the fiscal year and the number of special periods.
    You can define a maximum of 16 posting periods for each fiscal year in the Controlling component (CO).
    The fiscal year variant specifies the number of periods and special periods in a fiscal year and how the SAP System is to determine the assigned posting periods.
    You have 12 periods in SAP and also four special periods. These periods are stored in what is called the fiscal year variant (K1, K2, K3 and K4)
    You can use the function module DATE_TO_PERIOD_CONVERT to get the period by passing the date.
    Also see
    [Determining Posting Periods|http://help.sap.com/saphelp_nw04/helpdata/en/c6/f0c33b8e2811d4b3090050dadefebd/frameset.htm]
    special periods
    Thanks
    Chandran

  • Authorization check for Open and Close Periods ( OB52)

    Dear Experts,
                           We have created ZOB52 for Opening and closing periods. This is replica of Tcode: OB52 with some other developments that we required. Here for resticting user I had tried authorization Object: F_BKPF_BUP for particular company code wise posting. This was however not working. Kindly suggest.

    Hi,
    The last column in OB52 - AuGr (Authorization Group) helps you in restricitng certain users to use a posting period. This field is freely definable.
    If only a limited set of users is to be able to post in a particular posting period, proceed as follows:
    Add the posting period authorization (authorization object F_BKPF_BUP) to the authorizations of the selected users. Assign an authorization group (e.g. '0001').
    In OB52,  in the row with the account type '+', enter the period(s) whose use is to be restricted in the first period, those which are available to all users in the second period, and the authorization group (e.g. '0001') in the last column.
    For company code wise restrictions, you should have a seperate posting period variant for each company code.
    Edited by: Michael Gerard Leo on Jan 12, 2010 2:55 PM
    Edited by: Michael Gerard Leo on Jan 12, 2010 3:01 PM

  • How to schedule Process Chain with Full Update for the past closed month

    Hello,
    I have an HR-BN benefits transactional data extractor - http://help.sap.com/saphelp_nw70/helpdata/en/08/b01d3cf8aa101ce10000000a11405a/frameset.htm
    One of the selection fields for that extractor is calendar year/month 0CALMONTH and it is a full update extractor.
    SAP recommends running this extractor once a month after the month has been closed.
    If I were to include this update/extract into my process chain, would it be possible to automate the process in a way where the process chain is scheduled to execute once a month (I know how to do that), but that also only pulls values for the past/closed CALMONTH (as if it had a variable value of which would be automatically set to the last closed month when pchain is run)? As I mentioned 0CALMONTH is one of the selection criterias in the infopackage for that extractor.
    let me know how I might be able to do that.
    P.S. we are on BI 7.0/2004s
    Thank you

    For Calmonth selection in infopackage you can use the SAP-Exit OLAP Variable 0CMLMON (Last Month)
    select Type "7" ("OLAP Variable")
    and in Details of Type screen, Select OLAP Variable "0CMLMON" Which is SAP-Exit variable for Calmonth, that returns the last month from the current system-date.
    If variable 0CMLMON is not active, you need to activate it from Business content.
    Assign pts if helpful.

  • Need to create report query to get latest open and last closed period for given application

    Hi All,
    I need to create a report query to get below result displayed in report output.
    1)   -   Application name
    2)   -    Ledger name
    -o/  -Operating Unit
    3)   -  Last Closed Period
    4)   -  Current Open Period
    5)   -  Date Closed – Last Closed Period
    6)   -  Date Open – Current Open Period
    I tr I tried to create the query below is the same. Please let me know if it looks fine.
    SELECT *
      FROM (SELECT fav.application_name ,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status ='C'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc )WHERE ROWNUM = 1 
    UNION ALL
    SELECT *
      FROM (SELECT fav.application_name Application_Name,
                   hou.name Operating_Unit_Name,
                   gl.name Ledger_name,
                   gl.latest_opened_period_name,
                   gps.period_name Period_Name,
                   DECODE(gps.closing_status, 'O', 'Open', 'C', 'Closed') status,
                   gps.last_update_date Last_status_modified_date
              FROM gl_period_statuses gps,
                   gl_sets_of_books   gsob,
                   fnd_application_vl fav,
                   hr_operating_units hou,
                   gl_ledgers         gl
             WHERE gps.period_name = gps.period_name
               AND gps.closing_status = 'O'
               AND fav.application_short_name =
                   NVL('&p_application_short_name', fav.application_short_name)
               AND gps.application_id = fav.application_id
               AND gsob.set_of_books_id = gps.set_of_books_id
               AND hou.set_of_books_id = gps.set_of_books_id
               AND gl.ledger_id = gsob.set_of_books_id
               AND hou.organization_id=NVL('&p_operating_unit',hou.organization_id)
               AND gl.ledger_id=NVL('&p_ledger_id',gl.ledger_id) 
             ORDER BY gps.last_update_date desc)
             WHERE ROWNUM = 1

    It is within the table I believe (I'm not a DBA or a developer) since I created a BLOB column and then used the file browse feature to allow users to attach a resume to the table in order to be able to perform a search of the attached documents.
    I'm just having a hard time pointing the link in the search results report to the document in the blob column.
    The information on that page is great if you're trying to create a link to the document on the initial report.
    But I created a query using Oracle Text to run a report that does a boolean search of the attached word documents in the table.
    When it displays the search results, it doesn't create a link to the document and I can't figure out how to do it.
    Here's a link the the instructions I used to create the initial search report with Oracle Text, mind you I only created the index and query, I didn't add in all the link data since they're using documents on websites and I'm using documents in a table.
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_text_application_v1.6.pdf
    If you can help me with this I'd really appreciate it.
    Thanks again.
    Greg
    Edited by: gjones77 on Dec 2, 2008 8:14 AM

  • Depreciation is not executed for last month and the period is closed. Giving Error in this Dep. Cycle.

    Hi All,
    We had a month End scenario where the depreciation for a company code is not executed for the last month and closed the period without checking it.
    While  running the Depreciation posting for this month we encounted a error that last motn period is closed. Can we do the depreciation without opening the period closed. Kindly let us know the options available.
    Regards,
    Lakshmi Narayana

    Lakshmi,
    There is no way you can post depreciation without opening the prior periods. Please discuss with your business and secure all necessarry approval, I believe the business has a process on this kind of situations. As long as it is fully documented, auditors will not find it wrong.
    This is the best time to improve your process, think of possible ways so that business will not forget to post depreciation (e.g send automatic email during 3 days before, 2 days before., 1 day before and during the day of depreciation run).
    Hope this helps.
    Thanks!
    Jhero

  • Stock Report for selected posting period!

    Dear All,
    Is there any standard program on Stock Report for selected posting period, which shows PRODUCT| UNITS| OPE.STOCK| PURCHASE| SALES| CLO.STOCK|
    I want report on this, anybody can help me out on the same. Or is there any standard report.
    Need urgently.
    Thanks & regards,
    Abhay.

    Hi Abhay
    There is no standard report available as format given by you.
    You have to develop a Z Program for the same. We have also developed
    the same requirement.
    Regards
    Harish

  • Can SAP run the depreciation for closed Period and posting to diff month?

    My client forgot to run the depreciation for Jan 2011, and now the Jan period has been closed and report also done.
    My solution was to re-open the Jan and does the depreciation, once completed reclassify Jan depreciation posting to Feb 2011 manually.
    I am just wandering whether SAP can handle this different way.
    Can SAP performs Jan (Closed Period) depreciation and post to Feb period automatically or any other suggestions?
    Cheers

    Hi
    Yes, you can do that
    Follow this thread... Unable to post depreciation- Error AA730
    Using ABF1, you can do it
    Br, Ajay M

  • Log for the Closing Period & Opening Period -Urgent

    Hello,
    While Opening & Closing Periods in MM where will be the logs saved.
    Thanx & Regards,
    Kumar Rayudu

    Go to transaction SE16> enter the table name MARVCD or MARV and enter the parameters of company code, then execute, you may find the person who changed the last MM period. I am not sure if it holds previoys history, but the latest changes may be found

  • Reserval of Assessment Cycles for closed periods - FAGLGA15

    Hello,
    We have assessment cycles in closed periods which we want to reverse / repost in current period.  We are using ECC New GL functionality.  Tcode KISR does not seem to recognize Assessment cycles created with FAGLGA1* .
    Suggestions / options to achieve the end result, please.
    Regards
    Jayesh.

    Hi:
    If your CO allocation has some external postings (like GL or fixed assets) or generating some intercompany documents, then it needs FI to be open also. It happens sometimes if the allocation goes external so it would need fI period to be open also. If FI is close but CO is open, it would only work for CO specific allocations and others would error out.
    Please check the cycle/segment which is in error. If it is suppose to hit FI, then FI (OB52) and CO (OKP1) periods should be in sync.
    Thanks.
    Rahul

  • Performing GR for closed period

    Hi Experts,
    we closed mm period but unfortunitely we have notice still one product we need to do GR.
    so plz advice me how to perfor GR for close MM period
    Thanks,
    Rajesh

    Hi
    Check in Tcode MMRV for Post to previous period and activate it.
    Now you try to post in previous month it will allow.
    You can also use Tcode OMSY to change the period but you have to be cautious if you are in live system.
    Hope it helps
    Thanks/Karthik
    Edited by: Karthik on Aug 18, 2009 5:25 AM

  • FM for checking closing period

    Hi all,
    I need an FM that can check whether a given Posting Date lies within a closing period or not.

    Hi,
    call function 'FI_PERIOD_DETERMINE'
    exporting
    i_budat = p_datum
    i_bukrs = p_bukrs
    importing
    e_gjahr = year
    e_poper = period.
    aRs

  • Asset Accounting Reports - Can they be run for any selection of dates

    Folks,
    I have a query - in Asset Accounting, can I run any of the reports (for current fiscal year and closed fiscal years) for any selection of start and end dates? so for example, if I want to run the Asset history sheet for fiscal 2007 (which has been closed in my books), can I run this report for say the month of July 2007 (July 1-31, 2007)?
    I was under the impression that asset reports for closed fiscal years could be run for the entire year ONLY!
    An early response would be appreciated.
    Thx,
    Sameer Aroskar

    Hi Sameer
    I think I did answer this in other forum but anyway here you go again !
    Select Transaction OARP >> Depreciation Lists >> RAGAFA01(Posted Depreciation) - Select this and Execute.
    Select the require company codes and necessary parameters then under Settings select the Depreciation Posting Period e.g. 4 for the required Report date which can be last day of the month from the required previous years. eg 30.04.2007 etc.
    Cheers !
    SA
    PS: award points if you find the answer useful.

Maybe you are looking for