Sale Order Query Print layout/Crystal Report Query required

Hi Experts,
I created a Sale Order. Items included in it are service and material.
(I created a BOM, bound the child material item to the parent service item. Moreover child item will have unit price where as parent item will not have unit price)
I need the report on it please let me know how i can do it.
I tried with below query
select a.DocEntry, a.DocNum, a.CardCode, a.CardName, b.DocEntry,b.ItemCode, b.Dscription, b.Quantity, b.Price, b.LineTotal, a.DocTotal, a.VatSum 
from ORDR a inner join RDR1 b on a.DocEntry = b.DocEntry
--and b.TreeType <> 'N'
where a.docnum = '14240621'
output of above query is
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
2493.76
43940.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0001
Material for PROVIDING & LAYING
17.62
2800
49336
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM INCLUDING CEMENT
10.055
1980
19908.9
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0002
Material for BM CM  INCLUDING CEMENT
10.055
1650
16590.75
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
116.5
7572.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0003
Material for P/APPLYING
65
65
4225
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
31625.05
70618.74
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0004
Material for P& FIXING
2.233
44000
98252
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
3593
10779
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
MT0005
Material for PROVIDING RMC
3
4847
14541
354652
18888.46
and my desired output is
Unit price of both child item and parent item should be display in single column. ie. cumulative in Unit Price Column and Linetotal respectively.
DocEntry
DocNum
CardCode
CardName
DocEntry
ItemCode
Description
Qty
Unit Price
Line Total
DocTotal
Tax Amount
621
14240621
CDR0001
ABCDEFGH
621
302010001
PROVIDING & LAYING
17.62
5293.76
93276.05
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
305010005
BM CM  INCLUDING CEMENT
10.055
3630
36499.65
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
302040001
P/APPLYING
65
181.5
11797.5
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
301000001
P& FIXING
2.233
75625.05
168870.7
354652
18888.46
621
14240621
CDR0001
ABCDEFGH
621
306010001
PROVIDING RMC
3
8440
25320
354652
18888.46
please let me know the update on this.
with regards

Hi Nagarajan,
thanks for reply..
1) Yes, i.e i have taken into BomType: Template
2) i did not get any helpful output by using treetype by keeping 'S' and 'N', i kept in comment.
3) Actually MT0001-05 - these are material item- unit prices are fixed. see in attached image
     for parent item, unit prices are not fixed. I give the price for them in Sale Order.
     I want unit price for parent and child should be summed/cumulative for Sale Order print.
     (in my above post, first matrix exactly same as sale order line items plz check it)
Please help me, how i can achieve this by query(for PLd or Crystal report)
With Regards

