Import Journal Entries

Hello,
I'm going to import with DTW sales and purchase documents from a commercial management software and journal entries from an accounting software.
I have seen that when I import a document, an automatic journal entry is created.
So, when I will import the journal entries, I will have this information twice.
Is there any way to block the automatic creation of the journal entries using SDK?
Or is there any way to import only the journal entries not coming from sales, purchase, banking...?
Thank you very much.
Thibault

Hi Thibault,
You will not be able to stop this behavior of creating journal entries in SBO. It is a built in process and stopping it will have a major impact on the financials in the system.  You have to filter the journal entris from the commercial management and accounting software on your side in some or another way that you know which are manually created journal entries and then post them into SBO.
Hope it helps,
Adele

Similar Messages

  • Error while importing Journal Entries by using Data Transfer Workbench (DTW

    Dear Experts,
    when i am trying to import journal entries (expese entry, met my cash) i got a error message for without entering the tax group.
    error message " you cannt post abase amount wihtout taxgroup JDTI BaseSum [line:1] [application defined or object error  65171]
    but in example (proving by SAP ) all these are mentioney as date ( tax group)
    please give me a solution for this.

    Hi Jijo,
    Check the link
    JE Tax Group
    Regards
    Jambulingam.P

  • DTW How to Import Journal Entries

    I am attempting to test import some journal entries, but I cannot get DTW to work.
    I need help with the .csv format (date format, account code format, any crucial fields i need)
    I also need to know what could be causing DTW to constantly crash, and freeze after an action is performed.
    This is my current setup:
    OJDT Journal Entries.csv
    1,08/31/2014,Test 1,BN,,,,,,,,,,,,,,,,,,
    2,08/31/2014,Test 2,BN,,,,,,,,,,,,,,,,,,
    3,08/31/2014,Test 3,BN,,,,,,,,,,,,,,,,,,
    JDT1 Journal Entries_Lines.csv
    1,,,1000-00-00,1000.2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    1,,,2120-00-00,,1000.2,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    2,,,1000-00-00,255.95,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    2,,,2120-00-00,,255.95,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    3,,,1000-00-00,165123.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    3,,,2120-00-00,,165123.5,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
    Is the JdtNum field supposed to be the next journal entry number sequence? i.e. 36745,36746...
    I would hope the import would automatically select the next available je number.
    Thank you for any help.

    Hi Nadeem,
    OJDT -
    JdtNum
    TaxDate
    VatDate
    DueDate
    Memo
    JdtNum
    TaxDate
    VatDate
    AutoVAT
    Memo
    1
    20140831
    20140831
    20140831
    Test
    JDT1-
    ParentKey
    LineNum
    AccountCode
    Debit
    Credit
    JdtNum
    LineNum
    Account
    Debit
    Credit
    1
    0
    OACT.ACCTCODE
    100
    1
    1
    OACT.ACCTCODE
    100
    is your GL segmented ? If yes, get the acctcode value and not 1000-00-00 .
    Try to run a query for the accountcode -
         select AcctCode From OACT
    Hope this helps.
    Regards,
    Darius

  • DI: Error importing Journal entries

    does anyone know what this error is refering to?
    Add Journal: -5011[JDT1.Account][line 1], 'Row in Transaction with Account No.'
    //Code
    vJournal.ReferenceDate = CDate(refDate)
    vJournal.TaxDate = CDate(refDate)
    vJournal.Reference = "Import"
    vJournal.Lines.AccountCode = "112000000100101"
    vJournal.Lines.ShortName = "_SYS00000000002"
    vJournal.Lines.ContraAccount = "341000000100101"
    vJournal.Lines.Debit = 30.0
    vJournal.Lines.DueDate = CDate(refDate)
    vJournal.Lines.Reference1 = "Import"
    vJournal.Lines.ReferenceDate1 = CDate(refDate)
    vJournal.Lines.TaxDate = CDate(refDate)
    vJournal.Lines.Add()
    vJournal.Lines.AccountCode = "341000000100101" vJournal.Lines.ShortName = "_SYS00000000102"
    vJournal.Lines.ContraAccount = "112000000100101"
    vJournal.Lines.Credit = 30.0                vJournal.Lines.DueDate = CDate(refDate)
    vJournal.Lines.Reference1 = "Import"
    vJournal.Lines.ReferenceDate1 = CDate(refDate)
    vJournal.Lines.TaxDate = CDate(refDate)

    Hi,
    After the Line vJournal.Lines.Add()
    You then need to reference the new line with a call to vJournal.Lines.SetCurrentLine(1)

  • DTW error (Journal Entry)

    Hi,
    Please help me to know what is wrong to import Journal Entry by DTW;
    Reason is
    "You are not allowed to edit posting date by row Application-defined or object-defined error 65171"
    Version is 2005B SP00 PL41
    I create the header file as below;
    RecordKey, JdtNum, DueDate, ReferenceDate, TaxDate, TransactionCode, Memo
    1,,20081110,20081110,20081110,100,ABC
    the line file is;
    RecordKey, LineNum, AccountCode, Debit, Credit, Reference1, Reference2, AdditionalReference, LineMemo, CostingCode
    1,0,738008,4800,0,21486,20081017,ABC,DEF,212
    1,1,112200,0,4800,21486,20081017,ABC,DEF,212
    The first time I tried it was successful to import, but after change amount I can not import them.
    If you have any solution or instructions, please let me know.
    Thank you for your help in advance.
    KAORI

    Hi
    I create the header file as below;
    RecordKey, JdtNum, DueDate, ReferenceDate, TaxDate, TransactionCode, Memo
    1,,20081110,20081110,20081110,100,ABC
    1. Please aviod transaction code
    2. you have to add AutoVAT coloumn tYES.
    RecordKey, LineNum, AccountCode, Debit, Credit, Reference1, Reference2, AdditionalReference, LineMemo, CostingCode
    1,0,738008,4800,0,21486,20081017,ABC,DEF,212
    1,1,112200,0,4800,21486,20081017,ABC,DEF,212
    1. You have to add vat details if it is no need in the last 5 colomns.
    2. tax date , tax group , vat amount , vat date , vat line.
       20081110 , Exempt ,   0 ,   20081110  , tYES
    3. tax group is the tax code. You should be given the tax code. if no tax code in the JE, nesessary you should be use tax exempt in the colomn.
    4. forthur you have to check the GL Accounts whether it is ok.
    let me know
    regards

  • How not to get a 'Journal Import Created' description at the Journal Entry Lines?

    For records loaded thru the Journal import,
    I always get a 'Journal Import Created' description at the Journal Entry Lines.
    Instead of this description, I want a
    more useful information which I may
    include at the GL_INTERFACE table
    possibly at the REFERENCE10 field.
    For those who will reply to this question,
    thank you very much in advance.
    null

    To populate this journal description, the Reference10 field must be populated in the GL_INTERFACE table.
    However, I have also discovered (version 11.03) that if you populate this field, but then import summarized journals, Oracle discards the value and reverts to "Journal Import Created" unless the value in the reference10 field is identical for all records to be summarized.
    null

  • Import GL Journal Entries

    Can someone please tell me the exact format to use when importing GL Journal entries using the SDK DI
    I have tried using the sample that is in the DI Objects with absolutely no luck at all.
    What exactly ARE the mandatory fields? I have a .txt file which is so simple it should work. 2 lines only plus a minimal header.
    When I use the AccountCode and the ContraAccount and the shortname Account in the one line the system throws me back an error which states the ContraAccount does not exist which is not true.
    Then my default period is set as this month and the system gives me an error stating my date is in the wrong period.
    I would appreciate all the help someone can give me please as I am confused.
    File input is:
    "GJH","10/08/04"
    "GJL",161010,500045,,22.00,"10.08.04",0,"10.08.04",161010,"10.08.04"
    "GJL",500045,161010,22.00,,"10.08.04",1,"10.08.04",500045,"10.08.04"
    Mapping is:
    GJH equals Header and the date is mapped to TaxDate
    GJL equals Line and the mapping is:
    Field 02 = AccountCode
    Field 03 = ContraAccount
    Field 04 = Credit
    Field 05 = Debit
    Field 06 = DueDate
    Field 07 = LineNbr
    Field 08 = TaxDate
    Field 09 = ShortName
    Field 10 = ReferenceDate1
    I am testing using the UK Demo Database

    Hi,
    You haven't posted all of code, but I suppose you add a Line object immediately after creating a new JournalEntry object. But when you create JournalEntry object you already get one empty Line, so you have add lines from 2-nd. It's a common issue with the DI Business Objects. I've got the same messages when tried to recieve invoices.
    Best regards,
    Mark

  • No entry in Ledger LoV while running Import Journal from Purchasing

    Hi,
    I am trying to run Import Journals in a GL responsibility:
    GL Superuser > > Journal > Import > Run.
    The Source is Purchasing.
    However when I try to select the Ledger name from the LoV, there are no values.
    Whats the solution to this?
    One of my collegues said it might be a data access set issue and that I might have to set profile options.
    Thanks in advance
    Susovan

    Hi,
    Thanks for the helpful pointers.
    In addition what I found out is that value Set being used for the 'Ledger' parameter is GL_SRS_JOURNAL_IMPORT_LEDGERS is based on the view gl_srs_ji_ledgers_v, which looks for records available in the GL_INTERFACE table for the given source. When there is no record available, then it is expected that this fail with message 'No entries found for List of Values'
    In my case, the query " select * from gl_srs_ji_ledgers_v where je_source_name = 'Purchasing';" gives outputs which has no ledgers for the responsibility i am working with.
    I have understood the reason for the problem but could someone help me remedy for this situation? What can I do to get a value in the dropdown for ledgers? Since I am in a functional role, can this be done from a functional perspective or is this an issue for the technical team?
    Sorry for the bother but I am a newbie to Oracle apps.
    Thanks in advance
    Susovan

  • Import to journal entry from Excel

    I would like to know how user can create journal entry by importing data from excel.
    in our site we have a payroll system and when we want to create journal voucher for related transaction it takes too long , if we had aforementioned facility it would be easy to do this task.

    Hi
    When you go to DTW log in
    <p> Put your user name and password .Enter your server name and click option
    and put the necessary information and click refresh.
    You should see the list of company   </p>
    Hope this solves your issue
    Thank you
    Bishal

  • Error while importing the Entries from Payroll

    Dear Guru's
    For the First time we are Import the Entries from Payroll , Request End with the Warning message
    when i check the Out Put file lot of Errors
    eriod Error Codes
    EP01 This date is not in any open or future enterable period.
    EP03 This date is not within any period in an open encumbrance year.
    EP04 This date is not a business day.
    DOHA COA Journal Import Execution Report Date: 21-APR-12 10:16
    Concurrent Request ID: 424967 Page: 11
    ========================================================== Error Key ===========================================================
    Period Error Codes
    EP05 There are no business days in this period.
    Unbalanced Journal Error Codes
    WU01 Warning: This journal entry is unbalanced. It is accepted because suspense posting is allowed in this ledger.
    EU02 This journal entry is unbalanced and suspense posting is not allowed in this ledger.
    EU03 This encumbrance journal entry is unbalanced and the Reserve for Encumbrance account is not defined.
    Flexfield Error Codes
    EF01 This Accounting Flexfield is inactive for this accounting date.
    EF02 Detail posting not allowed for this Accounting Flexfield.
    EF03 Disabled Accounting Flexfield.
    EF04 This is an invalid Accounting Flexfield. Check your cross-validation rules and segment values.
    EF05 There is no Accounting Flexfield with this Code Combination ID.
    EF06 The alternate account is invalid.
    WF01 An alternate account was used instead of the original account.
    WF02 A suspense account was used instead of the original account.
    Foreign Currency Error Codes
    EC01 A conversion rate must be entered when using the User conversion rate type.
    EC02 There is no conversion date supplied.
    EC03 A conversion rate type or an accounted amount must be supplied when entering foreign currency journal lines.
    EC06 There is no conversion rate for this currency, conversion type, and conversion date.
    EC08 Invalid currency code.
    EC09 No currencies are enabled.
    EC10 Encumbrance journals cannot be created in a foreign currency.
    EC11 Invalid conversion rate type.
    EC12 The entered amount must equal the accounted amount in a ledger or STAT currency journal line.
    EC13 Amount is too large.
    ECW1 Warning: Converted amounts could not be validated because the conversion rate type is not specified.
    Budget Error Codes
    EB01 A budget version is required for budget lines.
    EB02 Journals cannot be created for a frozen budget.
    EB03 The budget year is not open.
    EB04 This budget does not exist for this ledger.
    EB05 The encumbrance_type_id column must be null for budget journals.
    EB06 A period name is required for budget journals.
    EB07 This period name is not valid. Check calendar for valid periods.
    EB08 Average journals cannot be created for budgets.
    EB09 Originating company information cannot be specified for budgets.
    Encumbrance Error Codes
    EE01 An encumbrance type is required for encumbrance lines.
    EE02 Invalid or disabled encumbrance type.
    EE03 Encumbrance journals cannot be created in the STAT currency.
    DOHA COA Journal Import Execution Report Date: 21-APR-12 10:16
    Concurrent Request ID: 424967 Page: 12
    ========================================================== Error Key ===========================================================
    Encumbrance Error Codes
    EE04 The BUDGET_VERSION_ID column must be null for encumbrance lines.
    EE05 Average journals cannot be created for encumbrances.
    EE06 Originating company information cannot be specified for encumbrances.
    Reversal Error Codes
    ER01 A reversal period name must be provided.
    ER02 This reversal period name is invalid. Check your calendar for valid periods.
    ER03 A reversal date must be provided
    ER04 This reversal date is not in a valid period.
    ER05 This reversal date is not in your database date format.
    ER06 Your reversal date must be the same as or after your effective date.
    ER07 This reversal date is not a business day.
    ER08 There are no business days in your reversal period.
    ER09 Default reversal information could not be determined.
    Descriptive Flexfield Error Codes
    ED01 The context and attribute values do not form a valid descriptive flexfield for Journals - Journal Entry Lines.
    ED02 The context and attribute values do not form a valid descriptive flexfield for Journals - Captured Information.
    ED03 The context and attribute values do not form a valid descriptive flexfield for Value Added Tax.
    Miscellaneous Error Codes
    EM01 Invalid journal entry category.
    EM02 There are no journal entry categories defined.
    EM04 The value in the ACTUAL_FLAG must be "A" (actuals), "B" (budgets), or "E" (encumbrances).
    EM05 The encumbrance_type_id column must be null for actual journals.
    EM06 The budget_version_id column must be null for actual journals.
    EM07 A statistical amount belongs in the entered_dr(cr) column when entering a STAT currency journal line.
    EM09 There is no Transaction Code defined.
    EM10 Invalid Transaction Code.
    EM12 An Oracle error occurred when generating sequential numbering.
    EM13 The assigned sequence is inactive.
    EM14 There is a sequential numbering setup error resulting from a missing grant or synonym.
    EM17 Sequential numbering is always used and there is no assignment for this ledger and journal entry category.
    EM18 Manual document sequences cannot be used with Journal Import.
    EM19 Value Added Tax data is only valid in conjunction with actual journals.
    EM24 Average journals can only be imported into consolidation ledgers.
    EM25 Invalid average journal flag. Valid values are "Y", "N", and null.
    EM26 Invalid originating company.
    EM27 Originating company information can only be specified when intercompany balancing is enabled.
    EM29 You do not have access to this ledger and account combination.
    EM30 This balancing segment value is not valid for this ledger.
    EM31 This management segment value is not valid for this ledger.
    ** Batches listed under "Unbalanced Batches**" have not been imported.
    Edited by: 912775 on Apr 21, 2012 1:00 AM

    Hi Bharat17an,
    Please provide the detail information when create the MySQL connection in your PowerPivot model. Here is a good article regarding "how to Use MySQL and Microsoft PowerPivot Together" for your reference, please see:
    http://www.datamensional.com/2011/09/how-to-use-mysql-and-microsoft-powerpivot-together-2/
    If this issue still persists, please help to collection windows event log information. It maybe helpful for us to troubleshoot this issue.
    Regards,
    Elvis Long
    TechNet Community Support

  • Journal Entry DocEntry

    Hi Experts
    how to know the DocEntry of Journal Entry
    because when im uploading IP in DTW and the DocType is JE i was failed to upload because it say's "Base document card and target document card do not match. [RCT2DocLine][Line8]
    hope you can help me..thanks

    Hi,
    1. Are you uploading incoming payments-checks? If yes, run below query to get docentry of AR invoices.
    Select * from OINV
    2. Please refer below threads:
    Upload Incoming Payment using DTW
    Import incoming payment with DTW
    Thanks & Regards,
    Nagarajan

  • How to identify manual journal entries

    Hello,
    In the GL tables, GL headers and GL Lines, how can we identify if a journal entry is an automated entry or a manual entry.
    That is, entries can be made into the General ledger through Interface programs or other import methods. We describe them as Automated.
    And if journal entries are made directly into the GL, how to identify them against the automated ones.
    I need to know from a backend perspective, i.e which column in which GL table specifies if an entry is a manual or an automated journal entry.
    For Ex: In the GL_JE_Headers table, the JE_Source and the JE_Category mentions from where the source is.
    Like, JE_Source is Payables and Je_Category can be Purchase Invoices or Payments.
    Looking at the above line, we can identify that this is an automated entry from Payables.
    How to identify the manual entries.
    Your help is greatly appreciated.
    Thank you
    Bob

    Hi Bob,
    In the GL_JE_HEADERS table, column JE_SOURCE would have value as "MANUAL", this indicates that journal is created manually in General Ledger module and not imported from subledgers ....There is no indicative column for us to identify whether it is Automatic or Manual .... values such as MANUAL and RECURRING indicates entries that were created directly in General Ledger Module...
    Also in the GL_JE_LINES table, for GL_SL_LINK_ID and GL_SL_LINK_TABLE coumns, the column values would be NULL/Blank, since these columns normally contains reference to the base transaction in the subledger ....for a manual transaction there wont be a reference to subledger, hence they would remain as blank ..
    Regards,
    Ivruksha

  • DTW - Series not deifned for Journal Entry

    2007B
    Importing AP invoices thru DTW.
    using Document Series
    The document series assigned for AP Invoice is "APINV" and the same document series is selected for JE also.
    The code for APINV is "7"
    The field in DTW to define the document series is "Series" and the series code is given (eg : "7")
    DTW gives error "series not defined for Journal Entry Application defined or object defined.."
    where as when tried to create an AP Invoice manually, it was successful.
    what could be the issue?
    vijay

    I managed to find the issue.
    IN the DTW template,
    the field, "handwritten' was tYES, which I changed to tNO as we follow document series and numbering series.
    nothing is entered in the  'docnum' field.
    now I get the error " to generate this document, first define document series'
    vijay

  • Cannot add journal entries programmatically

    Hi everyone
    I'm not able to insert Journal entries in the database.
    I'm using SAP Business One DI API Version 2007 and a copy of the database SBODemoUS. The code I'm using is inspired by the example in the SDK Help.
    I'm trying to add journal entries to the company database. When I execute the code, I get a System Message:
    [JDT1.Account][line:1],'Tax account has not been defined for the selected tax code', even though I'm not using a tax code. But when I assign a value to the property .TaxCode, I get a System Message: You can edit VAT fields only in Automatic VAT mode [JDT1.TaxCode][line: 1].
    I'm able to create journal entries manually in SAP B1 using the same information that I'm using in my code. But I cannot create journal entries programmatically.
    Here is the code that I'm using:
       Private Sub ImportJournalEntry()
          Dim rt As Long
          Dim errCode As Long
          Dim errMsg As String
          oCompany.Server = "PERSONNE-6D3DBE"
          oCompany.CompanyDB = "MYSBODEMO"
          oCompany.UserName = "manager"
          oCompany.Password = "manager"
          oCompany.language = 3
          oCompany.UseTrusted = False
          oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2005
          oCompany.DbPassword = "sapwd"
          oCompany.DbUserName = "sa"
          rt = oCompany.Connect()
          If rt <> 0 Then
             oCompany.GetLastError(errCode, errMsg)
          Else
             Dim entries As SAPbobsCOM.JournalEntries =               DirectCast(Me.oCompany.GetBusinessObject(BoObjectTypes.oJournalEntries), JournalEntries)
             Dim str2 As String
             Try
                entries.TaxDate = DateTime.Now.ToShortDateString
                entries.StornoDate = DateTime.Now.ToShortDateString
                entries.ReferenceDate = DateTime.Now.ToShortDateString
                'First line
                'entries.Lines.TaxCode = "CA"
                entries.Lines.AccountCode = "112200000100101"
                entries.Lines.ShortName = "Cash at Bank "
                entries.Lines.Debit = 0
                entries.Lines.Credit = 125
                entries.Lines.Add() 'Add
                'Second line
             'entries.Lines.TaxCode = "CA"
                entries.Lines.AccountCode = "611000000100101"
                entries.Lines.ShortName = "Travel Expense"
                entries.Lines.Debit = 125
                entries.Lines.Credit = 0
                entries.Lines.Add() 'Add
                If entries.Add <> 0 Then
                   Dim num As Integer
                   Me.oCompany.GetLastError(num, str2)
                   SBO_Application.MessageBox(str2)
                Else
                   SBO_Application.MessageBox("Import was successful!")
                End If
                oCompany.Disconnect()
             Catch exception1 As Exception
                SBO_Application.MessageBox(exception1.Message.ToString & _
                      "   Source = " & exception1.Source.ToString & _
                      "    TargetSite = " & exception1.TargetSite.ToString & _
                      "    StackTrace = " & exception1.StackTrace.ToString)
                oCompany.Disconnect()
             End Try
          End If
       End Sub
    Thanks for any help

    Hello Vitor
    Thanks, I got the code to work. You were right about debit or credit, not both. I also removed the tax code.
    But the main reason I think it didn't work is because the account code I was using was incorrect. Since the company is using segmentation for their account code, we are suppose to use the account key, not the account code. In order to get the account key I found this function:
    Private Function GetAccountKey(ByVal v_sAccountCode As String) As String
          Dim oSBObob As SAPbobsCOM.SBObob
          Dim oRecordSet As SAPbobsCOM.Recordset
          Dim oChartOfAccounts As SAPbobsCOM.ChartOfAccounts
          Dim sStr As String
          '// Get an initialized SBObob object
          oSBObob = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge)
          '// Get an initialized Recordset object
          oRecordSet = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
          '// Get an initialized oChartOfAccounts object
          oChartOfAccounts = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oChartOfAccounts)
          '// Execute the SBObob GetObjectKeyBySingleValue method
          oRecordSet = oSBObob.GetObjectKeyBySingleValue(SAPbobsCOM.BoObjectTypes.oChartOfAccounts, "FormatCode", v_sAccountCode, SAPbobsCOM.BoQueryConditions.bqc_Equal)
          sStr = oRecordSet.Fields.Item(0).Value
          GetAccountKey = sStr
       End Function
    So the final code looks like this. Although I don't pretend to have perfect code, I'm able to add journal entries.
    Private Sub ImportTitan2()
          Dim rt As Long
          Dim errCode As Long
          Dim errMsg As String
          Dim sAccountKey As String
          oCompany.Server = "PERSONNE-6D3DBE"
          oCompany.CompanyDB = "MYSBODEMO"
          oCompany.UserName = "manager"
          oCompany.Password = "manager"
          oCompany.language = 3
          oCompany.UseTrusted = False
          oCompany.DbServerType = BoDataServerTypes.dst_MSSQL2005
          oCompany.DbPassword = "sapwd"
          oCompany.DbUserName = "sa"
          rt = oCompany.Connect()
          If rt <> 0 Then
             oCompany.GetLastError(errCode, errMsg)
          Else
             Dim entries As SAPbobsCOM.JournalEntries = DirectCast(Me.oCompany.GetBusinessObject(BoObjectTypes.oJournalEntries), JournalEntries)
             Dim str2 As String
             Try
                entries.TaxDate = DateTime.Now.ToShortDateString
                entries.StornoDate = DateTime.Now.ToShortDateString
                entries.ReferenceDate = DateTime.Now.ToShortDateString
                'First line
                entries.Lines.SetCurrentLine(0)
                sAccountKey = GetAccountKey("112200000100101")
                entries.Lines.AccountCode = sAccountKey    'Account code
                entries.Lines.ShortName = sAccountKey
                entries.Lines.Credit = 300
                entries.Lines.Add() 'Add
                'Second line
                entries.Lines.SetCurrentLine(1)
                sAccountKey = GetAccountKey("611000000100101")
                entries.Lines.AccountCode = sAccountKey   'Account code
                entries.Lines.ShortName = sAccountKey
                entries.Lines.Debit = 300
                entries.Lines.Add() 'Add
                If entries.Add <> 0 Then
                   Dim num As Integer
                   Me.oCompany.GetLastError(num, str2)
                   SBO_Application.MessageBox(str2)
                Else
                   SBO_Application.MessageBox("Import was successful!")
                End If
                oCompany.Disconnect()
             Catch exception1 As Exception
                SBO_Application.MessageBox(exception1.Message.ToString & _
                      "   Source = " & exception1.Source.ToString & _
                      "    TargetSite = " & exception1.TargetSite.ToString & _
                      "    StackTrace = " & exception1.StackTrace.ToString)
                oCompany.Disconnect()
             End Try
          End If
       End Sub
    Thank you for your help. You put me in the right direction.

  • How to reverse a manual Journal Entry Voucher created via Custom BO

    Hi All,
    I have created a custom BO for triggering a Journal Entry Voucher for each and every Customer Invoice created in the system.Normally all Customer Invoice will be having a corresponding Journal Entry document ,apart from the default JE document I have created an additional Journal Entry for each CI through a Custom BO because of the Business requirement.I am using the default JE as the source document for the newly created JE for the same CI.
    If a custom invoice gets cancelled only the default JE will get reversed.How to reverse the newly created JE too.I there a way to carry out this reversal process through PDI using ABSL.
    Please find below the code for details.
    Custom BO contains these lines.
    import ABSL;
    import AP.FinancialAccounting.Global;
    import AP.CustomerInvoicing.Global;
    var query;
    var selparam;
    var resultset;
    var query1;
    var selparam1;
    var resultset1;
    var query2;
    var selparam2;
    var resultset2;
    query = AccountingDocument.QueryByElements;
    selparam = query.CreateSelectionParams();
    selparam.Add(query.UUID.content, "I", "EQ", this.ZJEUUID.content);
    resultset = query.Execute(selparam).GetFirst();
    selparam.Clear();
    if (resultset.IsSet())
        var CI_ID = resultset.OriginalEntryDocumentContainingObjectReference.FormattedID;
        if (!CI_ID.IsInitial())
            query1 = CustomerInvoice.QueryByElements;
            selparam1 = query1.CreateSelectionParams();
            selparam1.Add(query1.ID.content, "I", "EQ", CI_ID);
            resultset1 = query1.Execute(selparam1).GetFirst();
            selparam1.Clear();
        if (resultset1.IsSet())
            foreach (var itemIns in resultset1.Item)
                var qty = itemIns.Quantity.content;
                var pid = itemIns.ItemProduct.ProductKey.ProductID.content;
                query2 = ZProductTax.QueryByElements;
                selparam2 = query2.CreateSelectionParams();
                selparam2.Add(query2.ZprdID.content, "I", "EQ", pid);
                resultset2 = query2.Execute(selparam2).GetFirst();
                selparam2.Clear();
                if(resultset2.IsSet())
                this.ZEnvTax.content = this.ZEnvTax.content + (qty * resultset2.ZtaxPrice.content);
                this.ZEnvTax.currencyCode = resultset2.ZtaxPrice.currencyCode;
                this.InvID = resultset.OriginalEntryDocumentContainingObjectReference.FormattedID;
    //Manual creating of Journal Voucher //
    var newJV = AccountingEntry.Create();
    newJV.CompanyID = resultset.Company.ID;
    newJV.Note.content = resultset.Note.content;
    newJV.AccountingDocumentTypeCode = "00047";
    newJV.BusinessTransactionTypeCode = "601";
    newJV.TransactionCurrencyCode = resultset.Item.GetFirst().BusinessTransactionCurrencyAmount.currencyCode;
    newJV.AccountingClosingStepCode = resultset.AccountingClosingStepCode;
    newJV.ZcustomerID.content = resultset1.BuyerParty.PartyKey.PartyID.content;
    newJV.PostingDate = resultset.PostingDate;
    var sob = newJV.SetOfBooks.Create();
    sob.SetOfBooksID.content = resultset.SetOfBooksID.content;
    //Making the Credit account of Original JE as Debit account in this JV//
    var debitAccIns = resultset.Item.Where(c => c.DebitCreditCode == "2").GetFirst();
    var debitAcc = debitAccIns.ChartOfAccountsItemCode;
    var newJVGL = newJV.Item.Create();
    newJVGL.DebitCreditCode = "1";
    newJVGL.ChartOfAccountsItemCode.content = debitAcc.content;
    newJVGL.TransactionCurrencyAmount.content = this.ZEnvTax.content;
    newJVGL.TransactionCurrencyAmount.currencyCode = this.ZEnvTax.currencyCode;
    // Posting the debited account to a new GL account//
    var newJVGL1 = newJV.Item.Create();
    newJVGL1.DebitCreditCode = "2";      
    newJVGL1.ChartOfAccountsItemCode.content = "101000";
    newJVGL1.TransactionCurrencyAmount.content = this.ZEnvTax.content;
    newJVGL1.TransactionCurrencyAmount.currencyCode = this.ZEnvTax.currencyCode;
    Please respond ASAP
    Regards,
    Navin Kandasamy

    Hello Navin,
    There is an action "Cancel" in the Accounting Entry BO. Try calling that action from ABSL whenever the CI is canceled. But to do that you should have the reference of the created JEV through code.
    Hope this helps.
    Thanks & Regards,
    Meghna

Maybe you are looking for

  • Invokin SQL*Loader from a stored procedure

    I try to invoke SQL*LOADER from within a database package by using external C procedure (the procedure calls the system() C function) but the loader generates the following error in its log file : SQL*Loader -523: error -2 writing to file (STDERR) an

  • Tax Issue in MIRO

    Hello SAP Scholars, When I try to post an invoice in MIRO, some amount is hitting BSX (stock account). Tax code I1 (4%) has been given in PO so logically there should be 3 accounts: 1) Reconciliation account 2) GR/IR account 3) Tax account but when I

  • How to config BI in ECC 6.0

    hii friends.. i have installed ECC 6.0 with bi options.. how to configure BI in ecc 6.0?? plz any one tell me the step by step procedure to configure... with regards K.Saravanakumar.

  • Problem calling function inside a procedure

    I have a procedure that simply calls a function, but I'm not sure how to declare it. When I run my script oracle returns an error: CREATE OR REPLACE PROCEDURE pr_entrada_close(      var_id_entrada int) AS BEGIN      fn_criaJobAnalise(var_id_entrada);

  • Is it possible to capture windows messages in java?

    Hello All, I am new in this forum & it's my first question. Plz help me as soon as possible. Thanks