Query for posting date versus created date

Hi i would like a simple query (so i can use the query generator) to enable me to run a general ledger report that will include the date the transaction was created.  This will be a usefull query to identify any prior month or prior year transactions.  Currently if any balances change in the prior year it is impossible to find which ones they are.  If the query can show the transaction and the created date it will be easy to identify those items pre dated back into previous months/year. 
I have no experience in sql so am limited to use the query generator or can copy a query into the generator.
Would appreciate some help.  To assist going forward i have created transaction codes for users to include in their journals so we can use the system general ledger report to identify them, however if the user leaves the code off we cannot detect them.
thanks judi
Edited by: Darius Heydarian on Mar 28, 2008 11:20 AM.

Hi Judi,
I generated a query that lists all your Journal Entry details, based upon the document.
SELECT
T0.TransId, T0.RefDate, T0.Memo, T1.Debit, T1.Credit, T0.UpdateDate, T0.CreateDate,T2.USER_CODE AS [CREATOR NAME],T2.USER_CODE AS [UPDATEOR NAME]
FROM OJDT T0  INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId, OUSR T2
WHERE T0.UserSign = T2.USERID AND T0.UserSign2 = T2.USERID
1. open the query generator
2. Click the Execute Button. It trows an error. Please don't mind that.
3. Click the ICON - dEditText - Select completly and paste the above query.
Might be it will be helpful for you.
SAGAR

