Query for outgoing payment

Hi All,
         i need a report for the outgoing payment where i could display the account details, the doc remarks, row total and also the payment mode, whther by cash or by cheque. I have a query but i dont know how to get the mode of payment and also how to get the row total??
SELECT T0.[DocNum], T0.[DocDate], T1.[AcctName], T1.[Descrip], T0.[CashAcct], T0.[CheckAcct] FROM OVPM T0  INNER JOIN VPM4 T1 ON T0.DocEntry = T1.DocNum WHERE T0.[DocDate]  = [%0]
How do i get the row total and the mode of payment incorporated in the query? apart from the doc date, can i also get a selection criteria for the mode of payment as well?? Can anyone please suggest a better query??
Thanks in advance,
Joseph

Try this one to start:
SELECT T0.DocNum, T0.DocDate, T1.AcctName, T1.Descrip, T0.CashAcct, T0.CheckAcct, T0.DocTotal, CASE WHEN T0.CashSum > 0 THEN 'Cash' WHEN T0.CreditSum > 0 THEN 'CC' WHEN T0.TrsfrSum > 0 THEN 'WIRE' ELSE 'Check' END AS 'Mode'
FROM dbo.OVPM T0
LEFT JOIN dbo.VPM4 T1 ON T0.DocEntry = T1.DocNum
WHERE T0.DocDate = [%0\] AND T0.JrnlMemo != 'Cancelled'
Thanks,
Gordon

