AccountCode in Incoming Payment

Hi,
How can i retrieve AccountCode in Incoming Payment using SQLQuery?
Plese help..

Try following:
SELECT T0.DocNum, T0.DocDate, T0.CardCode, T0.CardName,
     CASE WHEN T0.CashSum > 0 THEN 'Cash'
     WHEN T0.CreditSum > 0 THEN 'Credit Card'
     WHEN T0.CheckSum > 0 THEN 'Check'
    WHEN T0.TrsfrSum > 0 THEN 'Bank Transfer'
     END AS ReceiptType,
     CASE WHEN T0.CashSum > 0 THEN T0.CashAcct
     WHEN T0.CheckSum > 0 THEN T0.CheckAcct
    WHEN T0.TrsfrSum > 0 THEN T0.TrsfrAcct
     END AS Account
FROM ORCT T0
But, in case where same incoming payment has received payment from more than one mode, than this will be wrong.
Second thing is the credit card account is saved in some other table. Will check it and let you know later.
Rahul

Similar Messages

  • Adding Journal Entry  throgh Incoming Payments,

    Hi Friend,
                  I need Help ....
    I need to create a journal entry using incoming payment. I have different types of deduction Accounts. All deductions need to display in  journal entry and also its reflect in Invoice.Then only invoice going to close.
    Dim junEntry As SAPbobsCOM.JournalEntries
    Ex :-
    :::::Journal Entry::::::
    *Account Code/BpName*                *AccountName*          *DR*            *CR*
    620005                                Deduction1            10      
    620006                                Deduction2           100
    620007                                Deduction3           100
    620008                                Deduction4           115
    620009                                Deduction5            10
    6200010                              Deduction6             10       
    6200011                         Cash Recived               655             1000
                                                              1000             1000 
            Dim decDebi As Decimal = 0
            Dim dtCount As Integer = dtDataTable.Rows.Count - 1
            junEntry = objAddOnCentral.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
            junEntry.Memo = strBpCode
            junEntry.ReferenceDate = Now.Date
            For intLoop = 0 To dtDataTable.Rows.Count - 1
                junEntry.Lines.AccountCode = dtDataTable.Rows(intLoop)("Account").ToString()
                junEntry.Lines.Debit = dtDataTable.Rows(intLoop)("Amount").ToString()
                decDebi += CDec(dtDataTable.Rows(intLoop)("Amount").ToString())
                junEntry.Lines.Add()
            Next
            junEntry.Lines.ShortName = strBpCode.Replace("Incoming Payments", "")
            junEntry.Lines.Credit = decDebi
            junEntry.Lines.Add()
            intErrCode = junEntry.Add()
            If intErrCode <> 0 Then
                objAddOnCentral.objApplication.StatusBar.SetText("" & objAddOnCentral.objCompany.GetLastErrorCode & " " & objAddOnCentral.objCompany.GetLastErrorDescription & "", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error)
                Return False
            End If

    Hi,
    I thing no need addon once u add incoming payment automatically invoice will close and JE also will pass.
    Regards,
    Siva

  • Add Invoice with Payment Terms set 'Open Incoming Payment' = Cash - with DI

    Hi,
    I have this type of problem: I have defined a Payement Terms (Payment Terms - Setup) and I have set the field 'Open Incoming Payment' = Cash.
    In this way, when I create an Invoice and I put this 'Payment Terms' in Accounting Label, when I Add the Invoice, Sap open the 'Payment Means' form, and I must set the Total Cash of the payment. I set this field, click Ok, and then I'm able to Add the Invoice (and his Payment).
    If I try to do this operation with DI API, when I call .Add() method, I retrieve this error: "Invoice & receipt must be paid exactly  [OINV.GroupNum]". There is a method or property in SAPbobsCOM.BoObjectTypes.oInvoices that I must set to do automatically this operation?
    What can I do this???
    Thank you
    Marco

    Hi Niall,
    yes, I have set the property vInvoice.PaymentGroupCode = 2 , infact i retrive the error.
    If i try to set PaymentGroupCode = 1 or PaymentGroupCode = 3 (other 'normal' Payments Terms), my procedure work correctly, and the Invoice are added.
    If I try to set PaymentGroupCode = 2, i retrieve the error.
    This is my simple code:
                        vInvoice.Series = 26
                        vInvoice.CardCode = "C0001"
                        vInvoice.HandWritten = SAPbobsCOM.BoYesNoEnum.tNO
                        vInvoice.DocDate = "10/01/2009"
                        vInvoice.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Service
                        vInvoice.PaymentGroupCode = 2
                        vInvoice.Lines.AccountCode = "11005010"
                        vInvoice.Lines.Quantity = 1
                        vInvoice.Lines.Currency = "Eur"
                        vInvoice.Lines.Price = 110
                        ret = vInvoice.Add()
                        If ret <> 0 Then
                            myDB.GetLastError(errCode, errMsg)
                            myapp.SetStatusBarMessage(errMsg, SAPbouiCOM.BoMessageTime.bmt_Medium, True)
                        End If
    Thank
    Marco

  • Incoming Payment Error(-2028) Data source - No data found, pls help me

    Dear friend,
    Im struggle in Adding Incomming Payment, I got -2028 Error msg,
    DATA SOURCE – NO DATA FOUND pls help me to solve
    Its My code
    Public Sub incopay(ByVal oform As SAPbouiCOM.Form)
            Dim incom As SAPbobsCOM.Payments
            Dim value As Integer
            Dim strerror As String
            Try
                Dim rset As SAPbobsCOM.Recordset
                oitem = oform.Items.Item("om")
                oedit = oitem.Specific
                vfd1 = oedit.String
                incom = ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
                incom.AccountPayments.AccountCode = acc
                incom.AccountPayments.AccountName = accn
                incom.AccountPayments.Decription = "deposit"
                incom.AccountPayments.SumPaid = vfd1
                'incom.CardCode = "C1"
                'incom.CardName = "Shama Broadcast Contents & Services (P) Ltd."
                incom.DocDate = Now
                incom.DueDate = Now
                incom.TaxDate = Now
                incom.DocCurrency = "INR"
                incom.Reference2 = 2
                incom.JournalRemarks = "Incoming Payments - 161020"
                'incom.AccountPayments.Add()
                'value = incom.Add
                incom.CheckAccount = "102020"
                incom.Checks.DueDate = Now
                incom.Checks.CountryCode = "IN"
                incom.Checks.BankCode = "HDFC"
                incom.Checks.Trnsfrable = SAPbobsCOM.BoYesNoEnum.tNO
                incom.Checks.CheckSum = 100
                incom.Checks.Add()
                incom.AccountPayments.Add()
                value = incom.Add
            Catch ex As Exception
                oapp.MessageBox(ex.Message)
            End Try
            ''incom.AccountPayments.Add()
            ''value = incom.Add()
            If value <> 0 Then
                ocompany.GetLastError(value, strerror)
                MsgBox(value & "   " & strerror)
            End If
        End Sub
    Regards,
    Hempradeep.S

    Hi Hempradeep,
    I haven't tried executing your code, but suggest that you try and solve it with elimination. This means you make your code shorter and shorter until it posts.
    So firstly take out the account payment and the check payments and just do a cash payment and see if it posts. If it posts then you gradually add the code you hade previously until it gives you that error again.
    That error you got can be because of many reasons. It could be that the cardcode, gl account, currency, etc, etc, etc does not exist. It could be because of any data you specify from another table does not exist or does not relate to this object. Like when you're posting to a customer and you actually specify a supplier (just an example and not your problem).
    Start with a very basic incoming payment and work your way up to the code you've got there now.
    Good luck,
    Adele

  • Incoming payment by F-28: Reason code error while posting

    Hello everyone,
    I want to post Incoing Payment using F-28 net of TDS. I want the separate GL account to be picked up automatically for the difference when I enter the Reason Code 003.
    I did the following customization for the same.
    1. Financial Accounting> Accounts Receivable and Accounts Payable> Business Transactions>Incoimng Payments> Incoming Payments Global Settings>Overpayment/Underpayment> Define Reason Codes:- Here I selected the Indicator 'C' for reason code 003 which is for "Indicator: Charge off difference via separate account". The reason code 003 is for TDS Netted
    2. Below the Define Reason Code node, I selected the node 'Define Accounts for Payment Differences' . Selected the key ' Rules' and selected the checkbox 'Reason Code'. Then clicked on 'Accounts' and enetered the desired GL account against the reason code '003'.
    After doing the above customization I posted the Incoming payment using T code F-28. I entered the difference in the field 'Difference Posting'. Then entered reason code '003' which is for 'TDS netted' in the field 'Reason Code'. Now, I am getting the follwoing error.
    Reason codes with automatic charge-off are not permitted here
    Message no. F5605
    Diagnosis
    The reason code entered is designed to ensure that the payment difference amount is posted to an account specially set up for this purpose.  Postings of this nature usually require additional specifications (e.g. tax code, business area). If the difference stems from a single open item, the necessary specifications can be taken from that item. In the case that led to this error message, however, the difference does not stem soley from one item, which means that this method cannot be used.
    System Response
    The reason code entered is not accepted.
    Procedure
    You can either select a different reason code, which would create a new open item for the customer or vendor OR write off the difference using the function Charge off diff.. This function either takes you into a pre-configured account assignment model or into the document overview. From here you can enter the required difference postings.
    How can I proceed ahead?
    Thanks and Regards,
    Pradnya

    Hi Saulo,
    Thanks for ur reply.
    I had alreay done the config in OBXL and OBBE. Only thing I wanted to know is while posting Incoming Payment by F-28, how to use this reason code.
    Ur reply was a gr8 help for me.
    Regards,
    Pradnya

  • Background Journal entry for Incoming payment

    Dear Experts,
    Would you please help me in how to get the journal entry for an incoming payment entered as "payment on account".
    The relationship map does not show this, but I can see the credit entry for the customer is passed.
    same happens for incoming payment made for specific AR invoices.
    SAP Doc says...
    Result
    An incoming payment document is created.
    A journal entry that credits the customer and the tax accounts (if tax is involved), and debits the receivable account, is created.
    The journal entries of the incoming payments and the paid invoices are reconciled.
    The paid invoices are closed; they no longer appear in the Open Items list and in the Incoming Paymentswindow as documents for payment.
    So how to check the journal entries for incoming payments.
    Regards
    Message was edited by: Suman Roy

    Hi,
    To see journal entry, drill down arrow at transaction no of incoming payment window.
    Thanks & Regards,
    Nagarajan

  • Clearing issue Incoming payment due to Cash discount ( customers)

    Hello,
    During processing automatic incoming payments the system don't clear the customer open item in case the customer has taken a cash discount.
    The clearing should be done automatically in the posting area 2 but now the the user needs to do manual interventions in the FEBAN in order to clear the customer
    We checked the payment terms and verified the discount taken by the customer and they are ok
    After investigation we guess that the original SD invoice don't send the Discount amount and Discount base amount to FI, because  we saw that those fields are empty in the FI document (RV),
    Also in Billing the Cash discount base field in empty...
    When i tried to create a manual customer invoice those fields are well filled in and the system clears the customer open item perfectly !
    Any one an idea how to fix it ?

    Hello,
    Thanks for your feedback but the issue is not solved.
    Is there difference in clearing behaviour in case the open item posting is orginated from  a SD invoice ( Billing) because as stated before, when I make a FI sales invoice (FB60) the system perfectly accepts the cash discount and post and clears in postingarea 2
    Also when I consult the open item position (FBL5N) the cash discount amount field is empty which is not the case when I post an FB60 invoice
    Summarized
    We are usiing the automatic bank statement program ( FEBC), during posting the system post perfectly posting area 1 (FEBP) but fails the post postingarea 2 ( the system makes a payment advice) the message the system generates ' Difference to large for clearing F5263'
    Many thanks for help

  • Invoice details in Incoming Payment

    Dear All,
    we are making incoming payment against invoice. In Pld for incoming payments i want details of invoice (Invoice Number and Invoice Amount) against which receipt entry is made.
    Ex:
    Account Code...........Account Name......................................................Amount
    A0001.....................ABC
    ..............................Invoice Number 12..................................................1000  
    .....................................................13..................................................1500
    and so on ...
    I have tried in PLD but not able to get the OINV table in PLD. Is there any other option to get this details.
    Swapnil
    Edited by: SWAPNIL PATIL on Mar 20, 2009 9:50 AM

    Dear Friend,
    Which query u sended that working fine for Incomeing Payments. But ih this ur matching
    T1.DocEntry = T2.DocEntry. Means suppose in Income Payment entry there is no Invoice entry then it is not showing. But i want to show that entry also. Please refer the following formatt.
    SELECT T0.DocNum, T0.DocDate, T0.CardCode,T2.DocNum,   T1.SumApplied FROM [dbo].[ORCT]  T0 INNER JOIN RCT2 T1 ON T0.DocNum = T1.DocNum INNER JOIN OINV T2 ON T1.DocEntry = T2.DocEntry
    Formatt:
    Account Code...........Account Name......................................................Amount
    A0001.....................ABC
    ..............................Invoice Number 12..................................................1000
    .....................................................13..................................................1500
    and so on ...
    .................................................................................Total...................2500
    In that suppose Invoice not available in that then Total is not showing. But i want to show Total for Incomeing Payment. Can u plz tell me how to solve that proble.
    Swapnil

  • Billing Doc. No in Incoming payment.

    Dear Gurus,
                 I made a sales document in SD module say "12345" and the billing doc. no as "123" for customer "xyz" for amount "1000".
    I receive payment via- T.code f-28 for this customer for exact amount. My query is when I check the ledger in FBL5N for this customer it is not showing billing doc. no"123" for the incoming payment (doc.type "ZP" ),however it is showing billing doc. for sd document . Kindly guide . Also is there any way to view customer ledger via billing document no. For ex. how much payment due?Please guide

    Payment document can be posted based on the accounting document.
    If you want you can maintain invoice number in reference field, also there is one option to make reference field mandatory.
    In OBA7 activate reference document number as mandatory for the document type DZ. So, while doing the transaction in F-28, value should be mandatory to this field.
    If maintain invoice value in reference field, then you can do sorting and totaling based on the reference field in FBL5N.
    there are no standard reports to check the outstanding amount based on the invoice number.
    Rgds
    Murali. N

  • FI-CA Incoming Payment

    Hi,
    In PSCD, when you post an incoming payment (transaction FP05), do you have to have FM account assignment for Cash line item?
    We recently upgraded our system from 4.71 to ECC 6.0.
    In 4.71, when we post incoming payment, there is no FM account assignment for Cash line item. System splits the cash line item based on the FM assignment on the offsetting Business Partner line items at the time of Forward posting the document to FI in Special Purpose Ledger document.
    Currently in ECC 6.0, since system is looking for valid FM account assignment for Cash line item, I assigned some general fund. As a result of this, additional line items were generated using Fund Clearing account to balance the document by FM assignments. This has 2 negative impacts:
    a. Extra line items (Fund Clearing account) are generated in PSCD document.
    b. Cash account balance is not available by "True" funds.
    I would appreciate if someone can send some info on this topic.
    Regards,
    Suresh

    Hi James,
    What I could gather from your post is that you are concerned only about the creation of a file in ACH format for check payments which are being posted in to SAP as payment lots.
    So, the ACH file that gets created during the FPY1 run is actually done by a standard program SAPFKPY3 with the help of preconfigured FM's linked to the ACH payment medium format.
    You can view these FMs by going to Transaction Code-FQP3. Select in the ACH format and clicking on "Event Module for Payment medium formats".
    Now coming to your requirement, all the payment information related to the payment lots are stored in DFKKZP table at the item level and at DFKKZK at header level.
    So you can develop a program which retrieves the information from these tables as per the business requirements in a structure accepted by the std program SAPFKPY3.
    You need to develop new FM's which will retrieve the information and would create the a flat file in ACH format.
    You need to take care of the scenario where  the check payment in the payment lot is not actually hitting the account, but is getting routed to the payment clarification worklist. It will depend on the business requirement  whether these scenarios are to be included in the ACH file or not.
    Hope it helps...
    Thanks,
    Amlan

  • Sample for A/R invoice and Incoming Payment

    Hi,
    Have any samples for create A/R invoice and incoming payment by SDK?
    Which related tables are used?
    Thanks!
    Regards,
    On

    On,
    If you look at the SDK Help Documentation, specifically at the Documents, Document_Lines and Payments Objects for the DI API, the help discusses the tables involved as well as gives samples of common documents.
    Eddy

  • Create A/R Invoice and Its Incoming Payment using DI Server

    Hi Everyone,
    I need to create an A/R Invoice and its payment in a sigle transaction using DI Server. The problem is that I don't know the DocEntry that will be assigned to the invoice in order to set it in the SOP message for creating the incoming payment.
    I guess the SOAP message should look like:
    <?xml version="1.0" encoding="UTF-16"?>
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header>
      <SessionID>F46EDCE6-3F79-1F9F-1D1E-DC6226D04FA7</SessionID>
    </env:Header>
    <env:Body>
    <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add invoice">
      <BOM>
       <BO>
        <AdmInfo>
         <Object>oInvoices</Object>
        </AdmInfo>
        <Documents>
         <row>
          <DocDate>20040707</DocDate>
          <DocDueDate>20040707</DocDueDate>
          <CardCode>BP</CardCode>
         </row>
        </Documents>
        <Document_Lines>
         <row>
          <ItemCode>Item1</ItemCode>
          <Quantity>3</Quantity>
          <TaxCode>My Tax</TaxCode>
         </row>
        </Document_Lines>
      </BO>
      </BOM>
      </dis:AddObject>
      <dis:AddObject xmlns:dis="http://www.sap.com/SBO/DIS" CommandID="Add Incoming Payment">
      <BOM>
       <BO>
        <AdmInfo>
           <Object>oIncomingPayments</Object>
        </AdmInfo>
        <Payments>
           <row>
               <CardCode>BP</CardCode>
               <DocTypte>rCustomer</DocTypte>
           </row>
       <Payments>
       <Payments_Invoices>
            <row>
                 <DocEntry>???</DocEntry> <---- ???
                 <InvoiceType>it_Invoice</InvoiceType>
                <SumApplied>100</SumApplied>
            </row>
       </Payments_Invoices>
       </BO>
      </BOM>
    </dis:AddObject>
    </env:Body>
    </env:Envelope>
    Any help?

    Dear Hugo Moreno,
    You could use the GetNewObjectCode Method of the Company Object to retrieves the key of the last added record.
    Please refer to SDK DI API help for this method.
    Best Regards
    Jane Jing
    SAP Business One Forums team

  • Incoming payment rows details in Crystal report

    Hi Xperts
    I want to create Payment Advice print layout in Crystal Report.  Can anybody tell me which table is related Incoming payment Row wise details in SAP.
    I need following Details in SAP (Row Details)
    Document No,  Document Date, Document Total
    Any body help me out regarding this
    Thanks
    Balaji

    Hi Balaji,
    Check this link.
    [Crystal Generic samples from SAP|https://websmp204.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000635012009E&]
    It consists of most of all the documents in SAP.
    Hope this helps.
    Regards,
    Bala

  • 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,

  • Error : FZ010 : Enter a payment method for incoming payments

    Hi,
    I am running F110 and paying intercompany vendors/customers.
    I am running payment run for Compony 0050 and paying my vendor VEND0060 and CUST0060.
    The balance of vend0060 is 2 million(credit) and  balance of CUST0060 is 1 million (Debit).
    So I am going in Reallocate and changing the bank details as getting exceptioin in CUST0060. But it gives out an error "Enter Payment method for incoming payments"
    We have just configured outgoing payment and actually as credit balance is more, it should not give this error.
    Does any one know solutin for this?
    Error in details:
    Enter a payment method for incoming payments
    Message no. FZ010
    Diagnosis
    The balance of the items to be paid requires a payment method for incoming payments. You specified a payment method that is defined for outgoing payments.
    System Response
    The payment method is rejected.
    Procedure
    Enter a payment method for incoming payments.
    Thanks
    JR

    In the master record of the customer/vendor, ensure that the appropriate payment methods are maintained.  If you click on F4 on the payment method field, you can see different methods available for Incoming Payments and different methods for Outgoing payments.
    Assign points accordingly.
    Thanks,
    Madhav Nanduri

Maybe you are looking for

  • Word processing app for macbook air

    Whats the best app to get for essay writing for the Macbook air?? I need something with a spell checker and word count facility and obviously user friendly when I upload the essay to submit electronically, Thanks

  • Can i use apple computer to place phone call?

    can i use apple computer to place a phpne call?

  • Starting a fcs post production business ?

    Hi, I have been a freelancer fcp editor for 5 years- I have an edit suite at home but most of my work is for post house's & direct clients & find myself now looking at the possibility of starting my own edit suites for hire. Does anyone here have any

  • Useful list of the Freeview channels as of 1st OCt

    A useful list of the Freeview channels as of 1st OCt is at http://www.freeview.co.uk/wp-content/uploads/2014/​10/Freeview-Channel-Guide_1-Oct.pdf Of course it gets quickly outdated ... eg when ITV Be starts on channel 26 on 8th OCt. However it does l

  • Jdb problem ?

    Hello , After a java out of memory error which occurred because my application was trying to read a huge BufferedImage that has a dimension of about 9000X9000 runing on a 512mb jvm. Now when ever i run the jdb.exe to test the application the jvm cras