Similar Messages

  • New customized report using PLD or QUERY PRINT LAYOUT to show customers onl

    I am working with a Software Developing firm as an SAP Consultant.
    Please tell me how to create a new     customized     report displaying various details as required by the client in the report using PLD or Query Print Layout.
    Please help me asap.

    Hi,
    You can create queries using the Query Generator or the Query Wizard tools.
    After you have created your own queries, you can link them to a required print layout.
    for user reports.Look at:
    Tools --> Queries --> Query Print Layout
    Set there your query reports.
    Printing User-Defined Queries
    After you had linked a user-defined query to a user report template, you can now print it
    according to its linked print layout.
    There are two ways for printing your user-defined queries.
    1. Using the Query Print Layout window:
    • Select from the upper menu Tools &#1048774; Queries &#1048774; Query Print Layout.
    • Click the Reports tab page.
    • Click to highlight the required query you would like to print.
    • Click on the printer icon or select from the upper menu File &#1048774; Print.
    • The user-defined query is printed according to its linked print layout.
    2. Using the Queries Manager window:
    • Click the Queries Manager icon on the upper tool bar.
    • Click to highlight the required query you would like to print.
    • Click on the printer icon or select from the upper menu File &#1048774; Print.
    • The user-defined query is printed according to its linked print layout.
    Note! You can also print preview user-defined queries. Do so by selecting the Print
    Preview option as described in the methods above for printing your query.
    Btw, you could search the manual training files relate to query PLD in http://www.service.sap.com/smb
    Rgds,

  • My Menu - Add a Query Print Layout to the Report Folder

    This is a newb question.  I can easily add a Query or form or most anything else to the Folders under My Menus ... But how can I add a specific Print Query Layout to the Reports folder un My Menu?
    I know it is simple but I can not find the steps in the documentation
    Thanks in advance!!! 
    Dana

    Kapil
    I tried that, but it adds the Query not the QPLD to the menu.
    I had figured that I could go the the QPLD memu and add the Report, but that adds the Query Print Layout Menu with all the reports.
    I feel like I am missing something very obvious here!!!
    Thanks for your quick response!!
    Dana

  • Authorization on Query Print Layout Report

    Hi Experts,
    Is there a way to limit users from generating Query Print Layout which they are not suppose to generate? Currently, all query print layout is exposed to all users, but I want to limit which users who can access specific reports only and to prevent from accidentally generating other confidential reports.
    I tried grouping the queries per Query Manager and assigned the query number to designated users in Authorizations, but it seems that this does not apply in Query print layout generation.
    Any help?
    Don

    Hi Gordon,
    Yes, I gave the users authorization for the query print layout so that they can run one of the report, however, all the reports are exposed also, for confidentiality purposes, I don't want to allow the same users to generate other query print layouts.
    Is there a way for this?
    Thanks.

  • Query Print Layout column sum in report footer

    Hi Experts,
    I am utilizing a query and created the layout via Query Print Layout. I am using sort and group functions which filters my column sums for a certain field conditions. My problem is that when I want to make a total column sum for all the repetitive footers' column sum, the system shows a message that only repetitive areas can be average/ sum.
    Is this the standard behaviour of the system? Or is this a limitation if we are using the print layout via Query print layout. Any workaround to get the final total for all pages column sum?
    Please advise.
    Thanks,
    Don

    hello
    Don
    what u want actually i dint understood as i now but u need colsum of ur repetitive fields or repetitive footer fields
    I).if u want repetitive footer all columns sum take the contact of those fields ex:(concat(F_a+F_B -
    )) so u can get ur total for repetitive footer fields
    II).if u want repetitive area lines colsum for every field u take as colsum with respect to the unique id of repetitive area fields
    regards
    Jenny

  • How to create authorization to access Query Print Layout?

    Hi again..
    i have 10 query print layout, and not every user can view this layout.
    I assume,
    report 1-3 only for user A,
    report 4-7 only for user B, and
    report 8-10 only for user C.
    How to create autorization for Query Print Layout?
    Thankyou for the help

    Dony,
    In order to createthe PL's of customize report (from Query Manager) you will have to go the Tools Tab of the Menu Bar in which you will have to click the Queries tab which will lead to a drop down menu which when clicked will lead to Quaery Print layout. You will have to choose your query based upon whether from the reports tab double click it to open the Query Print Layout Designer.
    Here again in the Menu Bar you will find the under the Tools the first tab is the PLD which when clicked you can do the same process as explined below
    When you go to the document ( Any Document ) in the tool bar you would find the 24th Icon to be the Print Layout Designer Tab when you click this it takes you to the layout designer window.... below there is tab named set as default when you click this the system would ask you 2 choices
    1. Set as default for all users
    2. Set as default for current user
    Which means that you will have to open each and every form?
    for each and every user and set them as default for the user.
    If you feel this answer is helpful then please do remember to reward points
    Regards,
    Nagesh.

  • Help me . Query in " Query Print layout Design "

    Hi Everybody .
    I Design Report by Query Print layout Design , So when I run Report , I see Message : " Table not found Administrator (OA DM)" .
    This is My Query .
    ( Note :this  Query is run ok in Microsoft SQL  . )
    Select Cast(left([dbo].[Get_rate](T0.BatchNum,left(T0.Account,4),T1.U_VNS_JType),5)       as nvarchar(50))+ Cast(T0.BatchNum as nvarchar(50))As No_Number    ,  T0.TaxDate As Date       ,     case left(T0.Account,4)when '1112'then '0.00'     when '1122'then'0.00' else           [dbo].[Get_11](T0.BatchNum,left(T0.Account,4),T1.U_VNS_JType)end  as Amount1              , case left(T0.Account,4) when '1111'then '0.00' when '1121' then '0.00'           else [dbo].[Get_111](T0.BatchNum,left(T0.Account,4),T1.U_VNS_JType) end  As Amount2            , T1.U_VNS_MEMO  As U_VNS_MEMO, T1.U_VNS_VNUMBER as PV_No    , T1.U_VNS_JType as 'Voucher Type'         , T0.Account  As AC_Code    , T3.AcctName as Description  , T0.Debit As Debit ,T0.Credit As Credit        , T1.U_VNS_NAME,     T0.U_VNS_REMARKS   From BTF1 T0                Inner Join OBTF T1 On T0.BatchNum = T1.BatchNum               Inner Join OBTD T2 On T0.TransID = T2.BatchNum                Inner Join OACT T3 On T0.Account = T3.AcctCode                    Where  T0.BatchNum = '[%0]'  Group by   Cast(left([dbo].[Get_rate](T0.BatchNum,left(T0.Account,4),T1.U_VNS_JType),5)       as nvarchar(50))+ Cast(T0.BatchNum as nvarchar(50)) ,  T0.TaxDate   ,       case left(Account,4)when '1112' then '0.00'     when '1122'then'0.00' else           [dbo].[Get_11](T0.BatchNum,left(Account,4),T1.U_VNS_JType)end             , case left(Account,4) when '1111'then '0.00' when '1121' then '0.00'           else [dbo].[Get_111](T0.BatchNum,left(Account,4),T1.U_VNS_JType) end            , U_VNS_MEMO  , T1.U_VNS_VNUMBER    , T1.U_VNS_JType       , Account     , AcctName       , T1.U_VNS_NAME,     T0.U_VNS_REMARKS      order by  Amount1 desc
    Please help me .
    Thank you very much .
    Message was edited by:
            Tran Ba Hai

    Note: This Quey if I change = [%0] by = 1 ,  and I run Report in SAP is ok .

  • Add Query Print Layout at the User Menu

    Hi,
    I want to add a specific Query Print Layout in the user Menu.
    Is there any option?
    Thanks in advance

    Hi......
    I Dont think its possible in QPLD to give authorization for a Particular Query Print Layout.
    I'm not sure whether its possible in case of Crystal Report or not.....
    Regards,
    Rahul

  • How to use query print layout design

    i have a sql query and i want to see its result on report with the help of print layout design.

    In addition to Tuvia's answer, here is the printing procedure of query PLD:
    Printing User-Defined Queries
    Use
    After you have linked a user-defined query to a user report template, you can print it according to its linked print layout.
    Procedure
    To print a user-defined query, use one of the following two procedures:
    Using the Query Print Layout window:
    1. Choose Tools u2192 Queries u2192 Query Print Layout.
    2. Choose the Reports tab page and select the query you would like to print.
    3. Choose File u2192 Print.
    The user-defined query is printed according to its linked print layout.
    Using the Queries Manager window:
    1. From the toolbar, choose with the quick info text Queries Manager.
    2. Select the query you would like to print.
    3. Choose File u2192 Print.
    The user-defined query is printed according to its linked print layout.
    You can also display a print preview for user-defined queries. To do so, choose File u2192 Print Preview.
    Printing User-Defined Queries with Variables
    Use
    When a user-defined query contains variables, its linked print layout will also display the variables data and print them.
    In the print layout linked to that query, you can see that an additional area containing the condition's parameters was added
    There is pdf file relate to Query PLD in  the SAP service marketplace website.
    Rgds,

  • How too set query print layout parameters?

    Hello,
    simple task:
    1. Open "Query Print Layout...": SBO_Application.ActivateMenuItem("4868")
    2. Handle new reports form: SBO_Application.Forms.ActiveForm (I know, the better solution should be get form with proper TypeEx and highest TypeCount, but now it doesn't matter)
    3. Select row with required report: m.Columns.Item(0).Cells.Item(row).Click(BoCellClickType.ct_Regular, 0)
    4. Run printing: SBO_Application.ActivateMenuItem("519")
    5. Handle new parameters form: ???
    How can I get newly created form containing report parameters (TypeEx "4000")? I wanna set proper parameters and click "OK" to show printed report. Doesn't work handling:
    - FORM_LOAD in ItemEvent
    - MenuEvent for "519" (is only BeforeAction
    - PrintEvent (executed after accepting parameters)
    - ReportDataEvent (passed FormUID belongs to reports list, not parameters)
    In each event I've listed all forms and there is no form titled "Query - Selection Criteria" with expected TypeEx.
    Is there any way to achive this?

    when you activate print preview of printing on selected User Query Layout, you can cacth the ET_FORM_LOAD event of formTypeEx =4000
    It is working. Please note if you do not have this event, you may check your filters (?)
    Then you can populate your values. Based on my experience the click ok button is not working.
    Tip: Search the forum in year 2009 i have posted there sample codes
    Regards
    J

  • Problem with Query Print Layout

    Hi, i have this type of problem.
    I have create a query with 5 fields,i have saved it, and ,after, i have created a report on this query (Query Print Layout).
    So, i have manipulated the report based on the preferences of the customer.
    After this operation, customer tell me that he want to see one more field in the report, so i must add, in the original query, this field. But i note that i can't add a field. I can do it, but i must remake all the report.
    There is a way to do this type of operation, without remake the report from the start?
    Thanks
    Regards
    Marco

    Hi Marco:
    I asked our Print Layout Expert, and she tolds me that you have to create the report again.
    Some time ago, in the report designer was a  way to change the link to the query, but that option is disable now.
    So, be patient and ask for this functionality to be implemented.
    Harold Gómez V.

  • Print preivew Query print layout

    Hi All,
    I have a query that I have created a print preview to.  I can click on Query Print Layout, select the report and print preview to show the report. 
    Does anyone know of a way to do this via the SDK? 
    I was trying to use the ReportLayoutsService and managed to get the report loaded into a SAPbobsCOM.ReportLayout but I have not been able to determine how to display the report.
    Thanks
    Karen

    Karen,
    There is not an object or method to do this currently via the SDK.  The ReportLayoutsService Object is a service that enables you to copy the print layout of a specified document type from one company database to another.
    Please also see this post ...
    Run SBO report directly from SDK
    Eddy

  • Query Print Layout / Query Manager

    Hopefully some one here can help me out ...
    I have created a handful of Query Print Layouts.  How or is there a way when I make a change to the underlying query, to reassociate it with the report?  Now when I change the query,  I have to create a new report.  I am currently on SAP B1 2007 PL11.  When I upgraded from PL06 to PL11,  the queries handle prompted dates differently, causing me to have to make a simple syntax change to my query which does not change the data being passed to the report.
    Thanks in advance
    Dana

    Dana,
    This is the short-coming of the Query PLD.  Once you change the Query, you will need to redo the template all over again.
    Therefore, it is a good practise to always finalize the query and then design the layout.
    Re-assigning the revised query to QPLD is not possible
    Suda

  • Query Print Layout - Generated PDF Document Name?

    Hi All,
    Query Print Layouts associated to my user queries work great for printing...but does anyone know if there is a way to set a more appropriate document file name when attaching an edited PDF report to an email? It seems to always automatically create a document name starting with 'Query Manager_-1_12' or something similar when attaching the report document directly to email.
    I do realize that I can save the file locally, choose any name I like, then attach to email... but this defeats the purpose of being able to send the query report directly to the email icon.
    If anyone knows how I can do this it would be much appreciated. There seems no option in the QPLD document properties.
    Best regards,
    John

    Hello,
    Yes, I have the same question. It could be great being able to choose the name of the document when creating a pdf. Even better if you could chose fields of the document for the name of the pdf, such as, name of customer, number of document, date, etc.
    Is there any way for doing this?
    Thanks in advance,
    Javier.
    Hi All,
    Query Print Layouts associated to my user queries work great for printing...but does anyone know if there is a way to set a more appropriate document file name when attaching an edited PDF report to an email? It seems to always automatically create a document name starting with 'Query Manager_-1_12' or something similar when attaching the report document directly to email.
    I do realize that I can save the file locally, choose any name I like, then attach to email... but this defeats the purpose of being able to send the query report directly to the email icon.
    If anyone knows how I can do this it would be much appreciated. There seems no option in the QPLD document properties.
    Best regards,
    John

  • Query Print Layout - Incoming Payment

    Hi All,
    I have done the query print layout for incoming payment. but it cannot show the correct A/R invoice: document number. When I only make the payment for 1 invoice it seems to be correct, but when I choose 2 invoices to be paid, then the A/R invoice: document number for the second row is wrong ( if follows the first row).
    Below is the query:
    SELECT T0.DocNum, T0.DocDate, T0.DocCur, T0.DocTotal,
    T0.DocTotalFC, T1.DocNum, T1.CardCode, T1.CardName,
    T1.DocDate, T1.Comments,T1.TrsfrRef as 'Cheque No',
    T2.BankCode' 'T2.AcctNum as 'Bank Code' , T0.Address , T3.Phone1 , T3.CntctPrsn , T0.PaidToDate, T0.PaidFc , T4.AppliedSys , T4.AppliedFc
    FROM [dbo].[OINV]  T0 INNER JOIN ORCT T1
    ON T0.ReceiptNum = T1.DocEntry LEFT JOIN RCT1 T2
    ON T1.DocNum = T2.DocNum LEFT JOIN RCT2 T4
    ON T4.DocNum = T2.DocNum LEFT JOIN OCRD T3
    ON T1.CardCode = T3.CardCode
    WHERE T1.DocNum = [%0]
    ORDER BY T1.DocNum
    the fields that i want to display in repetitive area are: A/R invoice: Document date , A/R invoice: document number, Amount that they have paid ( partial payment / full payment) i used this database: Incoming payment - a/r invoice: paid, outstanding amount i used formula ( total document - paid to date), and document currency
    Thank you! hope you can help.
    Pauline

    Pauline,
    I've tested your query in B1 2007A SP00 PL30 and works fine. I even created PLD for the query and I can see 2 invoice paid by one incoming payment.
    Rgds,

Maybe you are looking for

  • Accessing COM from Java using JCOM

    When I tried to access a simple COM component with the com2java generated files, I got the following error. Can someone help me with this? <Nov 8, 2001 3:37:24 PM CST> <Error> <HTTP> <[WebAppServletContext(366665,Defaul tWebApp,/DefaultWebApp)] Servl

  • Searching for driver help for dv6-1320ej

    Notebook - dv6-1320ej, windows 7 x64 recently had to purchase a new hdd my last one died subsequently lost my recovery partition, i tried calling my local hp and they directed me to 6 diffrent places because they had never heard of "recovery dvd pack

  • Unable tostart integration builder(xi server conected thru sm59 of crm srvr

    Hi everybody, We are connecting to xi server using sm59 (rfc) transaction in a crm server.I can't start the integration builder(sxmb_ifr). I tried this url in the internet explorer http://<host-name or IP address of XI server>:<java Port number)>/rep

  • Lineas Guias

    Hola tengo un problema, bueno despues de formatear mi pc y de instalar todos mis programas entre ellos el pagemaker tengo problemas con unas plantillas que ya tengo hechas, que pasa, que cuando imprimo mis plantillas las lineas guias aparecen esta ve

  • I would like to send photo as an attachment.

    I would like to send photo as an attachment.  Whenever I email photos from iphoto the picture becomes part of the body of the email.  This is problematic for my PC/dialup family members.  Takes an hour to receive one compressed picture.  I have read