Error creating Invoice though code

Hi All,
I have a requirement to convert deliveries to invoice through code.
When adding a delivery without rearranging items in the matrix and converting that delivery to invoice through code works fine.This can be done using the "Copy To" function in delivery window also.However when I add items to a new delivery , eg : items A001,A002,A003 added to the lines and before clicking the add button, I changed A001 to A003,Then clicked add.Delivery is saved.This saved delivery couldnt be converted to Invoice through code.Error is "INV1: ItemCode is missing in Line".But this delivery can be manually converted to invoice though B1 window.The code I am using is as follows.
SAPbobsCOM.Documents oINV;
                    oINV = (SAPbobsCOM.Documents)
                        modups.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
                    oINV.CardCode = oDLN.CardCode;
                    for (int i = 0; i < oDLN.Lines.Count; i++)
                        oDLN.Lines.SetCurrentLine(i);
                        string str = oDLN.Lines.ItemCode;
                        if (i != 0)
                            oINV.Lines.Add();
                        oINV.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
                        oINV.Lines.BaseEntry = oDLN.DocEntry;
                        oINV.Lines.BaseLine = i;
                        taxcode = oDLN.Lines.TaxCode;
oINV.Add();
Can any body help me to trouble shoot this? I am wondering because it works in one case and fails in othercase where the itemcode is edited just before save.
Deepesh

Deepesh,
Documents.DocDueDate and Document_Lines.ItemCode are mandatory fields. You need to set them manually.
SAPbobsCOM.Documents oINV;
oINV = (SAPbobsCOM.Documents)
modups.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
oINV.CardCode = oDLN.CardCode;
oINV.DocDueDate = oDLN.DocDueDate;
for (int i = 0; i < oDLN.Lines.Count; i++)
oDLN.Lines.SetCurrentLine(i);
string str = oDLN.Lines.ItemCode;
oINV.ItemCode = str;
if (i != 0)
oINV.Lines.Add();
oINV.Lines.BaseType = Convert.ToInt32(SAPbobsCOM.BoObjectTypes.oDeliveryNotes);
oINV.Lines.BaseEntry = oDLN.DocEntry;
oINV.Lines.BaseLine = i;
taxcode = oDLN.Lines.TaxCode;
oINV.Add();
Kind Regards,Yatsea

