Select query in MB51 failing only for posting date(BUDAT)02/02/2010

Hello Experts,
I am having below select query.
It is running perfectly fine for all the dates except 02/02/2010.On all other dates it is getting executed with in second.
For 02/02/2010 it keeps on running for more than 10 minutes and then fails with timeout error.
Please let me know if anyone know any solution for this.
select (g_t_fields)
    into corresponding fields of table itab
    from mkpf inner join mseg
    on    mkpfmandt = msegmandt
      and mkpfmblnr = msegmblnr
      and mkpfmjahr = msegmjahr
       WHERE MKPF~BUDAT in BUDAT
         and MSEG~BWART in BWART
         and MSEG~CHARG in CHARG
         and MKPF~FRBNR in FRBNR
         and MSEG~KUNNR in KUNNR
         and MSEG~LGORT in LGORT
         and MSEG~LIFNR in LIFNR
         and MSEG~MATNR in MATNR
         and MSEG~SOBKZ in SOBKZ
         and MKPF~USNAM in USNAM
         and MKPF~VGART in VGART
         and MSEG~WERKS in WERKS
         and MKPF~XBLNR in XBLNR
%_HINTS
ORACLE '&SUBSTITUTE VALUES&'
Moderator message - Please see Please Read before Posting in the Performance and Tuning Forum before posting and please use code tags when posting code - post locked
Edited by: Rob Burbank on Feb 4, 2010 9:02 AM

