Problems creating invoice from order (DI API and SBO)

Hello all!
I´m getting various tax problems using the following code to automatically create invoices from existing orders.
For Each currentKey In arrABEntrys
  objInv = objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
  objAB.GetByKey(currentKey)
  objInv.CardCode = objAB.CardCode
  With objInv.Lines
    .BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    .BaseEntry = currentKey
    .BaseLine = 0
    For i = 1 To objAB.Lines.Count - 1
      objInv.Lines.Add()
      BaseType = SAPbobsCOM.BoObjectTypes.oOrders
      .BaseEntry = currentKey
      .BaseLine = i
    Next
  End With
If objInv.Add() = 0 Then
Else
End if
The result of objInv.add() was first "5002 - 'Tax Definition (1)' (a very informative message to me).
Then I checked my admin tax settings and put a check on "EU".
The next time the result was "10 - Customer´s tax ID not defined OINV.LicTradNum"
Actually, I don´t want to pre-set any fields in the invoice, because the order looks complete to me.
By the way: The error occurs in SBO, too.
Thanks for help in advance!
Best regards
Marian

Hi Marian,
Your Error "10 - Customer´s tax ID not defined OINV.LicTradNum" is not working (through DI and in SBO)
occurs because your "Federal Tax ID" is not set up against the Business Partner. (This is on the main page of the Business Master Data Screen).
Set this up and it will work in SBO and the DI API!

