Query on Undeposited checks per customer

Hi Experts,
Can anyone provide me a query on all undeposited checks per customer? Columns are as follows: Payment no., posting date, customer code, customer name, check date, check number, bank & check number. Parameter will be on per customer name.
Also, this query must be updated when checks will be deposited.
Thanks,
Don

HI FIND THE QUER Y BELOW
I THINK THIS VIL SOLVE U
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName], T2.[CheckNum], T2.[CheckDate], T2.[BankCode], T2.[Branch], T3.[DeposNum], T3.[DeposDate], T2.[Deposited]
FROM ORCT T0  INNER JOIN RCT1 T1 ON T0.DocEntry = T1.DocNum, OCHH T2 INNER JOIN ODPS T3 ON T2.DpstAbs = T3.DeposId
WHERE T2.[CardCode] = T0.[CardCode]  AND  T1.[DocNum] = T2.[CheckKey] AND T2.TransNum=T3.TransAbs AND
T0.[CardName]=[%0]
(OR)
SELECT  T0.[CheckNum],T0.[CardCode], T1.[CardName], T0.[BankCode],
CONVERT(VARCHAR(11),T0.[CheckDate]) FROM OCHH T0 , OCRD T1
WHERE T1.[CardCode] = T0.[CardCode] and  T0.[Deposited] = 'N'
GROUP BY T0.[CheckNum],T0.[CardCode], T1.[CardName], T0.[BankCode],
T0.[CheckDate]
ORDER BY T0.[CheckNum] Asc,T0.[CheckDate] Asc
REGARDS
JENNY
Edited by: Jennifer Anderson on Jun 3, 2010 2:22 PM

