Incoming Payment add in sequence via SDK

Hi guys,
I want to use the SDK to add an incoming payment based on an invoice. It will only be a partial payment however and I want to pay the invoice in the same way that the "Add In Sequence" button works. I do not want the invoice to close until it is paid in full.
Can anyone help?

Hello
Pay in Sequnece is a business logic, you must code the same  logic as B1 client uses.
Of cource it is possible. I am sure, until the invoice not fully payed, the sap b1 internal reconsiliation engige will not close the sales invoice, os it will stay opened automatically. (not payed totally, you will see the reaining amount when you open the invoice via B1 client).
logic should be coded:
1. get the payment anoumt and customer
2. get open  of the customer and sort them by date (sequnece based on date).
here you mayuse a query based on jdt1 (balduedeb and balduecred are the fields holding the open amount of a transaction, ie unpayed amount of the incoive or a Journal entry)
select * from jdt1 where shortname = 'cardcode' and balduedeb-balduecred != 0
3. issue the payment object, until the payment amount is fit wiht the selected open items amount.
Regards
János

Similar Messages

  • Add EmployeeInfo Record via SDK

    Trying to add an EmployeeInfo record with SDK, set First and Last Names which are mandatory fields, but add fails with message saying userid is not set.
    I need to add records without a userid, does anyone know how?

    Hi Andrew,
    I have tested your code in my environment and it still succeeds. I'm also using UK Demo database.
    I have not changed anything in your code... here's the code I executed. Are you declaring your eEmpRecordSet variable the same as mine? Please write down the exact error message.
                Dim lErrCode As Integer
                Dim sErrMsg As String
                Dim oEmpRecordSet As SAPbobsCOM.EmployeesInfo
                oEmpRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oEmployeesInfo)     '171
                'write
                With oEmpRecordSet
                    .FirstName = "Unknown"
                    .LastName = "Unknown"
                    lErrCode = oEmpRecordSet.Add
                    If lErrCode <> 0 Then
                        oCompany.GetLastError(lErrCode, sErrMsg)
                        MsgBox(sErrMsg, , "SAP HR Link")
                        Exit Sub
                    Else
                        MsgBox("successful")
                    End If
                End With
    Thanks,
    Adele

  • INCOMING PAYMENT  ISSUE

    I need to post Incoming Payment for a customer via SDK.
    This case I have to select all transaction like ( AR INVOICE , ADVANCE AMOUNT IN INCOMING PAYMENT, CREDIT JE ,DEBIT JE ,OUTGOING PAYMENT,A/R DOWN PAYMENT , A/R CREDIT MEMO )
    ERROR CODE is: BASE DOCUMENT ENTRY AND TARGET DOCUMENT ENTRY DOES NOT MATCH
    i need some explainable about doc-line concept , where and in which case  we have to give docline property
    Thanks in Advance

    Dear Jaykumar / Tausif,
    In AR customer ref no. set one FMS like  (Copy sequence in Customer Ref no.) and fetch your Sequence number in your customer ref no.
    its sole your incoming payment issue problem and agging reports also.
    Try its manually first and let me know.
    Regards
    Mangesh Pagdhare
    Edited by: MANGESH  PAGDHARE on Aug 4, 2011 7:22 AM

  • How to import Incoming Payments via DTW

    Hello all,
    I am importing opening balances for Customers via DTW.  My client wants to import all the open Invoices at their original amount, and then import the incoming payments against them to have them net out to the correct remaining balance.  I already know how to import the invoices.  I'm looking at using the PaymentDrafts template in DTW for the Incoming payments but I could use some guidance.  Can anyone provide and example of the data required to both import the incoming payments and apply them to the appropriate AR Invoice?
    Thanks,
    don shields

    hi donald,
    Check this link to resolve ur doubts.
    Import Incoming Payments with DTW
    Import Incoming Payments with DTW
    also check this SAP Note
    Note 1162513 - How to link an Incoming Payment to an Invoice via the DTW
    Jeyakanthan
    Edited by: Jeyakanthan A on Apr 30, 2009 10:31 PM

  • Can We enter Sales Invoice and Incoming Payment VIA SDK

    Dear Experts
    We have to develop an integration bridge with retrieve data from excel sheet and upload in SAP , i want to clear is it possible to enter sales invoices and incoming payment via SDK?. If it is possible please guide me about objects name and any reading material for SDK development.
    Thanks

    Hello,
    Yes it is possible with 2 steps:
    1. you post the invoice
    2. you post the payment
    I have already posted into the forum several examples, you may check them:
    For invoice + payment
    for payment only:
    Regards
    János

  • How to do an incoming payment based on journal entry whit SDK ?

    Hello
    Somebody have the code for SDK of Business One,  how  to do an  incoming payment based on journal entry?
    Tks

    Hello Julio,
    Here some example code from the SDK helpfile.
    Private Sub cmdTest_Click()
       On Error GoTo ErrorHandler
       Dim vCompany As SAPbobsCOM.Company
       'create company object
       Set vCompany = New SAPbobsCOM.Company
       'set paras for connection
       vCompany.CompanyDB = "SBODemo_US"
       vCompany.Password = "manager"
       vCompany.UserName = "manager"
       vCompany.Server = "(local)"
       'connect to database server
       If (0 <> vCompany.Connect()) Then
          MsgBox "Failed to connect"
          Exit Sub
       End If
       Dim nErr As Long
       Dim errMsg As String
       'Set the object's properties
       Dim vPay As SAPbobsCOM.Payments
       Set vPay = vCompany.GetBusinessObject(oIncomingPayments)
       vPay.Address = "622-7"
       vPay.ApplyVAT = 1
       vPay.CardCode = "D10006"
       vPay.CardName = "Card D10004"
       vPay.CashAccount = "288000"
       vPay.CashSum = 0
       'vPay.CheckAccount = "280001"
       vPay.ContactPersonCode = 1
       vPay.DocCurrency = "Eur"
       vPay.DocDate = Now
       vPay.DocRate = 0
       vPay.DocTypte = 0
       vPay.HandWritten = 0
       vPay.JournalRemarks = "Incoming - D10004"
       vPay.LocalCurrency = tYES
       vPay.Printed = 0
       vPay.Reference1 = 8
       vPay.Series = 0
       vPay.SplitTransaction = 0
       vPay.TaxDate = Now
       vPay.TransferAccount = "10100"
       vPay.TransferDate = Now
       vPay.TransferSum = 0
       vPay.Invoices.AppliedFC = 0
       vPay.Invoices.AppliedSys = 0
       vPay.Invoices.DocEntry = 8
       vPay.Invoices.DocLine = 0
       vPay.Invoices.DocRate = 0
       vPay.Invoices.InvoiceType = 13
       vPay.Invoices.LineNum = 0
       vPay.Invoices.SumApplied = 5031.2
       Call vPay.Invoices.Add
       Call vPay.Invoices.SetCurentLine(1)
       vPay.Invoices.AppliedFC = 0
       vPay.Invoices.AppliedSys = 1089.65
       vPay.Invoices.DocEntry = 11
       vPay.Invoices.DocLine = 1
       vPay.Invoices.DocRate = 0
       vPay.Invoices.InvoiceType = it_Invoice
       vPay.Invoices.LineNum = 1
       vPay.Invoices.SumApplied = 1000
       vPay.CreditCards.AdditionalPaymentSum = 0
       vPay.CreditCards.CardValidUntil = CDate("10/31/2004")
       vPay.CreditCards.CreditAcct = "295000"
       vPay.CreditCards.CreditCard = 3
       vPay.CreditCards.CreditCardNumber = "884848448"
       vPay.CreditCards.CreditCur = "EUR"
       vPay.CreditCards.CreditRate = 0
       vPay.CreditCards.CreditSum = 5031.2
       vPay.CreditCards.CreditType = 1
       vPay.CreditCards.FirstPaymentDue = CDate("11/29/2002")
       vPay.CreditCards.FirstPaymentSum = 5031.2
       vPay.CreditCards.LineNum = 0
       vPay.CreditCards.NumOfCreditPayments = 1
       vPay.CreditCards.NumOfPayments = 1
       vPay.CreditCards.OwnerIdNum = "3993939"
       vPay.CreditCards.OwnerPhone = "383838888"
       vPay.CreditCards.PaymentMethodCode = 1
       Call vPay.CreditCards.Add
       Call vPay.CreditCards.SetCurentLine(1)
       vPay.CreditCards.AdditionalPaymentSum = 0
       vPay.CreditCards.CardValidUntil = CDate("10/31/2004")
       vPay.CreditCards.CreditAcct = "295000"
       vPay.CreditCards.CreditCard = 3
       vPay.CreditCards.CreditCardNumber = "884848448"
       vPay.CreditCards.CreditCur = "EUR"
       vPay.CreditCards.CreditRate = 0
       vPay.CreditCards.CreditSum = 1000
       vPay.CreditCards.CreditType = 1
       vPay.CreditCards.FirstPaymentDue = CDate("11/29/2002")
       vPay.CreditCards.FirstPaymentSum = 1000
       vPay.CreditCards.LineNum = 1
       vPay.CreditCards.NumOfCreditPayments = 1
       vPay.CreditCards.NumOfPayments = 1
       vPay.CreditCards.OwnerIdNum = "3993939"
       vPay.CreditCards.OwnerPhone = "383838888"
       vPay.CreditCards.PaymentMethodCode = 1
       If (vPay.Add() <> 0) Then
           MsgBox ("Failed to add a payment")
       End If
       'Check Error
       Call vCompany.GetLastError(nErr, errMsg)
       If (0 <> nErr) Then
           MsgBox ("Found error:" + Str(nErr) + "," + errMsg)
       Else
           MsgBox ("Succeed in payment.add")
       End If
       'disconnect the company object, and release resource
       Call vCompany.Disconnect
       Set vCompany = Nothing
       Exit Sub
    ErrorHandler:
       MsgBox ("Exception:" + Err.Description)
    End Sub
    HTH Regards Teun
    Edited by: Teun Aben on Aug 4, 2010 9:00 PM

  • Use of Add in Sequence in payments

    Can someone please clarify the difference between "Add" and "Add in Sequence" for incoming/outgoing payments? Thank you.

    Allen,
    Add and Add in Sequence are completely 2 different things.
    Add is to Add the Incoming Payment.
    Add in Sequence is an automatic way to apply payment to the Invoices in the Sequence of their display order.
    Example
    Invoice No...........Balance Due.....................Total Payment
    100......................300.00.................................300.00
    101......................200.00.................................200.00
    102......................150.00.................................150.00
    103......................250.00.................................250.00
    In the above case if the Customer Pays 550.00 and the normal process would be to enter 300.00 on the first, 200.00 on the second and 50.00 on the third invoice manually.  (presuming you want to apply the payments to the first 3 invoices).  To User Add in Sequence instead of manually entering the amounts to each invoice, you will simply go to Payment means and enter the total amount and on the main screen Click Add in Sequence and it would automatically allocate the amounts in the order of the Invoices (Top to Bottom) and your screen would look as below and the first 3 rows would be highlighted. 
    Invoice No...........Balance Due.....................Total Payment
    100......................300.00.................................300.00
    101......................200.00.................................200.00
    102......................150.00................................. 50.00
    103......................250.00.................................250.00

  • Posting Incoming Payment via T-code: F-28

    Hi SAP,
    Our users need to post incoming payment via t-code F-28, but when they simulate the
    transaction, only 1 line item was appeared and system gave error
    message;" please correct the marked line item". Then i correct the line item (fill in business area).
    Then, when i enter the next posting for 2nd line item, system gave an
    error message: "You are not authorised for company code 9000". Before
    this our user can do the posting via incoming payment.This problem only
    happened after we upraded the system to ECC.6.
    I try check Txn SU53 to display the error message, unfortunately no error was generated by
    the system. Please help me. I did ask our local consultant before but they asked me to implement note 727973. we already implemented the note but the problem still happened.
    Will give points for those who help me solve this problem.
    TQ
    Regards,
    Nazrul

    Now that you are working on a ECC 6.0 the suitable note will be:
    "1249923 - FB05: F5 413 for field GSBER for automatically created item".
    Please, apply the correction instructions on this note and afterwards the problem should be solved.
    Regards,
    Lidia

  • Not able to add deposits for Incoming payments thru cheques

    Hi All,
    I have posted an incoming payment for an invoice through cheque in "Cheques Receivable". Now I am going to add the deposit. When I add the deposit the system shows and error
    "This entry already exsists in the following table 'Business Partners' OCRD (ODBC-2035) Message 131-183"
    This is happening for more than one business partners. Formerly I have successfully posted deposits without encountering such problems. Please help me with a suggestion
    Regards,
    Raj
    Edited by: debraj bhattacharyya on Nov 21, 2009 1:56 PM

    Your document docentry (Next Document Number For the deposit document) doesnu2019t match your current docentry.It is seems to be a data in consistency issue. Please contact our SAP team to get the solution.
    Please raise your ticket to sap.
    Please read the following threads
    This entry already exist in the following table " (ACPR) in SBO 2005A
    This Entry Already Exists in the following table (DLN1) ODBC-2035
    Cheers

  • Sequence Code in Incoming payment

    Hi Experts,
    Is it possible that we can can show the sequence code in Incoming payment window and How ?.
    Please can any one share their experience regarding the sequence code in Incoming payment window.
    How we can accomplish this particular task in SAP Business One 2005B .
    Regards
    Amit Tyagi

    Hi Marcella,
    Thanks for reply
    I would like to inform you that we can put the sequence of document by follow below path:
    Administration>Setup>Finances>Tax>Sequence.
    This functionality work when there are more than one profit center of an enterprise just for tracking of the document profit center wise.
    I think above description help you to understand the concept of the sequence code.
    Regards
    Amit Tyagi

  • How to add incoming payment lock field (EZASP or INC_PAY_LOCK) in CA of MDT

    I want to add the field of incoming payment lock  in the master data template contract_account.
    i tried the following configuration(Tcode =EPDTYPE)
    Type Name       EZASP_OLD_KK
    Table Name      FKKVKP1
    Field Name      EZASP
    Counter         888
    Table Name      FKKVKP
    Field Name      EZASP
    and another option configuration:
    Type Name       EZASP_OLD_KK
    Table Name      FKKVKP1
    Field Name      EZASP
    Counter         888
    Table Name      DFKKLOCKS
    Field Name      LOCKR
    but nothing is right( can not save to database)
    please any experts can explain it?

    session #1 doing
    MMR_XWALK
    SET
    PAY_ADJUSTMENT_END_DT = :PAY_ADJUSTMENT_END_DT,
    UPDATOR_ID = :UPDATOR_ID,
    UPDATE_DT = SYSDATE,
    PAYMENT_PERIOD_DT=TO_NUMBER(200502)
    WHERE
    HIC_NUM= :HIC_NUM AND
    SEQUENCE_NUM = :SEQUENCE_NUM AND
    PAY_ADJUSTMENT_START_DT= :PAY_ADJUSTMENT_START_DT_XWALK AND
    ACTIVE_IND = 'A'session #2
    UPDATE
    FDS.CMS_MMR_XWALK
    SET
    PAY_ADJUSTMENT_END_DT = TO_DATE( :PAY_ADJUSTMENT_END_DT,'YYYY-MM-DD'),
    UPDATOR_ID = :UPDATOR_ID,
    UPDATE_DT = SYSDATE,
    PAYMENT_PERIOD_DT=TO_NUMBER(200503)
    WHERE
    HIC_NUM= :HIC_NUM AND
    SEQUENCE_NUM = :SEQUENCE_NUM AND
    PAY_ADJUSTMENT_START_DT=TO_DATE( :PAY_ADJUSTMENT_START_DT_XWALK,'YYYY-MM-DD') AND
    ACTIVE_IND = 'A'Slightly different UPDATE statements means 2 different procedures hitting same table
    Notice different PAYMENT_PERIOD_DT between sessions
    Are any triggers involved?
    This is application problem; not Oracle problem

  • Add prproj sequences into AME, via scripting

    Hi,
    we're using CS4 and the "Watch Folder" feature would have been nice, if it worked on prproj files.
    I tried to see what happens during export with a Sysinternals tool named "process monitor" but the log is just too big to make sense of.
    How can I add a prproj sequence to AME (Media Encoder) from the command line, or via windows scripting host, or via APIs?
    Our projects usually have just one sequence, or it has a known name. Since prproj files are XML, we could even have our own heuristics in script code. All I need is a way to feed a sequence from a prproj into AME.
    Choosing a named preset from AME is okay. We could provide all encoding settings explicitly though, if that's required.
    We need this because we have dedicated encoding boxes on the network and we could push a project (including video and audio sources) into a shared directory for the encoding box to pick up. Right now, we have to physically be at the encoding box, opening the prproj and exporting the desired sequence. It'd be nice to be able to cut and edit somewhere else and just push the encode job over the network.
    Is there any way?

    AME has no trouble at all understanding PP project files, and uses them regularly to do it's job.  Just not via the Watch Folder.  Sequences have to be manually set up.
    Indeed! I should have added " Watch Feature"  to maintain clarity.
    ...AME cannot transcode a PP sequence from another machine.
    Yes it can; we've done it and it works great! But even if it didn't, automatically pushing files to another computer's local storage is trivial. In either case, you then have to manually load the project & sequence, which gets back to the OP issue I think.
    To crackwitz or anyone else who stumbles upon this, there may be a workaround. You may be able to write a script via extendscript in AE, and Dynamic Link to a PPro project (locally stored or otherwise), then render from AE. My trials indicate that AE renders our projects at 50% the speed of PPro/AME (a well-known issue). That said, the ability to offload the rendering to a non-editing machine is worth the tradeoff in our case (it may not be in all cases). There are additional things to consider as well, including encode setting inconsistencies between PPro/AME and AE. The part we have not tested is whether you can specifiy a sequence via extendscript. If not, this will not work. If we confirm one way or another, I'll post back.
    It'd be great if Adobe could kick it up a notch for customers that need greater levels of automation and work-flow efficiency with regards to rendering. However, these types of features have been a need for us for years, so I would encourage anyone interested not to wait on Adobe for this, and experiement with work-arounds, and share what you come up with!

  • 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

  • ADD chek num to incoming payment form

    Hi,
    I added a user column to incoming payments matrix.
    I tried to insert the cheknum in that column but i see any change.
    i debgged my code and so that the adding operation is correct.
    I tried to enter a value using the keyboard in that cell and i noticed that the value is written on the celle but when i click on any other button or edittext in the form the value disappears.
    Does anybody has a hint?
    Thanks.

    Achref,
    Are you binding your data to the column you added?  If you search this forum on "databind" you should find many posts that should help.
    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

Maybe you are looking for

  • Default Color Space

    Safari is color managed and that is great, but I understand if it encounters an un-tagged file it assumes monitor space, I'd like to know if it can be changed to assume sRGB for un-tagged files? Thanks. Patrick

  • More than one ipod

    I have an ipod video and nano and is there anyway to use both with the same itunes program on my laptop? my goal is for them to have access to the same music with out having to go in between two programs or importing music/cd's twice.

  • How read information from other clients (other systems) of sap

    Hi I have a requiremt to read the roles assigned to a user id in production system to the developemet system. So how i can get this production system information from development. Could please  please let me know how to call the remote function calls

  • Photos printing in negative in Pages, etc.

    Not sure if this is something others have addressed and I apologize it is somewhere in the archives but no time to read old posts... I recently imported photos from my PC (saved via HP editing software that came with HP printer). They all showed up n

  • Data load happening terribly slow

    Hi all, I had opened up quality server and made some change(removed its compunding attribute) at definition level to an infoobject present in the InfoCube. The infoobject,IC and Update rules are all active. when i scheduled the load now ther is a hug