How to create an Invoice in delivery screen?

Hi everybody.
I am trying to create an invoice in the delivery screen, but i am getting an error "-5002 Invalid total[OINV.DocTotal]". Can anyone tell me how to solve this ?
here is my code
Dim sNewObjCode As String
        Dim i As Integer
        ' Get last added document number (the order that was added)
        oCompany.GetNewObjectCode(sNewObjCode)
        ' this loop adds the different items to the invoice object
        i = 0
        Do
            oInvoice.Lines.BaseEntry = sNewObjCode
            oInvoice.Lines.BaseLine = i
            oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
            oInvoice.Lines.TaxCode = TableLines.Rows(i).Item(4)
            i += 1
            If i <> TableLines.Rows.Count Then
                oInvoice.Lines.Add()
            End If
        Loop Until i = TableLines.Rows.Count
        ' Try to add the invoice object to the database
        lRetCode = oInvoice.Add()
        If lRetCode <> 0 Then ' If the addition failed
            oCompany.GetLastError(lErrCode, sErrMsg)
            MsgBox(lErrCode & " " & sErrMsg) ' Display error message
        Else
            cmdInvoice.Enabled = True
            MsgBox("inv Added to DataBase", MsgBoxStyle.Information, "Order Added")
        End If
Thanks
Mina

Mina,
You have to fill the mandatory fields of the invoice
oInvoice.CardCode = oDelivery.CardCode
oInvoice.DocTotal = oDelivery.DocTotal
oInvoice.HandWritten = tNO
oInvoice.DocDate = oDelivery.DocDate
Regards,
Edwin van Kwikkelberghe

