Last posting date in Bex

Hi all,
Below is my requirement,
there is a posting date in the cube, and while running in Bex we have to apply a logic to set the version (like actual,plan),
1. If key date (user variable ) <= latest posting date available for actual then set version = actual
2. If key date (user variable ) >  latest posting date available for actual then set version = actual and plan
Here the challenge is how to find out the latest posting date, I think this can be done via create a new info object based on virtual characteristic and derive logic to find the latest date,  but not sure how it affects while drill down to any characteristics. Any suggessions please?
thanks
Jose

Hi Jijo,
Check my hints:--
1) Create a new text Infoobject called "Version" of length 1. Maintain two records in it like below:--
    Key   Short Description
    A       Maintain "Actual"
    P       Maintain "Actual & Plan"
2) Make this infoobject as Nav Attr to "Posting date"
3) Create a Virtual KF and write a BADI code with the required logic. Your code should read the User entry variable and compare with latest Posting date. You have to SORT Posting Date in Descending.
Sample Code:--
SORT IT_VBRK  BY ERDAT DECENDING
read table it_vbark into wa_vbark index 1.   (" here we got recent date on first row )
latest_date = wa_vbark-erdat.
After that you can compare as per your mentioned logic and set version by considering text infoobject keys.
Regards,
Suman

Similar Messages

  • Getting the last posting date

    Hi everybody,
    I need some help. I want to create a Bex Variable with Customer Exit, and i need to modify the ABAP code in order to get the last posting date of Data in my request. I'll like to create to create with BEx Query Designer a request that allows me to make my report on the most recent data only.
    Eg. Let's say today before leaving the work I launch a routine that provides me during the night data for my R/3 system and I'm wonking in a BW environment. Tomorrow, i'll like to compose any request guiving me informations only on what i loaded yesterday without typing the date. I'm oblige to use a variable, but I need the corresponding Abap code. Can some one help me please ?
    Thanks.

    You want your query to return results from only the most recently loaded request. Is that right? You don't need a variable for that. Just bring in "Request ID" (from Data Package dimension) into Filter area and use "Last Request Loaded" variable delivered by SAP.

  • How to get material's last posting date of issuing to production order?

    Hi,
    In my scenario, I need to get material's last posting date of issuing to production order (e.g. mov. typ. 261).
    I tried to select the material documents whose movement type is 261, and restrict the posting date from month to month each time, until the first material document is selected.
    But this method seems quite inefficient.
    What kind of algorithm is more effient to do this?
    Thanks
    Wesley

    Hi,
    select max( budat )
      from mkpf
      into gv_budat
      where mblnr in ( select mblnr
                         from aufm
                        where aufnr = gv_aufnr "(Prod. Order)
                            and  matnr = gv_matnr "(Issued Material)
                            and bwart = '261' ).
    Edited by: Azeem Ahmed Matte on Mar 12, 2010 12:33 PM

  • Last Post Date (and Time?)

    Before the last revision of Discussions format the My Subscriptions page under Last Post the date of the last post in a forum or category was listed along with _the time_ of the post. This was a very helpful feature as one could scan the list and see if there were any new entries in a forum or category. Now we still have the date (Aug 29, 2007), but no time listed. Should we expect the time to be listed before long, or is that a casualty of the new dispensation? And if it has been removed, does anyone have an idea of why?
    Thanks.
    cornelius
    Message was edited by: cornelius

    Hi Cornelius,
    I hope you will forgive my saying so, but sarcasm does not become you.
    As a Level 4, you have the facility to post such a question in the FHB in the Lounge, where it can receive the attention of the Hosts and all the other Lounge Lizards who have that special 'inside' information.
    This particular forum will only attract attention mostly from the fringe dwellers such as myself, who are not likely to have access to or the freedom to publicly disclose the information which you require.
    Nevertheless, have a good day!

  • Problem with the Posting Date of Goods Receipt or Invoice Receipt for PO

    Hi All,
    I am working on 2LIS_02_SCL - Purchasing Data (Schedule Line Level),
    For our report, we should get the scheduled PO quantity,actual PO qty, Scheduled date and actual date in the report.
    we are getting all these fields from the above extractor...
    For a PO which is opened (Delivery Completion indicator not set) - we where getting all field as in ECC(ME23N)
    But for a PO which is finished(Delivery completion indicator is set) - we where are getting actual GR qty,planned qty,planned or scheduled date at schedule line level.But we are not getting the Posting Date of Goods Receipt or Invoice Receipt for PO from history EKBE for all the schedule line.
    ex:
    for open PO
    PO num         item num   schedule line    Planned date   actual date  difference  actual qty  planned qty  difference
    450002432   10                        1              01/10/2011    02/10/2011       1 day          100             100             0
                                                     2              02/10/2011    04/10/2011       2 days        200             400            200
                                                     3              03/10/2011    07/10/2011       4 days         300            300              0
    For the same PO when it is Finished or completed(Delivery completion indicator is set)
    PO num         item num   schedule line    Planned date   actual date  difference  actual qty  planned qty  difference
    450002432   10                        1              01/10/2011    07/10/2011       6 day          100             100             0
                                                     2              02/10/2011    07/10/2011       5 days        200             400            200
                                                                    03/10/2011    07/10/2011       4 days         300            300              0
    for all the schedule line its displaying the last posting date(i think its taking from EKKO table)
    Is there any possibility to get that posting date history ....

    You can have multiple receipts against a PO schedule line, but this extractor is not meant to go to that level of granularity.  Please try to use 2lis_02_sgr instead which provides goods receipts per PO schedule line.

  • Choose Posting Date when entering Bank Statement

    Version: 2007A SP00 PL49 (and newer)
    Problem: Because of SAP note 1296726, you have to use the bank statement date as the posting date for the corresponding journal entries and reconciliations.  This is not flexible: if I have a bank statement of 24/06/2009 and I want to reconcile an invoice with posting date 30/06/2009, I get an error: "Reconciliation date must be on or after the last posting date for
    transactions selected for reconciliation Message 3821-3".  Using 30/06/2009 as posting date for this particular row is not possible because the posting date of the bank statement is 24/06/2009 and you will get the same error again because you reconcile that row JE with the total bank statement JE at date 24/06/2009 containing a journal entry on 30/06/2009 (namely that row JE).
    Since PL49 and the fix of SAP note 1296726, it is no longer possible to use a different posting date and bank statement date and this is the main cause of the problem above.
    Current Workaround: Don't reconcile the invoice when entering the bank statement and do this manually after you have finalized the bank statement.
    Proposed solution: Make an extra field "posting date bank statement" in the "Bank Statement Details" window where the user can choose on which day he can post his bank statement (just like in other documents like invoices, ...).  In the problem described above the user could choose 30/06/2009 as the posting date, but keeping 24/06/2009 as the statement date.

    >
    Avinoam Fraenkel wrote:
    > Pieter
    >
    > I had some feedback recently that the cumulative journal posting in the Bank Statement Processing functionality which is unique to the Belgian localization may in fact not be a general requirement from a business process perspective in Belgium
    This is true. I completely agree with that.
    >
    > If this is true then my preferred approach to solve this issue is to provide the standard Bank Statement Processing functionality to Belgium where each separate Bank statement line creates a separte posting with no collective cumulative posting being made.
    >
    > Please confirm if this approach will be acceptable to you.
    I'm not a business man, but an IT expert.  But as far as I know, your approach is correct.
    Before we used SAP in our company, our previous accounting software made only one journal post for each Bank statement.  This way, the (series) numbering of the journal posts correspond to the bank statement numbers.
    >
    > If so then I will need to do some further research and will consider this approach in our future version planning.
    >
    > Aside from the above I will add your proposal to the future change list but cannot currently guarantee if and when it will be implemented.
    Thanks for taking my proposal into consideration.
    >
    > In the meantime I would ask you to kindly use the workaround of performing manual reconciliations after bank statement finalization.
    >
    > Thank you for raising this issue and providing your solution proposal.
    >
    > Grateful thanks,
    >
    > Avinoam
    You're welcome!
    Regards,
    Pieter Verhaeghe

  • Report on most recent posting date

    Hi experts,
    My report needs to show the fields profit center and its posting date.posting date should have a selection variable for the user to enter a key date.The report should show only the last posting date for every profit center before the key date.
    my doubt is that the data in the infoprovider should be compared to get the last posting date. is it possible to read the data and get the recent posting date in the customer exit for the variable on posting date.
    Please suggest the possible ways of doing this.

    Hi Krishna,
    The recent posting date for the profit centre can not be stored as a transaction data in the cube and it can not be derived in the customer exit.
    You have to add a date field as the master data attribute of profit centre and populate that from the transaction cube data to get last posting date for each profit centre.
    You can then show is as the nav attaribute of profit centre in the report.
    Thanks,
    Krishnan

  • User exit for MIGO Posting Date

    Dear all,
    My Client want requirement is : Posting date of GRN should be after last posting date of goods issue
    i.e.  GI                261  1st june
           GI Reverse 262   2nd june
    again  GI 261  28 may   ( as 2 posting perod are open )
    then user should be able to do GRN on or after 28th may
    For this user exit please suggest me any FM or logic
    my current logic is allowing to post GRN after 1st june i.e. latest GI date  but that is not matching client requirement
    Please suggest
    Regards,
    Ishwar

    Hi,
       Enhancement for MIGO ,you can try these user exit
    MB_CF001-->  Customer Function Exit in the Case of Updating a Mat. Doc.
    MBCF0002 --> Customer function exit: Segment text in material doc. item
    MBCF0005 --> Material document item for goods receipt/issue slip
    MBCF0007  -->Customer function exit: Updating a reservation
    In BADI,you can refer these
    MB_CIN_LMBMBU04--> posting of gr
    .In MKPF table having data (posting date of goods issue) BUDAT-field name,tell the conditions as per your requirement to ABAPer,they can implement the enhancement as per your requirement...
    I hope,it will help you
    <=<< Sharing Knowledge is a way to Innovative >>=>
    By,
      Yoga

  • Last GR Date in the Bex Query

    Hello Experts,
    I have one requirement in BW, where I need to get the last GR (Goods Receipt) date.
    In my query, I will be having 4 KEY Fields and 1 CHR Field
    CHR Field is “ 0MATERIAL
    KEY Field is  : Closing Stock Qty , Closging Stock Value, GR Value, and Last GR Date
    I am using 0PUR_C01 and 0IC_C03  info provider for this query. Now my concern is, how do i get the “Last GR Dates”.
    No matter to which date I execute the report, it should always shows the latest date on when we have done the last GR.
    For example.. I executed the query as on 31/Dec/2013.. But the last GR date should be let’s say 03/April/2014.
    Regards
    Sachin

    u can follow this document Posted by  AL , Provides Detail steps how to show latest Record based on Date .
    How to show First and Latest Record at BEx Level

  • Standard report to show last transaction date posted to an asset

    Is there any standard report in asset accounting which shows- to view the last posting of transactions to an asset (if there were up or down movement on the asset values) excluding the depreciation posted.

    Try individual Asset transactions report , you can specify posting date ranges here and display report Asset wise -- S_ALR_87012048 - Asset transactions ,S_ALR_87012050 - Asset Acquisitions ,S_ALR_87012054 - Intracompany Asset Transfers ,S_ALR_87012052 - Asset Retirements
    Also check S_ALR_87012058 - List of Origins of Asset Debits .
    Lastly you can go with the Query SQ01 or SQVI reports.
    Regards
    Mukta

  • Month end accrual posting date- Last day of the month

    Hi Experts,
    I have set up month end accruals for PY US by configuring posting dates, LDCD, WageType accrual processing class, Schema changes. I have also set the closing dates as the end of the month.
    Now after I do the posting , there are three documents getting generated.
    1. Accrual posting document with first day of the current month
    2. Normal Payroll posting  document with payroll period posting date
    3. Accrual reversal document with first day of the following month.
    My Question is:  As per standard SAP configuration, the month end accrual will have first day of the month. Can we customize this to end of the month for doc#1 - accrual document?
    Please do let me know your suggestion and ideas.
    Thanks,
    Amosha

    Hello,
    I have a similar question and I hope to have more details on how to change the posting date.
    The point is that I have an amount of 1200 and I have to post 100 for each month.
    Key Date for Accruals: 31.01.2011
    I posted 100 with Document date: 31.01.2011 and Posting date 31.01.2011
    Key Date for Accruals: 28.01.2011
    I posted 200 with Document date: 28.02.2011 and Posting date 28.02.2011
    Also I reversed the amount posted in the previous month (100) with Document date: 31.01.2011 Posting date 28.02.2011
    And so on...
    The problem are the dates because I need to post the amount at the end of each month (28/02) and to reverse the previous amount at the beginning of the next month (01/02).
    How can I change these dates?
    Thanks a lot in advance
    Kind Regards,
    E.

  • Present date - posting date

    hi ,
    the query contains char posting date(0pstng_date).
    query should bring the values which are longer than 6 months.when the user  run the query it should calculate the present date(sys date) - document posting date .if it is longer than 6 months it should bring that record.
    *how the query calculates the sys date(todays date)?
    *how to get whether it is older than 6 months?
    how can we acheive this.please advise.
    regards
    sri

    Search for it here, you will get a no of posts describing the steps for a user-exit. One such post is Re: Bex : selection variable - write default values
    In the code of the user exit, you may write something similar to
    data : w_date like sy-datum.
    WHEN '<Var Name>'.
    IF i_step = '2'.
    w_date = sy-datum.
    w_date+6(2) = '01'.
    w_date = w_date - 160.
    w_date+6(2) = sy-datum+6(2).
    l_s_range-low = w_date.
    l_s_range-sign = 'I'.
    l_s_range-opt = 'BT'.
    l_s_Range-high = sy-datum.
    APPEND l_s_range TO e_t_range.
    ENDIF.
    If you want to exclude the last six months data from the report, mention "l_s_range-sign = 'E'." instead in the above code. (current code will show the last six month data).
    Once done, you can restrict your pstg_date field (context menu-->restrict) with this variable.

  • How to get the last run date.

    We intend to develop an incremental data load mapping using this strategy:
    1) The mapping reads the date it was last run from an auxiliary table.
    2) It selects from the source only those rows that were inserted or updated after said date.
    3) Then, a post-mapping process updates the last run date in the auxiliary table, using SYSDATE.
    The problem with this logic is that there is a gap: if the mapping starts running at 1:00 and ends at 2:00, the rows that are inserted in between will never be loaded.
    Is there any way to get the value when the mapping started running? Is there a better way to do this?
    Any help would be appreciated.
    Juan Algaba

    There is always the possibility of some record updates slipping through the crack if you are depending on dates unless you are very carefull. All of the audit tasks that the OWB-generate code performes take time. Any pre- or post- process that needs to run takes time. So which date is the best cuttoff point to equate to "when the last run of the merge (or insert or update) statement completed"?
    Plus, how do you handle reloads if the previous load failed and your mapping had incremental commits?
    Is your source on another server? If so, are the dates in perfect synch? The audit tables populate with sysdate of your runtime schema. Is that the same as the sysdate on your source remote database?
    I would qualify my query to look for all updates since the start of the last run that finished successfully - adjusted if neccesary for sysdate differences if it is on a remote schema. And make sure that your code handles any reloads gracefully in the event that this brings back data that you have already loaded once. .
    Because we use Oracle Streams to load a local staging area, we also have custom code to dump the primary keys of all data changes to utility staging tables while streams is updating the local copy. So, our Person table has an st_Person_delta table that just holds the primary keys that have been updated by Streams since the last ETL run.
    During datamart load we disable the streams apply to stabilize our environment, and join these lists of pk's to their source tables to drive our ETL. So we only select data where Streams has performed an update to the row since our last run. When we are done our ETL, we truncate the primary key staging tables, and then turn streams back on to start loading up our new delta into our staging tables again..
    The ETL gets pretty complex though when many tables join together in one mapping and you need to check all possible source table deltas to see if any of them got updated to determine the delta for a given dimension or fact record, but it works great once you get it all done.

  • How to calculate the data in bex

    Dear all,
                i have a service order no and it current active status  and it time stamp details in my query
    example
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    17.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   15-01.2009   = 2 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      2
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina

    Hi vamsi talluri ,
      i working in crm reports ( service ) here i want to calulate the differance between the old status that is inactive status date to part despathed date
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007  
    in my ods i have
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A    17.01.2007  
    800000243      15.01.2009   shahina part pending               x    16.01.2007  
    800000243      15.01.2009   shahina part for asp                 x    13.01.2007  
    i want to calulate the aging of part pending to part despatched
    17.01.2009   -   13-01.2009   = 4 days
    i want to display in my bex like this
    sevice orer no  posting date name    current active status  active status date    part aging
    800000243      15.01.2009   shahina part despatched          A     17.01.2007      4
    in bex i am dispaying only active satus but i want calculate diff bet active status which i am dispalying in the bex analyzer and old status whaer the data are available in sercice order ods
    please help me how to perform the calculation
    Regards,
    shahina..!
    ( in bex report i want to display only active status )
    can any one help me please to solve this issue
    Regards
    shahina..!
    Edited by: Shahina A on Jan 21, 2009 6:13 AM

  • Stock in posting Date

    Hi
    Dear Guru
    we have done sum  stocks  close in year ending 2008, in that time we have tranasferd Stock from material to material, we have tranferd all the stocks from material A to Material B.
    But theire is no stcoks in the MMBE for material A , for todays date , when we are going to check MB5B, on 31/03/2008, it is showing valuated stock, of sum quantity,
    we have checked all the Material Stock Transaction, no where it is showing stock eccept in MB5B That to posting date on 31/03/2008.
    so how to remove that stock on posting date(Valuated stock). only in MB5B.
    Kindly suggest
    Madhu

    hi
    For doing stock transfer , stock must be avalaible on current date and on the last day of the previous month, if u want to to do transfer postion on previous month's date.
    reward if useful
    Amit

Maybe you are looking for

  • Creative cloud and Photoshop so slow as to be unusable.

    I have been having an ongoing problem with both Creative Cloud and Photoshop. Both programs have slowed down to the point of being inoperable. For example, it takes 1-5 minutes just to choose a tool in Photoshop. When either of these programs are ope

  • How do I select a new calendar as a "writable calendar"?

    Thunderbird 24.3.0/Mac OS X Mavericks/Lightning 2.6.4. I have a calendar set up to sync with an Internet cloud service (not Google; not iCloud). This calendar has worked fine for me for months and I have many calendar events and tasks on this calenda

  • How to download PDF attachment from gmail on iphone 5S

    Hi, How to download PDF attachment from gmail on iphone 5S Regards Ram

  • SOA Suite 11.1.1.5

    Can anybody provide me the link to download SOA Suite 11.1.1.5 for OIM 11.1.1.5. I am not able to get the installer for 11.1.1.5. In the Oracle site it is available for SOA Suite 11.1.1.6

  • New iTunes & applying App updates

    In the new iTunes, how do you apply app updates as there is no "search for updates" or "update all" buttons anymore?  Previously I could decide which updates to apply. I have 9 app  updates needing applied but I dont want to apply them all.   I used