Similar Messages

  • Query item not sold per customer for this month compare with last month

    Dear all,
    i want to make query that show information about item sold per customer last month which is not sell again this month.
    for example last month customer A buy item 1,2 and 3. This month, customer A only buy item 2. So, the query will show information item 1 and 3 which is not sell again to customer A.
    Thanks a lot

    Here's one that will show you items bought in the last 60 days but not the last 30 days.  It's not perfect but will get you on your way, some bits will also not be relevant, like the qrygroup64 part.
    select     t0.cardcode,
              t0.cardname,
              t2.slpname,
              t1.itemcode,
              t1.itemname,
              t1.onhand,
              s0.[2mthqty],
              s0.[2mthdollar],
              s1.[1mthqty],
              s1.[1mthdollar],
              s2.lastsale
    from
    (select     t0.cardcode,
              t1.itemcode,
              sum(t1.quantity) as [2mthqty],
              sum(t1.linetotal) as [2mthdollar]
    from
    oinv t0
    inner join
    inv1 t1
    on t0.docentry = t1.docentry
    where t0.docdate >= getdate()-60
    and t1.quantity > 0
    group by     t0.cardcode,
                   t1.itemcode) s0
    full outer join
    (select     t0.cardcode,
              t1.itemcode,
              sum(t1.quantity) as [1mthqty],
              sum(t1.linetotal) as [1mthdollar]
    from
    oinv t0
    inner join
    inv1 t1
    on t0.docentry = t1.docentry
    where t0.docdate >= getdate()-30
    group by     t0.cardcode,
                   t1.itemcode) s1
    on s0.cardcode = s1.cardcode and s0.itemcode = s1.itemcode
    inner join
    (select     t0.cardcode,
              t1.itemcode,
              max(t0.docdate) as lastsale
    from
    oinv t0
    inner join
    inv1 t1
    on t0.docentry = t1.docentry
    where t0.docdate >= getdate()-60
    group by     t0.cardcode,
                   t1.itemcode) s2
    on s0.cardcode = s2.cardcode and s0.itemcode = s2.itemcode
    inner join
    ocrd t0
    on s0.cardcode = t0.cardcode
    inner join
    oitm t1
    on s0.itemcode = t1.itemcode
    inner join
    oslp t2
    on t0.slpcode = t2.slpcode
    where           (s1.[1mthqty] = 0 or s1.[1mthqty] is null)
    and t0.qrygroup64 = 'N'

  • A/R balance and outstanding checks per customer

    Hi Experts,
    Is there a way to query to get the information as to the A/R balance and the Outstanding checks of a customer? Columns would be document number, document date, Customer Name, A/R balance, Outstanding checks and Total. Parameters will be date start/end, Customer code from/end.
    Many thanks!
    Don

    Dear Mr Elicor,
    I am working on the query. At the best of my knowleadge the tables involved are the OINV, OCHH and ORCT.
    There are other tables that can be involved (e.g. RCT1), but I think that with the 3 tables above we can get all the data.
    select t0.docnum, t0.docdate, t0.cardcode, t0.doctotal, t1.checksum, t2.deposited, t2.checknum
    from oinv t0 inner join orct t1 on t0.docnum = t1.docnum
    join ochh t2 on t1.docentry = t2.rcptnum
    where t1.checksum <> 0 and t2.deposited <> 'c'
    The t2.deposited tells us if the check has been paied, so there is no open payment for it.
    Please, let me know if this query helps you.
    Regards,
    Marcella Rivi
    SAP Business One Forums Team

  • Query for Turnover per Customer / article and from wich agent in one file.

    Hello Experts -  basicly the subject tells it all, what I whant to see in the query is:
    Turnover Per Customer wich articles and wich agent is responsible for the customer.
    Many thanks in advance.

    Hi,
    Actually there are two field in the INV1 table
    1) Price = Net Price (after the adjustment of the Discount at row level)
    2) pricebefdi = Gross Price ( which does not include the discount at the row level)
    I have amended the query again based on the above fields :
    select distinct t0.CardName as 'Business Partner Name',
    CASE WHEN t1.discprcnt != 0 then ROUND(SUM((t1.Quantity*t1.PriceBefDi)*((100-t1.DiscPrcnt)/100)),2)
    WHEN t1.DiscPrcnt = 0 then ROUND(SUM((t1.Quantity*t1.PriceBefDi)*((100-t0.DiscPrcnt)/100)),2)
    WHEN t1.DiscPrcnt !=0 and t0.DiscPrcnt != 0 THEN
    ROUND(SUM((t1.Quantity*t1.price)*((100-t0.DiscPrcnt)/100)),2)
    END as [Total Turnover after Discount],
    t1.DiscPrcnt as 'Discount Percentage Rows',
    T0.Discprcnt as 'Header Discount',
    t1.VatSum as 'Vat Amount', t1.Dscription as 'Item Name',
    sum(t1.Quantity) as 'Qty Sold', t3.SlpName as 'Sales Employee Name'
    from OINV t0 inner join INV1 t1 on t0.DocEntry = t1.DocEntry
    inner join OSLP t3 on t3.SlpCode = t0.slpcode
    where t0.DocDate >= '2011.01.01' and t0.DocDate <= '2011.12.31'
    Group BY t3.SlpName, t0.Cardname,t0.slpcode, t1.Dscription,t1.DiscPrcnt,t1.vatsum,
    t1.DiscPrcnt,t0.discsum,t0.discprcnt
    order by t1.Dscription
    I have incorporated the one where discount is there both on header and rows.
    Kind Regards,
    Jitin
    SAP Business One Forum Team
    Edited by: Jitin Chawla on Oct 12, 2011 11:17 AM
    Edited by: Jitin Chawla on Oct 12, 2011 11:18 AM

  • Report as per Customer Account Assignment group or Material Account Assig

    Hi,
    I require report as per customer account assignment group or material account assignment group.
    Can you please tell me how to fullfill this requiremetn.
    I have go for ZReport or any standard report is available.
    Regards,
    ch.srinivas

    Hi,
      You could have gone for a query but unfortunately,you cannot use table TSTMT in a query so I think ZREPORT would be a better option.
    Regards
    Karan

  • 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

  • How to use a database per customer

    Hello,
    I currently design an Application that shall be used by multiple customers. Every customer shall have a database by its own for security and performance reasons. What is the best way to do this:
    - Create a database schema per customer (no problem)
    - Create a persitence unit per customer in peristence.xml (also no problem)
    How can I select the correct persistence manager at runtime?
    @PersistenceContect(unitName="customer14") EntityManager em;
    Selects the Persistence Unit for a bean at compile time. Any idea how I can do this at runtime? I would prefer to keep with container managed Entity Managers, if this is possible.
    Thanks in advance for any help.

    stelzbock wrote:
    Ahh, wow, that was quick!
    So all of them have these features I need?
    If you mention derby, I just found Java DB which is based on derby. So whats the diference? Can anyone recommend one of them?Check them all. Try which one you like best. I think Java DB is the new name of Derby.
    Personally I prefer HSQLDB, but I choose whichever you like.
    And what about the Table control? Is JTable feasible? It should be configurable and extendible like this:This is an entirely different question, better asked in the Swing forum.
    Also, be careful to separate your DB access from your UI code (google for MVC). It will make your application a lot easier to maintain.

  • Sales BOM per customer

    This might be a strange question but still. We have a customer who ships out pallets and crates to their customers. They want to be able to track these items of course and bill the customers according to the number of items they received. N.B. these items are not returned so returnable packaging is out of the question.
    We are looking at the use of a sales BOM so we can calculate the number of pallets and crates per sales order and delivery based on the number of finished products they ship out and of course create an invoice where these items are listed as part of the delivery with the actual costs. This works quite satisfactory BUT it will only work when either all customers use the sales BOM or all customers do not use the sales BOM.
    What's the problem, as this is a new process, they will not be able to convince all customers to directly pay for pallets and crates that are being shipped out. We are now facing the problem that for part of the customers they want to use a sales BOM and invoice them for the pallets and crates they receive BUT for part of the customers they do not want to invoice them for the pallets and crates they receive. This means that we are looking for a way where we can indicate, per customer, whether to use a sales BOM (ship out and invoice pallets and crates) or not to use a sales BOM (do not logically ship out and invoice pallets and crates).
    Is this possible yes or no? Maybe with a user exit that checks for a specific field in the customer master? We have already defined two sales BOM's per material, one where pallets and crates are used and one without pallets and crates so we could mis-use the alternative sales BOM principle, but we still need a trigger to call either sales BOM.
    Any help would be appreciated.

    Hi Roberto and Biju,
    We looked at both options but neither are workable. Not all warehouses use HUM because not all warehouses are their own warehouses, some are from logistics service providers who have not SAP access, otherwise the problem would be a bit easier, plus the customer does not use packing and will not use packing in the future.
    The dynamic product proposal was a bit more promising but also there, we encounter a problem because we cannot make a calculation on the number of crates and pallets shipped out to a customer, which is one of the requirements.
    The problem still lies in the fact that
    - Customer A does not want a bill for crates and pallets and therefore does not want to see the items on the delivery and the invoice.
    - Customer B does want a bill for crates and pallets and therefore needs a calculation for the number of pallets and crates he received.
    We cannot set a field somewhere that says customer A without these items, customer B with these items and then trigger something else.
    Thanks for the help but we still haven't solved the problem.

  • F.27 - Individual Request per customer while printing account statements

    Hi All,
    Currently  using transaction code F.27  Customer Account statements
    can be printed.
    The system produces one spool for all the customers processed.
    I need to have generate one spool per customer.
    Any advise on how this can be achieved
    Thanks for your help
    Regards
    Mohamed

    IMG-Financial accounting -GL account-Correspondence internal document-make and check setting for corespondence
    Pl check in the above the config has been done properly.
    Check whether you have created the request in F.61 prior to running F.27
    Hope the above helps u in resolving the issue.

  • Schedule line per customer with strategy 40

    Hello Forum,
    Is it possible to generate Schedule line per customer with strategy 40 ? 
    For instance for a product 'ABC' we have one vendor 'Z' and two customers 'LMN' and 'PQR'.
    When we are executing the MRP then SAP is generating schedule line for total demand and not individual per customer . Can we do it with strategy 40 ?
    Thanks

    Hello
    This is not possible with strategy 40.
    Check the following information provided on FAQ note 550568:
    Question:
    There are several requirements on one day. Is it possible that the MRP creates a separate procurement proposal for every requirement?
    Answer:
    Same as for the daily lot size with a number of periods = 1 (lot size TB), requirements of one day are also grouped into one procurement proposal for the lot-for-lot order quantity (lot size EX) (see documentation for the lot-for-lot order quantity). Separate procurement proposals can be achieved only if you work with make-to-order production. Here, the requirements are managed in separate planning segments of the stock/requirements list.
    You should try with an MTO strategy, such as 20.
    BR
    Caetano

  • Currencies Exchange rate per Customer

    Hi Experts,
    Is there anyway in SAP to maintain Currencies Exchange rate per Customer. For e.g. the customer's currency is EUR and my local currency is USD.
    Meaning we want to maintain a fixed exchange rate for that particular customer, so during creation of Sales Order, system take this fixed rate instead of taking FI - Currencies Exchange Rate table.
    Thanks,
    Kiran D

    Hi Kiran,
    Just check the Currency field available in the customer master Sales Area Data --> Sales tab. The currency maintained in this field is determined in Sales order.
    Hope it works.
    REWARD if it helps you!!
    Regards,
    Ajinkya

  • How to query opening balance for all customer or Vendor for an speci. date

    Hi,
    How to query opening balance for all customer or Vendor for an specific date?
    Example:
    put any date and query will show all customer/ Vendor  that date opening/current balance.
    Regards,
    Mizan

    Hi mizan700 ,
    Try this
    SELECT T0.[DocNum] As 'Doc No.', T0.[CardCode] As 'Customer Code',
    T0.[CardName] As 'Customer Name',(T0.[DocTotal]-T0.[PaidSys]) As 'O/S Balance'
    FROM OINV T0 INNER JOIN OCRD T1 ON T0.CardCode = T1.CardCode
    INNER JOIN OCRG T2 on T1.GroupCode = T2.GroupCode
    INNER JOIN INV1 T3 ON T0.DocEntry = T3.DocEntry
    WHERE T0.[DocStatus] ='O'
    AND
    (T0.[DocDate] >='[%0]' AND T0.[DocDate] <='[%1]')
    Regards:
    Balaji.S

  • ATP Check against customer stock for return Sale order

    Hi Friends,
    Pl.help in this.
    1. Is it possible to configure ATP check against Customer stock in a Sale order/Return order/any other way? ( Actuallly, client wants to take back empty cylinders through return sale order by ATP check against the customer stock)
    Regards,
    Mani

    Hi Mani ,
    Are you  taking cylinder as returable packing item or not?
    ex- For soft  drinks or beverages industry  it pretty common , they  use thel returnable package material type and more over why you want  use return sales order for this?
    Note- Just plz explain  scenario to MM and PP People also as availability check with all combination
    Hope it is helpful to you,
    Regards
    Venkat

  • 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

  • Issue check to customer

    Hi Gurus,
    I have a business scenario:
    Customer comes to store and picks up the items and pay the item.  I use F.13 to clear customer open items.
    When customer comes for exchange, customer returns item and pick ups another item i receive return sales order for the full amount and fresh sales order for new item. I have one credit memo and one invoice for that customer. But i get only net payment(either customer paid or we paid to customer) from my front end application to SAP. Customer balance is zero now. Technically Customer has not paid yet. We have policy  we issue check from HQ not from store. I can't use F110 or FCH5 or other mode of payments.
    Example: Sales order triggers delivery and billing immediately.
    Sales Order:$ 100
    Payment: $100
    F.13 cleared.
    ===========================
    Exchange
    Return sales order:$100
    No payment
    We have credit memo
    Fresh sales order
    SO: $ 60
    Payment $ 40(We paid to customer)
    There are 3 line items in customer:
    1. Credit memo $ 100
    2. Invoice $ 60
    3. Payment $ 40
    Balance is 0. But customer has not paid this $ 40 from store.
    Requirement:  We want to issue check to customer from SAP if i owe customer money. How can i achieve this?.
    Thanks in advance.
    Regards,
    Jagadeesan

    Resolved by myself...

Maybe you are looking for