Re:Query for no.of days delayed using Receipt from production posting date.

Dear SAP Experts,
I need a query to calculate no of days delayed by using Receipt from production posting date and prod.order due date..i have already done the query but there is no link for joining the tables.Is there any link to join the tables..
Plz Suggest a good query for this issue..
With Regards,
Revathy

Dear Revathy,
I think there is no need to link table if you just need calculate no of days delayed by using Receipt from production posting date and prod.order due date.
You may check this query with the above:
SELECT T0.ItemCode,T0.DueDate,
T0.DocNum, T0.CloseDate,
Datediff(dd,t0.DueDate,T0.CloseDate) Diff
FROM dbo.OWOR T0
WHERE  Datediff(dd,t0.DueDate,T0.CloseDate) > 0
Thanks,
Gordon

Similar Messages

  • Query for last 8 days results

    any body have a query for last 8 days results
    TIMESTAMPADD(SQL_TSI_DAY, -8, CURRENT_DATE) this is resulting only 1 day results only .if i execute this query is it displaying 8th back day results only.
    i want all 8 back days results .
    anybody have query for this...
    Edited by: user12255470 on Apr 28, 2010 7:19 AM

    This works fine for me:
    SELECT "D0 Time"."T00 Calendar Date" saw_0, "F1 Revenue"."1-01 Revenue (Sum All)" saw_1 FROM "Sample Sales" WHERE "D0 Time"."T00 Calendar Date" BETWEEN TIMESTAMPADD(SQL_TSI_DAY, -8, CURRENT_DATE) AND TIMESTAMPADD(SQL_TSI_DAY, -1, CURRENT_DATE) ORDER BY saw_0
    regards
    John
    http://www.obiee101.blogspot.com/

  • Query for  to get  database size, used size, freesize, db size after drop

    Pls give me a query for to get database size, used size, freesize, tablespacesize of sometables which is starting with 'RQ%'
    I have to get result like this
    Total size, used size, free size ,tablespace size of RQ tables alone
    Reason why i go for "tablespace size of RQ tables" i want to know the size of database after deleting the rq tables
    Pls reply
    S

    i tried with
    SELECT
    --fs.tablespace_name name,
    df.totalspace/1024/1024 mbytes,
    (df.totalspace - fs.freespace)/1024/1024 used,
    fs.freespace/1024/1024 free
    FROM
    (SELECT
    --tablespace_name,
    ROUND(SUM(bytes)) TotalSpace
    FROM
    dba_data_files
    ) df,
    (SELECT
    --tablespace_name,
    ROUND(SUM(bytes)) FreeSpace
    FROM
    dba_free_space
    ) fs
    i AM GETTING total bytes, used bytes, free bytes
    I WANT TO include one more column.. database size after deleting rq tables
    Pls reply
    S
    Edited by: AswinGousalya on Jul 10, 2009 2:17 PM

  • Query for create manual tabular form using apex collection add row button functionality

    Hello everyone
    My requirement is i created a tabular form manually using apex collection but if i click on add row button then previously selected data refreshed and added new row in this form it is fine.but i don't want to refreshed previously selected data and click on add row button then add new row .how it is possible? plz help
    Thanks & Regards,
    Ujwala

    Ujwala
    Instead of starting a new thread with the same question as Query for create manual tabular form using apex collection add row button functionality.
    Could you answer the question about what you see while debug the javascript code.
    If you don't understand the question or have trouble debug javascript let us know.
    Nicolette

  • Approval Query for Receipt from production

    Hi experts,
    I want to define an approval process for receipt from production.
    The condition is below:
    Only if it is " Receipt from production" then the goods receipt document should go to approval of quality.
    If is any unplanned direct goods receipt then system should allow to add it straightly.
    To do so, Please provide me the required query.
    regards
    Ravindran Srinivasan

    Hi Ravindran,
    I once encounter same problem like this. And I found out that, unfortunately, approval procedure can't work on receipt from production document.
    Yes, we all know that receipt from production and inventory goods receipt are actually same object type in SAP B1 and stored in same table. But, try it by yourself in your testing database, even if you apply the approval templates for goods receipt document, and you apply the condition as "always", you won't get prompted for approval if you try to add the receipt from production document.
    However, I said this based on my experience with version prior to 8.81 and 8.82. But somehow I have a strong feeling that this issue still not yet realized by SAP.
    Best Regards,
    Hendry Wijaya

  • I have an iPhone 4s. Suddnely for past two days, the contact names from my address book are disappeared.  Has anyone came across this issue earlier and know the solution please?

    I have an iPhone 4s. Suddnely for past two days, The contact names from my address book are disappeared.  Has anyone came across this issue earlier and know the solution please?

    You had to have some kudos for the effort put in to your thread as week as the point you make.

  • Non riesco a ricevere acquisti fatti su itunes, mi da questo errore :erreu : you have an error in your sql syntax; checkthe manual that corresponds to your mysql server version for the right syntax to use near from news order by id desc at line. cosa devo

    non riesco a ricevere acquisti fatti su itunes, mi da questo errore :erreu : you have an error in your sql syntax; checkthe manual that corresponds to your mysql server version for the right syntax to use near from news order by id desc at line. cosa devo fare?  grazie

    Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
    * Don't make any changes on the Safe mode start window.
    See:
    * [[Troubleshooting extensions and themes]]

  • Problem Posting Receipt From Production and Issue for Production

    Hi Everyone,
    I am posting Receipt from Production and Issue for Production through DIAPI in SAP Business One 2007A SP00 PL03.
    I am using following lines of code
    oDocument.Lines.SetCurrentLine(0);
    oDocument.Lines.BaseEntry = int.Parse(BaseEntry);
    oDocument.Lines.Quantity = double.Parse(Quantity);
    lRetCode = oDocument.Add();
    The Document adds perfectly but when I open the document in SAP Business One i am not able to see the Order Number at Line level on which this document was Based.
    I identified the problem being Order Number Column being binded to BaseRef field hence form is not able to Show the Order Number and we cannot set BaseRef via DIAPI since the property to set that field is not exposed.
    I donot want to update the table through a Recordset Update Query. I would appreciate if the property to set that field is exposed by SAP or any other workaround can be put forward by anyone who has faced the same problem.
    Thanks
    Kapil

    Do you need to set
    oDocument.Lines.BaseType = 17 (if this is sales order)
    and then baseentry = baseentry....etc
    If you bind the base entry correctly it should alwasy shows the base document on both database as well as front end. I have never had any problem with this
    Sincerely

  • How to get the first day in the month from a domain date ?

    Hi,
    I like to know how to get the first day in the month from a domain date?
    Thanks
    Stephen

    Hi Gokul...
    Instead of using the funtion module you can just write the 3 statements of code to get the first day of the week.
    Its similar to the above one but instead of writing case statement you can achive the following.
    data : w_res type i,
             w_data type d,
    w_res = w_date mod 7.
    w_date = w_date - w_res.
    write w_date.
    This works.
    Regards,
    Siddarth

  • Hi i need the email of the apple store chicago michigan avenue.  is to ask for a copy of the sales receipt from an iPad and I do not find your mail from anywhere  thank you very much

    hi i need the email of the apple store chicago michigan avenue.
    is to ask for a copy of the sales receipt from an iPad and I do not find your mail from anywhere
    thank you very much
    my mail is [email protected]

    The one on North Michigan Av. ? You'll have to call, I couldn't find an email address.
    Apple Store
    North Michigan Avenue
    679 North Michigan Avenue
    Chicago, IL 60611
    (312) 529-9500

  • Approval Procedure for Issue to Production and Receipt from Production

    Hi All,
    Is there a way to create an approval procedure for Issue to production and Receipt from production?
    Thanks.
    Eric

    Hi Riyaz,
    Yes it is not in Standard SAP Business One.  But is there a way to create one for issue to production and receipt from production? 
    Thanks.
    Eric

  • Problem Creating a query for a hierarchical tree. [using connect by prior]

    Hi all,
    I have 2 tables.
    box (box_id, box_name)
    item(item_id, item_name, box_id)
    In a box there are several items.
    I want to create a hierachical tree to display items that are present in each box.
    LIKE:
    |---BOX1
    | |----ITEM 1
    | |----ITEM 2
    |
    |---BOX2
    | |----ITEM 1
    | |----ITEM 2
    Currently i am trying this query:
    SELECT -1 state, box_name, 'icon' icon, box_id val
    from box b, item i;
    I don't know what value to put for level, i don't know how to code the 'connect by prior' part.
    Could you please advise me?
    Michaël.
    PS. Then i will eventually use this query in forms builder.

    Note the name of this forum is "SQL Developer *(Not for general SQL/PLSQL questions)*" - so only for issues with the SQL Developer tool. Please post these questions under the dedicated SQL And PL/SQL forum.
    Regards,
    K.

  • Re:Query for Item and its first child Itemcode from BOM...!!!

    Dear SAP Members,
    I need a query that contains
    ItemCode,ItemDescription from oitm table and its first child item code,Item Description,Quantity,currency and price from itt1 table.I have taken all the datas but there is no ItemDescription from itt1 table.How to join all these datas.
    Please Give suggestions or query for this issue.
    With Regards,
    Revathy

    Hi try this
    Declare @BOMDetails table(TreeType Nvarchar(MAX),PItem NVARCHAR(Max),PName NVARCHAR(MAX),CItem  NVARCHAR(Max),CName NVARCHAR(MAX),Comment NVARCHAR(MAX),onHand Numeric(18,0),[Committed] Numeric(18,0),FreeStock Numeric(18,0),[Status] NVARCHAR(MAX),Quantity numeric(18,0),Price numeric(18,0),Warehouse nvarchar(MAX),Currency nvarchar(MAX))
    INSERT Into @BOMDetails
    SELECT T1.TreeType ,T0.Father AS [Parent Code], T2.ItemName AS [Parent Description], T0.Code AS [Child Code],
    T1.ItemName AS [Child Description], T0.Comment, cast((T1.OnHand ) as Numeric(18,0)) as [Un-Committed Stock],
    cast(T1.IsCommited as Numeric(18,0)) AS [Committed Stock], cast((T1.OnHand - T1.IsCommited)as Numeric(18,0)) AS [Free Stock], T2.FrgnName AS [Status],T0.Quantity,T0.Price ,T0.Warehouse,T0.Currency
    FROM ITT1 T0 INNER JOIN OITM T1 ON T0.Code = T1.ItemCode
                 INNER JOIN OITM T2 ON T0.Father = T2.ItemCode
    WHERE T0.ChildNum=1
    Union All
    SELECT ' ',T0.Father as [Parent Code], T2.ItemName AS [Parent Description], '', '', '', 0,0,0 , '',0,0,'','' FROM ITT1 T0 INNER JOIN OITM T1
    ON T0.Code = T1.ItemCode INNER JOIN OITM T2 ON T0.Father = T2.ItemCode
    Group By T0.Father,T2.ItemName
    ORDER BY T0.Father, T0.Code
    update @BOMDetails set PItem='' ,PName='' where TreeType='N' or TreeType='P'
    Select PItem as[Parent Code] ,PName as [Parent Description],CItem as [Child Code],CName as [Child Description],Comment,Quantity,Price,Warehouse,Currency   from @BOMDetails
    thanks,
    Neetu

  • Query for row by rows-before using seq number

    Hi,
    I have a table of CatalogAuthor records
    long : id
    varchar : author
    long : seqnum
    I have made the table so that initially, if there are 10000 unique authors, then the rows will have sequence numbers from 1 to 10000. As authors are dynamically added, they are given the sequence number of an existing row in the table, i.e. the nearest row whose author comes before the new author. As time goes there are more and more duplicates, and at a certain point, the table has all its sequence numbers reassigned to be monotonic increasing by author name order.
    We want to use this table to build a tree of about 10 nodes per parent, culminating in author names. So to expand the tree at the first level, we could divide 10000 by a suitable power of 10 to get the groups of sequence numbers. However, with duplicate seqnum, there may be 14365 rows so ideally, to overcome the problem of clumping, I would do some kind of query to identify the 1436 record in sorted order by sequence number, the 2872 record by seq number and so on.
    What query would that be? With appropriate indices, would it still be slow? Would I have to do 10 of these queries to expand one node with 10 children? Is there a better design to accomplish the same goal of exploding a balanced tree by author name sort order, culminating in a leaf of one particular author?
    Andy

    Hi, Andy,
    user9990110 wrote:
    Hi,
    I have a table of CatalogAuthor records
    long : id
    varchar : author
    long : seqnumYou can't be serious! The LONG data type is nothing but trouble, and completely unnecessary. You must mean NUMBER instead of LONG.
    I have made the table so that initially, if there are 10000 unique authors, then the rows will have sequence numbers from 1 to 10000. As authors are dynamically added, they are given the sequence number of an existing row in the table, i.e. the nearest row whose author comes before the new author. As time goes there are more and more duplicates, and at a certain point, the table has all its sequence numbers reassigned to be monotonic increasing by author name order.
    We want to use this table to build a tree of about 10 nodes per parent, culminating in author names. So to expand the tree at the first level, we could divide 10000 by a suitable power of 10 to get the groups of sequence numbers. However, with duplicate seqnum, there may be 14365 rows so ideally, to overcome the problem of clumping, I would do some kind of query to identify the 1436 record in sorted order by sequence number, the 2872 record by seq number and so on.
    What query would that be? With appropriate indices, would it still be slow? Would I have to do 10 of these queries to expand one node with 10 children? Is there a better design to accomplish the same goal of exploding a balanced tree by author name sort order, culminating in a leaf of one particular author?I'm just curious, why do you need this? What will this tree structure do for you that an index on author won't do?
    I don't know of any way to automatically keep a tree balanced every time DML is done.
    You could periodically re-balance the tree; that shouldn't be too hard. Let's say you want each parent to have up to r children. Use the analytic ROW_NUMBER function to assign unique numbers 0, 1, 2, 3, ... to each row, in order by author.
    The row numbered 0 will have no parent
    For all all rows numbered n (n > 0), the parent will be the row numbered FLOOR (n/r).
    Whenever you re-configure the tree, use a MERGE statatment. An index on author will probably make generating the ROW_NUMBERs faster.
    If you need help, post CREATE TABLE and INSERT statements to show the table as it exists with the tree out of balance, and also show how you want it to look after balancing. Use a small value of r (maybe 2 or 3) to keep the sample set small.
    Edited by: Frank Kulash on Jan 12, 2011 12:41 PM

  • Query for create manual tabular form using apex collection using item textfield with autocomplete

    can we create a manual tabular form inside item textfield with autocomplete ?
    how it is possible?
    with Apex_item API used for this item.
    i used this code for creat  cascading select list
    select seq_id,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   1,
            p_value                     =>   c001,
            p_query                     =>   'SELECT C001 D
         , C002 R
      FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = ''col1''',
            p_attributes                =>   'style="width:150px" onchange="f__name(this,parseInt(#ROWNUM#));"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f01_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f01_#ROWNUM#',
            p_show_extra                =>   'NO') name,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(
            p_idx                       =>   2,
            p_value                     =>   c002,
            p_query              =>   ' SELECT null d, null r FROM dual WHERE 1 = 2
            p_attributes                =>   'style="width:150px"',
            p_show_null                 =>   'Yes',
            p_null_value                =>   null,
            p_null_text                 =>   '- Select name -',
            p_item_id                   =>   'f02_'|| LPAD (ROWNUM, 4, '0'),
            p_item_label                =>   'Label for f02_#ROWNUM#',
            p_show_extra                =>   'NO')name2,
    from apex_collections
    where
    collection_name = 'COLLECTION1'
    It is fine .
    but i want item in tabular form  textfield with autocomplete and remove select list. my requirement is using textfield with autocomplete select a employee name and second item textfield with autocomplete display dependent perticular employee related multiple task.
    how it is created.i have no idea related textfield with autocomplete.Please help me....

    pt_user1
    I understand that the add row button is currently doing a submit.
    To not submit the page you need a dynamic action on the page.
    Does the javascript function addRow do what you want?
    Otherwise have a look at the following two threads Add row in manual tabular form using dynamic action and Accessing Tabular Form & Add Elements to Collection without Page Submit.
    You're process could be something like:
    Add the new values to the collection using the idea's in the second thread and at the same time add the new row.
    And as second action refresh your tabular form.
    If you get stuck set up what you have done on apex.oracle.com using the tables from the demo application.
    Nicolette

Maybe you are looking for