PayToCode not set in invoice

Hello,
I create an new invoice, which is based on an existing order.
I add the orderlines to the invoice by using some code like this:
oInvoices.Lines.BaseEntry = OrderDocEntry
oInvoices.Lines.BaseLine = OrderPositionLineNum
oInvoices.Lines.BaseType = 17
The ShipToCode and the Address2-Field was filled with the correct values, also the Address-Field (BillToAddress), but the PayToCode-Field is still empty.
Trying to set oInvoices.PayToCode to the corresponding value from the order did not work.
Do I make something wrong or is there a error in DI API?!
Thanks for your help!
Sebastian

Hi Sebastian,
Which Version of Business One (including Patch Level) are you using?
It works fine for me in Version 2007A PL45. There is a very similiar issue related to creating Sales Orders based on Quotations, which will be fixed in a future patch. If you have access to the SAP Notes, see 1290487.
If it still happens for you in the latest patch available it does look like an application error to me and I would suggest to log a SAP message if you can.
In general the workaround is to set the PayToCode in the Addon. Example:
oInvoice.PayToCode = oOrder.PayToCode
Hope that helps.
Kind Regards,
Friederike Mundt
SAP Business One Forums Team

Similar Messages

  • Indicators "goods receipt" "invoice expected" are not set! Bug or feature?

    Hi all,
    we are using SRM 5.0 classic scenario.
    A freetext shopping cart without vendor assignment creates a PR in the backend (4.6C). In this PR the indicators for "goods receipt" and invoice expected" are not set. Is this ab bug or a feature.
    In former realeases these indicators are set automatically for the document flow.
    What do I have to do to set the indicators automatically in SRM 5.0.
    Best regards
    Susanne

    Hello,
    in classic scenario those flags are set according to the account assignment type and the settings in backend transaction OME9. On the one hand these settings can be overruled by BADI(s), on the other hand this behavior has also been noticed due to a malfunction which was corrected with note 1175255
    (pls also take into account the corrections for the backend!).
    I hope this is a first approach for solving the issue.
    BR
    Michael Haslinger

  • MIRO : Final Invoice Indcator not setting committment amount to zero

    Hi,
    We have situations when goods receipts for some of items is not possible and when PO is paid we manually set Final Invoice indicator in MIRO. PO sitll show committment items and we want these removed.
    Is there is any user exits , which can set committment balance to zero if Final Invice Indicator is set in MIRO?
    Regards,
    Saeed

    Hi,
           Do you input quantity( Amount 0 ) in MIRO?.
    Regards,
       Gaito

  • Final Invoice indicator not set for limt PO though same done in SRM system

    Hi,
    We are closing Standard and Limit PO through a program in SRM system. For standard PO it's working fine (the Final Invoice flag in ERP system is set checked with WBS element blocked), however when it come to Limit PO, it's giving an error message and not updating Final Invoice flag for the same WBS element though we have updated the final invoice flag in BBP_PDIGP as well as BBP_PDLIM tables in SRM system through the program.
    Regards,
    Ni3

    Hi,
    The error message I am getting is "User status LFI is active (WBS E.000804.02.02)" where in standard PO the same WBS is referred still the PO is getting closed.
    PS: I do not wish to create any customization.
    Regards,
    Ni3

  • TDS TAX AMOUNT  IS NOT MACHING WITH INVOICE WTAX AMOUNTu2019

    Dear All,
    I am Facing Following Problem in TDS
    While creating an A/P Invoice after putting row level information when user click on u2018ADDu2019 button u201CWithholding Tax Tableu201D opens for deduction of TDS amount. When user selects u201CWithholding Tax Codeu201D in u201CWithholding Tax Tableu201D to deduct TDS amount for an invoice system shows WTax amount as per rate of deduction. But when user click on u2018OKu2019 to u201CWithholding Tax Tableu201D window, WTax Amount will comes as zero on A/P Invoice window.
    Then when again user will go to u201CWithholding Tax Tableu201D and manually put the value of WTax Amount system reflects it on A/P Invoice window.
    In case when we set approval procedure to A/P Invoice, this invoice goes for an approval. After coming back as approved invoice when originator of invoice going to u2018ADDu2019 the same document system shows an error as u2018TDS TAX AMOUNT  IS NOT MACHING WITH INVOICE WTAX AMOUNTu2019
    please reply me ASAP
    Thanks & Regards,
    Swapnil

    hi
    try this
    We need to follow  the following steps
    u2022     Open the BP master for which TDS needs to be deducted go to the accounting tab followed by tax option and then  click on the checkbox subject to withholding tax
    u2022     Click on the option WTAX codes Allowed and select the TDS Category
    u2022     On the previous window click the check box pertaining the checkbox  u201CTDS OVERLOOKu201D
    Regards,
    Manish

  • Amount to draw from down payment is not set in document currency

    hi,
    i always get the error "amount to draw from down payment is not set in document currency" when i try to update a draft of invoice with down payment.
    i do the following:
    1. sales order
    2. down payment
    3. income payment
    4. delivery note
    5. invoice
    5.1 save as draft by di api
    5.2 get draft by key
    5.3 do some changes, for example change comments by di api
    5.4 update draft by diapi  <--- the error is thrown!
    If i do this on screen everything works fine. But by sdk its not working.
    System: SAP 8.8 SP00 PL20
    Is there a solution for this problem?
    best regards
    Markus

    Hi Markus,
    What if you update the same draft from UI instead of by diapi? Do you still get error message?
    Thanks,
    Gordon

  • Billing document not relenvent for invoice list

    Dear forum members,
    For one sales area I can create a invoice list from a billing document, but not for the other.In debug mode first one is relevent for invoice list processing ( VBUK-RELIK), but for another sales area ,thus staus is not relevent.
    Partner detemrination was different for both the above sales area.This was the only differnce. Partner determination is correct in both.What can be the other possible reasons for the status NOT RELEVENT for invoice list.
    Best Regards,
    Kanwal

    Dear Goyal,
    -->Check the configuration settings if you are using diffirent Invoice documents in two sales areas.
    IMG Path is SPRO>Sales and Distribution>Billing>Billing documents>Invoice lists.
    -->Check the data in the customer master in the transaction VD02.
    Go to Sales area data tab-->Billing document here you check whether you are maintaining the Invoice list dates or not.
    -->Check the Partner determination procedure assignment to the Invoice List type at Header level and item level.
    Because you are mentioned that partner dtermination wad different.
    Header assignment path.
    IMG>SPRO>Sales and Distribution->Basic functions>partner determination>set up partner determination.>Set up partner determination for billing header-->Prtner determination procedure assignment.
    Item assignment path
    IMG>SPRO>Sales and Distribution->Basic functions>partner determination>set up partner determination.>Set up partner determination for billing item -->Prtner determination procedure assignment.
    I hope it will help you
    Regards,
    Murali.

  • Condition records are not showing in Invoice

    Hi Experts,
    My List price for XXXX material is amount $$$$$. Condition records having required validity.
    But the values are not showing in invoice though the pricing analysis shows green for this condition type.
    Condition values shown perfectly in preceeding documents.
    Analysis message says " Condition record exists but has not been set "
    Can you please suggest me, why this condition values are not shown in net value and suggest me the fis.
    Thank you in advance.
    Edited by: Ganesh B on Feb 4, 2010 4:45 AM

    Hi,
    Goto the T. Code "VF03".
    Enter your billing document number.Enter.Check what is the pricing procedure determined here.Goto the T.Code "V/08".Check whether that condition type present in that procedure.
    If so check the validity of the condition records.Ensure it falls under your billing document date.Also ensure that it is not marked for deletion.For this goto the last column in the condition record screen "VK12 T.Code".Ensure that this check box is not ticked.
    And you are telling that you are able get this one in previous documents.
    Goto the T.Code "VTFA(if your scenario is order related billing)" else goto the T.Code "VTFL(If your scenario is delivery-related billing)".
    Select your valid combination.Double click on item.Select your item category.Details.
    Make the Pricing type as "D" and pricing source as "blank".
    Regards,
    Krishna.

  • Please clear the price/ set the invoice expected indicator

    Hi SRM Gurus,
    We have upgraded from SRM 3.0 to SRM 7.0 thro' Double step upgrade.
    We are  in SRM 7.0 SP06
    Scenario :Extended Classic Scenario
    After the Upgrade we have created a shopping cart from SRM-MDM catalog.
    Shopping cart is approved.Local Purchase order is not ordered but it is
    saved. When we Edit the Purchase order and press the Check button
    defect noticed" Plese clear the price (or) set the invoice expected
    indicator.
    This happens only after the Upgrade.
    even for the old purchase order when we do changes we are getting the above defect
    can you please advice us.
    whether any SAP notes to be applied. I have checked in SAP market place,there is no SAP NOTES
    Regards
    G.Ganesh Kumar

    Hi,
    I have checked the Purchase order for the newly created one in SRM 7.0
    If we go to the supplier list we can check for the invoice expected indicatoe where we can check this.
    It is working, I  resolved on my own.
    For all the OLD purchase order created before upgrade if i change and check even though the invocie indicator is checked
    i get the above message."Please clear the price/ set the invoice expected indicator"
    any one working on SRM 7.0 can please check and reply
    Regards
    G.Ganesh Kumar

  • Middleware BDOC Error- Parameter I_IBASE is not set

    Hi All,
    In our system, when a CRM Sales Order transaction is replicated from CRM to ECC6 and completely processed in ECC 6.0
    through Invoice, the CRM Middleware receives a BDoc that is in error with message Parameter I_IBASE is not set and the
    result is the Document flow is not replicated to CRM transaction. I could not find any relevant OSS note or solution for this
    problem. Could you let me know what is the solution for this problem. Please explain the steps to fix this error.
    Thanks in advance.
    --R D

    Hi,
    We have experienced the same error; however we have not found any solution.
    Has anyone experienced with this error found a solution?
    Brent

  • OPM Actual Costing (PMAC) not including AP Invoice transactions

    Hi,
    OPM Actual Costing (PMAC) not including AP Invoice transactions in 12.1.3 version. We have set profile GMF:Include Receipts in Actual Cost = 0, GMF:Include Invoices in Actual Cost = 1 still AP Invoice not included in OPM Actual costing.
    Observed, Invoices which has IPV are shown as in Actual transaction view with line source as "Invoice Price Variance". I was looking for a line source with "AP invoice" and "IPV"(if exisits) in Actual transaction view screen.
    Thanks,
    Solomon.

    Hi,
    did you run the extract AP charges request ?
    thanks .
    Ahmad.

  • Bill To Address contents is not showing in invoice logistics tab

    Hi All,
    Bill To Address contents is not showing in invoice logistics tab though i have defined the Bill To Addresses for Business Partners.
    Same is happening with my Ship To addresses.
    Please Suggest.
    Regards.
    ShriX.

    I encountered the same issue, please do the following to make the Bill to address in the documents work.
    In the Administration ->  Setup -> Business Partners -> Countries
    Look for the Code where your business partners country are set.
    Then in the Address Format, choose your format. In my case I choose our company format. Hope this help.
    Regards,
    Cyrous

  • Document file or input stream is not set.

    Error sending mail :Exception Thrown
    oracle.apps.xdo.delivery.DeliveryException: Document file or input stream is not set.
    at oracle.apps.xdo.delivery.AbstractDeliveryRequest.submit(AbstractDeliveryRequest.java:1154)
    Delivery manager:
    Can some one tell me what was wrong with this,
    I check my document path I can describe it
    When i send one attachment it works with the same path
    but when I use multiple attachment it gives then error
    Attachment m = new Attachment();
    m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test.pdf","test.pdf","application/pdf");
    m.addAttachment("/fapps/oracle/fintstcomn/java/chami/test2.pdf","test2.pdf","application/pdf");
    delReq.addProperty(DeliveryPropertyDefinitions.SMTP_ATTACHMENT,m);
    Thanks

    Ok. What I needed to do is use the Bursting Engine to send out an email (list of invoices) to sales reps for our company. From what I read I have created an XML Document (Template) and have successfully ran that but it looks like I need to create a control file(bursting)? This control file would need to be saved as an XML? Is this correct?

  • "cacheHostInfo is null" and Add-SPDistributedCacheServiceInstance : Object reference not set to an instance of an object.

    I am working on a standalone install Sharepoint 2013 (no Active Directory). I found newsfeed feature is not available and checked Distributed Cache service is stopped. When start it “cacheHostInfo is null” is returned.
    I checked the Windows service “AppFabric caching service” is stopped because the default identity “Network Service” not work. Then I change the AppFabric service identity to use “.\administrator” (which is also the sp farm administrator) and the service can
    be started.
    However the “cacheHostInfo is null” when try to start Distributed Cache service in central admin.
    I searched on web and found this blog: http://rakatechblog.wordpress.com/2013/02/04/sharepoint-2013-spdistributedcacheserviceinstance-cachehostinfo-is-null/
    I tried to run the script but it return error:
    Add-SPDistributedCacheServiceInstance : Object reference not set to an
    instance of an object.
    At C:\root\ps\test.ps1:8 char:13
    + $whatever = Add-SPDistributedCacheServiceInstance
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo : InvalidData: (Microsoft.Share…ServiceInstance:
    SPCmdletAddDist…ServiceInstance) [Add-SPDistributedCacheServiceInstance]
    , NullReferenceException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletAddDistr
    ibutedCacheServiceInstance
    I am not sure what went wrong. Please give me some idea? Thank you for any comment!

    Can you deploy Active Directory as installing without is not a supported installation scenario - http://support.microsoft.com/kb/2764086.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • Using a Variable in SSIS - Error - "Command text was not set for the command object.".

    Hi All,
    I am using a OLE DB Source in my dataflow component and want to select SQL Query from the master table  I have created variables v_Archivequery
    String packageLevel (to store the query).
    <Variable Name="V_Archivequery" DataType="String">
         SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
         FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
         ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
         Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)
        </Variable>
    I am assigning this query to the v_Archivequery variable, "SELECT a.*, b.BBxKey as Archive_BBxKey, b.RowChecksum as Archive_RowChecksum
    FROM dbo.ImportBBxFbcci a LEFT OUTER JOIN Archive.dbo.ArchiveBBxFbcci b
     ON (SUBSTRING(a.Col001,1,4) + SUBSTRING(a.Col002,1,10)) = b.BBxKey
    Where (b.LatestVersion = 1 OR b.LatestVersion IS NULL)"
    Now in the OLE Db source, I have selected as Sql Command from Variable, and I am getting the variable, v_Archivequery .
    But when I am generating the package and when running I am getting bewlo errror
     Error at Data Flow Task [OLE DB Source [1]]: An OLE DB error has occurred. Error code: 0x80040E0C.
    An OLE DB record is available.  Source: "Microsoft SQL Native Client"  Hresult: 0x80040E0C  Description: "Command text was not set for the command object.".
    Can Someone guide me whr am going wrong?
    Please let me know where am going wrong?
    Thanks in advance.
    Thankx & regards, Vipin jha MCP

    What happens if you hit Preview button in OLE DB Source Editor? Also you can use the same query by selecting SQL Command option and test.
    Could you try set the Delay Validation = True at Package and re-run ?
    If set the query in variable expression (not in value), then Set Evaluate As Expression = True.
    -Vaibhav Chaudhari

Maybe you are looking for