Similar Messages

  • 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 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 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

  • How to create excise invoice with reference thorugh credit memo

    Hi All,
    Please provide any solution for the following qurey:
    How to create excise invoice with reference thorugh credit memo

    Hi murali,
    i am unable to understand your requirement i think there is no like this scenario requirement for any client
    if any requirement is there kindly explain detail
    cheers

  • Creating excise invoice for delivery at depot

    Hi SAP Guru,
    i am facing an error while creating  excise invoice for delivery at depot. The error is You are not authorized to create
    Message no. 8I465 Trans Code J1IJ
    I had transfer the stock by ME27
    Delivery by VL10G And VL02n
    Proforma  invoce VF01
    Excise invoice  J1IIN
    Excise invoice at DEpot by J1IG
    still i am facing the problem in creating excise invoice for delivery at depot by J1IJ
    Pl Guide me where i am wrong
    Regards
    Hemu

    Hii..
    Contact your basis buys it seems that you are having authorization problem.
    Regards,
    Aakash Kehralia

  • How to create a parameter id on screen element

    How to create a parameter id on screen element
    reply urgent

    Hi Madan,
    Check this info.
    Parametere Id is the one which holds the memory for the particular field. when we need to pass the the field from one screen to another use the parameter Id.
    The SAP Memory is a user-specific memory area of the application server, which is accessed by all main sessions of a user session at once. ABAP programs have access to SPA/GPA parameters stored in the SAP Memory (also called SET/GET parameters).
    Eg. Of  how to use Set parameter
    you can give value of variable (dobj) to parameter ID 'pid'. This will store value in SAP memory
    SET PARAMETER ID pid FIELD dobj.
    When you want to use that value stored in SAP memory
    you can use GET parameter.
    GET PARAMETER ID pid FIELD dobj.
    To fill the input fields of a called transaction with data from the calling program, you can use the SPA/GPA technique. SPA/GPA parameters are values that the system stores in the global, user-specific SAP memory. SAP memory allows you to pass values between programs. A user can access the values stored in the SAP memory during one terminal session for all parallel sessions. Each SPA/GPA parameter is identified by a 20-character code. You can maintain them in the Repository Browser in the ABAP Workbench. The values in SPA/GPA parameters are user-specific.
    ABAP programs can access the parameters using the SET PARAMETER and GET PARAMETER statements.
    To fill one, use:
    SET PARAMETER ID <pid> FIELD <f>.
    This statement saves the contents of field <f> under the ID <pid> in the SAP memory. The code <pid> can be up to 20 characters long. If there was already a value stored under <pid>, this statement overwrites it. If the ID <pid> does not exist, double-click <pid> in the ABAP Editor to create a new parameter object.
    To read an SPA/GPA parameter, use:
    GET PARAMETER ID <pid> FIELD <f>.
    This statement fills the value stored under the ID <pid> into the variable <f>. If the system does not find a value for <pid> in the SAP memory, it sets SY-SUBRC to 4, otherwise to 0.
    To fill the initial screen of a program using SPA/GPA parameters, you normally only need the SET PARAMETER statement.
    The relevant fields must each be linked to an SPA/GPA parameter.
    On a selection screen, you link fields to parameters using the MEMORY ID addition in the PARAMETERS or SELECT-OPTIONS statement. If you specify an SPA/GPA parameter ID when you declare a parameter or selection option, the corresponding input field is linked to that input field.
    Check this link.
    http://help.sap.com/saphelp_47x200/helpdata/en/f5/6a853c61c5140ee10000000a11405a/frameset.htm
    Hope this resolves your query.
    Reward all the helpful answers.
    Regards

  • 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.

  • Reg: How to create shipment by using delivery...

    HI all,
    How to create shipment by using delivery...
    Thanks

    Hi Jamie:
    Thank you for your help.
    Could you please tell me what is "SQL*Plus session"?
    I modified the code into:
    Statement Stmt = Conn.createStatement();
    Stmt.executeUpdate("CREATE VIEW csclass AS SELECT * FROM CSGRADE10");
    The error message is the same:
    SQLException: Error during query: Unexpected Exception: java.sql.SQLException message given: Syntax error or access violation: You have an error in your SQL syntax near 'VIEW csclass AS SELECT * FROM CSGRADE10' at line 1
    SQLState: S1000
    VendorError: 0
    I am using MySQL.
    Jack

  • How to create collective invoice output

    hi frnds
    I have created 50 invoices in (VF01). How to create collective invoice output. What is the procedure?
    regards

    (Assuming you want to print all the 50 invoice)
    Use VF31.

  • 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 refer to Delivery Note

    Hi SAP Expert,
    I am doing STOCK Transport process from factory to depot and hitting error while creating excise invoice in Factory.
    From SAP help on Creating Excise Invoice, it said :
    From the SAP Easy Access screen, choose Indirect Taxes ® Sales/Outbound Movements ® Excise Invoice ® For Sales Order ® Outgoing Excise Invoice Create/Change/Display ® …
    If you want to create the excise invoice with reference to a pro forma excise invoice or commercial invoice, choose Excise Invoice ® Create.
    If you want to create the excise invoice with reference to a delivery note, choose Exc. inv. for delivery ® Create.
    Enter the number of the reference document.
    - When i created the excise invoice with reference to a STO Delivery Note, i am getting error : " For delivery 800050092 no document of type JEX exist "
    - I already setup the config to assign Delivery Type NL to billing type JEXP.
    I was doing the steps as below :
    1. ME21N u2013 Create Stock Transport Order
    2. VL10B u2013 Create Outbound Delivery w.r.t. STO
    3. J1IIN u2013 Create Outgoing Excise Invoice w.r.t. Delivery Note
    - Anything that i am missing ?

    Hi Guru,
    Thanks for your reply. It is my typo error. I have maintained the delivery type NL to billing type JEX, instead of JEXP
    I am getting error :
    For delivery 800050092 no document of type JEX exist
    Message no. 8I320
    Diagnosis
    The excise reference document defined does not exist for the delivery.
    Procedure
    Create the excise reference document before running the excise posting transaction.
    - What is it means by create the excise reference document before running the excise posting transaction ? Do I need to create Pro-forma invoice prior to execute transaction J1IIN ?
    I did not check the selection for ": Excise Inv during Billing " in my Excise Group maintainance.

  • How to create an Invoice Book

    I make about 4-7 invoices a week since i have started using Numbers. My process is to create the invoice and convert to PDF for electronic delivery. I normally keep the PDF and the Numbers file.
    Is there a way of cataloging these invoices so that i can look them up at a later date or do a search of them by at least 3 criteria.
    I use the same template every time.

    It's not a Numbers problem.
    Select a PDF icon
    press cmd + I
    At the top of the infos window, you will see an area entitled "Comments Spotlight"
    Enter identification items in it.
    So, you will be able to do search based on these comments.
    Yvan KOENIG (from FRANCE jeudi 5 février 2009 19:14:02)

  • How to create excise invoice without material document

    Hi,
    I want to create excise invoice for a subsequent credit note. I am agreed to give additional amount to my supplier for which i have not paid to him, now when i issue a subsequent credit note, how to create a excise invoice and do the excise entries without a material document.
    Please suggest a solution
    Regards,
    Ashish

    Go to T Code J1IH.
    Select Additional Excise. Replace the document number by the vendors excise invoice. Enter the excise duties in lower box and click on Determine GL accounts button to simulate and then post.

  • How to Create Excise Invoice (J1IIN) with order related billing document

    Dear Experts,
    Is it possible  to Create Excise Invoice (J1IIN) with order related billing document? How? please guide
    Regards
    BK GAIKWAD

    Sir,
    We have make the supplementary Invoice (Debit Note) as per below process
    1) Create sales order_VA01
    2) Create billing document_VF01_with reference to sales order
    3) Create Excise Invoice With J1IS (Other Movement) It is manually job & due to heavy work load (create 200 invoice  per day) it is not possible to do manually.
    Hence we want to create excise Invoice with J1IIN instead of J1IS, any alternative solution for that?
    Regards
    BK GAIKWAD

Maybe you are looking for