Hi Sameer,
Please check on which date the production order has status as "completed".
It could be on 01.02.2015.
Thanks,
Vimal

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

  • 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

  • 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

  • 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

  • LSMW used only for master data upload?

    Hi
    Can you please let me know if LSMW is used only for master data upload or we can also use it for transaction data ?

    Hi Christino.
    I have come across a standard SDN thread which deals with the uploading master data, refer it:
    [SDN Reference for uploading master data using LSMW|how can we upload master data by using LSMW;
    [SDN reference for which uploading is preferred (Master data or Transaction data)|Which one is better for uploading data LSMW or ECATT ?;
    Good Luck & Regards.
    HARSH

  • Dynamic Select Query including Dynamic Tables with For all Entries

    Hello everyone,
    I need to create a select query which involves using of Dynamic Tables.
    Suppose I have a dynamic table <d1> which consist of let say 10 records.
    Now i need to make a select query putting data into another dynamic table <d2>
    CONCATENATE keyfield '=' '<d1>' INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <d1>
            FOR ALL ENTRIES IN <d1>
    WHERE (g_condition).
    But it is giving dump.
    Please help me on this....

    Short text
        A condition specified at runtime has an unexpected format.
    What happened?
        Error in the ABAP Application Program
        The current ABAP program "ZNG_CUSTOMWRITE" had to be terminated because it has
        come across a statement that unfortunately cannot be executed.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "WRITE_ARCHIVE_PROD" "(FORM)", nor was it propagated by a RAISING
         clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        The current ABAP program has tried to execute an Open SQL statement
        which contains a WHERE, ON or HAVING condition with a dynamic part.
        The part of the WHERE, ON or HAVING condition specified at runtime in
        a field or an internal table, contains the invalid value "ZCOURIER-ZCOURIERID".
    CONCATENATE keyfield '=' g_header INTO g_condition SEPARATED BY space.
    CONCATENATE g_condition '-' keyfield INTO g_condition.
    SELECT * FROM (wa_all_tables-name) INTO CORRESPONDING FIELDS OF TABLE <dyn_table1>
    FOR ALL ENTRIES IN <dyn_table>
      WHERE (g_condition).

  • How to month in select query.....for vbap

    Hi Experts,
    I am using selection option Listbox ( January, February, March, etc...).
    How to use it in select query for table vbap (Shown below),
    I want to retrieve data of january from vbap and matches erdat in pa_mnr.
        parameters: pa_mnr type ztemp-zlist as listbox visible
                    length 13 default 'January'.
        select * from vbap into corresponding fields of table it_vbap
                 where matnr in matnr1 and
                       gsber = 'HIP'   and
                       vstel = 'BSP'   and
                       erdat in pa_mnr.

    hi,
    take the date from the select option.
    let say you have date, month and year seperate select option..
    then look at some FM whcih gives month number for your month name..
    concatenate all the three separated by dot and put it in a variable of type datum..
    now your variable contains the user selected date.
    you can write your select query.
    rewards if useful
    regards,
    nazeer

  • Any selection input for posting date in Confirmation Report CN48n

    Hi All,
    Is there any way to select some date based on posting date in CN48n report, because if i have run by Plant / co.code it takes so long.
    Plz advice.
    Cheers,
    Nies

    Hi,
    The only option I found out is "Data on Dates Definition -- Finish Date" in dynamic selections.
    This including the Plant & Company Code selection will not exactly meet your requirement but of course can definitely reduce the search load on the system.
    regards

  • Help with query to do with aggregating for MIN(DATE)

    Say i have the following table of data:
    Table: TEST               
    ID     TDATE     CLIENT     VAL
    1A     1/10/2005     client1     10
    2A     2/10/2005     client1     30
    3A     3/11/2005     client2     22
    4A     5/10/2005     client2     43
    5A     5/10/2005     client2     3
    6A     6/10/2005     client3     5
    7A     7/10/2005     client3     76
    I want to create a query that will retrieve a distinct list of the CLIENT column (ie. in the above table I want only 3 records retrieved in the query as there are only 3 clients) and the corresponding ID and VAL for the client record with the MIN(DATE). In the case where 2 dates are the same, I dont care which record is selected as long as the ID and VAL columns belong to the same record.
    For example in the above data I would expect the following returned in the query:
    ID     CLIENT     VAL
    1A     client1     10
    4A     client2     43 <- this record could also be 5A, client2, 3
    6A     client3     5
    Please help.

    Hi Joshua,
    You didn't post your Oracle version but I hope it supports analytic functions.
    Try as follows:
    SQL> select id,
      2         tdate,
      3         client,
      4         val
      5    from (select t.*,
      6                 row_number() over
      7                   (partition by client order by tdate) rn
      8            from test t)
      9   where rn = 1;
    ID         TDATE      CLIENT                                VAL
    1A         01/10/2005 client1                                10
    4A         05/10/2005 client2                                43
    6A         06/10/2005 client3                                 5Regards.

  • How to pull records only for particular date range in Flex frm SAP wd table

    Hi,
    Can anyone help me with databing for datefield.
    I am using two datefields in Flex for Start Date and End Date. When I click the Execute button, it should pull only the records for that date range from SAP wd table and display in my Flex datagrid.
    Thanks,
    Sri
    Edited by: rmsridevi on May 17, 2011 4:38 PM

    Hi,
    Your query has mistakes as well. I corrected them.
    Check this two different ways were in first you can define the period (month) you want and in second you have the option to select from the drop drown list :
    SELECT T0.DocNum, T0.DocDate, T0.CardName,T0.DocTotal,T1.whsCode
    FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE t0.docdate >= '2011.01.01' and t0.docdate <='2011.01.31'
    OR
    SELECT T0.DocNum,T0.DocDate,T0.CardName,T0.DocTotal,T1.whsCode
    FROM OINV T0 INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
    WHERE t0.docdate >= [%1] and t0.docdate <= [%2]
    Kind Regards,
    Jitin
    SAP Business One Forum Team

  • Select query taking too much time to fetch data from pool table a005

    Dear all,
    I am using 2 pool table a005 and a006 in my program. I am using select query to fetch data from these table. i.e. example is mentioned below.
    select * from a005 into table t_a005 for all entries in it_itab
                       where vkorg in s_vkorg
                       and     matnr in  s_matnr
                       and     aplp   in  s_aplp
                       and     kmunh = it_itab-kmunh.
    here i can't create index also as tables are pool table...If there is any solutions , than please help me for same..
    Thanks ,

    it would be helpful to know what other fields are in the internal table you are using for the FOR ALL ENTRIES.
    In general, you should code the order of your fields in the select in the same order as they appear in the database.  If you do not have the top key field, then the entire database is read. If it's large then it's going to take a lot of time.  The more key fields from the beginning of the structure that you can supply at faster the retrieval.
    Regards,
    Brent

  • 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

  • QA11 for posting date

    Hi all ,
    System allowing to post document having "Posting Date" greater than "System Date" in QA11.
    Any BADI is avialable to restrict the same.
    Please help

    As I know there is no customer exit or BADI to control the posting date field(RQEVA-BUDAT) at UD transaction.
    Using a field exit is only way for your requirement.
    But SAP does not support the field exit functionality anymore through CMOD from version 4.6C.
    Therefore you have to use report RSMODPRF or develop a function like as 'FIELD_EXIT_***'.
    Regards
    Luke

  • 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

Maybe you are looking for

  • Installed 10.8.1 and lost display on my MBP

    I upgraded to 10.8.1 on my mid-2010 i5 MBP and once I logged in following the reboot, my display went black except for one line at the top. Resetting the PRAM seemed to be the only thing that got it back. Reboots alone did not help. I may back out 10

  • Safari close constantly and gives error ??

    My MacBook Air Safari app close constantly and send error msg, ?? any support plz?

  • Can I sync the files from my G5 Dual 2.5 desktop to my 17" Powerbook

    I'm looking to synchronize all of the files and applications from my desktop over to my laptop. Is there away to do this without having to re-install all of my programs and manually copying the files? Mac G5 Dual 2.5   Mac OS X (10.3.9)   17" PowerBo

  • Changing the colors of crop marks

    Hi guys. I´m printing a small job off a inkjet printer and the paper I´m using is black. So, is there a way to change color of the corner crop marks? Thank you.

  • Unable to download sig 256

    Our most recent sig available in the Cisco VMS is 252. When I go to auto download, there are no new updates - but we have already downloaded and pushed 255. I think something is wrong with the sig database on the MC. Following the link in the Cisco u