How to Create AP Invoice from PO using SDK

Hi,
I want to create an A/P Invoice thru SDK for which already the Purchase Order has been entered thru the front-end. How to do it? Using SBO objects I am loading the particular PO. But after that how to transfer everything in the PO to AP Invoice.
Thanx in advance.
with regards,
Ram.

Hi Ram,
Herewith an example:
        oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseInvoices)
        oPOrder.GetByKey(sOrder)
        oInvoice.CardCode = oPOrder.CardCode
        oInvoice.CardName = oPOrder.CardName
        oInvoice.Address = oPOrder.Address
        oInvoice.Address2 = oPOrder.Address2
        oInvoice.AgentCode = oPOrder.AgentCode
        oInvoice.Comments = oPOrder.Comments
        oInvoice.ContactPersonCode = oPOrder.ContactPersonCode
        oInvoice.DocDate = oPOrder.DocDate
        oInvoice.DocDueDate = oPOrder.DocDate
        oInvoice.FederalTaxID = oPOrder.FederalTaxID
        oInvoice.JournalMemo = "Based on Sales Order " & sOrder
        oInvoice.NumAtCard = oPOrder.NumAtCard
        oInvoice.Project = oPOrder.Project
        oInvoice.Reference1 = oPOrder.Reference1
        oInvoice.Reference2 = oPOrder.Reference2
        oInvoice.SalesPersonCode = oPOrder.SalesPersonCode
        oInvoice.SummeryType = oPOrder.SummeryType
        For i = 0 To oPOrder.Lines.Count - 1
            oPOrder.Lines.SetCurrentLine(i)
            If i > 0 Then
                oInvoice.Lines.Add()
            End If
            oInvoice.Lines.BaseEntry = oPOrder.DocEntry
            oInvoice.Lines.BaseLine = oPOrder.Lines.LineNum
            oInvoice.Lines.BaseType = 22
        Next
        If oInvoice.Add() <> 0 Then
            oApplication.MessageBox("Error: " & oCompany.GetLastErrorDescription)
        End If
        System.Runtime.InteropServices.Marshal.ReleaseComObject(oInvoice)
Hope it helps,
Adele