Similar Messages

  • Restrict multiple Proforma invoice from order

    Hello All,
    Our customer wants to restrict multiple proforma invoice from sales order.I have written a logic in copy requirement routine.Its working when there is already created invoice from order .But if i try to create invoice first time from order then system doesn't allow me to create invoice and giving message "No billing document were generated ".
    Could anybody help.
    Regards,
    Sachin

    Hi,
    Restrict multiple Proforma invoices
    Thanks & regards.

  • Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in oracle and yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Hi All, We are in to Release 11.5.10.2.There is a specific requirement to Prevent users from creating Manual Sales Orders in Oracle and  yet users should be able to book the Sales Orders Imported from CRM system into Orcale.Please advise.

    Thanks for your advise.
    However, I missed to mention that we have two set of users  One is for Finished Goods and another for Spares.
    Only Spares users need to be prevented from creating Direct/Manual Sales Orders in Oracle.
    As you suggested, if this will be done at Form level, that may Disallow FG users also to create Manula Sales Orders which should not be the case.
    Further, I tried to test one scenario through Processing Constraints but it did not work.
    Application
    OM
    Validation Type
    Entity
    Temp
    Short Name
    TBL
    Validation Semantics
    Created By
    Equal To
    User(Myself)
    Processing Cosntraint
    Application
    OM
    Entity
    Order Header
    Constraint
    Operation
    User Action
    Create
    Not Allowed
    Conditions
    Group
    Scope
    Validation Entity
    Record Set
    Validation Template
    101
    Any
    Order Header
    Order
    Above Created
    Please advise.

  • Function module to create Invoice from the Delivery no ?

    Hi All,
    Is there any way (function module) to create an Invoice from the Delivery no and the Billing Type ? We do not want to go with BDC for transaction VF01.
    Details:
    We want to generate a pro-forma invoice while saving the delivery. We will have 'Special Function' (NAST-NACHA = 8) in the output determination and a routine would be called from there. That routine would contain the code to generate the Invoice. We will have only the 'Delivery no and the Billing Type'  in that routine. So trying to find any function module which can create an Invoice from the Delivery no and the Billing Type.
    Any suggestion / hint  is welcome.
    Thanks,
    Ashok

    Hello Ashok Satapathy ,
                                        The only option  for you is to call the FM "GN_INVOICE_CREATE" .
    There is no special FM availaible to pass only the delivery number at this point.
    You need to retrieve all the delivery information details and need to pass it to the FM "GN_INVOICE_CREATE".
    Thanks,
    Greetson

  • Can we create invoice from po instead of receipt in P2P

    Hi,
    how to create invoice from po in p2p instead from receipts.
    Thanks and Regards,
    Srikanth

    Hi Srikanth,
    You don't need a receipt to create an Invoice.
    All depends on your matching preferences.
    2-way. 3-way, 4-way - Please go through the documentation.
    Thanks
    Vinod

  • I have problems transferring files from PC to Mac and from Mac to Mac

    I have problems transferring files from PC to Mac, and from Mac to Mac.  PC to PC is fine.  Nothing but problems with the Mac.  One example:
    While working on my PC, I open shared folders on an external HDD connected to the Mac.  I click on paste to move the files.  I get an error after a few seconds to a minute of trying to move several files from my PC Win 7 to Mac OS Maverick, that there is a file already at the destination on Mac. This statement is true, but it was just put there because I am copying them over in that same action.  It reads 0Kb and wasn't there before I started.  Then I get an error: The Action Cannot be completed because the folder is open in another program.  Close the folder or file and try again..
    Whether I click on it a bunch right of way or wait, it still takes about 45 seconds. I have to do it with every file and it only happens when copying from a PC to Mac.  I have even restarted both computers so nothing is using any files.  If I copy one file at a time, I don't get any error.
    So I have one file to move, no problem.  If move 5 files, The first will go fine, but it shows all 5 files in folder at once.  All other files than the first show 0kb. I get the file already existing error once it starts the second file transfer, and I select move and replace.  Then I get The Action Cannot be completed because the folder is open in another program.  I wait or click repeatedly until it starts to move file.  That file will then show something other than 0kb.  When it is done, the error process starts all over.  I tried checking the PC with unlocker, but the files do not show themselves locked on the PC.

    Its not only French. Even certain characters in English will come across as gobblydegook from 1 platform to another. I see this in emails that likely were composed in Word & the characters don't come across.
    Not sure if this is still true, but years ago someone explained that there is a standard character set & then I think its extended characters & those vary from platform to platform or language to language, etc.

  • Unable to Create Invoice from iSupplier

    I am unable to create invoice from isupplier module,
    the moment i click on create invoice "with a PO" or "without a PO" under finance Tab,
    i get this error "You cannot complete this task because you accessed this page using the browser's navigation button(the browser Back button, for example).
    But I have not accessed the pages with any browser navigation buttons at all.
    please advise what may be preventing me from creating invoice?

    This is caused by the incorrect setup of the browser.
    The browser's "Temporary Internet Files" setting for "Check for newer versions of stored pages" was set to "Never". This caused the browser to pull up the old data instead of querying the server.
    Please make sure the browser's "Temporary Internet Files" setting for "Check for newer versions of stored pages" is set to "Automatic".
    You Used Your Browser's Navigation Buttons To Get Here (Doc ID 1214138.1)

  • Creating Invoice from a Delivery Note using SDK

    Hi,
    I am working on SAP 2005 A Patch 4 with SQL 2000 SP 4. I am using VB.NET (VS2005). I am trying to create a Invoice from a Delivery note which is created based on a Sales order.
    I am getting the following error
    Error occured while saving Invoice: 0 - '15' is not a valid value for field 'BaseType'. The valid values are: '-1' - '',  '0' - '',  '23' - 'Sales Quotation',  '17' - 'Sales Order',  '16' - 'A/R Returns'
    The Code that i used to create the invoice is as follows
    Dim oInvoice As SAPbobsCOM.Documents
            oInvoice = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            oDelivery = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
            Try
                If oDelivery.GetByKey(iDlvNo) = True Then
                    sTaxCodes = sTaxCode
                    oInvoice = pcompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)
                    oInvoice.CardCode = oDelivery.CardCode
                    oInvoice.SalesPersonCode = oDelivery.SalesPersonCode
                    oInvoice.DocType = SAPbobsCOM.BoDocumentTypes.dDocument_Items
                    oInvoice.DocumentSubType = SAPbobsCOM.BoDocumentSubType.bod_None
                    oInvoice.Address = oDelivery.Address
                    oInvoice.ShipToCode = oDelivery.ShipToCode
                    oInvoice.Address2 = oDelivery.Address2
                    oInvoice.JournalMemo = "Invoice - " & oDelivery.CardCode
                    oInvoice.Comments = "Based on Delivery  " & oDelivery.DocNum
                    oInvoice.PaymentGroupCode = oDelivery.PaymentGroupCode
                    oInvoice.DocDueDate = Now.Month & "/" & Now.Day & "/" & Now.Year
                    For iRowNo = 0 To oDelivery.Lines.Count - 1
                        If iRowNo > 0 Then
                            oInvoice.Lines.Add()
                        End If
                        oDelivery.Lines.SetCurrentLine(iRowNo)
                        oInvoice.Lines.ItemCode = oDelivery.Lines.ItemCode
                        oInvoice.Lines.Quantity = oDelivery.Lines.Quantity
                        oInvoice.Lines.Rate = oDelivery.Lines.Rate
                        oInvoice.Lines.BaseType = SAPbobsCOM.BoAPARDocumentTypes.bodt_DeliveryNote
                        oInvoice.Lines.BaseEntry = iDlvNo 'DocEntry of Delivery Note
                        oInvoice.Lines.BaseLine = iRowNo
                        oInvoice.Lines.TaxCode = sTaxCodes
                    Next
                    iReturnValue = oInvoice.Add()
                    If iReturnValue <> 0 Then
                        pcompany.GetLastError(iReturnValue, sErrorDescription)
                        Throw New Exception("Error occured while saving Invoice: " + _
                                           iErrorNo.ToString() + " - " + sErrorDescription)
                    Else
                        MessageBox.Show("Invoice created succesfully")
                    End If
                End If
    Since in the error message it has specified that i have given the BaseType as Delivery which has a value of 15 i changed that from bodt_DeliveryNote to bodt_Order which has a value as 17.
    When i tried creating the invoice again it gave the error
    Error occured while saving Invoice: 0 - Target item number does not match base item number.  [RDR1.TargetType][line: 2]
    I am not able to proceed further ... can any one help me
    thanks in advance
    Ganesh

    Greetings,
    I am having a similar problem, only I'm doing it as suggested in Louis' reply.  In fact I copied that code and tried it.  It's giving me a 2028 error with no description.
    I had been doing it slightly differently and the error I was getting was 5002 "Item no. is missing [INV1.ItemCode][line 2]"  I don't have 2 lines and I'm certain I have an item code.  The numbers I'm putting in for baseentry & baseline are absolutely in the table and the order is open.
    Here is that code:
            oDNUpd = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            oDNUpd.CardCode = CardCode.Text
            oDNUpd.Lines.BaseEntry = CInt(SalesOrder.Text)
            oDNUpd.Lines.BaseLine = CInt(baseline.Text)
            oDNUpd.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
            oDNUpd.Lines.Add()
            lretcode = oDNUpd.Add
    I'm using SBO 2005 patch 7 (and the new dll).  I have similar code doing a stock transfer and it's working fine.
    Thanks for any suggestions you can offer
    John

  • Problem creating a sales order for configurable material in SAP ECC

    I have a Variant Configurable material named X.
    The structure of this VC material is
    Material X has charatcertics CHARCTERISTIC1 and CHARCTERISTIC2.
    CHARCTERISTIC1 has values VALUE1
    CHARCTERISTIC2 has values VALUE2
    I created a sales order manually from VA01 using configurable material and read the values of all configuration tables to be filled from BAPISDORDER_GETDETAILEDLIST. With the help of this data i got an idea how to fill the tables of BAPI BAPI_SALESORDER_CREATEFROMDAT2. But still i am able to create a sales order but the configuration data that i give is not getting populated in the sales order.
    Where am i missing. please some body suggest. I am unable to debug and searched the forums
    for this information but dint find solution for my problem. some body please tell me where am i missing?
    Any help would be highly appreciated
    Edited by: jessica sam on Jan 12, 2009 2:59 PM

    Even after maintaining the item category MTAC(Mills Make to order config at mat level), the configurable material is not getting replaced in the sales order (va02). It is just showing material variant exists for the configurable material.
    The setting in item category for configuration is.
    Config. Strategy     01(Sales Order Strategy (TAC, TAM))
    Mat. Variant Action  4 (Replace configurable material (Append and change))
    ATP material variant 2 (Do not substitute if not completely available)
    Structure scope      D (Configuration, poss. with BOM explosion)
    I have maintained the stock for material variant as well to take care of ATP material varinat setting shown above.
    Please suggest if missing something.

  • Having problems creating PDF from website with query-string URLs

    I have a website that I would like to create a PDF from. I am using the Create -> PDF from Web Page..., selecting the site's home page, and capturing 2 levels, with "stay on same path" and "stay on same server" checked in order to limit the scope of the crawl.
    Where the pages are at example.com/foo/ and example.com/foo/bar/, this works fine. However, where the pages are at example.com/foo/ and example.com/foo/?p=1, the page represented by the query string URL is not converted to the PDF.
    This is a problem, given that the site I want to archive as a PDF uses query strings for most of its pages.
    I have been able to individually convert a single query-string-based page into a PDF using this method, but doing this for every page on the site would be almost impossible given the sheer number of pages on the site.
    Is this a known issue? Is there a workaround other than separately capturing each page (which would be prohibitive effort)?
    I have tried this in both Acrobat Pro X and Acrobat Pro 9 for Mac, with the same results.

    Remember, Acrobat is a 32-bit application and as such cannot access all that 'extra' stuff.
    Be well...

  • Invoice from order in B1WS

    Hi,
    I can see that is possible in DI server to create an invoice from a sales order. Can anyone point me in the right direction for doing this with B1WS?
    Thanks
    Iain

    njmog1 wrote:
    I think it should be possible, in the same way as the DI (Apologies if it isn't but in theory it should be)
    >
    > You link documents on a line level instead of a header level. The needed properties on the line level are BaseType, BaseEntry and BaseLine. If you set these, the document will pull through the information from the base document.
    Thank you for the support! Although not strictly an answer it helped motivate me to figure the thing out.
    Relatively straight forward in the end, this is my code in case it can help someone else -
    Dim myInvoice As Document = New Document
    myInvoice.CardCode = "XXX01"
    Dim DocLine As DocumentDocumentLine = New DocumentDocumentLine 'just used to define type in the array
    myInvoice.DocumentLines = Array.CreateInstance(DocLine.GetType(), (1)) 'create the array with your amount of lines
    Dim DocLine1 As DocumentDocumentLine = New DocumentDocumentLine 'define the lines of your document
              With DocLine1
                    .BaseEntry = 21175
                    .BaseEntrySpecified = True
                    .BaseLine = 0
                    .BaseLineSpecified = True
                    .BaseType = 17 '17 for sales order, 15 if you want to base this on a delivery note
                    .BaseTypeSpecified = True
                End With
                myInvoice.DocumentLines.SetValue(DocLine1, 0) 'set your document lines
                myInvoiceService.Add(myInvoice) 'add invoice
    Iain

  • Create Invoice From a Draft

    Hi everybody,
                        I'm trying to create an invoice from an existing draft by code and i can't...i use this code to do this, but it create a new draft instead an invoice.
    oCompany.XmlExportType = SAPbobsCOM.BoXmlExportTypes.xet_ExportImportMode
    oCompany.XMLAsString = False
    oDrafts = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDrafts)
    oFacts = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
    oDrafts.GetByKey(20)
    oDrafts.SaveXML("C:\draft.xml")
    oFacts = oCompany.GetBusinessObjectFromXML("C:\draft.xml",0)
    oFacts.DocObjectCode = SAPbobsCOM.BoObjectTypes.oInvoices
    oFacts.Add()

    Hi Mariano Bertini,
    Can you pls share the code as i'm facing the same problem for conversion of open draft a/r invoice to invoice

  • Problem creating a table with a subquery and a dblink

    Hello!!
    I have a little problem. When I create a table with a subquery and a dblink, for example:
    CREATE TABLE EXAMPLE2 AS SELECT * FROM EXAMPLE1@DBLINK
    the table definition is changed. Fields with a type of CHAR or VARCHAR2 are created with a size three times bigger than the original table in the remote database. Field of type DATE and NUMBER are not changed. For example if the original table, in the database 1, has a field of type CHAR(1) it is create in the local database with a type of CHAR(3), and a VARCHAR2(5) field is created with VARCHAR2(15).
    Database 1 has a WE8DEC character set.
    Database 2 has a AL32UTF8 character set.
    Could it be related to the difference in character sets?
    What can I do to make Oracle use the same table definition when creating a table in this way?
    Thanks!!

    That is related to character sets, and probably necessary if you want all the data in the remote table to be able to fit in the new table.
    When you declare a column VARCHAR2(5), by default, you're allocating 5 bytes of storage. In a single-byte character set, which I believe WE8DEC is, that also happens to equate to 5 characters. In a multi-byte character set like AL32UTF8, though, 1 character may require up to 3 bytes of storage, so you'd need to allocate 15 bytes to store that data. That's what's going on here.
    You could still store all the data if you create the table locally by explicitly requesting 5 characters of storage by declaring the column VARCHAR2(5 CHAR). You could also set the NLS_LENGTH_SEMANTICS parameter to CHAR rather than BYTE before creating the table, but I believe that both of these will only apply when you're explicitly defining columns as part of your CREATE TABLE. I don't believe either will apply to CTAS statements.
    Justin

  • Problems creating PDF from JPEGs.

    I am using Acrobat Standard 6.0.5. I am having trouble creating a PDF from certain JPEGs. I created these JPEGs using a scanner and Photoshop Elements 5, saving them as 8-bit grayscale at 300dpi. When I create a PDF from these JPEGs in Acrobat, I get a blank, 1 inch x 1 inch image. I've tried zooming in and out and the image is still blank. The funny thing is that I can extract the JPEGs from the newly created PDF, so they are somehow present; I just can't see them.
    Some other data points:
    1. I can create a PDF from JPEGs from my digital camera. These are 180 dpi, 24-bit color, but otherwise I don't see any notable differences.
    2. I've tried converting the problematic JPEGs to 24-bit color. That made no difference.
    3. I've tried converting the problematic JPEGs to JPEG2000. That *did* make a difference -- I can create a PDF from them just fine.
    4. I can open the problematic JPEGs in Photoshop Elements and *print* them to PDF. That works just fine.
    There's obviously something about these files that Acrobat doesn't like, or else some configuration setting in Acrobat that needs to be adjusted, but I can't figure out what it is.
    Thanks in advance!

    JPegs are often problems. You might try saving to TIFF instead, the standard for scanners.

  • Problem creating  image from a data vector

    Hello i have a problem in this aplication.
    I get a image from a web cam. I want to put the original image in a file and the negative image in another file (in this example is not the negative image, is just a white image). The problem is when i use setData method. The image become black. If I use setFormat method the new image is the original image.
    Here is the code with problems:
    imageBuffer = frameGrabbingControl.grabFrame();
    theData = new int[dataLength];
    theData = (int[]) imageBuffer.getData();
    for (int y = 0; y < videoHeight - imageScanSkip; y+=imageScanSkip) {
    for (int x = 1; x < videoWidth - imageScanSkip; x+=imageScanSkip)
    theData[y*videoWidth+x]=Integer.parseInt("FFFFFF",16);
    Buffer b1=new Buffer(); //This is the new buffer in which i want to put the new pic
    b1.setData(theData);
    //here i create the 2 files frst from the original buffer and second from the new buffer b1
    Image img = (new BufferToImage((VideoFormat)imageBuffer.getFormat()).createImage(imageBuffer));
    Image img1 = (new BufferToImage((VideoFormat)b1.getFormat()).createImage(b1));
    BufferedImage buffImg = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
    BufferedImage buffImg1 = new BufferedImage(320,240, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = buffImg.createGraphics();
    Graphics2D g1 = buffImg1.createGraphics();
    g.drawImage(img, null, null);
    g1.drawImage(img1, null, null);
    try{
    ImageIO.write(buffImg, "jpg", new File("c:\\webcam.jpg"));
    ImageIO.write(buffImg1, "jpg", new File("c:\\webcam1.jpg"));
    catch (Exception e){}
    the webcam1.jpg file is black(it should be white).
    If i put "b1.setFormat(imageBuffer.getFormat());" the webcam1.jpg will be same the file as webcam.jpg

    Hello i have a problem in this aplication.
    I get a image from a web cam. I want to put the original image in a file and the negative image in another file (in this example is not the negative image, is just a white image). The problem is when i use setData method. The image become black. If I use setFormat method the new image is the original image.
    Here is the code with problems:
    imageBuffer = frameGrabbingControl.grabFrame();
    theData = new int[dataLength];
    theData = (int[]) imageBuffer.getData();
    for (int y = 0; y < videoHeight - imageScanSkip; y+=imageScanSkip) {
    for (int x = 1; x < videoWidth - imageScanSkip; x+=imageScanSkip)
    theData[y*videoWidth+x]=Integer.parseInt("FFFFFF",16);
    Buffer b1=new Buffer(); //This is the new buffer in which i want to put the new pic
    b1.setData(theData);
    //here i create the 2 files frst from the original buffer and second from the new buffer b1
    Image img = (new BufferToImage((VideoFormat)imageBuffer.getFormat()).createImage(imageBuffer));
    Image img1 = (new BufferToImage((VideoFormat)b1.getFormat()).createImage(b1));
    BufferedImage buffImg = new BufferedImage(img.getWidth(null), img.getHeight(null), BufferedImage.TYPE_INT_RGB);
    BufferedImage buffImg1 = new BufferedImage(320,240, BufferedImage.TYPE_INT_RGB);
    Graphics2D g = buffImg.createGraphics();
    Graphics2D g1 = buffImg1.createGraphics();
    g.drawImage(img, null, null);
    g1.drawImage(img1, null, null);
    try{
    ImageIO.write(buffImg, "jpg", new File("c:\\webcam.jpg"));
    ImageIO.write(buffImg1, "jpg", new File("c:\\webcam1.jpg"));
    catch (Exception e){}
    the webcam1.jpg file is black(it should be white).
    If i put "b1.setFormat(imageBuffer.getFormat());" the webcam1.jpg will be same the file as webcam.jpg

Maybe you are looking for

  • Excise invoice number range assignment

    Dear SAP Gurus, This is with regarding Excise invoice number range assignment (J_1IINTNUM, J_1IRG23A1, J_1IRG23A2) For the financial period April 2011 to March 2012, following number ranges exist already in SNUM. 01---- 2011--5007393-5999999 01---201

  • Process Chain Load Processing Time Issue

    Hi All, One my process Chain is running daily , but after 2 hours of load it is showing Red in the Monitor screen, but after 5 hours load is successful. Why Monitor screen is showing Red? Is it possible to Extend the load processing time in the Infop

  • ICloud changes please help me!

    What will be deleted if I delete my iCloud account?  As in when the account is deleted will I lose my pictures, contacts and other files?

  • Ipod Nano 6th gen apps

    I have the new ipod nano (6th gen), and i was just wondering what other "apps" i can get other than the ones that i started with. 

  • Output proposal from customer master in 4.7

    Hi   I'm trying to find configuration nodes in spro for <b>output proposal from customer master</b> in SAP R/3 4.7. Strangely it is not where it is supposed to be i.e. SD>Basic Functions>Output Control      I tried by searching but unable to find it.