Query for dispatch details in Delivery

Hi all,
I require simple query which will display item wise dispatch details for delivery.
Query Output required based on delivery document is as follows
Doc Num, Doc Date,Card Name, Item Code, Item Description, Quantity, Batch Number, Comments
Input for query will be From date and To date.
Solution appreciable

Hi
Try this:
SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName,
T1.ItemCode, T1.Dscription, T2.Quantity, T2.BatchNum, T0.Comments
FROM ODLN T0
inner join DLN1 T1 on T1.DocEntry = T0.DocEntry
LEFT JOIN IBT1 T2 ON T2.BsDocEntry = T0.DocEntry and T2.BsDocType = 15 and T2.BsDocLine =  T1.LineNum
WHERE T0.DocDate >= '[%0\]' and T0.DocDate <= '[%1\]'
Thanks,
Gordon

Similar Messages

  • Query for dispatch details for BP SO

    Hi experts,
    I am new to the forum and would appreciate your help. I am trying to make a report about the pending and dispatched material for BP. The qurey is -
    SELECT T0.[DocNum], T0.[CardName], T0.[NumAtCard], T0.[TaxDate], T0.[DocDueDate], T1.[ItemCode], T1.[Quantity], T1.[OpenQty], T2.[DocNum], T2.[DocDate], T2.[ShipToCode], T2.[TrackNo] FROM ORDR T0  INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, OINV T2 INNER JOIN INV1 T3 ON T2.DocEntry = T3.DocEntry, OPOR T4 INNER JOIN POR1 T5 ON T4.DocEntry = T5.DocEntry, ODLN T6 INNER JOIN DLN1 T7 ON T6.DocEntry = T7.DocEntry WHERE T0.[CardName] = [%0] AND  T3.[BaseRef] =  T6.[DocNum] AND  T7.[BaseRef] = T0.[DocNum]   AND  T1.[ItemCode] =  T3.[ItemCode]
    But i get an error message -
    1). [Microsoft][SQL Native Client][SQL Server]The conversion of the nvarchar value '3700081929' overflowed an int column. Maximum integer value exceeded.  'User-Defined Values' (CSHS)
    Pl help. Thanking you in advance.

    Hi..........
    Welcome to SAP Forum.......
    Please try this....
    SELECT Distinct T0.DocNum, T0.CardName, T0.NumAtCard, T0.TaxDate, T0.DocDueDate, T1.ItemCode, T1.Quantity, T1.OpenQty, T2.DocNum, T2.DocDate, T2.ShipToCode, T2.TrackNo FROM ORDR T0 INNER JOIN RDR1 T1 ON T0.DocEntry = T1.DocEntry, OINV T2 INNER JOIN INV1 T3 ON T2.DocEntry = T3.DocEntry, OPOR T4 INNER JOIN POR1 T5 ON T4.DocEntry = T5.DocEntry, ODLN T6 INNER JOIN DLN1 T7 ON T6.DocEntry = T7.DocEntry WHERE T0.CardName = '[%0]' AND T3.BaseRef = T6.DocNum AND T7.BaseRef = T0.DocNum AND T1.ItemCode = T3.ItemCode
    Above query wont give any error.
    But from your Subject the query report seems give wrong result......
    Regards,
    Rahul

  • Af:query for master detail

    Hi Experts,
    Can we have an af:query to show master detail data ?
    What we generally have is af:query showing records of 1 table. What i want is for the records that get populated from af:query in the master table, i want to show the records in the detail table of the row selected
    any idea ?
    thnks

    Thank you NewBee. It worked and am able to get the detail information from the master table. I am struggling with another implementation. I have 3 radio buttons in the global template which I am referencing in all my pages.
    The template has 3 radio buttons. Contacts, Plans and Users. The three queries are completely different from one another.
    On click of Contacts, I should display the respective af:query for Contacts, Plans and Users without displaying the resultant table. This query panel will be global to all the pages.
    I have tried setting it as follows:
    <af:panelGroupLayout layout="vertical"
    id="pt_pgl3"
    rendered="#{baseBean.searchContactsSelected == 'true'}"
    visible="#{baseBean.searchContactsSelected == 'true'}">
    <af:query id="qryId1" headerText="Search" disclosed="true"
    value="#{bindings.GloablSearchByContactsVOCriteriaQuery.queryDescriptor}"
    model="#{bindings.GloablSearchByContactsVOCriteriaQuery.queryModel}"
    queryListener="#{bindings.GloablSearchByContactsVOCriteriaQuery.processQuery}"
    queryOperationListener="#{bindings.GloablSearchByContactsVOCriteriaQuery.processQueryOperation}"
    resultComponentId="::contactSearch:md1"/>
    <f:subview id="contactSearch">
    <jsp:include page="/contactsSearchResults.jspx"/>
    </f:subview>
    <af:panelGroupLayout>
    I have tried various implementations to the best of my knowledge but its not rendering. Is it possible to navigate to a different jspx on click of Search button of af:query. This will give me an opportunity to display different pages based on the Search action and keeping the search on a global level.
    Hope I was clear in explaining the issue
    Thanks!

  • Query for vendor details in F-53

    Hi,
    Need help on query development for vendor payment through F-53 with selection criteria Co. code, Fiscal Year, Fiscal Period, Transaction code and document type. Required output would be Co. code, Fiscal year, vendor number, document number and amount.
    I tried to develope query using tables BKPF & BSEG but system did not allow BSEG as it's a structure. Then tried with BKPF & BSAK but it's not pulling any data for query.
    Also, would like to know is there any standard report available for vendor payment through F-53?

    Hi Hein,
    Thanks for your reply.
    The issue in FBL1N is I cannot enter the TCode F-53 and the document type used for F-53 , is used by other transactions also. Hence I am not getting the correct report.
    Any help on developing a querry for this.
    Thanks
    Rajesh

  • Query for EFT Details

    Dear All
    I need to develop a query in which the user sees EFT details based on Policy Number. The Policy Numbers are stored in BSIS and EFT details ( like amount ,method of payment...) are stored in Table REGUH. However When I try to join the tables, it generates an auto link and everything looks fine. But when I try to execute the report it doesnt give me any data returns. I already checked in se16
    . Do I need to do something or am I missing something ?
    Please help me out
    Thanks
    Sameer

    Hi
    Try this:
    SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName,
    T1.ItemCode, T1.Dscription, T2.Quantity, T2.BatchNum, T0.Comments
    FROM ODLN T0
    inner join DLN1 T1 on T1.DocEntry = T0.DocEntry
    LEFT JOIN IBT1 T2 ON T2.BsDocEntry = T0.DocEntry and T2.BsDocType = 15 and T2.BsDocLine =  T1.LineNum
    WHERE T0.DocDate >= '[%0\]' and T0.DocDate <= '[%1\]'
    Thanks,
    Gordon

  • Approval Query For A/R Delivery

    Hi
    I have made a query for Approval Procedure, only those Delivery documents will go for approval for which A/R Down payment Request has not been made. But it is not working properly Kindly Correct the query.
    SELECT Distinct 'True'  where dln1 t0 inner join odln t1 on t0.docentry = t1.docentry inner join ordr t2 on t0.baseentry = t2.docentry and t2.docentry not in (Select distinct t4.baseentry from dpi1 t4) and
    t2. docentry = $[DLN1.Baseentry]
    Thanks
    Rashid

    Hi Rashid,
    B1 does not support approval queries on document lines. you can query only document header.
    you can either try to workaround it with all sorts of aggregate UDFs in the header, or alternatively take a look at:
    [http://www.beonesolutions.com/ip/Solutions/ap.html|http://www.beonesolutions.com/ip/Solutions/ap.html]
    all details, including the ability to query all document tables, are in:
    [http://www.beonesolutions.com/files/Approval_Pro_Brochure.pdf|http://www.beonesolutions.com/files/Approval_Pro_Brochure.pdf]
    Gilan

  • Query for invoice and distribution detail

    hi 2 all
    anybody have the query for getting invoice with distribution detail in oracle payable r12.
    thanks
    zulqarnain

    select ass.SEGMENT1 vendor_number,
    ass.VENDOR_NAME,
    assa.VENDOR_SITE_CODE VENDOR_SITE,
    aia.INVOICE_NUM,
    aia.INVOICE_DATE,
    aia.INVOICE_AMOUNT,
    aia.INVOICE_TYPE_LOOKUP_CODE,
    gcc.CONCATENATED_SEGMENTS distribution_account ,
    gcc1.CONCATENATED_SEGMENTS liability_account,
    to_char(aia.GL_DATE) GL_DATE,
    AP_INVOICES_PKG.GET_APPROVAL_STATUS( AIa.INVOICE_ID,
    AIa.INVOICE_AMOUNT, AIa.PAYMENT_STATUS_FLAG,
    AIa.INVOICE_TYPE_LOOKUP_CODE) APPROVAL_STATUS_LOOKUP_CODE
    from ap_invoices_all aia,
    ap_suppliers ass,
    ap_supplier_sites_all assa,
    ap_invoice_distributions_all aid,
    gl_code_combinations_kfv gcc,
    gl_code_combinations_kfv gcc1
    where aia.VENDOR_ID = ass.VENDOR_ID
    and assa.VENDOR_SITE_ID = aia.VENDOR_SITE_ID
    and ass.VENDOR_ID = assa.VENDOR_ID
    and aid.INVOICE_ID = aia.INVOICE_ID
    and aid.DIST_CODE_COMBINATION_ID = gcc.CODE_COMBINATION_ID
    and assa.ACCTS_PAY_CODE_COMBINATION_ID = gcc1.CODE_COMBINATION_ID
    --and aia.INVOICE_ID =  81000
    and aia.GL_DATE between '01-JAN-12' and '31-MAR-12'
    order by aia.GL_DATE
    Thanks,
    Atul

  • Standard Query (Sq01) for Leave Details

    Hi Experts,
    I have created a query using SQ01 for Leave Details which includes all infotypes required viz. 2001, 2002 etc.
    When i use this query for any employee using any subtype/absence type, it works fine, but when i use it for a particular type i.e. On Duty, it do not brings any result although it has the data in the respected infotype. This absence type has been newly created by my functional consultant.
    Kindly let me know if there are any possible solutions for this. If yes, plz let me know the steps how to correct it.
    Prateek

    resolved.

  • Query For Purchase A/P Cycle Details

    Hi
    All export pls. provide me Query for Purchase A/P Cycle Details i.e Vendor Code  Vendor Description doc. date posting date po date amount quantity unit price same as Grpo returns and invoice in singal screen
    Thanks & Regards

    Hi,
    What do you mean by Query for Purchase A/P Cycle . All Query  for A/P Cycle , you can search  in SDN.Any specific unsolved query for you can be posted here.Ok.
    Check the details:
    1.PO creation
    http://e-mory.blogspot.com/2008/01/sap-me21n-create-purchase-order_30.html
    2.Goods Receipt
    http://e-mory.blogspot.com/2008/02/sap-migo-goods-receipt.html
    3.Invoice Verification
    http://e-mory.blogspot.com/2007/11/sap-miro-enter-invoice-verification.html
    Regards,
    Biju K

  • Query development for Vendar details

    Dear All,
    We want to develop an query for the below mentioned requirement.
    As we have not familiar (not worked) with SAP Query development process,can any one guide us how to proceed with detail steps.
    The input will be the Vendor Code ( with selection range )
    The output requirement are as  follows
    Vendor Code
    Vendor Name
    Vendor Address
    (We need a selection field in the input screen for vendor code)
    Thanks for your time and patience
    Regards

    Hi.
    In SQ02 create info-set. You need table. Choose  Table join...  (Table  LFA1).
    ThanDrag and drop requared fields from left to right(to field gruop).
    You can use button Join to join some more tables(LFB1 etc)
    Save it and generate.
    After that go SQ01,enter name of query and click Create, while doing it select Created infoset.Save...
    Than choose buton InfosetQuery and select which fields do you want in selection and output list.
    Than go QUERY-MORE function-Generate program. Mantion this name.
    Go se93, create transaction with this name of program

  • Query for details of  Sale order , Invoice and COGS

    I Need the report cointing following based on month & Business partner
    Sale order, Sale Amount, Due date, Invoice Amount, Last Invoice date, COGS amount

    Hi Anantha,
    Please check below link and modify according to your requirement.
    Sales Order Query for  in SAP B1
    Query - Sales Orders linked to Deliveries
    My Top SQL Queries for SAP Business One
    Hope this helps
    Regards::::
    Atul Chakraborty

  • Formatted search query for displaying invoice items details

    hi all,
    i need to display all the items in AP invoice.kindly suggest me a query for that.
    in AP invoice
    Ex. row items
    code--descqtyprice--
    total
    I0001--XXXXXXX5--
    100 -
    500
    query should display this row as
    code--desc--
    price
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    I0001--XXXXXXX--
    100
    =================================
    the query should display as the qty is 5 so it will display the same item 5 times
    kindly suggest me some query for formatted search
    its very urgent
    regards
    sandip

    Hi Sandip,
    DoQuery("Select b.ItemCode from OINV a,INV1 b Where a.DocEntry=b.DocEntry")
    Hope its help for you
    Give me reward points,
    Regards,
    G.Suresh.

  • BAPI for Getting details of outbound delivery or VL03N

    Hi,
    Can any one tell me whether there is a BAPI for display of outbound delivery.
    Can any one help me?
    thanks.

    Hi,
    Why do you need BAPI for displaying the delivery?
    Below 2 lines of code is enough.
    SET PARAMETER ID 'VL' FIELD 'delivery number'.
    CALL TRANSACTION 'VL03N' AND SKIP FIRST SCREEN.
    Thanks,
    Vinod.

  • Query for Consolidated tax details

    Dear All
    I need an output through query in PO in the following format:
    BASIC
    FREIGHT
    VAT
    CST
    EXCISE (should include cess & hecess)
    I have the query for individual breakup. ex. vat,cst,bed,cess,hecess, bed on frieht,cess on freight,hecess on freight,vat on freight,cst on freight,vat on excise, cst on excise etc.,
    But i need to have consolidated values for VAT,CST & EXCISE Amounts.
    Can anyone help me on this asap
    regards
    KARTHIK

    You can use dsquery and dsget at the command line of a Domain Controller for most of this. To get displayName, email address (mail attribute), and sAMAccountName (pre-Windows 2000 logon name) of all users:
    dsquery user -limit 0 | dsget user -display -samid -email
    If you want the Common Name, specify  -dn for the distinguishedName. Getting the password expiration date takes more code. I have VBScript and PowerShell scripts for generic queries of AD linked on this page:
    http://www.rlmueller.net/GenericADO.htm
    You are prompted first for the base of the search. Enter nothing for the entire domain. Then you are prompted for the LDAP syntax filter. For all users use:
    (&(objectCategory=person)(objectClass=user))
    Finally you are prompted for the names of the attributes to retrieve. You can enter:
    cn,displayName,mail,pwdLastSet
    The pwdLastSet is a large integer, but the program converts this into the corresponding date (in the local time zone) when the password was last changed. Using the domain maximum password age policy, you can tell when the password will expire. The program
    has an optional parameter to display results in comma delimited format. You would redirect the output to a text file.
    There are scripts to determine the date the passwords will expire, but there is more code. See this example for just one user:
    http://support.microsoft.com/kb/323750
    Richard Mueller - MVP Directory Services

  • Dispatch details

    Hi,
        What are the fields and tables are required for displaying sales order and dispatch details.

    The Tables are
    VBAK : Order (Header)
    VBAP : Order (Item level)
    LIKP : Delivery (Header)
    LIPS : Delivery (item level)
    VBFA : Document Flow
    Thanks.
    Ashish

Maybe you are looking for

  • IPod touch locked on the logo of apple

    Hello, My iPod Touch is now locked on the logo of apple from now on a few hours. I have to try to put the iOS 4 on this one and I am very disappointed by the result(profit). I am not even apt of restoring my iPod Touch with iTunes. He(it) is written

  • Iphone 5 shuts down when battery life still shows 10% left

    Install iOS7 on iphone 5 and the device will power down sometimes when it still shows 10-20% battery life then not power back on, while displaying that it should be plugged in. Also the phone will sometimes jump from 20% life down to something like 1

  • Can I type in a PDF file?

    I have a PDF file fornm that I would like to fill out. It says I can type my information, but I cannot seem to "type" on/in the form. Without paying for a new piece of software for this one form, is there any answer besides a typewriter (LOL)?

  • Color scheme, how do I change it?

    I have an abstract pastel, moving blocks going pneumonia here and I will not have it ,and increase letter size for my android please, thankyou and HAPPY NEW YEAR!

  • HT1933 Do in app purchases appear on your purchase history?

    Do in app purchases appear on your purchase history?