Similar Messages

  • How to create an invoice from multiple sales doc.

    Hi,
    how to create an invoice from multiple sales doc.
    thanx,
    sourav

    hello, friend.
    assuming that your settings in VTFA and VTFL allow, you can create 1 invoice for many sales orders or deliveries by using VF04.  choose all documents that apply and click "collective billing document". 
    you can also click on "simulation" if you want to test if the combination is possible and the system will give you a split analysis if this is not possible.
    regards.

  • How to create chord charts from midi using logic pro x

    How to create chord charts from midi using logic pro x

    Depending on what you mean by Chord charts (Tabs?)
    Use the Score.......
    http://help.apple.com/logicpro/mac/10/#lgcpf755d649

  • How create an invoice from delivery using an idoc

    Hi expert,
    I'll like recive an help to know how implement the following solution: we would create an invoice from delivery sent into the idoc structure.
    In detail the process that we would implement is:
    To use an output type for outbound delivery and to assign a program to it in order to create an idoc when the output type is processed; when the idoc is created the program has to call the transaction VF01 to create the invoice from the idoc.
    Which type of idoc do we have to use?
    How the VF01 call transaction should be excuted?
    Many thanks in advance
    Regards
    Roberta

    Check with following standard basic IDoc types:
    INVOIC01- Invoice/Billing document
    INVOIC02 - Invoice/Billing document
    INV_ID01 - Invoice
    SISINV01- SIS - billing document
    And refer following link for understanding: [iDoc|http://wiki.sdn.sap.com/wiki/pages/viewpage.action?spaceKey=HOME&title=StepbyStepprocedureforcreationof+IDOC&decorator=printable]
    I hope this can assist you.
    Thanks & Regards
    JP

  • How to create/delete files from filesystem using PL/SQL ? UTL_FILE?

    Greetings,
    I will start by explaining what i intend to do.
    I have an application made in APEX. This application will have among other purposes the managment of pdf files which will reside in the filesystem.
    I have questioned the person in charge to keep the pdf files in the database and not in the filesystem but without success.
    So the pdf files reside in the filesystem and there is a record in a database table about them. A table keeps all info about the pdf, their location , size and name, creation date etc.
    The APEX application will have a mecanism to allow the deletion of the pdf files if an administrator decides.
    So it should be possible for an administrator to schedule the deletion of all pdf files whoe creation date is older than 2008 for example
    So, how can i achieve that?
    After some research i foudn about the UTL_FILE package which seems to have it takes to perform the task in issue.
    My idea was to have a script in the operating system which runs nightly and reads a file containing all file names of the pdf to be erased.
    The file which contains the names of the pdfs to be erased will be generated by the database a few minutes before.
    If there are no pds files to be erased than the file containing the names will simply be empty
    Are there any other viable solutions out there?
    And as for opening/creating the file withn the pdf names, i use:
    UTL_FILE.FOPEN (
    location IN VARCHAR2,
    filename IN VARCHAR2,
    open_mode IN VARCHAR2,
    max_linesize IN BINARY_INTEGER)
    RETURN file_type;
    And as for writing lines (a pdf name per line ), i use;
    UTL_FILE.PUT_LINE (
    file IN FILE_TYPE,
    buffer IN VARCHAR2,
    autoflush IN BOOLEAN DEFAULT FALSE);
    is there a better solution?
    thanks all.
    -> My Homepage <-
    Edited by: Igor Carrasco on Apr 14, 2009 3:11 PM
    Edited by: Igor Carrasco on Apr 14, 2009 3:12 PM

    Greetings,
    I have read that link above, some questions still though.
    I will provide some more information.
    -First the database is in a windows server.
    The windows server has a virtual drive mounted as z:\ <-- this points to a directory in virtual machine, i can manually access/create/delete files manually,i tested.
    -Second utl_file_dir is defined as * , in t that enough to cover mounted drives? ( i can't change the init.ora and reboot the db right now :( gotta wait.. )
    Do i explicitly have to define utfl_file_dir = z: ?
    -Third haven't had the chance to test it on linux or any other operating system, assuming a virtual unit is mounted successfully and that the issues above are solved i should be able to operate on any mounted drive whatever the os, right?
    Best regards

  • How to create a list from checkboxes using Numbers on iPad?

    I am creating a guest list using Numbers foriPad. First sheet is a list of invited people with checkboxes (Yes/No/still to reply) in next column. In the next sheet i want create a list of everyone that has replied yes.
    I have tried using the if statement, but I dont want any blank cells.
    -IF(A2;TRUE;A1) gives name in A1 if box is checked, but gives 0 or something else if i specify. But i want to automatically start on next row to avoid blank or 0-
    Example:
    David   V
    Lisa.     V
    Derek 
    Brad.   V
    Paul.
    John
    The separate list in another sheet should then be:
    David
    Lisa
    Brad
    Any help will be appreciated.

    Can you use the the reorganize panel to sort the list?
    Idon't have Numbers on the iOS so I am not sure.  You are posting in the forum for Numbers on Mac OS X.
    you can also add a new column (let's say C)
    where
    C1=if(A1, A1, "")
    this will include the name from column A  when the checkbox in B is checked.  You can then copy column C and paste values using the menu item (Edit > Paste Values, or equivalent in iOS... not sure what it is)

  • How to create an Invoice using a BAPI call from XI and trigger the sameIdoc

    Hi XI Gurus,
    I have a senario where in I need to create an Invoice from a XI using BAPI  and then I need to auto tigger the same INVOICE IDOC whcih has been created and this has to converted into EDI using Seebuger Adapter.
    1. How can be this achived??
    2. What is the BAPI that I need to use to create Invoive from XI
    3. What are all the configurations that I need to do to atuo tiggert an INVOICE Idoc when it is created.
    Please Help......
    Thanks in Advance...
    Suma

    Hi,
    Are you looking for BAPI <b>BAPI_ACC_INVOICE_RECEIPT_POST</b>?
    Hope this helps (please reward me if it does).
    Regards, Joerg

  • Creating Excise Invoice from Sales Delivery using DI API.

    Hi Experts,
    I have been searching a lot for any Business Object for creating Excise Invoice base on Sales Delivery using DI API.. But have not yet found any one.
    I want to create Invoice for excisable items from Sales Delivery using DI API.,for Excisable items we cannot create standalone A/R Invoice . We need to create Excise Invoice also . But How to create Excise Invoice based on Sales Delivery using DI API. Is there any Business Object for that.
    Please suggest me.
    Thanks and Regards,
    Pooja Singh.

    Hi all,
    I have not received any reply for this thread. Does this mean that there is no provision for creating Excise Invoice from Sales Delivery ? Actually I was asked to create sales delivery and then Outgoing Excise Invoice and then Sales Invoice using DI API.
    But I don't find any Business Object for this in SDK ? Is it really not possible to create Outgoing Excise Invoice from Sales Delivery using DI API.? If possible then how?
    Please reply me if anyone has got any idea in this regard.
    Thanks and Regards,
    Pooja Singh.

  • How to create dll file from c code to use in compactrio 9004 RT controller

    Hi.
    I am using Compactrio 9004 Real time controller and i am new to this. I have a C code and i want to use this with the RT controller.I red that that can be done by creating a dll file and can be called in labview.Can any body expalin how to create a DLL from the c code and be used with this RT controlelr?
    Regards,
    Vishnu

    vishnu123 wrote:
    Hi,
    Earlier in this forum itself in cRIO 900x controllers will run Pharlap and run C/C++ code compiled into .dll files.Can you please tell how to transfer the created DLL to RT controller memory throght FTP?
    Thanks and regards,
    Vishnu
    There is another KB article about this for Pharlap based controllers. And you are right the earlier CompactRIO controllers were Pharlap based. Basically for a deployed application to work, you need to put the DLL through FTP in "/ni-rt/system". If you deploy it directly from the project everything will be loaded into memory through the project environment itself including directly dependable DLLs, (but of course won't survive a power cycle).
    I hope you are aware that while Windows DLLs can work on Pharlap OS they by no means will do so always. The Pharlap OS has not a fully featured Windows API. Also you need to be careful which version of Visual C you are going to use depending on the Pharlap OS version, since the VC runtime DLLs already present on the controller will need to be the same as the ones your Visual C environment likes to link in. Recent Pharlap OS versions use the msvcr71.dll. It's very possible that those runtime libraries can't just simply be copied from a normal Windows installation but might have been recompiled by NI specifically for their controller targets.
    So to avoid problems it's a good idea to make sure your DLL uses the same runtime library DLL or make your DLL to include the static MS runtime.
    Rolf Kalbermatter
    Message Edited by rolfk on 02-05-2008 09:51 AM
    Message Edited by rolfk on 02-05-2008 09:53 AM
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to create an Invoice for the sales order using the T-Code VF01

    Hello Experts,
    How to create an Invoice for a sales order using the T-Code VF01?
    Thanks in advace,
    Suma

    hi,
    Make the following settings-
    1. Create sales document and billing type
    2. assign billing type in sales document type config VOV8
    3. Activate itemcategory as sales order related billing
    4. Maintain copy control header and item level between sales order and billing
    5. Maintain pricing procedure for sales order and billing
    6. Define Output procedure in case to print invoice
    Regards
    Goutham

  • How to create excise invoice with reference delivery document

    hi all sd guru
    please guide me how to create excise invoice by taking reference of delivery no.
    thankx in advance
    san

    HI
    FACTORY SALES
    IN CASE OF FACTORY sales you have to create a billing document either Proforma or Commercial.
    Then you can reference the billing doc i9n J1IIN for creation
    DEPOT SALES
    In case of depot sales you can create a excise invoice with reference to delivery document.
    For this after creation of delivery goto J1IJ  and slect the rg23d from menu
    you can create an excise invoice with delivery in depot sales.
    In factory it is not possible to create a excise invoice with delivery doc.
    regards
    Prashanth

  • How to create Excise Invoice.

    Hi SD Guru's
              How to create excise invoice and what is the use of this one and sd point what are the setting required.
    Thanks
    Rajendra

    In Indian Manufacturing scenario, Excise Invoice is required when goods move out of factory premises. The process is as under:
    Inquiry / Document type IN
    Tcode: VA11,VA12,VA13. tables VBAK,VBAP
    Quotation / QT
    Tcode: VA21,VA22,VA23. tables VBAK,VBAP
    Sales Order OR
    Tcode: VA01,VA02,VA03. tables VBAK,VBAP
    Delivery LF
    Tcode: VL01,VL02,VL03. tables LIKP,LIPS
    Billing F2
    Tcode: VF01,VF02,VF03. tables VBRK,VBRP
    Excise Invoice
    Tcode: J1IIN
    Configuration of CIN Settings:
    1.1 Maintain Excise Registration
     Logistics general  SAP Ref. IMG SPRO  Maintain Excise Basic setting India tax on Goods Movements Registrations
    1.2 Maintain Company Code Settings
    SPRO   Basic settingIndia  tax on Goods Movements Logistics general SAP Ref. IMG   Maintain Company Code Settings
    1.3 Maintain Plant Settings
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Maintain Plant Basic setting India Movements Settings
    1.4 Maintain Excise Groups
    SAP Ref. IMGSPRO   Maintain Basic setting India  tax on Goods Movements Logistics general  Excise Groups
    1.5 Maintain Series Groups
    SAPSPRO   Basic setting India  tax on Goods Movements Logistics general Ref. IMG  Maintain Series Groups
    1.6 Maintain Excise Duty Indicators
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Maintain Excise Duty Basic setting India Movements Indicators
    1.7 Maintain Subtransaction Type with Text
    India  tax on Goods Movements Logistics general  SAP Ref. IMG SPRO   Maintain Subtransaction Type with TextBasic setting
    1.8 Determination of Excise Duty
    tax Logistics general  SAP Ref. IMG SPRO   Select Tax Calculation Determination of Excise DutyIndia on Goods Movements Procedure
    1.9 Maintain Excise Defaults
    SAP Ref.SPRO   Determination of ExciseIndia  tax on Goods Movements Logistics general IMG   Maintain Excise DefaultsDuty
    1.10 Condition-Based Excise Determination
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Define Tax Code for Condition-Based Excise DeterminationIndia Movements Purchasing Documents
    1.11 Condition-Based Excise Determination
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Assign Tax Code to Condition-Based Excise DeterminationIndia Movements Company Codes
    1.12 Classify Condition Types
    SAPSPRO   Condition-BasedIndia  tax on Goods Movements Logistics general Ref. IMG   Classify Condition TypesExcise Determination
    1.13 Maintain Chapter IDs
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Maintain Chapter ids Master dataIndia Movements
    1.14 Assign Users to Material Master Screen Sequence for Excise Duty
    SPRO   Master dataIndia  tax on Goods Movements Logistics general SAP Ref. IMG  Assign Users to Material Master Screen Sequence for Excise Duty
    1.15 Specify Excise Accounts per Excise Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Specify Excise Accounts per Excise Account determinationIndia Movements Transaction
    1.16 Specify G/L Accounts per Excise Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Specify G/L Accounts per Excise Account determinationIndia Movements Transaction
    1.17 Incoming Excise Invoices
    SAPSPRO   BusinessIndia  tax on Goods Movements Logistics general Ref. IMG   Incoming Excise InvoicesTransactions
    1.18 Define Processing Modes Per Transaction
     Logistics general  SAP Ref. IMG SPRO   Define Processing Modes Business TransactionsIndia tax on Goods Movements Per Transaction
    1.19 Define Reference Documents Per Transaction
    tax on Goods Logistics general  SAP Ref. IMG SPRO   Define Reference Documents Per Business TransactionsIndia Movements Transaction
    1.20 Maintain Rejection Codes
    SAPSPRO   BusinessIndia  tax on Goods Movements Logistics general Ref. IMG   Maintain Rejection CodesTransactions
    1.21 Specify Which Movement Types Involve Excise Invoices
    Logistics SAP Ref. IMG SPRO   Specify Which Business TransactionsIndia  tax on Goods Movementsgeneral  Movement Types Involve Excise Invoices
    1.22 Outgoing Excise Invoices
    tax on Goods Logistics general  SAP Ref. IMG SPRO  Assign Outgoing Excise Invoices  Business TransactionsIndia Movements Billing Types to Delivery Types
    1.23 Maintain Default Excise Groups and Series Groups
     Logistics general  SAP Ref. IMG SPRO   Outgoing Excise Invoices  Business TransactionsIndia tax on Goods Movements Maintain Default Excise Groups and Series Groups
    1.24 Subcontracting Attributes
    tax on Logistics general  SAP Ref. IMG SPRO   Subcontrac Subcontracting Business TransactionsIndia Goods Movementsting Attributes
    1.25 Maintain Movement Type Groups
    SPRO   BusinessIndia  tax on Goods Movements Logistics general SAP Ref. IMG   Subcontracting SubcontractingTransactions Attributes
    1.26 Utilization Determination
    SAPSPRO   BusinessIndia  tax on Goods Movements Logistics general Ref. IMG   Utilization Determination UtilizationTransactions
    1.27 Specify SAPscript Forms
    tax on Logistics general  SAP Ref. IMG SPRO   Specify Excise Registers Business TransactionsIndia Goods Movements SAPscript Forms
    1.28 Number Ranges
    SAP Ref. IMGSPRO   Number ToolsIndia  tax on Goods Movements Logistics general  Ranges
    1.29 Message Control
     SAP Ref. IMG SPRO   Message ToolsIndia  tax on Goods MovementsLogistics general  Control
    Regards,
    Rajesh Banka

  • Create a PDF from webpage using entire site option doesn't works

    OK, guys, this is the problem...
    After YEARS of testing from Acrpbat 4 thru 9 on Create a PDF from webpage using entire site option... it doesn't works properly and doesn't got the entire site. ALWAYS get an error of memory or any other error but FINALLY you NEVER got the entire site. I'm talking for a big website... not like amazon.com, but a big one.
    I make a walkarround to try to capture the website in parts but Acrobat is not "intelligent" to make a resume capture of the site, because ALWAYS start from the begining instead from the resume position of the site...
    My question is, HOW can get the ENTIRE SITE in a PDF document... without getting errors or stopping the capture process...
    Don't have problem of low RAM memory because I'm in a MONSTER MACINTOSH.... 3.2 GHZ with 8 Core and 32 GB of RAM under Mac OS X Leopard 10.5.6 in Acrobat 9 Pro.
    If I'm not wrong, the GET ENTIRE SITE option in Web Capture (Create a PDF from webpage using entire site option) doesn't works from Acrobat 4 thru 9 in Pro version... tested, you'll never got the entire site... I'm talking in capture a huge entire site and not a little one...
    Can someone help me?
    Thanks.

    Ok so I go to a web page and select something to print. Once I've clicked print I switch over from printer/micosoft xps docu writer/fax and select Adobe PDF. All goes through with a 'Create Adobe PDF' coming up progressing through to eventually save and store. Once I open the file it end up as the picture above. I have the same version on another computer and that works fine but this particular Sony laptop it doesn't seem to work properly. 

  • How to create a stored procedure and use it in Crystal reports

    Hi All,
    Can anyone explain me how to create a stored procedure and use that stored procedure in Crystal reports. As I have few doubts in this process, It would be great if you can explain me with a small stored proc example.
    Thanks in advance.

    If you are using MSSQL SERVER then try creating a stored procedure like this
    create proc Name
    select * from Table
    by executing this in sql query analyzer will create a stored procedure that returns all the data from Table
    here is the syntax to create SP
    Syntax
    CREATE PROC [ EDURE ] procedure_name [ ; number ]
        [ { @parameter data_type }
            [ VARYING ] [ = default ] [ OUTPUT ]
        ] [ ,...n ]
    [ WITH
        { RECOMPILE | ENCRYPTION | RECOMPILE , ENCRYPTION } ]
    [ FOR REPLICATION ]
    AS sql_statement [ ...n ]
    Now Create new report and create new connection to your database and select stored procedure and add it to the report that shows all the columns and you can place the required fields in the report and refresh the report.
    Regards,
    Raghavendra
    Edited by: Raghavendra Gadhamsetty on Jun 11, 2009 1:45 AM

  • How to create Inbound Idoc from XML file-Need help urgently

    Hi,
    can any one tell how to create inbound Idoc from XML file.
    we have xml file in application server Ex. /usr/INT/SMS/PAYTEXT.xml'  we want to generate inbound idoc from this file.we are successfully able to generate outbound XML file from outbound Idoc by using the XML port. But not able to generate idoc from XML file by using we19 or we16.
    Please let me know the process to trigger inbound Idoc with out using  XI and any other components.
    Thanks in advance
    Dora Reddy

    Hi .. Did either of you get a result on this?
    My question is the same really .. I am testing with WE19 and it seems SAP cannot accept an XML inbound file as standard.
    I see lots of mention of using a Function Module.
    Am I correct in saying therefore that ABAP development is required to create a program to run the FM and process the idoc?
    Or is there something tht can be done with Standard SAP?
    Thanks
    Lee

Maybe you are looking for

  • Skype number unreliable / not working?

    I am using Skype on a Galaxy S3. Ever since I signed up for a Skype number I have had people emailing me saying that they were unable to contact me on the Skype number that I gave them. This has become more frequent just recently and I have missed so

  • Bookmark sidebar will not scroll and bookmarks will not open in Firefox 7

    After updating Firefox to version 7, I am unable to use the Bookmarks sidebar. The sidebar will not scroll, nor will any of the bookmarks respond to a mouse click to open them. Had to uninstall 7 and go back to 6. Any fix for this?

  • OK... Safari is CRASHING about 2 times an HOUR....

    last week somebody instructed me..... Open the Finder.  From the Finder menu bar click Go > Go to Folder Type or copy / paste:   ~/Library/Caches/com.apple.Safari Click Go then move the   Cache.db  file from the com.apple.Safari folder to the Trash.

  • Package, Function in SQL Developer

    DB 10gR2 SQL Developer 2.1.1.64 I can see the following package's code on my SQL Developer create or replace PACKAGE zero AS FUNCTION one (P_TABLE VARCHAR2) RETURN VARCHAR2; FUNCTION two RETURN VARCHAR2; END zero; But I can't find function one or fun

  • Where are the Helix sleves and cases?

    Unfortunately as nice as the plastic is on the case of this Helix, it's not as durable as my X201. I have a tiny nick already from who know's what, and I almost feel like sanding it down. So how about it Lenovo, how can you release this thing without