Similar Messages

  • Approval Query for Outgoing Payment

    Hi All Experts,
    I have to Create Approval for Outgoing Payment where payment means is Cash,Cheque or Bank Transfer but not Credit Card.
    In other words approval should be raised for all payment means other than Credit card payment means.
    For which I have Created Query as follows
    select Distinct 'true' FROM dbo.OVPM T0
    Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
    WHERE  T0.CreditSum=0 And T1.CreditAcct is null
    payments goes for approval but Credit Card payment also goes for Approval which is not required.
    Please Help me to Correct the Query.
    Regards,
    Gayatri Shukla.

    Hi,
    Little modification to your query. Try this.
    select Distinct 'true' FROM dbo.OVPM T0
    Left join dbo.VPM3 T1 on T0.DocEntry=T1.Docnum
    WHERE  T0.CreditSum = 0
    Regards,
    Amrut Sabnis.

  • Approver name for outgoing payment

    Hi Friends,
    I want a query for outgoing payment with the Username of the person who approved this and along with requester (originator) name .To print on crystal report one for requester name and other approved person  name.

    Hi Pradyuman,
    Please check below Query for Approver Name for Outgoing Payment.
    SELECT T3.U_NAME
    FROM OVPM T0
    INNER JOIN OWDD T1 on T0.DocEntry =  T1.DocEntry
    INNER JOIN  WDD1 T2 on  T1.WddCode  =  T2.WddCode
    INNER JOIN OUSR T3 ON T2.UserID = T3.USERID
    WHERE T2.Status  = 'Y' and  T1.ObjType  = 46 And T0.DocNum = $[OVPM.DocNum]
    Please try below Query for User Name for Login User.
    SELECT T0.U_NAME FROM OUSR T0 WHERE INTERNAL_K = $[USER] FOR BROWSE
    Please put above Two FMS in Two Different UDF to Get Result of above  FMS.
    Please also check below links.
    Approved by User name query
    Name of authorizers within an approval procedure
    Hope this helps
    Regards::::
    Atul Chakraborty

  • DI FOR OUTGOING PAYMENT(VENDOR) PAYMENT MEANS CHECKS

    Hi Experts,
    Can you give me a sample DI code for outgoing payments(vendor) through payment means on check. thanks
    Regards,
    Phoenix

    Hi Lucas,
    Are you trying to refund a customer or pay a supplier's invoice? If it's the latter then you need to use SAPbobsCOM.BoRcptInvTypes.it_PurchaseInvoice as the document type rather then it_Invoice.
    Kind Regards,
    Owen

  • What are the Transactions for outgoing payment ?

    Hi,
    i look for the transactions to use for outgoing payment for each payment method
    Please advise
    Regards.

    You need to add payment method (ZLSCH) as an additional selection item using T Code O7F1.  It will then appear as an addition selection in F-53 (post outgoing payment), when you select radio button 'Others' under Additional Selections.  You must be already aware that you can restrict automatic payment program (F110) to certain payment method(s).

  • Data Ownership for Outgoing payment document?

    Hi All
    How do I enable data ownership authorisations for outgoing payments window?
    Thanks
    SV Reddy

    Hi
    Read Below line
    The checkbox labeled Owner Filtering Active is a global flag to activate or deactivate data ownership authorizations for the entire company. Once this is activated, for all sales or purchasing documents and sales opportunities, access will be granted only if the user has a relationship to the owner and has the permission for that relationship either as Read Only or Full. In the case that a document or sales opportunity has no owner, then any user can access it as if no data ownership is in place. Any user can assign an owner to a document or sales opportunity that does not have an owner. Once an owner is assigned, only the owneru2019s manager or a superuser can change the owner.
    Excluded Forms Tab
    For each selected document, choose one of the filtering options:
    ·        No filtering: Data ownership is not active for this specific form irrespective of the owner fields at the header or line or stage.
    ·        By Header Owner Only: The document or sales opportunity is visible to the owner of the document and to all those users that have a defined relationship to the owner of the header and have the requisite permission for the specific relationship. The owner of any of the lines or stages will have no affect on providing access to the document or sales opportunity
    Kevin

  • Accounting Entry for Outgoing Payment

    Dear experts,
    I am currently doing PLD for outgoing payment.  Just want to know how I can include in the disbursement voucher I am doing the accounting entries for this.,  Example:
    Accounts Payable (Control Account)         20,000.00
         Cash in Bank MBTC  (GL account of the chosen Bank account)    20,000.00
    Thanks
    Sandra

    You may check this thread to have a reference:
    Re: Branch Code in a bank transfer summary report
    Thanks,
    Gordon

  • Why the Docentry and DocNum for Outgoing payment is same?

    Hi,
    I have define the numbering series for Outgoing payment , But while i created the outgoing payment document, in the backend the docentry and docnum values are same.
    Anyone have idea why its happened?
    i am using 2007 B
    Regards,
    Senthil Kumar

    Hi senthilkumar,
    That is the normal behavior in that table.
    Regards,
    Vítor Vieira

  • Query for Incoming Payments

    Hi Guys,
    I written a query for incoming payments  for some particular account heads and i have tried this.
    But did not achieved the  desired result.
    Anybody please modify the query.
    SELECT T1.[DocNum], T0.DocNum,  T0.AcctCode, T0.SumApplied,  T0.AcctName ,
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='355102'),
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='211417'),
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='355103'),
    (Select sum(SumApplied) from rct4 where T0.docnum = t1.docentry and T0.acctcode='211436')
    FROM RCT4 T0 
    Left outer  JOIN ORCT T1 ON T0.DocNum = T1.DocEntry INNER JOIN NNM1 T2 ON T1.Series = T2.Series
    WHERE T2.[SeriesName] ='Spares' and t1.docdate between [%0] and [%1]
    Regards,
    Vamsi

    Hi Vamsi,
    Try this:
    SELECT T1.DocNum, T0.DocNum,
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='355102') AS '355102',
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='211417') AS '211417',
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='355103') AS '355103',
    (Select SumApplied from rct4 where docnum = t1.docentry and T0.acctcode='211436') AS '211436'
    FROM RCT4 T0
    INNER JOIN ORCT T1 ON T0.docnum = T1.DocEntry
    INNER JOIN NNM1 T2 ON T1.Series = T2.Series
    WHERE T2.SeriesName ='Spares' and t1.docdate between [%0\] and [%1\]
    Thanks,
    Gordon

  • Approval procedure for Outgoing payment

    Dear all expert,
    I want to know how to make approval procedures for outgoing payment. So, everytime user create outgoing payment, it can't be printed until it's approved by Chief Acct. Where do i set this approval, because i see in the approval module, there is no  outgoing payment document.
    Thanks

    I have checked that, at least until 2007A version PL49 Outgoing payment has not yet added to Approval Template.  You may use SP Transaction Notification to block some users for posting.
    Thanks,
    Gordon

  • Stored Procedure for Outgoing Payment Approval

    Hi
    I am writing a stored procedure for Outgoing Payment (Draft) which is not validating my fields
    1.Outgoing Draft (Procedure Not Working)
       If @object_type = '140' and @transaction_type = 'A'
       begin
         if exists(select t0.DocEntry  from OPDF T0 inner join PDF4  T1 on
         T0.DocNum = T1.DocNum where t1.ObjType ='46' AND (T0.Series = '15' AND T1.OcrCode <> 'U-1')
         and T0.DocEntry = @list_of_cols_val_tab_del)
         begin
              set @error = 1
              set @error_message = 'Check Unit'
         end
       End
    Regards
    John
    Edited by: JohnSmith@B1 on Sep 9, 2011 4:49 PM

    John......
    Try this.....
    IF (@object_type = '140' And (Select ObjType From OPDF
           Where DocEntry = @list_of_cols_val_tab_del)='46'
    AND @transaction_type IN ('A'))
    BEGIN
    if exists(select t0.DocEntry from OPDF T0 inner join PDF4 T1 on
    T0.DocNum = T1.DocNum where t1.ObjType ='46' AND (T0.Series = '15' AND T1.OcrCode != 'U-1')
    and T0.DocEntry = @list_of_cols_val_tab_del)
    begin
    select @error = 1,
    @error_message = 'Check Unit'
    end
    End
    Above SP will only work when your Series Code is 15 and OcrCode is not equal to 'U-1'....
    Please confirm........
    And Object type for Payment Draft 140 is right.....
    Regards,
    Rahul

  • Query of Outgoing Payments Monthwise

    Hi Gurus,
    I have a written a simple query which gives me a summarized outgoing payment list group by vendor with date range. Query is working fine, now I want that report in monthwise (column) format from the given date range. Cau u help me how do I write this ...
    Select T0.CardCode, T0.CardName, T1.GroupCode,T2.GroupName, sum(T0.DocTotal) as 'Total Sum'
    from OVPM T0, OCRD T1, OCRG T2
    where T0.CardCode = T1.CardCode and T1.GroupCode =T2.GroupCode and T0.DocDate>=[%0] and T0.DocDate <=[%1]
    Group by T1.GroupCode, T2.GroupName
    What I want is : If I give Date range of  From 01-08-2011 to 31-10-2011 then the out come will be like as
    Group Name      August      September     October
    Group A              100               150              125
    Group B              200               150                0
    Group C              500               150               200
    Please help me find the way.
    Regards,
    SK

    Try this..
    select p.GroupCode,p.GroupName,
    sum([1]) as [Jan],
    sum([2]) as [Feb],
    sum([3]) as [Mar],
    sum([4]) as [Apr],
    sum([5]) as [May],
    sum([6]) as [Jun],
    sum([7]) as [Jul],
    sum([8]) as [Aug],
    sum([9]) as [Sep],
    sum([10]) as [Oct],
    sum([11]) as [Nov],
    sum([12]) as [Dec]
      from(Select
    T0.CardCode, T0.CardName,
    T1.GroupCode,T2.GroupName,
    (T0.DocTotal) as 'Total',MONTH(T0.Docdate)as month
    from OVPM T0, OCRD T1, OCRG T2
    where T0.CardCode = T1.CardCode and T1.GroupCode =T2.GroupCode
    and T0.DocDate>='[%0]' and T0.DocDate <='[%1]'
    )S
    PIVOT  (sum(Total) FOR [month] IN
    ([4],[5],[6],[7],[8],[9],[10],[11],[12],[1],[2],[3])) P
    group by p.GroupCode,p.GroupName
    ORDER BY P.[GroupCode]

  • Query For OutGoing Excise Invoice

    Hi Experts,
    I need to run areport for  OutGoingExcise Invoice.
    So pls give me a query to capture all the taxes related to that invoices like BED,EDCess,HECess. and VAT.
    Thanx in Advance,
    Regards,
    Vamsi.

    Hi Guys...
    Below is the query i used to run the report for OutGoing Excise Invoice.
    I need some modifications in this query.
    We are having two branches Branch1 and Branch2.
    While running the query we need to pay Excise duty for both the branches seperately,So i need to run a report for branchwise.
    So pls give me some solution.
    SELECT M.DocNum AS 'INV No. #', M.DocDate as 'Date', M.CardName as 'Customer Name',
    (Select Sum(LineTotal) FROM OEI1 L Where L.DocEntry=M.DocEntry) as 'Base Amt.(Rs.)',
    (SELECT Avg(TaxRate) FROM OEI4 where statype=-90 and DocEntry=M.DocEntry) as 'ED %',
           (SELECT Sum(TaxSum) FROM OEI4 where statype=-90 and DocEntry=M.DocEntry) as 'ED (Rs.)',
    (SELECT Avg(TaxRate) FROM OEI4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS %',
           (SELECT Sum(TaxSum) FROM OEI4 where statype=-60 and DocEntry=M.DocEntry) as 'EDCS (Rs.)',
    (SELECT Avg(TaxRate) FROM OEI4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS %',
           (SELECT Sum(TaxSum) FROM OEI4 where statype=-55 and DocEntry=M.DocEntry) as 'HECS (Rs.)',
    M.WTSum AS 'TDS (Rs.)',
    M.DocTotal as 'Total (Rs.)'
    FROM OOEI M LEFT OUTER JOIN OEI1 L on L.DocEntry=M.DocEntry
    LEFT OUTER JOIN OEI4 T on T.DocEntry=L.DocEntry and L.LineNum=T.LineNum
    LEFT OUTER JOIN OEI5 J ON M.DocEntry = J.AbsEntry
    LEFT OUTER JOIN OEI3 Q ON M.DocEntry = Q.DocEntry
    WHERE (M.DocDate >= '[%0]' AND M.DocDate <= '[%1]')  AND
    GROUP BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
    ORDER BY
    M.DocNum,M.DocDate,M.CardName,M.NumAtCard,M.DocEntry,M.DiscSum,M.WTSum,M.DocTotal
    Regards,
    Vamsi.

  • Creation of EDI 820 for outgoing payments in SAP

    Hi Experts,
    We have a requirement where in we need to create an outgoing  payment file in EDI820 with in SAP.
    We basically need to create specifications in EDI820 format for the bank to print checks and make wires and EFT payments.
    That EDI820 file will be created at the time of Automatic Payment Run(F110).
    Right now our client is sending a flat file to external service provider and they are creating EDI820 files and sending to the banks. Going forward the services of this service provider will be decommissioned and  an EDI820 file is to be generated in SAP and sent to the bank via SWIFT Net.
    Bank has provided us a sample file and file format for EDI820. This file format contains ST, BPR, RMR, REF etc records. There records have different codes and qualifiers.
    As far as we have analyzed, there are no standard SAP programs that can generate flat file in the EDI 820 format. Therefore we are heading towards developing a Z program for creating an EDI820 format.
    We are facing problem in mapping this file with SAP fields. We need to know how exactly we can map this file in SAP so as to create a program to generate EDI820. If anybody has had a similar requirement (for creating outbound EDI820 in SAP) and can provide us some lead, it will be greatly helpful for us.
    Thanks in advance for the help!

    Have you worked on this requirement?
    Could you please provide step by step instructions to configure and the high level process?

  • Creation of EDI 820 fromat for outgoing payments in SAP

    Hi Experts,
    We have a requirement where in we need to create an outgoing  payment file in EDI820 with in SAP.
    We basically need to create specifications in EDI820 format for the bank to print checks and make wires and EFT payments.
    That EDI820 file will be created at the time of Automatic Payment Run(F110).
    Right now our client is sending a flat file to external service provider and they are creating EDI820 files and sending to the banks. Going forward the services of this service provider will be decommissioned and  an EDI820 file is to be generated in SAP and sent to the bank via SWIFT Net.
    Bank has provided us a sample file and file format for EDI820. This file format contains ST, BPR, RMR, REF etc records. There records have different codes and qualifiers.
    As far as we have analyzed, there are no standard SAP programs that can generate flat file in the EDI 820 format. Therefore we are heading towards developing a Z program for creating an EDI820 format.
    We are facing problem in mapping this file with SAP fields. We need to know how exactly we can map this file in SAP so as to create a program to generate EDI820. If anybody has had a similar requirement (for creating outbound EDI820 in SAP) and can provide us some lead, it will be greatly helpful for us.
    Thanks in advance for the help!

    The program that sends the flat file should give you all the necessary fields, selection criteria, etc.  If the third-party constructs EDI820 from it, then there is enough data in that file for you to add steps to create an 820. 
    So, I'd start with the existing program, a particular outbound file and a copy of the 820 file created from it (if that can be obtained) and figure out how the intermediary converted the data to the correct format.  Piece of cake, right?

Maybe you are looking for

  • Adding a new field to an existing BDoc.

    I posted this message in other forum, but I think the correct one is this. I need to add a new field to bdoc BUS_TRANSACTION_MESSAGE, so I've added a field to structure BAD_BUS_TRANSN_MESSAGE, to the substructure PRODUCT_I. What I need to know is how

  • IMac G4 will not start up from OS disk to upgrade

    I am trying to upgrade the OS in a G4 iMac, the OS disk is recognized, am asked to restart, but it will not restart from the OS 10.5 disk.

  • Exporting events in iphoto

    Hi - I am running the 2011 version of Iphoto (version 9.2.3) off Snow Leopard and have had iphoto crash twice in the last year.  The last time, I had to bring my data in to get recovered.  Now, I'm trying to get save all my photo by event folders ont

  • Icloud difficulty

    i got my iphone 4s replaced today, my music is not appearing on my phone from the icloud? what do i do?

  • Invalid ID tags

    Help - when exporting photo files (TIFFS) from Lightroom 3 in Adobe Elements (10) Organiser a message flashes on screen stating 'watched folder - invalid ID tags' the imported images then appear in Organiser as an hour glass only. I've imported 1000'