Similar Messages

  • How to get current date for posting date

    hi,
    how to get current date for posting date ? any sample code ?
    Thanks

    Hi......
    Use
    Select getdate()
    for current date.......
    Regards,
    Rahul

  • MATERIAL DOCUMENTS FOR POSTING DATE TCODE ?

    HI ALL,
    CAN SOMEBODY GIVE ME THE MATERIAL
    DOCUMENTS FOR POSTING DATE TRANSACTION CODE.
    THANKS,
    KSR

    Hi all,
    For dispaly of Material Document we have Transaction Code : MB03,
    this with the Document No & Year,
    like wise for dispaly of Material Document for a date range i want to know the Tranasction Code.
    Thanks

  • No Oracle SSO support for POSTing data to protected resource [yet]

    Hi,
    I am using OHS infront of JBOSS and redirecting all requests from OHS to JBOSS after SSO Authentication.
    Everything works fine except that I get 500 error when I try to post data from HTML form.
    When i click on a button on a JSP page that submits page with the Form Post, the request goes to the OHS and is not getting forwarded.
    OHS log shows the following
    127.0.0.1 - - [11/Sep/2007:08:57:23 -0400] "POST /Sample/protected/standard.do HTTP/1.1" 500 788
    Proxy_error.log shows the followin error
    [Tue Sep 11 08:57:23 2007] [error] [client 127.0.0.1] [ecid: 1189515443:10.6.2.137:268:5568:74,0] \n[OSSO] E09: No Oracle SSO support for POSTing data to protected resource [yet].\n
    Any idea?
    Thanks
    Srikar.

    This error does no occur in our dev or test environments, only production. A workaround for us was to disable SSO by commenting the line to load it in the file $ORACLE_HOME/Apache/Apache/conf/httpd.conf. The line to comment out looks like: include "/u01/app/oracle/product/mid/Apache/Apache/conf/mod_osso.conf" where the /u01/app... above is the expansion of $ORACLE_HOME/Apache/Apache/conf/mod_osso.conf.
    We do not use SSO for our application, so this is not a problem. I next plan to try to figure out why this behaves like this, so I can keep all the server configurations consistent.
    HTH,
    Mark

  • Help in Query for max date

    Hi, How I can get the max(Gst_date) record of GRD. IF record of GRD has more than one record then I need the one max(GST_date) record of every GRD. Thanks.
    create table #CRT (CRT numeric, GRD numeric, GST_Date datetime)
    insert into #CRT values (7 ,1900,'01-01-2000')
    insert into #CRT values (19,1900,'01-01-2002')
    insert into #CRT values (24,1900,'01-01-2013')
    insert into #CRT values (7 ,2100,'01-01-2010')
    insert into #CRT values (19,2100,'01-01-2012')
    insert into #CRT values (7 ,2200,'01-01-2012')
    insert into #CRT values (19,2200,'02-02-2012')
    I would like the following output from query. The following record is the max(GST_Date ) of every '''GRD'".
    CRT   GRD   GST_Date
    24    1900  01-01-2013
    19    2100  01-01-2012
    19    2200  02-02-2012

    Please follow basic Netiquette and post the DDL we need to answer this. Follow industry and ANSI/ISO standards in your data. You should follow ISO-11179 rules for naming data elements. Everything you posted is wrong. You should follow ISO-8601 rules for
    displaying temporal data. In fact is is required by ANSI/ISO Standards. You failed again. We need to know the data types, keys and constraints on the table. Avoid dialect in favor of ANSI/ISO Standard SQL. You need to read and download the PDF for: 
    https://www.simple-talk.com/books/sql-books/119-sql-code-smells/
    Please, please learn why rows are not records. You do not even know what a key is or how to write a INTEGER NOT NULL(s, p) declaration. Allowing a table and column to have the same name is legal syntax and we regret not taking it out of the Standard. It is
    stupid! How can a set also be an attribute of itself? But your DDL gave no attribute  properties, as per ISO-11179. 
    Here is my attempt at repairs
    CREATE TABLE CRT 
    (crt_something INTEGER NOT NULL, 
     grd_something INTEGER NOT NULL, 
     PRIMARY KEY (crt_something, grd_something),
     gst_date DATE NOT NULL);
    Here is how we write an insertion statement; you are still using Sybase syntax! Why did you pick the most ambiguous, non-ANSI date display format? 
    INSERT INTO CRT 
    VALUES 
     ( 7, 1900, '2000-01-01), 
     ( 7, 2100, '2010-01-01'), 
     ( 7, 2200, '2012-01-01'), 
     (19, 1900, '2002-01-01'), 
     (19, 2100, '2012-01-01'), 
     (19, 2200, '2012-02-02'),
     (24, 1900, '2013-01-01');
    >> How I can get the MAX(gst_date) record [sic] of grd_something. If record [sic] of grd_something has more than one record [sic] then I need the one MAX(gst_date) record [sic] of every grd_something. <<
    WITH X
    (SELECT crt_something, grd_something, gst_date,
            MAX(gst_date) 
              OVER (PARTITION BY grd_something) AS gst_date_max
      FROM CRT)
     SELECT *
       FROM X
      WHERE gst_date_max = gst_date;
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • Query for finding data during special holidays

    Hi, i have a table for special holidays that looks like this:
    PROFILE_DAY
    VAR_DATE
    REGULAR_HOLIDAY
    1/1/2013
    H_WEEK_THURSDAY
    3/28/2013
    H_WEEK_FRIDAY
    3/29/2013
    REGULAR_HOLIDAY
    12/24/2013
    REGULAR_HOLIDAY
    12/25/2013
    REGULAR_HOLIDAY
    12/31/2013
    And another table (LOAD_PROFILE_TEST), which contains LOAD_PROF1 values from (TIME_EQ) 0 to 24 at intervals 0.25 for (PROFILE_DAY) MONDAY to SUNDAY including REGULAR_HOLIDAY, H_WEEK_THURSDAY and H_WEEK_FRIDAY.  All in all, this table contains 970 records (97 records between 0 to 24 with interval of 0.25 per PROFILE_DAY, with 10 distinct PROFILE_DAY).
    TIME_EQ
    PROFILE_DAY
    LOAD_PROF1
    LOAD_PROF2
    0
    REGULAR_HOLIDAY
    11.47
    0.25
    REGULAR_HOLIDAY
    11.27
    0.5
    REGULAR_HOLIDAY
    11.3
    0.75
    REGULAR_HOLIDAY
    11.08
    0
    MONDAY
    11.27
    0.25
    MONDAY
    11.33
    0.5
    MONDAY
    11.18
    Now, I have this query to update value of LOAD_PROF2 of the said table whenever parameters V_DATE_OUT & V_DATE_IN is entered:
    UPDATE LOAD_PROFILE_TEST
         SET LOAD_PROF2 = LOAD_PROF1 + :LOAD_DIFF
         WHERE  UPPER(PROFILE_DAY) IN (select UPPER(to_char(:V_DATE_OUT + (level-1), 'fmDAY'))
                       from  dual
                       connect by level <=  :V_DATE_IN - :V_DATE_OUT  + 1
    where :LOAD_DIFF is a certain pre-determined value.
    This query works fine if i am trying to update regular days from MONDAY to SUNDAY.  What i would like to do is to determine if the two parameter dates, V_DATE_OUT & V_DATE_IN would fall under any of the holidays on the first table LOAD_PROFILE_TEST, then update only those rows.  For example, V_DATE_OUT = 12/02/2013, Monday and V_DATE_IN = 12/06/2013, Friday.  The query above would update the values of LOAD_PROF2 for PROFILE_DAY -  MONDAY to FRIDAY, corresponding to dates 12/02/2013 and 12/06/2013.  If however, V_DATE_OUT = 12/23/2013, Monday and V_DATE_IN = 12/27/2013, Friday, this should update the rows corresponding to PROFILE_DAY - MONDAY for 12/23/2013, THURSDAY for 12/26/2013, FRIDAY for 12/27/2013, and REGULAR_HOLIDAY for the dates 12/24/2013 and 12/25/2013 since these two are included in the first table (table of holidays).  This same scenario will work the same way when V_DATE_OUT  and/or V_DATE_IN fall in the dates 3/28/2013 and 3/29/2013.  All other dates not included in the table for special holidays will be treated according to the day they fall on (Monday thru Sunday).  I hope my point is clear.  Thank you in advance.

    Thanks for your reply.  Firstly, I am using Forms [32 Bit] Version 10.1.2.0.2 (Production).  I will try to explain a little further but I don't know if i can give the exact details of the tables since this would be voluminous. First i have a table REG_HOLIDAYS, whcih contain the following:
    PROFILE_DAY
    VAR_DATE
    REGULAR_HOLIDAY
    1/1/2013
    H_WEEK_THURSDAY
    3/28/2013
    H_WEEK_FRIDAY
    3/29/2013
    REGULAR_HOLIDAY
    12/24/2013
    REGULAR_HOLIDAY
    12/31/2013
    REGULAR_HOLIDAY
    12/25/2013
    Now i have another table LOAD_PROFILE_TEST which i will simplify just to show what i wanted to do:
    CREATE
    TABLE LOAD_PROFILE_TEST
    TIME_EQ
    NUMBER (5, 2),
    PROFILE_DAY
    VARCHAR2 (15 BYTE),
    LOAD_PROF1
    NUMBER (6, 2), 
    LOAD_PROF2
    NUMBER (6, 2)
    Here are the sample values of this table:
    TIME_EQ
    PROFILE_DAY
    LOAD_PROF1
    LOAD_PROF2
    0
    Monday
    2
    0
    Tuesday
    2.1
    0
    Wednesday
    2.3
    0
    Thursday
    2.5
    0
    Friday
    2.2
    0
    Saturday
    2.4
    0
    Sunday
    2.3
    0
    Regular_holiday
    1.9
    0.25
    Monday
    2.1
    0.25
    Tuesday
    2.1
    0.25
    Wednesday
    2.4
    0.25
    Thursday
    2.2
    0.25
    Friday
    2.5
    0.25
    Saturday
    2.3
    0.25
    Sunday
    2.3
    0.25
    Regular_holiday
    2.5
    However, in the actual table, TIME_EQ will start with 0 until 24 with interval of 0.25 (i.e 0, 0.25, 0.5, 0.75, 1, 1.25, 1.5, ...23.5, 23.75, 24).  So for a PROFILE_DAY of 'Monday', there will be 97 rows corresponding to TIME_EQ of 0 to 24.  The same is true for Tuesday, Wednesday until Sunday including Regular_holiday.  All in all, this table would contain 776 rows.  LOAD_PROF1 values are random values initally inputted with PROFILE_DAY and TIME_EQ.
    The first goal is to UPDATE this table (LOAD_PROFILE_TEST) by updating the column LOAD_PROF2 by adding a certain parameter value, :LOAD_DIFF, say 0.1. Now, i will have two scenarios to show what i would like to happen.  First, i have two date parameters :V_DATE_OUT and :V_DATE_IN.
    First Case, V_DATE_OUT = 12/15/2013 (Monday); V_DATE_IN = 12/22/2013 (Sunday)
    I will have this query to update said table:
    UPDATE LOAD_PROFILE_TEST
           SET LOAD_PROF2 = LOAD_PROF1 + :LOAD_DIFF
       WHERE   UPPER(PROFILE_DAY) IN (select UPPER(
                                                                     to_char(
                                                                          :V_DATE_OUT + (level-1),
                                                                          'fmDAY'))
                                                                    from  dual
                                                     connect by level <=
                                                           :V_DATE_IN - :V_DATE_OUT  + 1);
    The output of this query would be:
    TIME_EQ
    PROFILE_DAY
    LOAD_PROF1
    LOAD_PROF2
    0
    Monday
    2
    2.1
    0
    Tuesday
    2.1
    2.2
    0
    Wednesday
    2.3
    2.4
    0
    Thursday
    2.5
    2.6
    0
    Friday
    2.2
    2.3
    0
    Saturday
    2.4
    2.5
    0
    Sunday
    2.3
    2.4
    0
    Regular_holiday
    1.9
    0.25
    Monday
    2.1
    2.2
    0.25
    Tuesday
    2.1
    2.2
    0.25
    Wednesday
    2.4
    2.5
    0.25
    Thursday
    2.2
    2.3
    0.25
    Friday
    2.5
    2.6
    0.25
    Saturday
    2.3
    2.4
    0.25
    Sunday
    2.3
    2.4
    0.25
    Regular_holiday
    2.5
    Since, 12/15/2013 up to 12/22/2013 is from Monday to Sunday without having a particular day included in the first table, REG_HOLIDAYS, therefore all the rows with Monday to Sunday are updated.
    Second Case, V_DATE_OUT = 12/23/2013 (Monday); V_DATE_IN = 12/29/2013 (Sunday)
    Take note that 12/24 and 12/25 are included in the first table, REG_HOLIDAYS, therefore i need a query so that this would be my output afterwards:
    TIME_EQ
    PROFILE_DAY
    LOAD_PROF1
    LOAD_PROF2
    0
    Monday
    2
    2.1
    0
    Tuesday
    2.1
    0
    Wednesday
    2.3
    0
    Thursday
    2.5
    2.6
    0
    Friday
    2.2
    2.3
    0
    Saturday
    2.4
    2.5
    0
    Sunday
    2.3
    2.4
    0
    Regular_holiday
    1.9
    2.0
    0.25
    Monday
    2.1
    2.2
    0.25
    Tuesday
    2.1
    0.25
    Wednesday
    2.4
    0.25
    Thursday
    2.2
    2.3
    0.25
    Friday
    2.5
    2.6
    0.25
    Saturday
    2.3
    2.4
    0.25
    Sunday
    2.3
    2.4
    0.25
    Regular_holiday
    2.5
    2.6
    As can be seen, since 12/23/2013 up to 12/29/2013 is from Monday to Sunday, rows with Monday upto Sunday should be updated, HOWEVER, since 12/24 and 12/25 which falls on a Tuesday and a Wednesday also were declared as holidays (included in the REG_HOLIDAYS table),  instead of updating rows with PROFILE_DAY of Tuesday and Wednesday, the query should instead update rows with Regular_holiday as PROFILE_DAY and leave as is the rows with Tuesday and Wednesday.  Additional note, days declared in the REG_HOLIDAYS table with PROFILE_DAY of Regular_holidays are treated as DISTINCT as in the case of 12/24 and 12/25.
    The query you gave me gives the correct value if the involved days between V_DATE_OUT and V_DATE_IN is from Monday to Sunday only, otherwise it always gives Regular_holiday only regardless of the other dates queried.  As in the first case above, it would give Monday to Sunday (correct) but for the second case, it will only give Regular_holiday, the other days (Monday, Thursday, Friday, Saturday and Sunday) was not outputted.
    I hope this became clearer since i will still be needing this for another query which i will inquire again after resolving this issue.  Thanks a lot for your help.

  • Validation for posting date.

    hi,
    i am creating a validation for fb01 where the posting date should not be less than the posting date for last document posted for same doc type.
    we have assigned different number ranges for different a set of document types.
    From which table can i get the data regarding number ranges used for particular doc type or group of doc types.
    for example i need the nyumber range assigned to doc type 'SA' and the last doc no. assigned to a document.
    Regards,
    Tarun Bahal

    i have checked FBN1.... i beleive its for creating number ranges.....
    how do we find out which range is assigned to which doc type.
    Regards,
    Tarun

  • Validation for posting date is less than 7 days of current date

    Hi
    I want to create a validation wherein  system will validate every entry that whether posting date is less than 7 days of current date. If it is than check in a set is that user id available if not than show error message.
    If someone have any idea on this logic pls share with me.
    Regd
    Shiv

    Hi,
    That's certainly possible via usual OB28 validation. Define your prerequisites for the posting date (you will have to do it via user-exit (bkpf-budat greater then sy-datum less 7 days) , and check whether the user is in the set.
    Regards,
    Eli

  • Master data time dependant attribute in query for several dates

    Hello all,
    I need to create a query to display prices for a material in different periods. 
    The user will enter a period interval.  For each period, they want to know the material price the last day of that period.
    Material price is a time-dependat attribute of material, and I created one formula variable to display it. The problem is the using the key-date of the query only works for a date, but not for severals.
    Is there any other way to do it?
    If not, the only solution I find is to have in the infoprovider the prices that I need, but I don't think this is a good practice.
    Any suggestions?
    Thanks!

    I have just seen something: in fact the created lines are:
    Key1   Compound1   fromdate    todate    attr1      attr2
    0001      L      01.01.1000      01.01.2006          <empty
    so as you can see, the right interval is created but the attributes are not up to date.
    Cheers.
    Cyril.

  • Query for FormSubmit data by ID via the SOAP API

    When I submit a form entry via the SOAP API request 'Create' it get an ID as well as the Form Type data in return:
    <CreateResponse xmlns="https://secure.eloqua.com/API/1.2">
      <CreateResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
           <CreateResult>
                <EntityType>
                     <ID>21</ID>
                     <Name>aherghaewForm</Name>
                     <Type>Form</Type>
                </EntityType>
                <Errors/>
                <ID>3</ID>
           </CreateResult>
      </CreateResult>
    </CreateResponse>
    However, I can't seem to query for that ID. When using the request 'Query'
    <ns:Query>
      <ns:eloquaType>
           <ns:ID>21</ns:ID>
           <ns:Type>Form</ns:Type>
      </ns:eloquaType>
      <ns:searchQuery>ID='3'</ns:searchQuery>
      <ns:pageNumber>1</ns:pageNumber>
      <ns:pageSize>20</ns:pageSize>
    </ns:Query>
    I receive the following Error:
    The search query you provided is invalid: 'id' is invalid.
    As the field 'ID' is not part of the FieldValueCollection, this outcome is not unexpected, but unfortunate, as it would greatly simplify querying for data that was just submitted. Querying for a field that is part of the FieldValueCollection delivers correct results.
    Is there a way to do just that, or do i have to follow another approach to retrieve FormSubmit data?
    Thanks,
    Felix

    OK. I see column X logic now:
    SQL> select  id,
      2          name,
      3          case when instr(sys_connect_by_path(id,',') || ',',',4,') > 0 then 'X' else 'Y' end x
      4    from  worker
      5    start with id in (
      6                      select  id
      7                        from  worker
      8                        where boss_id is null
      9                        start with id = 4
    10                        connect by prior boss_id = id
    11                      )
    12    connect by prior id = boss_id
    13  /
            ID NAME                             X
             1 Mennan                           Y
             2 Ahmet                            Y
             3 Akin                             Y
             4 Ayse                             X
             5 Aylin                            X
             6 Selim                            Y
    6 rows selected.
    SQL>SY.

  • Details on data types for posting data to DB2 on AS400 from XI

    Hi
       We have a scenario in which we post data from XI (3.0, SP23 ) to DB2 on AS400 and we are using jdbc adapters ( jdbc drivers from IBM deployed on XI J2EE server as per SAP's instructions )
    On AS400-DB2, there are two files F1 and F2  that we have to update in a particular library L1 - on a server S1.  Each of the two files has a single field with the same name as that of the file.
    I have the following questions :
    1. How do we construct/specify the data type in order to convert XML from XI to the sql that DB2 needs - I do understand there is a standard data type structure used to convert XML to sql calls when we use JDBC receiver adapter type communication channel. Do we use the same for posting XML data from XI to DB2 too ? 
    2. What is the url for the jdbc driver - to connect to DB2 on AS400 ?
    Please share experiences of XI -- > posting to DB2 using JDBC.

    Used standard xml -->SQL constructs

  • Trouble writing Query for Pivoting data from a table

    I am having a little trouble writing a query for converting the below table data into a pivot data. I am trying to write a query for which if I give a single valid report_week date as input it should give me the data for that week and also provide two extra columns, one which gives the data of last week for the same countries and the second column which gives the difference of numbers in both the columns(i.e. COUNT - COUNT_LAST_WEEK).
    REPORT_WEEK     DIVISION     COUNT
    9/26/2009     country1     81
    9/26/2009     country2     97
    9/26/2009     country3     12
    9/26/2009     country4     26
    9/26/2009     country5     101
    10/3/2009     country1     85
    10/3/2009     country2     98
    10/3/2009     country3     10
    10/3/2009     country4     24
    10/3/2009     country5     101
    10/10/2009     country1     84
    10/10/2009     country2     98
    10/10/2009     country3     10
    10/10/2009     country4     25
    10/10/2009     country5     102
    For example, if I give input as 10/10/2009, the output should be as give below.
    REPORT_WEEK     DIVISION     COUNT     COUNT_LAST_WEEK     DIFFERENCE
    10/10/2009     country1     84     85     -1
    10/10/2009     country2     98     98     0
    10/10/2009     country3     10     10     0
    10/10/2009     country4     25     24     1
    10/10/2009     country5     102     101     1
    For example, if I give input as 10/3/2009, the output should be as give below.
    REPORT_WEEK     DIVISION     COUNT     COUNT_LAST_WEEK     DIFFERENCE
    10/3/2009     country1     85     81     4
    10/3/2009     country2     98     97     1
    10/3/2009     country3     10     12     -2
    10/3/2009     country4     24     26     -2
    10/3/2009     country5     101     101     0
    Can anyone please shed some light on Query building for the above scenarios.
    Thank you
    SKP
    Edited by: user11343284 on Oct 10, 2009 7:53 AM
    Edited by: user11343284 on Oct 10, 2009 8:28 AM

    I assume there is no gap in report weeks. If so:
    SQL> variable report_week varchar2(10)
    SQL> exec :report_week := '10/10/2009'
    PL/SQL procedure successfully completed.
    with t as (
               select to_date('9/26/2009','mm/dd/yyyy') report_week,'country1' division,81 cnt from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country2',97 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country3',12 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country4',26 from dual union all
               select to_date('9/26/2009','mm/dd/yyyy'),'country5',101 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country1',85 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country2',98 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country3',10 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country4',24 from dual union all
               select to_date('10/3/2009','mm/dd/yyyy'),'country5',101 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country1',84 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country2',98 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country3',10 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country4',25 from dual union all
               select to_date('10/10/2009','mm/dd/yyyy'),'country5',102 from dual
    select  max(report_week) report_week,
            division,
            max(cnt) keep(dense_rank last order by report_week) cnt_this_week,
            max(cnt) keep(dense_rank first order by report_week) cnt_last_week,
            max(cnt) keep(dense_rank last order by report_week) - max(cnt) keep(dense_rank first order by report_week) difference
      from  t
      where report_week in (to_date(:report_week,'mm/dd/yyyy'),to_date(:report_week,'mm/dd/yyyy') - 7)
      group by division
      order by division
    REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
    10-OCT-09 country1            84            85         -1
    10-OCT-09 country2            98            98          0
    10-OCT-09 country3            10            10          0
    10-OCT-09 country4            25            24          1
    10-OCT-09 country5           102           101          1
    SQL> exec :report_week := '10/3/2009'
    PL/SQL procedure successfully completed.
    SQL> /
    REPORT_WE DIVISION CNT_THIS_WEEK CNT_LAST_WEEK DIFFERENCE
    03-OCT-09 country1            85            81          4
    03-OCT-09 country2            98            97          1
    03-OCT-09 country3            10            12         -2
    03-OCT-09 country4            24            26         -2
    03-OCT-09 country5           101           101          0
    SQL> SY.

  • FMS required for Posting Date + 4 week excluding weekends

    Hi,
    I have a UDFas U_FRDWDT in which I want that if the Sales Order posting date is 15/12/2010 then this udf should automatically update + 4 weeks EXCLUDING Fridays and Saturdays which is there in the 4 weeks hence the result should be e.g 27/01/2010 which is excluding Fridays and Saturdays.The requirement is as such that Friday and Saturday are holidays for the company and the client wants to have this field updated on + 4 weeks basis but it should not consider Friday and Saturday as its holiday.
    Also note in SAP base setup Holiday Master Weekend is set from Friday to Saturday. Will this help in any way of updating the field or through formated search.
    Kindly advise what best solution can be given
    Regards,
    Soni

    Hi Gordon,
    I used this formatted search and seeing some discripencies as if lets asume the Sales Order Posting Date is 15/12/2010 then 4 weeks should come in the udf means excluding friday and saturday and the date which is coming as per fms is 12/01/2011 but i guess the fms should show 25/01/2010 which is 4 weeks ( no of days 30 ) excluding friday and saturday. I think your fms is just brining 22 working days and then its showing 12/01/2010.
    I want the fms to consider friday and saturday as holiday and then give me 4 weeks.
    I hope i am clear to my requirement and able to make you understand.
    Regards,
    Soni

  • Idoc for Posting data to FB01 transaction

    Hi,
    In my Interface, i need to post data to a SAP FI system->FB01 transaction from XI. The scenario is nonSAP system->XI->SAP FI.So what are the possibilites to post data to SAP FI->FB01 transaction. Is there any Idocs for that or any other method.
    Please share your ideas..Ponts will be rewarded for good inputs...
    Thanks

    Hi,
    You need to get the file with the required format from the sender system and there shouldn't be any mapping in PI. Also please check the below link on how to get the file structure.
    Re: File for 'RFBIBL00'
    There is also a help for the RFBIBL00 program. Check this too.
    http://help.sap.com/saphelp_45b/helpdata/en/35/a47e63763e0392e10000009b38f9b7/content.htm
    The file should be placed in the ECC application folder and this program needs to be scheduled with that file path. If you are not able to get the file in the required format then you may need to go with the IDOC or BAPI solution.
    ~Vaas

  • MB5B - Closing Value for Posting Date inconsistently reported.

    Greetings,
    I am executing transaction MB5B in ECC 6.0 for a single Posting Date in November of 2008.  The parameters include 3000 ROH materials (selected by MIN/MAX material number ranges)  in 30 plants within 3 different companies (selecting all by leaving these values blank).  The problem I am having is that I am getting a different total USD valuation each time I run the report.  If I run the report 3 times in 15 minutes I will get 3 different USD totals.  Difference is usually small (.006%).
    At times I will get exact matches.  Yesterday, 3 out of 5 runs were exactly the same result.
    Can anyone advise what might be causing this variability?  And how it might be corrected.  Either by using different selection parameters of another more reliable transaction code.
    Regards,
    Joe

    Hi,
    If you post in the previous period and the material price in the previous period differs from the current price, the system generates a stock posting and revaluation line with the same value but opposite signs.
    You can ran an inconsistency check report using SE16: MBEW
    Go through SAP Note 518368
    Bye,
    Muralidhara

Maybe you are looking for

  • Hp All-in-One 2175 compatible drivers for Mac book pro 10.5

    I can print, cut can't scan. Does anyone know if their is scan software that will work with OS 10.5? The lastest listed on the Hp site is from 2006.

  • Add new column in ITEM data of ME21N/ME22N/ME23N

    Hi Experts, We have a requirement to add a custom field in ITEM data of transactions ME21N, ME22N and ME23N. A new column is required that would appear as checkbox. We have already tried screen exit MM06E005 but it is adding a new tab and the new fie

  • Why is my Apple ID not recognised with producer?

    I have downloaded iTunes producer to upload a book to the iBooks store that I am writing. However when I open iTunes producer, it says when I try to log in that my registered user ID is not recognised? Hope someone can help. I am using iMac running O

  • Download Saved Report in IR 4.1

    Hi, I have a query regarding saved reports feature in Interactive reports 4.1 I saved a normal report by adding some control breaks etc and make it more readable. I then saved it. Now if I want to download my saved report - I can't. It always downloa

  • Workflow - HD from Sony Zu1 to Final Cut - To SD DVD - Best Settings

    I'm starting a HD project that will be output to DVD. The main feature will be about 90 to 120 minutes in length. What is the best capture settings for footage acquired using a Sony Zu1 HD, on sony HDV mini dv tapes? I don't have Studio 2 or quad 2.5