Error When Add Payment to SAP!

Hi All !
I have function to Add Invoice and payment as follows:
Private Function Add_Invoice_Payment(ByVal TransCode As Double) As Boolean
Dim strShop As String = "C570004"
Dim oInv As SAPbobsCOM.Documents
oInv = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
oInv.CardCode = strShop
oInv.DocDate = Now.Date
oInv.DocDueDate = Now.Date
oInv.Comments = "From POS System - With Transaction Code " & TransCode
Dim disc As Double = 0
Dim WarehouseCode As String = "HCI001"
Dim VATGroup As String = "S10_CM"
For i_row As Integer = 0 To jsgxDetails.RowCount - 1
jsgxDetails.Row = i_row
oInv.Lines.SetCurrentLine(i_row)
oInv.Lines.ItemCode = jsgxDetails.GetValue("Item_Code")
oInv.Lines.ItemDescription = jsgxDetails.GetValue("Item_Name")
oInv.Lines.UnitPrice = jsgxDetails.GetValue("Item_Price")
oInv.Lines.Quantity = jsgxDetails.GetValue("Item_Quantity")
oInv.Lines.DiscountPercent = disc
oInv.Lines.WarehouseCode = WarehouseCode
oInv.Lines.VatGroup = VATGroup
oInv.Lines.Add()
Next
lRetCode = oInv.Add()
If lRetCode = 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
MessageBox.Show(sErrMsg)
Return False
else
'''''''''''''''''Add Payment from Invoice have Added
Dim oPayment As SAPbobsCOM.Payments
oPayment = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
oPayment.CardCode = strShop
oPayment.DocDate = Now.Date
oPayment.DocCurrency = "VND"
oPayment.CashAccount = "111100"
oPayment.CashSum = oInv.DocTotal
oPayment.Series = 0
oPayment.Remarks = "Remarks"
oPayment.Invoices.DocEntry = oInv.DocEntry
oPayment.Invoices.DocLine = 0
oPayment.Invoices.InvoiceType = SAPbobsCOM.BoRcptInvTypes.it_Invoice
oPayment.Invoices.SumApplied = oInv.DocTotal
lRetCode = oPayment.Add
If lRetCode 0 Then
oCompany.GetLastError(lErrCode, sErrMsg)
MessageBox.Show(sErrMsg)
Return False
End If
end if
end function
Add Invoice is OK! but when Add Payment it appears Error: "No matching records found (ODBC -2028)" . Help me to fix it. Thanks

Dear Tao lao,
The error "No matching records found (ODBC -2028)" can mean any property's value are invalid.
Do you get more detailed error like
"No matching record found 'G/L Accounts' [ODBC 2028]" ?
If you suspect the issue is due to the DocEntry is incorrect, then you can try
1. use DocNum
oPayment.Invoices.DocEntry = oInv.DocNum
2. check the value of DocNum after the invoice added, then assign the value to oPayment.Invoices.DocEntry.
Best Regards
Jane Jing
SAP Business One Forums team

Similar Messages

  • Error when linking payment on account with Invoice

    Hi
    When i tried to link/reconcile the payment recd on account through income payment menu, its showing an error message " Confirmation Amount greater than Zero".  Pymt on Account showing as JE and open invoice amt are same only. 
    Anybody help me on the solution.
    Thanks
    Sundaram

    Hi,
    It will not be possible to apply Invoices and Payments in the Outgoing/Incoming Payments untill there is any value/amount which is left to pay.
    That is why you are getting the error, because the Payment searches for the Payment Means to create a Journal Entry which is not there and a zero JE cannot be entered.
    Hope it clarifies.
    Regards,
    Jitin
    SAP Business One Forum Team

  • Error when add Purchase Order

    Hi all,
    I have a problem when Add new Purchase Order, plz help me!
    I add new Purchase Order, system alter error as below:
    ''Document cannot contain both regular and fixed asset items"
    I checked Item Master Data and I'm sure items in this PO is not Fixed Asset
    Thanks and Best Regard!

    Hi Sudhir,
    I'm using SAP Version 9.0 PL 09 and I don't see checkbox Fixed Asset in Item Master Data.
    I selected in SQL Itemtype = 'I' and AssetItem ='N'.
    Please see below pictures and help me again.
    Many thanks!
    Regards,
    Hong Bich

  • Error when add a custom field to source 2LIS_12_VCHDR

    Hi Experts,
    I'm trying add a custom field to source 2LIS_12_VCHDR. The fields are in LIKP table's append. That are
    zz fields. I can see the fields in MCLIKP structure, but I can't see these fields in LBWE transacction when I try update the structure MCLIKP. I don't know if this last is important because when I replicate of the source the fields, they are visible in BW.
    The problem is when I try activate the transfer structure. I Can add the fields from the data source to the transfer structure but If try activate the source the error is:
    "Error when creating transfer structure /BIC/CCBA2LIS_12_VCHDR in source system XXXX"
    I'm forgetting some step?
    somebody know other way for do it?
    thanks for your help.
    Manuel.

    Hi
    May be the datasource is not active, do the following obviously in development
    goto LBWE and click on your datasource; system will ask you for a transport request number give it a name. now save the datasource.
    replicate and activate your t/r
    hope this helps
    Regards

  • Object refrenence error when add-on start in client machine

    Hi all,
    I m getting error in add-on when i m start to add-on client machine its through error  object reference error. msgbox continuously
    Thanks & Regards
    B.Lakshmi narayanan

    Hi
    Check this
    Error: Object reference not set to an instance of an object
    "Object Reference Not Set To An Instance Of An Object"   
    Object reference not set to an instance of an object.
    Thansk
    Mohammad Imran

  • Get error when add new object in crystal report

    hi
    i have this error "You are attempting to use functionality that falls under the Crystal Decisions Report Creation API license. This system does not have a valid license, or the evaluation copy of the license has expired. Please contact Crystal Decisions to obtain a Report Creation API license."
    when i add new object in crystal report with vb.net
    ""CRReport.Sections.Item(ii).AddTextObject("new text", 1000, 0)
    i do same program for 3 months ago but i lost it work without error
    ihave a license key for crystal report
    use cr10 with vb.net 2005
    can help me
    thanks

    Also, check out the blog [Use of the Report Designer Component (RDC) in VS .NET|http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=(J2EE3414700)ID0468837450DB00359707053703393347End?blog=/pub/wlg/15939].
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup

  • Get error when add start:body tag, ERROR: oracle.apps.xdo.template.fo.area.NoAvailableAreaException: Not enough rendering area

    I'm using "Oracle BI Publisher Template Builder for Word"
    Version: 10.1.3.2.1  Build 87
    When I try to add <?start:body?> and <?end body?> tags get error in preview to pdf
    My structure is:
    for-each G_INVOICE
    [TABLE WITH HEADER INFORMATION]
    <?start:body?>
    [for-each G_DISTRIBUTION_LINE
    TABLE WITH DISTRIBUTION LINES INFO
    end G_DISTRIBUTION_LINE]
    <?end body?>
    "text for special instructions"
    end G_INVOICE
    The log generated is:
    Font Dir: C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\Template Builder for Word\fonts
    Run XDO Start
    RTFProcessor setLocale: en-us
    FOProcessor setData: Z:\projects\AEROSTAR\reports\AERO - AP - Disbursal Request\AEROAPDISREQ.xml
    FOProcessor setLocale: en-us
    oracle.apps.xdo.template.fo.area.NoAvailableAreaException: Not enough rendering area. Please look into the incomplete output file for cause.
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.checkInfiniteLoop(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.createNewPage(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.startLayout(Unknown Source)
      at oracle.apps.xdo.template.fo.elements.FormattingEngine.run(Unknown Source)
      at oracle.apps.xdo.template.fo.FOHandler.endElement(Unknown Source)
      at oracle.apps.xdo.common.xml.XSLTHandler$EEEntry.sendEvent(Unknown Source)
      at oracle.apps.xdo.common.xml.XSLTMerger.startElement(Unknown Source)
      at oracle.xml.parser.v2.XMLContentHandler.startElement(XMLContentHandler.java:167)
      at oracle.xml.parser.v2.NonValidatingParser.parseElement(NonValidatingParser.java:1182)
      at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:301)
      at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:268)
      at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:149)
      at oracle.apps.xdo.template.fo.FOProcessingEngine.process(Unknown Source)
      at oracle.apps.xdo.template.FOProcessor.generate(Unknown Source)
      at RTF2PDF.runRTFto(RTF2PDF.java:632)
      at RTF2PDF.runXDO(RTF2PDF.java:466)
      at RTF2PDF.main(RTF2PDF.java:254)
    Please, Need help.
    Thanks in advance.

    The cause for this seems to be that a row in a table is larger than a page, and there is no place left for the Header row.
    Check the bellow action plan:
    1. Edit the template in MS Word.
    2. Click on the table.
    3. Right click on the little crossed square in the upper right corner of the table.
    4. Click on 'Table Properties' / tab 'ROW'.
    5. Look at all rows by using the button 'Next Row'.
    6. If 'Repeat as Header at the top of each page' is checked, please uncheck it.
    7. Save the template and retry.
    BR,
    Alex

  • Error when add new property to User Profile "General Information" portlet

    Portal 5.0.2 .NET 1.1
    The following error occurs when:
    1. Create new property (Everyone has select access)2. Edit "General Information" User Profile portlet and add the new property, then "Finish"
    <property name>: Current user is attempting to save an invalid property.
    Is there something that I am missing? Thanks Meredith

    Meredith,
    Don't forget to map the property to User objects in the Global Object Property Map. I suspect that this is the problem.
    jennifer

  • Error when add portlet into portal page

    Dear all,
    I use:
    + JDeveloper 10.1.3.4.0
    + Oracle Application Server 10g release 2.
    + JDK 1.4
    I installed ADF_Installer and Portlet_Container for OC4J instance in Oracle Application Server ok.
    1. I use JDeveloper, create my simple project with template is WebCenter Application.
    2. In the Portlet project, I added the Portlet Faces Bridge.
    3. I add the JSF (with name is home.jspx) in Web Tier into the Portlet project (select the JSF JSP). And type is .jspx and Do not automatically Expose UI Components in a Managed Bean.
    4. Inside the home.jspx, I add the OutputText only.
    5. Inside the WEB-INF, i created portlet.xml file with content is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <portlet-app version="1.0"
    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    <portlet>
    <portlet-name>MyTestPortlet</portlet-name>
    <display-name>My Test Portlet</display-name>
    <portlet-class>oracle.portlet.server.bridges.jsf.FacesPortlet</portlet-class>
    <init-param>
    <name>DefaultPage.view</name>
    <value>/home.jspx</value>
    </init-param>
    <init-param>
    <name>BridgeLifecycleListeners</name>
    <value>
    oracle.portlet.server.bridges.jsf.adf.ADFFacesBridgeLifecycleListener
    </value>
    </init-param>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>VIEW</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <portlet-info>
    <title>My Test Portlet</title>
    <short-title>testportlet</short-title>
    </portlet-info>
    </portlet>
    </portlet-app>
    6. Inside the WEB-INF, i edited web.xml by added some contents (and inside this file, I removed line in web-app tag
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"): --> If I did not remove it, I received some error !
    <context-param>
    <param-name>javax.faces.application.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml,/WEB-INF/portlet.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    7. I create the WAR File Deployment Profiles.
    Ok, I deploy this portlet into OC4J instance in Oracle Application Server (10g release 2). -- > Finished.
    From my browser, I use URL Address such as:
    http://mymachine.com:7780/jobs/portlets?WSDL --> ok.
    After that, I log into Oracle AS Portal, and register this provider with style WSRP --> ok, I can see it from Portlet Reposistory. But when I add it into my portal page, I receive following message
    Error:Could not get markup. The cookie or session is invalid or there is a runtime exception.
    I refresh my portal page but it not effect !
    In Oracle Application Server 10g release 2 have support JSF Portlet ? Or I have some misstakes ? Please guide to me to solve this problem.

    I updated Oracle Application Server Portal from 10.1.2 to 10.1.4 ! Please give me some ideas !

  • Error when add/ drop new logfile

    When I drop or add new logfile in my 10g r2 on RHEL, I did not see any error. however when I check the alert log file, I noticed at the same time of dropping or adding the logfile, systen produced three error .trc files in the udumpa and display error message about the " Control autobackup written to DISK device handle '/dbrecovery/flashback/#####BACKUP/autobackup/2006_09_07/o1_mf_s_600514666_2j0covnl_.bkp' " and here is the content of one of trc file, which I do not understood. to me there is no important message. can anyone see something significant?
    [oracle@BAANBACKUP bdump]$ more /oracle/product/10.2.0/admin/####backup/udump/####backup_ora_23123.trc
    /oracle/product/10.2.0/admin/####backup/udump/####backup_ora_23123.trc
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    ORACLE_HOME = /oracle/product/10.2.0/db_1
    System name: Linux
    Node name: #####BACKUP
    Release: 2.4.21-40.ELsmp
    Version: #1 SMP Thu Feb 2 22:22:39 EST 2006
    Machine: i686
    Instance name: #####backup
    Redo thread mounted by this instance: 1
    Oracle process number: 26
    Unix process pid: 23123, image: oracle#####backup@#####BACKUP
    *** 2006-09-07 09:37:47.991
    *** SERVICE NAME:(SYS$USERS) 2006-09-07 09:37:47.991
    *** SESSION ID:(191.13548) 2006-09-07 09:37:47.991
    [oracle@BAANBACKUP bdump]$

    select * from v$logfile;
    select * from v$log;
    if they list the changes after adding / dropping log files. You should be good.
    SID 191 , what is this sid about?
    SELECT * FROM v$session where SID=191 ;
    It doesn't seem that the alert log is complaining about log files. It seems that it has to do something with disk backup.
    Control autobackup written to DISK devic
    Thanks,

  • CUMA 7.0 error when add iphone

    i add phone to user by select iPhone. when finish i can not edit phone and show error "Unable to get the role for the user or the user already deleted."
    not occur with window mobile and symbian

    i add phone to user by select iPhone. when finish i can not edit phone and show error "Unable to get the role for the user or the user already deleted."
    not occur with window mobile and symbian

  • Unable to create Azure subscribtion - error when adding payment information

    Hello, i'm trying to create azure subscription but unfortunately i'm getting error message:
    "We can't authorize the payment method. Please make sure the information is correct, or use another payment method. If you continue to get this message, please contact your financial institution."
    If expanding Error details, there is only some crap like:
    30225-IPUnRwAAAAAAAAAA-be977ddd-7de8-4739-a5f3-37c32756c567
    I've tried three different cards (two debit and one credit), cards are issued from two different banks.
    My country is Lithuania, so according https://www.windowsazure.com/en-us/support/faq/ azure is available in my country...
    I've also found that maybe creating new live id and subscribing with it could work, but not for me... 
    any ideas? thanks!

    Hi,
    Sorry for some information in my above reply may have some misunderstanding. When you register a free trial account you need to give a phone number to get the message and a credit account for subscription, so I said credit card is only allowed. For the charging
    part it will be convenient after you finish free trial and still want to use Azure. Don't worry about it, we have spending limit function to control it.
    For your root problem I think it is from your credit card. I cannot say 100% where is wrong, but nothing I can find to make a change any more. I am not sure this service phone call is still alive: 8001301963. You can try it to consult this issue. You still
    need to check every info of your credit card has been entered correctly in the form. Of course, the info itself should be valid.
    http://www.developer.com/services/step-by-step-guide-to-setting-up-a-windows-azure-free-trial.html
    Thanks for your understanding. I really sorry for taking inconvenience to you.
    Thanks,
    QinDian Tang
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Receive some error when add portlet into portal page

    Dear all,
    I use:
    + JDeveloper 10.1.3.4.0
    + Oracle AS Portal 10g release 2.
    + Oracle Application Server 10g release 2.
    + JDK 1.4
    I installed ADF_Installer and Portlet_Container for OC4J instance in Oracle Application Server ok.
    1. I use JDeveloper, create my simple project with template is WebCenter Application.
    2. In the Portlet project, I added the Portlet Faces Bridge.
    3. I add the JSF (with name is home.jspx) in Web Tier into the Portlet project (select the JSF JSP). And type is .jspx and Do not automatically Expose UI Components in a Managed Bean.
    4. Inside the home.jspx, I add the OutputText only.
    5. Inside the WEB-INF, i created portlet.xml file with content is:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <portlet-app version="1.0"
    xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd">
    <portlet>
    <portlet-name>MyTestPortlet</portlet-name>
    <display-name>My Test Portlet</display-name>
    <portlet-class>oracle.portlet.server.bridges.jsf.FacesPortlet</portlet-class>
    <init-param>
    <name>DefaultPage.view</name>
    <value>/home.jspx</value>
    </init-param>
    <init-param>
    <name>BridgeLifecycleListeners</name>
    <value>
    oracle.portlet.server.bridges.jsf.adf.ADFFacesBridgeLifecycleListener
    </value>
    </init-param>
    <supports>
    <mime-type>text/html</mime-type>
    <portlet-mode>VIEW</portlet-mode>
    </supports>
    <supported-locale>en</supported-locale>
    <portlet-info>
    <title>My Test Portlet</title>
    <short-title>testportlet</short-title>
    </portlet-info>
    </portlet>
    </portlet-app>
    6. Inside the WEB-INF, i edited web.xml by added some contents (and inside this file, I removed line in web-app tag
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
    version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"): --> If I did not remove it, I received some error !
    <context-param>
    <param-name>javax.faces.application.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml,/WEB-INF/portlet.xml</param-value>
    </context-param>
    <context-param>
    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
    <param-value>server</param-value>
    </context-param>
    7. I create the WAR File Deployment Profiles.
    Ok, I deploy this portlet into OC4J instance in Oracle Application Server (10g release 2). -- > Finished.
    From my browser, I use URL Address such as:
    http://mymachine.com:7780/jobs/portlets?WSDL --> ok.
    After that, I log into Oracle AS Portal, and register this provider with style WSRP --> ok, I can see it from Portlet Reposistory. But when I add it into my portal page, I receive following message
    Error:Could not get markup. The cookie or session is invalid or there is a runtime exception.
    I refresh my portal page but it not effect !
    In Oracle Application Server 10g release 2 have support JSF Portlet ? Or I have some misstakes ? Please guide to me to solve this problem.

    I updated Oracle Application Server Portal from 10.1.2 to 10.1.4 ! Please give me some ideas !

  • JCo error when calling from webmethods sap adapter to SAP BAPI

    Hi,
          I am getting an error "[SAP.102.9000] JCo error: (104) RFC_ERROR_SYSTEM_FAILURE - connection closed without message (CM_NO_DATA_RECEIVED)"  when webmethods sap adapter is calling BAPI in SAP. The BAPI is working fine in SAP.
         Can anyone suggest me a possible solution.
      Thanks,
      Sarath.

    BAPI-step by step procedure
    http://www.sapgenie.com/abap/bapi/example.htm
    list of all BAPI's
    http://www.planetsap.com/LIST_ALL_BAPIs.htm

  • Error when sneding payment advice email notification

    Hi All,
    I have a problem with program RFFOAVIS_FPAYM, when i am running this to send email notification for payment advices , its giving an error :
    f0387 : dispatch via e-mail not poss.
    Please help me how to solve this and what is the cause for this error.
    Thanks in advance.
    Vishal.

    hi,
    i just know that solution with Re: f110 payment advice
    Andreas

Maybe you are looking for