Similar Messages

  • Error Creating Invoices with more than 1000 positions

    Hello.
    I am creating invoices in SD module with VF01 transaction.  When the document has more than 1000 positions an error is displayed.
    The text of the error is:
    Memory area p.status GUI SAPMV60A SM is too small.
    área memoria p.status GUI SAPMV60A SM demasiado pequeña.
    I would like to know if there is any way to correct this error. If it happens because memory is too small, how could it be increased?
    Thank you.
    Diana Carolina.

    Hi Diana
    As far as I know, standard SAP has restricted the no. of line items in an accounting document to 999.
    So, this is in turn impacts the no. of line items you can have on a Sales invoice,
    Since every invoice  line item can have atleast 2 accounting entries, the max. no. of  invoice line items you can have is 499.
    I dont think there is no work around for this
    Rgds

  • To many errors creating invoices.

    Hi,
    I made a scenario that writes an invoice as soon as a delivery is made.
    This worked fine while testing.
    But now in production the deliveries are made by the pick and pack manager.
    now about 20% go into failure.
    messages are:
    Exception : DI Error: (-2028) Customer record not found
    Exception : DI Error: (-2038) Record locked by another transaction
    Exception : DI Error: (-2028) Internal error (-2038) occured
    It looks like timing problems.
    Is there a way to retry the scenario again automatically?
    Like you can do manualy.
    Thanks,
    John

    Hello John,
    How are you, hope you're doing well!
    Depending on the way you config B1i and the step, this could be reprocessed automatic by b1i. Check Maintenance - cg Error Handling.
    How did you set up the step? Try to avoid to get an object and write to an (other) object in the same step. You must split this step and bind them with a queue.
    Good luck.
    Best Regards Teun

  • Error when creating Invoice via DI API

    Can you help me, I have a problem about DI
    When I create invoice with serial number and create transaction with 1 item in many serial number itu2019s no problem but
    If i create transaction with 2 diffrent item with many serial number has error the error code -5002([inv1.docentry][line:0],u2019item serial us not found in whseu2026.u2019)
    I using sap 2005 pl 40, I have debug my coding there is nothing wrong with it, than I suspec this is bug in DI is that rightu2026
    This is my code
      Dim oInvoices As SAPbobsCOM.Documents
            Dim iRetVal As Integer = -1
            Dim sErrMsg As String = ""
            Dim isAddHeader As Boolean = True
            Dim iRow As Integer = 0
            Dim sWhsCode As String = ""
            Dim iAddedQty As Integer
            Dim iCurrLine As Double = 0
            Dim iBasedDoc As Integer = 0
            Dim sNewDocNum As String = ""
            Dim sCardCode As String = ""
            Dim isdocnum As String = ""
            Dim CompleteOrder As DataRow
            Try
                oInvoices = myCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
                For iRow = 0 To myOrderDetailsTable.Rows.Count - 1
                    Console.WriteLine(myOrderDetailsTable.Rows(iRow).Item(ISSCANNED_FIELD))
                    If myOrderDetailsTable.Rows(iRow).Item(ISSCANNED_FIELD) = 1 Then
                        Console.WriteLine(myOrderDetailsTable.Rows(iRow))
                        CompleteOrder = myOrderDetailsTable.Rows(iRow)
                        Console.WriteLine(sWhsCode & "   " & CompleteOrder(WHSCODE_FIELD))
                        sWhsCode = CompleteOrder(WHSCODE_FIELD)
                        With oInvoices
                            If isAddHeader Then
                                isdocnum = CompleteOrder(DOCNUM_FIELD)
                                iBasedDoc = CompleteOrder(DOCENTRY_FIELD)
                                sCardCode = CompleteOrder(CARDCODE_FIELD)
                                '.DocObjectCode = SAPbobsCOM.BoObjectTypes.oInvoices
                                .Reference2 = CompleteOrder(DOCENTRY_FIELD)
                                .DocDate = Today.Date
                                .DocDueDate = Today.Date
                                .TaxDate = Today.Date
                                Console.WriteLine("cardcode : " & sCardCode)
                                .CardCode = sCardCode
                                Console.WriteLine("ibasedDoc :" & iBasedDoc)
                                .Reference1 = iBasedDoc
                                isAddHeader = False
                            ElseIf isAddHeader = False Then
                                ' .Lines.Delete()
                                .Lines.Add()
                            End If ' isAddHeader
                            iAddedQty = 0
                            iCurrLine = 0
                            Console.WriteLine("CompleteOrder(ITEMCODE_FIELD) : " & CompleteOrder(ITEMCODE_FIELD))
                            .Lines.ItemCode = CompleteOrder(ITEMCODE_FIELD)
                            Console.WriteLine(".Lines.WarehouseCode = CompleteOrder(WHSCODE_FIELD) : " & CompleteOrder(WHSCODE_FIELD))
                            .Lines.WarehouseCode = CompleteOrder(WHSCODE_FIELD)
                            Console.WriteLine("Lines.UnitPrice = CompleteOrder(PRICE_FIELD) " & CompleteOrder(PRICE_FIELD))
                            .Lines.UnitPrice = CompleteOrder(PRICE_FIELD)
                            Console.WriteLine("CompleteOrder(ISUSEBATCH_FIELD) : " & CompleteOrder(ISUSEBATCH_FIELD))
                            If CompleteOrder(ISUSEBATCH_FIELD) = 1 Then
                                For iCurrLine = 0 To CompleteOrder(QUANTITY_FIELD) - 1
                                    If iCurrLine > 0 Then .Lines.BatchNumbers.Add()
                                    .Lines.BatchNumbers.SetCurrentLine(iCurrLine)
                                    .Lines.BatchNumbers.Quantity = 1
                                    Console.WriteLine("CompleteOrder(SCANNED_FIELD) :" & CompleteOrder(SCANNED_FIELD))
                                    .Lines.BatchNumbers.BatchNumber = CompleteOrder(SCANNED_FIELD)
                                    '.Lines.BaseEntry = iBasedDoc
                                Next
                            ElseIf CompleteOrder(ISUSEBATCH_FIELD) = 0 Then
                                Console.WriteLine("CompleteOrder(WHSCODE_FIELD) :" & CompleteOrder(WHSCODE_FIELD))
                                While sWhsCode = CompleteOrder(WHSCODE_FIELD)
                                    If iCurrLine > 0 Then .Lines.SerialNumbers.Add()
                                    .Lines.SerialNumbers.SetCurrentLine(iCurrLine)
                                    Console.WriteLine("CompleteOrder(SYSSERIAL_FIELD)" & CompleteOrder(SYSSERIAL_FIELD))
                                    CompleteOrder(SYSSERIAL_FIELD) = IIf(IsDBNull(CompleteOrder(SYSSERIAL_FIELD)), 0, CompleteOrder(SYSSERIAL_FIELD))
                                    .Lines.SerialNumbers.SystemSerialNumber = CompleteOrder(SYSSERIAL_FIELD)
                                    Console.WriteLine("CompleteOrder(SCANNED_FIELD) :" & CompleteOrder(SCANNED_FIELD))
                                    .Lines.SerialNumbers.InternalSerialNumber = CompleteOrder(SCANNED_FIELD)
                                    ' .Lines.BaseEntry = iBasedDoc
                                    iCurrLine = iCurrLine + 1
                                    iRow = iRow + 1
                                    If iRow <= myOrderDetailsTable.Rows.Count - 1 Then
                                        CompleteOrder = myOrderDetailsTable.Rows(iRow)
                                    ElseIf iRow > myOrderDetailsTable.Rows.Count - 1 Then
                                        Exit While
                                    End If
                                End While
                                iRow = iRow - 1
                            End If
                            .Lines.Quantity = iCurrLine
                        End With ' oInvoices
                    End If ' CompleteOrder(ISSCANNED_FIELD) = 1
                Next iRow
                iRetVal = oInvoices.Add()
    thnx for your attention

    Hello tony,
    Please check the following:
    1.Make sure the item is managed by serials
    2.The serials number have been auto created in GRPO/AP invoice etc puchase document
    3.You need to set the system serial number for the lines. How do you know the system serial number of the serial number? refer to the Serial Number Details form
    Inventory=>Item management=>Serials Numbers=>Serial Number Details
    SystemSerialNumber Sets or returns the successive numerator starting from1 issued for each item with serial numbers management. This numerator progresses according to the creation of new units of the same sort (for the same item).
    This property is mandatory when using Serial Numbers for outgoing documents. Field name: SysSerial.This is a foreign key to the SerialNumbers object
    Sample code to add invoice with items managed by serials:
    Private Sub btnSerials_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnSerials.Click
            ConnectViaDI()
            Dim oInvoice As SAPbobsCOM.Documents = Nothing
            oInvoice = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices)
            oInvoice.CardCode = "C001"
            oInvoice.DocDueDate = Date.Now
            Dim oLines As SAPbobsCOM.Document_Lines = oInvoice.Lines
            oLines.ItemCode = "S00002"
            oLines.UnitPrice = 1500
            oLines.Quantity = 2
            oLines.TaxCode = "CA"
            'Set the system serial no. for the 1st item
            oLines.SerialNumbers.SystemSerialNumber = 3
            'Set the system serial no. for the 2nd item
            oLines.SerialNumbers.Add()
            oLines.SerialNumbers.SystemSerialNumber = 4
            lRetCode = oInvoice.Add
            If 0 <> lRetCode Then
                oCompany.GetLastError(lErrCode, errMsg)
                MsgBox(errMsg)
            Else
                MsgBox("AR Invoice with serials number added.")
            End If
        End Sub
    Kind Regards, yatsea

  • How to write error log while creating invoice and avoid implicite commit

    Hi,
    I've have written code in exit RV60AFZZ in which I check for some possible errors while invoicing via VF01/VF04. If conditions are met then we create error message and display it to the user. As result we had a lot of missing SD invoices in FI when we did batch/mass invoicing. I've opened OSS note and SAP support team wrote that using statement MESSAGE is forbidden in UE. It can lead to implicite commits.
    Do you have some example how to write error log for invoincing in VF01/VF04 transactions?
    Thanks

    @ sri nath. Please read post before answering. I wouldn't be posting trivial questions. As I wrote before it doesn't work.  Also SAP support would not answer to the question in my OSS.
    In VOFM, SAP is using routine  VBFS_HINZUFUEGEN_ALLG to write to error log.
    Mine is something like this in ue:
          PERFORM ZVBFS_HINZUFUEGEN_ALLG
                     USING VBAP-VBELN VBAP-POSNR  'ZSD' 'E '600'
                           SPACE SPACE SPACE SPACE.
    (we have custom message class)
    As result  XVBFS and VBSK are filled with error, but posting is also done.  Error log is filled but invoice is created and posted in FI.
    That is not OK.
    thanks

  • Reg;error message while creating invoice

    Hi Gurus,
    When i am trying to create invoice with reference to sales order (order related billing ) its giving error massege when trying to save the invoice.Its giving the message as:FOR OBJECT RV_BELEG NUMBER RANGE 41 DOES NOT EXIST.
    How to correct this.Pls help me out on this.
    Thanks & Regards,
    Sash.

    Hi Kiran,i assigned number range as u said.But still its giving the same error mesage .See the error in below.
    For object RV_BELEG , number range interval 41 does not exist
    Message no. NR751
    Diagnosis
    The database table NRIV has the delivery class 'C', i.e. the SAP default settings are only in client 000.
    Procedure
    Create the missing number range interval in customizing.
    Transaction code:

  • Error while creating inbound process code

    Hi gurus,Iam creating a custom idoc.
    800 -> sender
    810 -> Receiver
    i have completed outbound processing on 800.
    On 810, completed following steps for inbound processing.
    1.) I have added my Inbound FM in BD51.
    2 ) Assigned my FM to Message type and Idoc type in WE57.
    3 ) When adding my FM to process code in BD67, it is showing error that
    “Entry ZSATPC does not exist in TEDE2 - check your entry”.
    { zsatpc is my custom process code }.
    4) While Creating Process Code in WE42 with options [processing with ale service / Processing
    by FM] and saving it is giving error that
    " " is not a valid language.
    And when I saw help (?) regarding this error, the following text appeared in a window.
    Diagnosis
    A key with language "" "" was specified for table "EDE2T". This is not a valid language.
    This applies to field "LANGUA"
    System Response
    The system rejects the key.
    Procedure
    Enter a valid language. This is usually the language you logged on in.
    You logged on in language "EN".
    Table T002 contains a list of valid languages.
    Please solve this error. Give me steps to create inbound process code.
    thanx in advance. Hoping replies soon........
    Satish.

    Dear Satish,
    Very peculiar. The language should come from your log on language. Try to login into the system again. Call we42 again and see if it works.
    Regards, Rakesh

  • Error while creating Invoice

    Hi Experts,
    While Creating Invoice i am getting below error
    G/L account 0001 11002 cannot be posted to, please correct your entry
    Message no. >0205
    Diagnosis
    This G/L account is blocked against posting or is a reconciliation account and cannot be posted to directly.
    System Response
    The G/L account cannot be posted to.
    Procedure for System Administration
    Check you entry for errors, or change the master record of the G/L account: Proceed.
    I have taken lot of experts advises, but unable to solve. I have checked FS00, EK01 and EK02 and unable to find what problem is with these Tcodes.
    When i was trying to check Tcode FS00 i found G/L Account is "11002 - Constructions" and when i tried to see account group it was Balance Sheet Account and by experts advise i changed it to P&L Statement Acct, when i am opening Initially after saving Account Grp.Tcode FS00 it is showing Acct. Grp. as P&L Statement Acct and when i am choosing other tabs in FS00 the Acct Grp is Changing back to Balance sheet acct.. I am unable to find what wrong with this.
    I want to ask whether the problem is with above mentioned thing or with other, i believe i have explained my error in detail. Please advise how can i overcome this error.
    Regards,
    Kushal
    Moderator note - thread locked, same issue identified in G/L error while posting an amount - TXN: FPE1 - SAP ISU and Error while trying to do Billing

    Hi friends,
    The error thats triggered is "For object RV_BELEGnumber range 19 does not exist".
    I have deleted all the existing no ranges in VN01 and customized the nuber range for invoice doc and set it at Z1(Internal no range :1000-1999) and the existing no range entry in OBA7 for RV is 18(1800000000- 1899999999).
    Z1(Internal no range :1000-1999)  for Invoices
    Z2(Internal no range :2000-2999)  for Deliveries
    Z3 (Internal no range :3000-3999) for sales orders
    So my VN01 entries consists of Z1(Internal no range :1000-1999) ,Z2(Internal no range :2000-2999)  ,Z3 (Internal no range :3000-3999) .
    The sales orders and deliveries are working out fine but while generating the invoice its triggering the above message.
    Pl help on this.
    Thanks
    Ivy

  • EDI invoice idoc error "Enter a tax code in item 000001"

    Hello,
    I am trying ot post the EDI  invoice but the idoc getting failed by giving error "Enter a tax code in item 000001".
    Even i entered the tax code in my idoc, system not taking and also as i have maintained the table OBCD & OBCE but system not consider it.
    If i maintained the tax code in my PO then it is posting the invoice with PO tax code sucessfully.
    Please let me know, Is their any other setting needs tobe done for idoc to post the invoice without maintained TAX CODE  in PO ?
    Thanks in advance
    Regards,
    Satish

    No option available .you have to maintain tax code in PO.
    Try your luck with following option Still not sure as it works only if you call transaction MIRO
    OLMR -- incoming invoice -- maintain default value for tax codes

  • Error in posting :First create the jurisdiction code at state level ()-URGE

    Hi,
    We are getting ERROR "First create the jurisdiction code at state level ()" at the time of postiong . This is HST calculated on benefit that we are trying to post;;
    GL account tax category is defined as '<' in FS01 and posting without tax  allowed is not checked. Are we missing aything;
    Regards,
    Neelima

    Hi Neelima,
    Tax Jurisdiction code is related mainly to US.
    Please check the if tax jurisdiction code is maintained in SPRO > Financial Accounting > Financial Accounting Global Settings 's basic settings part. If not, maintain the same for the state. This might help you.
    Best Regards,
    Venkat.
    Edited by: Venkateswara Sarma Bhamidipati on Jan 1, 2011 4:45 AM

  • Error When Create Invoice related to Project

    Dear Friends,
    Good Day,
    I have been faced issue when i create Invoice related to project the following are the steps with the error :
    1. Entered the header.
    2.Entered the lines ( Line type, Amount, Distribute Account, and Fields that related to Projects...... etc).
    3. Save then Action > validate i have one holds, the hold name is Dist Variance then after i Click on the distributions line I have the following error :
    APP-SQLAP-97734: the system cant's generate distributions for 1 line because: Fatal Error:
    Error Stack: &ERROR_STACK
    Erro Stage: &ERROR_STAGE
    Error Message: &ERROR_MESSAGE
    Additional Information1: &ERROR_AGR1
    Additional Information2: &ERROR_AGR2
    Please Advice :)
    Best Regards,
    M.Qolaghassi

    Please see if these docs help.
    Projects Supplier Invoice Account Generation Error: APP-SQLAP-97734: The System Cannot Generate Distributions [ID 823787.1]
    APXINWKB.fmb APP-SQLAP-97734 When Entering a Recurring Invoice With Closed Project/Task [ID 779704.1]
    Grants Accounting: AP Invoice Workbench Drill Down to Distributions for Allocated Freight Gets APP-SQLAP-97734 Error [ID 845378.1]
    APP-SQLAP-97734: When Attempting To Generate A Distribution In A Project Related Invoice [ID 1251796.1]
    Overriding Project Supplier Invoice Account Generation Workflow CCID With User Entered Account [ID 360757.1]
    Project Supplier Invoice Account Generation Workflow - attribute 'fnd_flex_applid' does not exist [ID 1252887.1]
    Thanks,
    Hussein

  • I create an id. on review option when i enter visa card and security code, it always gives an error msg "Invalid Secruity code". but i use this code for money withdraw from ATM and for shopping also. plz tell the solution ????

    i create an id. on review option when i enter visa card and security code, it always gives an error msg "Invalid Secruity code". but i use this code for money withdraw from ATM and for shopping also. plz tell the solution ????

    The code they are asking for is the last three digits of the number on the back of the card (you don't use this when using an ATM or presenting the card in shops).

  • Failed (why else would I post). Error creating an image of Drive D:, rc = 2. Return Code -2147467259 0x80004005. "Not enough storage is available to process this command".

    Seems a common set of Return Codes to post so apologies that's not specific.
    To me appears the issue is related to the "Not enough storage is available to process this command" log entry. Looked into it and some SCCM 2007 issues that were related to too many sessions to the site server, but even after rebooting my MDT server
    I get the same issue.
    The server I am attempting to capture has a 60gb VHD with around 30gb actually used. The MDT Server has over 100GB free space.
    Here is from BDD.log:
      Console > Turning on VERIFY option for network share
    ZTIBackup 10/10/2014 12:56:30 PM
    0 (0x0000)
      Console > Scanning files and directories...
    ZTIBackup 10/10/2014 12:56:30 PM
    0 (0x0000)
      Console > Error imaging drive [D:\]
    ZTIBackup 10/10/2014 12:56:30 PM
    0 (0x0000)
      Console > Not enough storage is available to process this command.
    ZTIBackup 10/10/2014 12:56:31 PM
    0 (0x0000)
    Return code from command = 2 ZTIBackup
    10/10/2014 12:56:31 PM 0 (0x0000)
    Error creating an image of drive D:, rc = 2
    ZTIBackup 10/10/2014 12:56:31 PM
    0 (0x0000)
    Event 41036 sent: Error creating an image of drive D:, rc = 2
    ZTIBackup 10/10/2014 12:56:31 PM
    0 (0x0000)
    ZTIBackup COMPLETED.  Return Value = 2
    ZTIBackup 10/10/2014 12:56:32 PM
    0 (0x0000)
    ZTI ERROR - Non-zero return code by ZTIBackup, rc = 2
    ZTIBackup 10/10/2014 12:56:32 PM
    0 (0x0000)
    Event 41002 sent: ZTI ERROR - Non-zero return code by ZTIBackup, rc = 2
    ZTIBackup 10/10/2014 12:56:32 PM
    0 (0x0000)
    Command completed, return code = -2147467259
    LiteTouch 10/10/2014 12:56:33 PM
    0 (0x0000)
    Litetouch deployment failed, Return Code = -2147467259  0x80004005
    LiteTouch 10/10/2014 12:56:33 PM
    0 (0x0000)
    Event 41014 sent: Litetouch deployment failed, Return Code = -2147467259  0x80004005
    LiteTouch 10/10/2014 12:56:33 PM
    0 (0x0000)
    I'll post below full logs.

    imagex reported:
      Console > Error imaging drive [D:\]
      Console > Not enough storage is available to process this command.
    obvious question is: do you have enough free space on
    "\\arcadmin3\deploymentshare$\Captures\SIMSERVER.wim"
    Keith Garner - Principal Consultant [owner] -
    http://DeploymentLive.com

  • Error : Depreciation area 00 not created in comp.code

    Dear friends,
    Need assistsnce how to resolve asset master data problem for "Depreciation area 00 not created in comp.code".
    What I intend to do is to do an asset recalculation thru AS02> edit> recalculate values. But the system showed the above error.
    How can I resolve this. I have read thru the SAP note 459700, but I dont really understand the solution given.
    If anyone have similar experience, appreciate your help. Also for those who know how to resolve this... pls..help.
    Thanks.
    Syaban.

    Hi Srinivas,
    Here's the cronology.
    Actually I detect 1 asset that was created in 2007 and have all the APC, Depr expense & accum until 12/2007.
    But coming to fiscal year 2008, this asset was not brought forward to year 2008, hence making the asset report not correct bacuse the asset was not displayed at all.
    I did tried to redo the fiscal year change but no impact still same error. Then I tried to do recalculate value just to see if the asset can be corrected thru that function. At this point where the error message appear.
    Not sure why the  error appearing since in our system we dont have such depr area 00.
    Thanks

  • Error in invoice creation using BAPI BAPI_INCOMINGINVOICE_CREATE

    Hi All,
    I am using BAPI_INCOMINGINVOICE_CREATE to create an invoice using below data,
    wa_header-invoice_ind = 'X'.
    wa_header-doc_date = sy-datum.   "Enter the document date
    wa_header-pstng_date = sy-datum. "Enter the posting date
    wa_header-ref_doc_no = 'Test'.
    wa_header-comp_code = 'L110'.
    wa_header-gross_amount = '528.2400'.  "Enter the gross amount(aft. tax) for the invoice
    wa_header-calc_tax_ind = 'X'.
    wa_header-currency = 'USD'.
    wa_item-invoice_doc_item = '000001'.
    wa_item-po_number = '4600013733'.    "Enter the PO number
    wa_item-po_item = '00010'.           "Enter the PO item number
    wa_item-tax_code = 'I1'.             "Enter the tax code applicable
    wa_item-item_amount = '528.2400'.     "Enter the item amount
    wa_item-quantity = '1'.           "Enter the invoice quantity
    wa_item-po_unit = 'PC'.              "Enter the UoM
    APPEND wa_item TO it_item.
    when i call the BAPI its giving me an error
    Enter a tax code in item 000001
    so  when i entered a data in  TAXDATA  table of BAPI again it throw an error,
    Enter value in either field HEADERDATA-CALC_TAX_IND or field TAX_AMOUNT (import parameter TAXDATA).
    As per my requirement we wanted to set CALC_TAX_IND .
    Kindly suggest me.
    Thanks and regards,

    Dear Reddy
    My excel contain date format 'YYYYMMDD'
    But the server in i am uploading data having date format 'DDMMYYYY'.
    bapi also having date format YYYYMMDD.
    BUT in TCODE AS91 HAVING DATE IN DDMMYYYY FORMAT.
    Due to this format it is giving error.

Maybe you are looking for

  • Messageid in subject of mail in mail-adapter

    hi, we want to send ORDER-documents to our supplier via eMail. As subject in these mails we have to set the messageid of the document. Is it possible to set the subject of a mail in a j2ee-module? I didn't find any information about that in the XI- o

  • Can't recognize transfered songs

    Hi, i bought my ipod this afternoon before work, had it charged while i work, and I now just began trying to transfer songs on it. I pluged it in and windows recognized it as a usb mass storage device. I uploaded all my songs, each album its own fold

  • SO Wait causes exception occurred within external code called by call library node

    when trying to run some old code that used to work ok, i now get this error message: exception occurred within external code called by call library node and the vi flagged as calling the exception is SO Wait. the error occurs with different soundcard

  • Can't log onto Netgear network

    Can someone please please help, cannot join my exsiting netgear network, I have a dual G4 1ghz desktop, that is on there with no problem through it's wireless extreme card, I also have a G4 1ghz apple laptop, that also can join with no problem, this

  • Preferred Way of handling Analyzer Security (6.1.1)

    We would like to set up Analyzer security in the most efficient way possible. It seems to me that utilizing existing Essbase security for all Essbase database access, filters,.. would be best handled by the "Use Essbase Authentication" being enabled.