Sales per item report

hello experts
i have made the following query but i dont want to display double and triple times values per itemcode
i actually want to display the sum the quantity and the sum of the linetotal per item
SELECT
--T0.CardName
-- T0.ShipToCode
-- T0.DocDate
T1.ItemCode
, T1.Dscription
, sum(T1.Quantity)
, T1.LineTotal AS 'u0391u03BEu03AFu03B1 u03C0u03CEu03BBu03B7u03C3u03B7u03C2'
--, T2.CardCode
FROM OINV T0 
INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
INNER JOIN OSLP T3 ON T0.SLPCODE=T3.SLPCODE
WHERE
--(T0.CardName >= [%0] or [%0] = ' ')
--and (T0.CardName<= [%1] or [%1] = ' ')
--and (T0.ShipToCode >= [%2] or [%2] = ' ')
--and (T0.ShipToCode <= [%3] or [%3] = ' ')
(T2.CardCode = '80503')
--and (T2.CardCode = [%4] or [%4] = ' ')
AND (T0.DOCDATE BETWEEN '2011-10-01' AND '2011-10-25')
--AND (T0.DOCDATE BETWEEN '[%5]' AND '[%6]')
--and (T0.CANCELED= 'N')
--and ((T3.SLPNAME BETWEEN '[%7]'AND '[%8]') OR ('[%7]'=' ' AND  '[%8]'=' '))
group by T0.CardName,  T0.DocDate, T1.ItemCode, T1.Dscription, T1.Quantity, T1.LineTotal, T2.CardCode
order by T1.ItemCode
60344     test item1      1.000000     0.880000
60360     test item2      1.000000     1.500000
60360     test item2      1.000000     1.500000
60360     test item2             2.000000     3.010000
60361     test item3             2.000000     3.010000
do you have any idea?
thanks in advance for your time!

HI
try this:
SELECT
--T0.CardName
-- T0.ShipToCode
-- T0.DocDate
T1.ItemCode
, T1.Dscription
, sum(T1.Quantity)
, T1.LineTotal AS 'u0391u03BEu03AFu03B1 u03C0u03CEu03BBu03B7u03C3u03B7u03C2'
--, T2.CardCode
FROM OINV T0 
INNER JOIN INV1 T1 ON T0.DocEntry = T1.DocEntry
INNER JOIN OITM T2 ON T1.ItemCode = T2.ItemCode
INNER JOIN OSLP T3 ON T0.SLPCODE=T3.SLPCODE
WHERE
--(T0.CardName >= [%0] or [%0] = ' ')
--and (T0.CardName<= [%1] or [%1] = ' ')
--and (T0.ShipToCode >= [%2] or [%2] = ' ')
--and (T0.ShipToCode <= [%3] or [%3] = ' ')
(T2.CardCode = '80503')
--and (T2.CardCode = [%4] or [%4] = ' ')
AND (T0.DOCDATE BETWEEN '2011-10-01' AND '2011-10-25')
--AND (T0.DOCDATE BETWEEN '[%5]' AND '[%6]')
--and (T0.CANCELED= 'N')
--and ((T3.SLPNAME BETWEEN '[%7]'AND '[%8]') OR ('[%7]'=' ' AND  '[%8]'=' '))
group by T0.CardName,  T0.DocDate, T1.ItemCode, T1.Dscription, T1.LineTotal, T2.CardCode
order by T1.ItemCode

Similar Messages

  • Storing and calculating sales per item

    The case: We have a item, on that item we have a fee. If the item has sold more than 1000 copies, the fee will drop. Therefor i need to have a place that calculates/stores total sales per item. This can then be used to set the fee when i run my stored procedure
    for sales etc. 
    Database explained shortly: 
    The sales database looks like this: 
    ItemID, SalesDate, Quantity, Name.
    Example: 
    1399, 2014-01-01, 2, Fompa.
    1081, 2014-01-01, 13, Asddd. 
    1399, 2014-01-03, 1, Fompa. 
    Etc. 
    The item database looks like this: 
    ItemID, Name, Author, etc
    Now my boss asked me if i maybe should add total sales to the item database, but how is that possible? 
    I have also tried to gather all items and show the total sales, but something goes wrong, the itemID are not grouping together..
    here is the query: select ItemID, QUANTITY from BOOK_SALES group by ItemID, QUANTITY order by MAX(quantity) DESC
    If i get this query right, is it possible to store the query within a database table? 

    Hey, thanks for a fast answer. 
    I modified your query a little, 
    select
    itemid, sum(quantity) from book_sales group by
    itemid order by MAX(quantity) DESC
    but still, all of the itemIDs are not being grouped together. 
    Results show something like this: 
    1399, 981
    1081, 344
    1399, 199
    etc..

  • Sales order item report based on results analysis key and status

    Hi,
    I am trying to find a a report to generate list of sales order items with following selection
            -invoicing status -invoiced/not invoices (other status)
            -result analysis key assigned to this item (VBAP-ABGRS)
            -system status /released/teco
    Basically i am CO consultant and not so familiar with the SD statuses. I tried VA05 and V.26 but all required selections are not available in these reports.
    If no standard report is available in ERP, i would like to have it in BI. Can some help me with table fields for statuses.
    Thanks in advance.
    Regards
    Raghu

    Hi Raghu
    Go to SE16 and give VBUK table and execute it there you can select the following feilds and then check wheather they are meeting your requirements or not.If they are meeting your requirements then create a new Z report by copying standard VA05 key feilds. and include the other feilds which you need.So you take your ABAP team help
    Billing status     FKSTK
    Posting Status  BUCHK
    Overall status  GBSTK
    Document category VBTYP
    Regards
    Srinath

  • Sample Report: Sales per Customer by Period - WITH QUANTITIES

    I am trying to make some modifications to the 'Sales per Customer by Period'  sample report, but am having problems. I want it to be YTD and comparative, so YTD-12. That part was easy enough. Then I wanted to add the quanty. So i want the report to show the sales amount and quantity for each customer, ytd and prior year ytd. This seemed easy enough also, until I looked further into the data. It doesn't match up with reports from Business One. The problem seems to be my items that are packs, like an item that is sold in packs of 10. If the invoice has 10 10 Packs on an invoice, my report shows a quantity of 10. The SBO report shows it as a quantity of 100 (10x10). I have tried to add Item level stuff, so I could go get the 'Items per Sales Unit' value and multiply it by the quantity. When I do this the report crashes.
    Does anyone have any suggestions? Has anyone created a report like this? Any help would be appreciated.

    Hi,
    What is your B1 version and PL? Is this a Crystal Report or PLD?
    Thanks,
    Gordon

  • Partial delivery per item in sales order and ATP - schedule lines

    Hi,
    I've problem regarding ATP- schedule lines and partial delivery flag.
    In sales order there is flag Partial delivery per item B / 1 . That means create only one delivery even with quant 0. That comes from customer master or customer info-record and it is OK.
    Please look at next example.
    Customer requires:
    10 PCS of materail A on date X. Only 5 PCS are available on date X.
    10 PCS of material B on date X 0 PCS are available on date X, 10 PCS are available on date Y.
    So if we create outbound delivery on date X it will contain only 5 PCS of material  A. No successive deliveries will be created for material A because of the flag B/1. That item is closed.
    Problem is with material B.
    The sales order will be open because of material B and on date Y we can easily create another delivery with 10 PCS of mat B.
    That is wrong. Agreement with customer is only one delivery for ALL items in sales order. If we create delivery on date X it should contain only materials which are available on date X and sales order should close.
    Do you know how to fix this problem?

    Hi,
    I've think you didn't understand my requirement. I allways get schedule lines but they are confirmed on different dates.
    Example in same sales order we have:
    Schedule line for item A:
    DATE X confirmed quantity 10
    Schedule line for an item B.
    DATE X confirmed quanitity 0 (zeroe)
    DATE Y confirmed quantity 10.
    I would like to create outbond delivery on date X with:
    item A quantity 10
    item B quantity 0.
    And if that hapens than B/0 rule will work or reference customzing that you suggested before. So order will be closed because all items are processed or referenced once.
    Do you know how to do that?
    Regards

  • Table Name to take report of Open Sales Order items&its relevant GL Number.

    Hi,
    I wanted to take a report with Output as Open Sales Order Items and its relevant GL account numbers. is there any T Code in the Standard or atleast the table name.
    I have already fetched the Open Sales Order Items from T code VA05, but i need the relevant GL account numbers also.
    Any pointers on this will be appreciable.
    Rgds,

    Hi
    There are no standard reports where in you can fetch the data of the open sales order items and its G/L accounts with the output. But  by creating your own report using LIS then it is possible
    Regards
    Srinath

  • There is double quantity in the sales item report?

    Hi all,
    I have created an infoset with sales order item and delivery
    The issue is
    there is one sales order item with qty 10 but because it was delivered on different dates with different quantity like 5,5
    the report show likes
    sales order item                            quantity                  delivered quantiy   act gds issue date
    10                                                 10                             5                        20/09/2010
    10                                                  10                            5                        21/09/2010
    result                                              20                           10
    but the actual quanity should only be 10 but the result it is sumarizing as 20 because there are 2 line items for the same
    how to rectify and summarise it
    thanks

    Hi,
    Check this blog on your topic. It explaines exception aggregation in detail.
    Infoset Keyfigure multiplicity Part 3
    Infoset Keyfigure multiplicity Part 1
    Infoset Keyfigure multiplicity Part 2

  • Sales Comparison by Items Report

    Hello Experts,
    Is there a report in B1 that compares total sales by item between two periods? If not, could anyone help me with a query?
    For Example:  Total sales for item A0001 between Jan-Oct 2010 is $10000 and Total sales for item A0001 between Jan-Oct 2009 is $5000
    When i enter a date range i should get result like this:
    ItemCode ItemDesc Jan-Oct 2010  Jan-Oct 2009
    A0001     Printer      $10000             $5000
    Praneeth

    Updated:
    SELECT S.ItemCode, MAX(S.ItemName) as 'Item Description', SUM(S.[2010]) as 'Jan-Oct 2010',SUM(S.[2009]) as 'Jan-Oct 2009'
    FROM
    (SELECT T0.ItemCode, T0.ItemName, T1.LineTotal AS [2010], 0 AS [2009]
    FROM dbo.OITM T0
    INNER JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode AND Year(T1.ShipDate)=2010 and DateDiff(MM,T1.ShipDate,'10/10/2010')>=0
    UNION
    SELECT T0.ItemCode, T0.ItemName, 0 AS [2010], T1.LineTotal AS [2009]
    FROM dbo.OITM T0
    INNER JOIN dbo.INV1 T1 ON T1.ItemCode = T0.ItemCode AND Year(T1.ShipDate)=2009 and DateDiff(MM,T1.ShipDate,'10/10/2009')>=0
    UNION
    SELECT T0.ItemCode, T0.ItemName, -T1.LineTotal AS [2010], 0 AS [2009]
    FROM dbo.OITM T0
    INNER JOIN dbo.RIN1 T1 ON T1.ItemCode = T0.ItemCode AND Year(T1.ShipDate)=2010 and DateDiff(MM,T1.ShipDate,'10/10/2010')>=0
    UNION
    SELECT T0.ItemCode, T0.ItemName, 0 AS [2010], -T1.LineTotal AS [2009]
    FROM dbo.OITM T0
    INNER JOIN dbo.RIN1 T1 ON T1.ItemCode = T0.ItemCode AND Year(T1.ShipDate)=2009 and DateDiff(MM,T1.ShipDate,'10/10/2009')>=0
    ) S
    GROUP BY S.ItemCodeHAVING SUM(ISNULL(S.[2010],0))+SUM(ISNULL(S.[2009],0))> 0

  • Sales Analisys on Items report in Delivery

    Incorrectly sales analysis report on Items in the context of Delivery Notes, if Delivery has a status - Closed.
    1. Add the document u2013 Delivery №1 with item/service type to the system.
    2.We want to see the sales analysis report. Sales -> Sales reports -> sales analysis. Criteria for report: Delivery Notes and you can see customers, Items and Sales Employees reports.
    The Items report, Sales Employees report and customers report have the same values.
    3.Closed the document "Delivery".
    4.And if we see the Items report, then the report will show us a zero quantity.
    How can I remove this error?
    Tnaks.

    Yes, i agree with Gordon.
    YOu can try this SQL query.
    SELECT T0.ITEMCODE,
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'JAN QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 2 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'FEB QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 3 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'MAR QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 4 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'APR QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 5 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'MAY QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 1 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'JUN QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 7 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'JUL QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 8 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'AUG QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 9 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'SEP QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 10 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'OCT QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 11 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'NOV QTY',
    (SELECT SUM(T1.QUANTITY) FROM DLN1 T1 with (NOLOCK)
    WHERE MONTH(T1.DOCDATE) = 12 AND T1.ITEMCODE =
    T0.ITEMCODE) AS 'DEC QTY'
    FROM dbo.OITM T0
    LEFT JOIN dbo.DLN1 T1 ON T1.ItemCode = T0.ItemCode
    WHERE T0.SellItem = 'Y'
    GROUP BY T0.ItemCode,YEAR(T1.DOCDATE) HAVING YEAR(T1.DOCDATE) = YEAR(GETDATE())
    ORDER BY T0. ITEMCODE

  • Report Sales Per Customer

    Hello to all!
    i have a requirement to make a query that will bring me report for Sales Per Customer
    the desired fields are the following
    CardCode
    CardName
    --, (Select sum(T6.LineTotal) from inv1 t6  where t6.docentry=t0.docentry) 'Price Bef. Disc.'
    , (Select t5.linetotal from inv3 t5 where t5.docentry=t0.docentry and t5.expnscode in ('6','7')) as 'Freight'
    --, (Select t5.linetotal from inv3 t5 where t5.docentry=t0.docentry and t5.expnscode='11') as 'W/TAX'
    VatSum
    .DocTotal
    SlpName
    till now i have written the following code
    SELECT t0.docdate as 'Doc. Date', t0.docnum as 'Doc No.', T0.CardCode AS 'Customer Code', T0.CardName as 'Customer Name', (Select sum(T6.LineTotal) from inv1 t6 where t6.docentry=t0.docentry) 'Price Bef. Disc.', (Select t5.linetotal from inv3 t5 where t5.docentry=t0.docentry and t5.expnscode in ('6','7')) as 'Freight', (Select t5.linetotal from inv3 t5 where t5.docentry=t0.docentry and t5.expnscode='11') as 'W/TAX',T0.VatSum,  sum(T0.DocTotal) 'Doc. Total', T1.SlpName as 'Account Manager' FROM OINV T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode inner join ocrd t2 on t0.cardcode=t2.cardcode inner join ocrg t3 on t2.groupcode=t3.groupcode WHERE (T0.DocDate between '[%0]' and '[%1]')
    group by T0.CardCode, T0.CardName, T1.SlpName, t0.docnum, t0.totalexpns, t0.docentry, t0.docdate,T0.VatSum
    union
    SELECT t0.docdate as 'Doc. Date', t0.docnum as 'Doc No.', T0.CardCode AS 'Customer Code', T0.CardName as 'Customer Name',(Select (-1)*sum(T6.LineTotal) from rin1 t6 where t6.docentry=t0.docentry) 'Price Bef. Disc.', (Select (-1)*(t5.linetotal) from rin3 t5 where t5.docentry=t0.docentry and t5.expnscode in ('6','7')) as 'Freight', (Select (-1)*(t5.linetotal) from rin3 t5 where t5.docentry=t0.docentry and t5.expnscode='11') as 'W/TAX', (-1)*T0.VatSum, (-1)*sum(T0.DocTotal) 'Doc. Total',T1.SlpName as 'Account Manager' FROM ORIN T0 INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode inner join ocrd t2 on t0.cardcode=t2.cardcode inner join ocrg t3 on t2.groupcode=t3.groupcode WHERE (T0.DocDate between '[%0]' and '[%1]')
    group by T0.CardCode, T0.CardName, T1.SlpName, t0.docnum, t0.totalexpns, t0.docentry, t0.docdate,T0.VatSum
    but i would like only once to be displayed each customer
    do you have any idea?

    issue resolved
    SELECT
    T0.CardCode AS 'Customer Code'
    , T0.CardName as 'Customer Name'
    ,(select sum(t5.linetotal) from inv1 t5 INNER JOIN oinv T6 ON T6.DOCENTRY=T5.DOCENTRY where t6.cardcode=t0.cardcode and t5.docdate between '[%0]' and '[%1]') 'Price Bef. Disc.'
    ,(Select sum(t7.linetotal) from inv3 t7 inner join oinv t6 on t6.docentry=t7.docentry where t6.cardcode=t0.cardcode and t7.expnscode in ('6','7') and t6.docdate between '[%0]' and '[%1]') as 'Freight'
    ,(Select sum(t7.linetotal) from inv3 t7 inner join oinv t6 on t6.docentry=t7.docentry where t6.cardcode=t0.cardcode and t7.expnscode ='11' and t6.docdate between '[%0]' and '[%1]') as 'W/TAX'
    ,(select sum(t8.vatsum) from oinv t8 where t8.cardcode=t0.cardcode and t8.docdate between '[%0]' and '[%1]') as 'VatSum'
    ,sum(T0.DocTotal) 'Doc. Total'
    , T1.SlpName as 'Account Manager'
    FROM OINV T0
    INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
    WHERE (T0.DocDate between '[%0]' and '[%1]')
    group by T0.CardName, T1.SlpName,T0.CardCode
    union
    SELECT
    T0.CardCode AS 'Customer Code'
    , T0.CardName as 'Customer Name'
    ,(select sum(t5.linetotal) from rin1 t5 INNER JOIN orin T6 ON T6.DOCENTRY=T5.DOCENTRY where t6.cardcode=t0.cardcode and t5.docdate between '[%0]' and '[%1]') 'Price Bef. Disc.'
    ,(Select sum(t7.linetotal) from rin3 t7 inner join orin t6 on t6.docentry=t7.docentry where t6.cardcode=t0.cardcode and t7.expnscode in ('6','7') and t6.docdate between '[%0]' and '[%1]') as 'Freight'
    ,(Select sum(t7.linetotal) from rin3 t7 inner join orin t6 on t6.docentry=t7.docentry where t6.cardcode=t0.cardcode and t7.expnscode ='11' and t6.docdate between '[%0]' and '[%1]') as 'W/TAX'
    ,(select sum(t8.vatsum) from oinv t8 where t8.cardcode=t0.cardcode and t8.docdate between '[%0]' and '[%1]') as 'VatSum'
    ,sum(T0.DocTotal) 'Doc. Total'
    , T1.SlpName as 'Account Manager'
    FROM orin T0
    INNER JOIN OSLP T1 ON T0.SlpCode = T1.SlpCode
    WHERE (T0.DocDate between '[%0]' and '[%1]')
    group by T0.CardName, T1.SlpName,T0.CardCode

  • Sales Analysis query per item group summarized per BP Group

    Dear experts,
    My client is requiring me to create a query that when i select a certain item group it returns a sum/total of sold items in that group per BP group
    format:
    parameter: Item Group A
    BP Group A    1,000
    BP Group B    2,000
    BP Group C   1,000
    I have managed to get total sales per BP Group but i cant seem to figure how to break it down per Item Group
    here is my query:
    SELECT T2.[GroupCode], SUM(ISNULL(T0.Debit,0) - ISNULL(T0.Credit,0)) as "Amount(LC)" FROM JDT1 T0  INNER JOIN OJDT T1 ON T0.TransId = T1.TransId and T0.TransType IN (13,14)
    INNER JOIN OCRD T2 ON T2.CardCode = T0.ShortName
    WHERE T1.[RefDate]  BETWEEN [%0] and [%1]
    GROUP BY T2.[GroupCode]
    how can I link Item Groups to JDT1?

    Hi Carlo
    Try This
    SELECT t5.ItmsGrpNam AS ItemGroup,
       t7.GroupName AS BPGroup,
       SUM(ISNULL(T0.Debit,0) - ISNULL(T0.Credit,0)) AS "Amount(LC)"
    FROM JDT1 T0
    INNER  JOIN OINV T1 ON T0.transid = T1.transid
    LEFT OUTER JOIN INV1 T3 ON T1.docentry = T3.docentry
    LEFT OUTER JOIN oitm T4 ON t4.itemcode = T3.itemcode
    LEFT OUTER JOIN oitb T5 ON T4.ItmsGrpCod = T5.ItmsGrpCod
    INNER  JOIN ocrd T6 ON T0.ShortName = T6.CardCode
    INNER JOIN OCRG T7 ON t7.GroupCode=t6.GroupCode
    WHERE T1.DocDate BETWEEN [%0] AND [%1]
    GROUP BY t5.ItmsGrpNam,
       t7.GroupName
    Rgds

  • Utility Report to delete incomplete sales order items

    Does anyone know the name of the SAP report that is used to delete incomplete sales order items.
    When you save an order with multiple order items and later delete one of more of the items, SAP sometimes  leaves an entry in one of the internal tables and flags the sales order as "incomplete"; while referencing order items that no longer belong to the sales order.
    Prior to ECC6.0, SAP provided a utility report that could be used to delete these items .
    Does anyone have the name of this report  ?
    Points for help

    HI,
    try
    V_UC                 Incomplete SD Documents
    V_UC_7               Incomplete SD Documents
    Thanks,
    Pramod

  • Sales order item category per sales organization

    Hi
    Sorry for the question, I am FI/CO expert, and since our SD expert left us, I am also the SD expert now.
    Can I define different item categories for the same sales order type for different sales orgs?
    VOV4 (IMG-sales and distrebution-sales-sales documents-sales document item-assign item categories) has no sales organization parameter.
    Thanks
    Ofer

    >
    Ofer Cohen wrote:
    > Can I define different item categories for the same sales order type for different sales orgs?
    > Ofer
    Yes, you can define different item categories (in t.code VOV7) and assign to same sales order types. The item category is determined by based on Sales document type + Item category group (from material master) + Item category usage + High level item category (check t.code VOV4).
    The item categories are not assigned to sales organization, but the sales document types are assigned to sales area. Check t.code VOV8, where the sales documents are defined and in t.code OVAZ, the sales documents are assigned to sales area (sales area = sales org + distribution channel + division).
    YOu can see the steps of configuration at SPRO -> Sales and distribtution ->Sales document header (related to sales document type) and then at -> Sales document item.
    Regards

  • Sales AR Item Type Invoice Print Layout Design "Sub Total" per Page

    Dear Forum Team
    We need some advice on how to modify, fomulate(?) [Sub Total] for each page's 'amount' on the Sales AR Item Type Invoice.
    Currently the 'sub total amount' on each page is showing Grand Total instead of sub total.
    Thanks

    Hi,
    In you PLD, In repetitive area, you might have linked the fields like Item name, Item Description, and so on. In these fields one of the field will be Total for line items.  Am i right?
    If it is so, then in repetitive area footer, Create one Formula field and give formula PageSum("Field_025") (in your case)
    Ie., Field_201 = PageSum("Field_025")
    Field_025 - contains the Line Total of Row items.
    I hope this could help you.
    Raja.S

  • Deleting all linked documents per sales order/item

    We have documents linked to our sales orders/items (which can be seen via CV03N).  I would like to run a batch program to selectively delete all of these linked documents.  There is a function module CV140_LINKS_DELETE that looks will do the trick if you supply DOKAR, DOKNR, DOKVR, DOKTL, DOKOB and OBJKY.  In our case DOKAR is 'ZQN', DOKVR is '00', DOKTL is '0000' DOKOB is 'VBAP' and OBJKY is a combination of sales order/line.  How would DOKNR be filled in if I want to delete all documents?
    Thank you.

    In my case, I'm trying to delete the following:
    DOKAR = 'ZQN'
    DOKNR = (can have 34 different values ranging from Q01-Q34)
    DOKVR = 00
    DOKTL = 0000
    DOKOB = VBAP
    OBJKY = sales order/line - I have this in an internal table I loop thru
    My issue is with the DOKNR value.  Is there a way to delete all document links for a sales order/line when you don't have a DOKNR value?

Maybe you are looking for