SDK coding to Remove Journal Entry, Journal Voucher

Hai,
I have created journal entry.But before creating, I want to check whether journal entry, journal voucher already created for this month. If it is, already created, I want to remove the existing one.
My coding is as follows,
oSBOJournalvouchers = DirectCast(ocompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalVouchers), SAPbobsCOM.JournalVouchers)
                          Try
                                oSBOJournalvouchers.JournalEntries.GetByKey(10)
                            Catch ex As Exception
                                SBO_Application.MessageBox(ex.Message)
                            End Try
                            If oSBOJournalvouchers.JournalEntries.Remove() <> 0 Then
                                ocompany.GetLastError(errcode, errmsg1)
                                SBO_Application.MessageBox(errcode & "-" & errmsg1)
                            End If
    oSBOJournalvouchers.JournalEntries.GetByKey(10) --In this line error occurs.
Error Message is:
The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))
Any help is appreciated.
Thanks in Advance.
Thanks,
Parvatha Solai.N

Hi,
I get the same exception, I'm using 8.81 PL08 ... The creation for Journal Voucher success but when I'm trying to update the update failed ... please advice
JournalVouchers voucher = (JournalVouchers)Company.SBO_Company.GetBusinessObject(BoObjectTypes.oJournalVouchers);
voucher.JournalEntries.GetByKey(TransId);   // This line make exception The server threw an exception. (Exception from HRESULT: 0x80010105 (RPC_E_SERVERFAULT))

Similar Messages

  • How to do an incoming payment based on journal entry whit SDK ?

    Hello
    Somebody have the code for SDK of Business One,  how  to do an  incoming payment based on journal entry?
    Tks

    Hello Julio,
    Here some example code from the SDK helpfile.
    Private Sub cmdTest_Click()
       On Error GoTo ErrorHandler
       Dim vCompany As SAPbobsCOM.Company
       'create company object
       Set vCompany = New SAPbobsCOM.Company
       'set paras for connection
       vCompany.CompanyDB = "SBODemo_US"
       vCompany.Password = "manager"
       vCompany.UserName = "manager"
       vCompany.Server = "(local)"
       'connect to database server
       If (0 <> vCompany.Connect()) Then
          MsgBox "Failed to connect"
          Exit Sub
       End If
       Dim nErr As Long
       Dim errMsg As String
       'Set the object's properties
       Dim vPay As SAPbobsCOM.Payments
       Set vPay = vCompany.GetBusinessObject(oIncomingPayments)
       vPay.Address = "622-7"
       vPay.ApplyVAT = 1
       vPay.CardCode = "D10006"
       vPay.CardName = "Card D10004"
       vPay.CashAccount = "288000"
       vPay.CashSum = 0
       'vPay.CheckAccount = "280001"
       vPay.ContactPersonCode = 1
       vPay.DocCurrency = "Eur"
       vPay.DocDate = Now
       vPay.DocRate = 0
       vPay.DocTypte = 0
       vPay.HandWritten = 0
       vPay.JournalRemarks = "Incoming - D10004"
       vPay.LocalCurrency = tYES
       vPay.Printed = 0
       vPay.Reference1 = 8
       vPay.Series = 0
       vPay.SplitTransaction = 0
       vPay.TaxDate = Now
       vPay.TransferAccount = "10100"
       vPay.TransferDate = Now
       vPay.TransferSum = 0
       vPay.Invoices.AppliedFC = 0
       vPay.Invoices.AppliedSys = 0
       vPay.Invoices.DocEntry = 8
       vPay.Invoices.DocLine = 0
       vPay.Invoices.DocRate = 0
       vPay.Invoices.InvoiceType = 13
       vPay.Invoices.LineNum = 0
       vPay.Invoices.SumApplied = 5031.2
       Call vPay.Invoices.Add
       Call vPay.Invoices.SetCurentLine(1)
       vPay.Invoices.AppliedFC = 0
       vPay.Invoices.AppliedSys = 1089.65
       vPay.Invoices.DocEntry = 11
       vPay.Invoices.DocLine = 1
       vPay.Invoices.DocRate = 0
       vPay.Invoices.InvoiceType = it_Invoice
       vPay.Invoices.LineNum = 1
       vPay.Invoices.SumApplied = 1000
       vPay.CreditCards.AdditionalPaymentSum = 0
       vPay.CreditCards.CardValidUntil = CDate("10/31/2004")
       vPay.CreditCards.CreditAcct = "295000"
       vPay.CreditCards.CreditCard = 3
       vPay.CreditCards.CreditCardNumber = "884848448"
       vPay.CreditCards.CreditCur = "EUR"
       vPay.CreditCards.CreditRate = 0
       vPay.CreditCards.CreditSum = 5031.2
       vPay.CreditCards.CreditType = 1
       vPay.CreditCards.FirstPaymentDue = CDate("11/29/2002")
       vPay.CreditCards.FirstPaymentSum = 5031.2
       vPay.CreditCards.LineNum = 0
       vPay.CreditCards.NumOfCreditPayments = 1
       vPay.CreditCards.NumOfPayments = 1
       vPay.CreditCards.OwnerIdNum = "3993939"
       vPay.CreditCards.OwnerPhone = "383838888"
       vPay.CreditCards.PaymentMethodCode = 1
       Call vPay.CreditCards.Add
       Call vPay.CreditCards.SetCurentLine(1)
       vPay.CreditCards.AdditionalPaymentSum = 0
       vPay.CreditCards.CardValidUntil = CDate("10/31/2004")
       vPay.CreditCards.CreditAcct = "295000"
       vPay.CreditCards.CreditCard = 3
       vPay.CreditCards.CreditCardNumber = "884848448"
       vPay.CreditCards.CreditCur = "EUR"
       vPay.CreditCards.CreditRate = 0
       vPay.CreditCards.CreditSum = 1000
       vPay.CreditCards.CreditType = 1
       vPay.CreditCards.FirstPaymentDue = CDate("11/29/2002")
       vPay.CreditCards.FirstPaymentSum = 1000
       vPay.CreditCards.LineNum = 1
       vPay.CreditCards.NumOfCreditPayments = 1
       vPay.CreditCards.NumOfPayments = 1
       vPay.CreditCards.OwnerIdNum = "3993939"
       vPay.CreditCards.OwnerPhone = "383838888"
       vPay.CreditCards.PaymentMethodCode = 1
       If (vPay.Add() <> 0) Then
           MsgBox ("Failed to add a payment")
       End If
       'Check Error
       Call vCompany.GetLastError(nErr, errMsg)
       If (0 <> nErr) Then
           MsgBox ("Found error:" + Str(nErr) + "," + errMsg)
       Else
           MsgBox ("Succeed in payment.add")
       End If
       'disconnect the company object, and release resource
       Call vCompany.Disconnect
       Set vCompany = Nothing
       Exit Sub
    ErrorHandler:
       MsgBox ("Exception:" + Err.Description)
    End Sub
    HTH Regards Teun
    Edited by: Teun Aben on Aug 4, 2010 9:00 PM

  • How to create a journal entries by sdk

    hi Experts
    I know how to create invoice or order by sdk . but I do not know how to create Journal Entry by sdk. i mean what fields are required. Plz send me a basic template for Journal Entry.
    Regards
    Gorge

    Dim oJounalEntry As SAPbobsCOM.JournalEntries
                ''Passing Jounal Entry
                System.Runtime.InteropServices.Marshal.ReleaseComObject(oRecset)
                oJounalEntry = Me.SBO_Company.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oJournalEntries)
                oJounalEntry.Series = 14
                oJounalEntry.DueDate = Now
                oJounalEntry.ReferenceDate = Now
                oJounalEntry.TaxDate = Now
                oJounalEntry.Lines.ShortName = bpcode
                oJounalEntry.Lines.Credit = amount
                oJounalEntry.Lines.Debit = 0
                oJounalEntry.Lines.DueDate = Now
                oJounalEntry.Lines.TaxDate = Now
                oJounalEntry.Lines.ReferenceDate1 = Now
                oJounalEntry.Lines.Add()
                oJounalEntry.Lines.AccountCode = AccountCode
                oJounalEntry.Lines.Credit = 0
                oJounalEntry.Lines.Debit = amount
                oJounalEntry.Lines.DueDate = Now
                oJounalEntry.Lines.TaxDate = Now
                oJounalEntry.Lines.ReferenceDate1 = Now
                oJounalEntry.Lines.Add()
                lRetCode = oJounalEntry.Add()

  • Journal Entry Template - Remove Parameters

    Hello,
    Is there a way to remove or hide the "Auto Reverse" checkbox in the Journal entry template? Can this be done through the appset/application parameters?
    Also, is it possible to have "Reopen journal in the next period" unchecked by default?
    Any suggestions / ideas would be appreciated.
    Thanks,
    Nikunj

    I don't think this is possible, at least on BPC 5.1
    Customizing the journal template in this manner isn't officially supported. The only supported customization is of the placement of dimensions on the header & detail, and the other items you see in the admin console's journal wizard.
    I've heard of some consultants who managed to work around these limitations, and make some unsupported customizations to the journal template XLT file behind the scenes. But there are some risks involved, and I wouldn't recommend it unless you're absolutely certain of what you're doing. Even then, with a version upgrade you may find that your customizations get destroyed.
    However, given the nature of the changes you want to make -- just changing the default values of the checkbox selections -- it seems pretty low risk, at first glance.

  • Successfully posted Journal Voucher but no Journal Entry created

    Hi All,
    Today our customer experiences a case mentioned in the subject, she has chacked the status is already "Closed" in the Journal Voucher. But there is no Journal Entry created for that Journal Voucher. Is there any explanation for this?
    Thanks,
    Alvin

    Hi,
    Kindly run the following select query :
    Select * from OJDT T1 WHERE T1.[BatchNum] = 'xx'
    where 'xx' is the voucher number and check if it displays any result.
    If there are no results, please log a support ticket on SAP Portal to get the issue investigated.
    Regards,
    Jitin
    SAP Business One Forum Team

  • 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

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

  • Differrent date between AP Credit Memo and Journal Entry

    Hi!
    I don't know why AP Credit Memo posting date = '31/08/2011' but Journal Entry record posting date ='1/9/2011'.
    Change log on AP Credit Memo Create date ='31/08/2011' and change log on Journal Entry Create date='1/9/2011'
    APCredit Memo and Journal Entry link together.
    I try to make AP Credit Memo again and check. It's ok. It's not always happen just 1 Entry has problem.
    pls help me solve this problem

    HI Darius Gragasin!
    we use SAP 8.81 PL5.
    yesterday I try to check and reconize something:
    There are many trans from AR different date than Journal Entry but same month
    It's happen on date all user open addon (addon just help user load data from excel and put data on Sales order --> user add Sales order, addon don't add data), another date It's ok
    so, I think this problem by SDK but I don't know how to control SDK with this problem
    Regards,
    Hong Bich

  • 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

  • Audit Report Fix (Manual Journal Entries for Inventory)

    Hello!
    Curious if anyone has been able to fix an inventory audit report using journal entries?
    For example:  if an item was on inventory account 1500 based on it's item group assignment, then say 20 items are received for $1 each, then 5 are sold at $1 then the item group is switched and now it has an inventory account of 1520 and 5 more items are issued out.
    Running the audit report summarizing by accounts will show $15 as the balance in 1500 and -5 in 1520.  So when we go to actually check the accounts to reconcile them at the end of a period, our inventory accounts are always off.
    I have identified manual journal entries meant to 'fix' a GL account, but these have made the audit report basically unusable for reconciliation.
    Is there a way to journalize a change in the inventory accounts while making the change occur in OINM as well??
    I have looked through several expert empowerment sessions that acknowledge this as a problem, but do not offer any solutions.
    Thanks!
    Mike

    Hi Mike:
    Changing Item groups while inventory is on hand is a problem.  I have found a way to correct this, but it is a multi step process.  I would try this in DEMO first to make sure you get the proper results. 
    Try this.
    Below is the procedure for correcting the G/L Accounts on your Inventory Audit Report  It is complicated and needs to be performed when no other users are in the system.  Journal entries will not correct this problem.
    Here it is.
    1.     Review Inventory Audit Report by Summarize by Accounts for the item.
    2.     Do a Misc. Issue to remove the inventory.
    3.     Review Inventory Audit Report again. 
    4.     Change the Acct # on the Item Group for the Inventory Item to match the negative value account number.  CAUTION!  Make sure that users are not performing transactions on the system when you do this.
    5.     Do another Good Receipt for 1 each at price shown in Negative value account number.  Enter as a positive number.
    6.     Re-run the Inventory Audit to confirm that the negative account has been zeroed out.
    7.     Change Item Group Inventory account to remaining positive value account number.
    8.     Do an Inventory Issue for quantity of 1 each.
    9.     Re-run the Inventory Audit Report for the item.  All accounts should now have zero value.
    10.     Change Item Group account setting back to correct account for future.
    I hope it works for you.
    Regards,
    Vicki Smith

  • Duplicate rows on Query with journal entries and AP documents

    Hi Experts,
    I ahve the below query allowing me to have some information from journal entries and retrieve some other from AP docuements and PO.
    The thing is the query duplicates rows because the AP docuements have several rows but i don t know how to do to remove them (i guess this has to do with JOIN function...)
    SELECT
    T2.[GroupMask] as 'Account Family',
    T2.[FatherNum] as 'Parent Account',
    T2.[AcctCode] AS 'Account Code',
    T2.[AcctName] AS 'Account Name',
    T0.[TaxDate] AS 'Document Date',
    T0.[Number] AS 'Number',
    T0.[DocSeries] AS 'Document Series',
    T0.[BaseRef] AS 'Base Reference',
    T0.[TransId] AS 'Transaction Number',
    T0.[Ref2] AS 'Reference 2',
    T1.[ContraAct] AS 'Offset Account',
    T4.[BaseRef] AS 'PO code',
    T1.[Project] AS 'Project Code',
    T1.[ProfitCode] AS 'Distribution Rule',
    T1.[OcrCode2] AS 'Costing Code 2',
    T1.[OcrCode3] AS 'Costing Code 3',
    T1.[OcrCode4] AS 'Costing Code 4',
    (T1.[SYSdeb]-T1.[SYSCred])  AS 'Total Amount EUR',
    (T1.[FCDebit]- T1.[FCCredit]) AS 'Total Amount (FC)',
    T5.[DocTotalSy] AS 'PO Amount (EUR)'
    FROM  [dbo].[OJDT] T0 
    INNER  JOIN [dbo].[JDT1] T1  ON  T1.[TransId] = T0.[TransId]  
    INNER  JOIN [dbo].[OACT] T2  ON  T2.[AcctCode] = T1.[Account]  AND T2.[AcctCode] = T1.[Account]  
    INNER JOIN [dbo].[OPCH] T3 ON T3.[DocNum] = T0.[BaseRef]
    INNER JOIN [dbo].[PCH1] T4 ON T3.[DocEntry] = T4.[DocEntry]
    LEFT JOIN [dbo].[OPOR] T5 ON T5.[DocNum] = T4.[BaseRef]
    WHERE
    (T2.[AcctCode] > (N'599999' ) ) AND  (T2.[AcctCode] < (N'799999' ) )
    AND (T0.[TaxDate]>= [%0] ) AND (T0.[TaxDate]<= [%1])

    Try This
    SELECT T2.[GroupMask] AS 'Account Family',
       T2.[FatherNum] AS 'Parent Account',
       T2.[AcctCode] AS 'Account Code',
       T2.[AcctName] AS 'Account Name',
       T0.[TaxDate] AS 'Document Date',
       T0.[Number] AS 'Number',
       T0.[DocSeries] AS 'Document Series',
       T0.[BaseRef] AS 'Base Reference',
       T0.[TransId] AS 'Transaction Number',
       T0.[Ref2] AS 'Reference 2',
       T1.[ContraAct] AS 'Offset Account',
       T4.[BaseRef] AS 'PO code',
       T1.[Project] AS 'Project Code',
       T1.[ProfitCode] AS 'Distribution Rule',
       T1.[OcrCode2] AS 'Costing Code 2',
       T1.[OcrCode3] AS 'Costing Code 3',
       T1.[OcrCode4] AS 'Costing Code 4',
       sum(T1.[SYSdeb]-T1.[SYSCred]) AS 'Total Amount EUR',
       sum(T1.[FCDebit]- T1.[FCCredit]) AS 'Total Amount (FC)',
       T6.[DocTotalSy] AS 'PO Amount (EUR)'
    FROM OJDT T0
    INNER JOIN JDT1 T1 ON T0.TransId = T1.TransId
    INNER JOIN OACT T2 ON T1.Account = T2.AcctCode
    INNER JOIN OPCH T3 ON T0.TransId = T3.TransId
    INNER JOIN PCH1 T4 ON T3.DocEntry = T4.DocEntry
    INNER JOIN POR1 T5 ON T4.[BaseEntry] = T5.[DocEntry]
    AND T4.[BaseLine] = T5.[LineNum]
    INNER JOIN OPOR T6 ON T5.DocEntry = T6.DocEntry
    GROUP BY T2.[GroupMask],
       T2.[FatherNum],
       T2.[AcctCode],
       T2.[AcctName],
       T0.[TaxDate],
       T0.[Number],
       T0.[DocSeries],
       T0.[BaseRef],
       T0.[TransId],
       T0.[Ref2],
       T1.[ContraAct],
       T4.[BaseRef],
       T1.[Project],
       T1.[ProfitCode],
       T1.[OcrCode2],
       T1.[OcrCode3],
       T1.[OcrCode4],
       T6.[DocTotalSy]
    Regards,
    Kennedy

  • PARK & POST  Journal Entry and auto reversal

    Dear All,
    Our auditors has offered the following changes to be implemented in SAP system.
    1. JE approval: Configure the system functionality to place journal entries in a u201Choldu201D status when entered into the system, then the supervisor/manager review and approval then required to release the journal entry from the u201Choldu201D status and post the entry to the general ledger. The reviewer should not have the ability to initiate a journal entry.
    2. JE reversals:  Utilize the functionality to automatically reverse journal entries, booked in prior month as u201Creversing,u201D when new period is opened.
    3. 3-way match: Utilize the SAP functionality to perform an automated 3-way match process between invoice, purchase order, and goods receiving documentation. If invoices meet the 3-way match criteria based on established variance thresholds, invoices should automatically be approved for payment. If variances are noted, which exceed tolerance thresholds set by Management within the system, work flows should be used within the system to automatically route the invoice for the require approval.
    How this changes can incorporated in the system.
    Do suggest.
    Regards,

    For point 1, there is a functionality in SAP where all parked documents will be blocked and then released by the authorized person. There is a standard workflow for that. You may want to check Make and CHeck Settings for Document Parking. If this doesn't satisfy, then there's a need to create a customized workflow. Plus authorizations must be checked so that the users will not be able to Post but only Park. Note that, there is another functionality in Document posting called "Hold" this one, system doesn't assign any financial document. You can assign any reference/number to the document.
    For point 2, there is a Mass Reversal functionality in SAP called the F.80. For accruals, you may use FBS1 which you can input the reversal date and run F.81 to run the reversal.
    For point 3, it is a standard SAP functionality. You must set tolerance as to qty or price variance and the system automatically blocks the invoice for posting and the authorized person is required to release the approved invoices to remove the block for payment. In SAP, when you enter the PO for a particular invoice, it will give you how much or how many is actually goods received for that particular PO. in that sense you will be able to see whether the invoice is completely billed for the whole PO or not.

  • Post journal entry automatically when a certain account is posted

    Dear all,
    Thanks for your attention.
    I would like to post an Journal entry automatically at the same time (or just after) a certain account is posted.
    Certain account means an account ID for Payment Difference of Payment for Invoice.
    I would like to reverse payment difference amount and post same amoount with another account ID.
    What we need to do is to catch the event of each posting and if find the account ID, post another journal entry by using action "post".
    But I have no idea where to catch posting occurs.
    Could you tell me if anyone know what I should do for this?
    If you need more info, please ask.
    Thanks,
    Mai

    Hi Mai,
    If you go to General ledger work center and click on Journal Entries view.
    Here you can do advance filter  and find the journal entry type of posting ( Cash Disbursement for instance) and you can make a note of the diff amount that got posted may be due to payment difference/exchange rate diff etc.,
    (One way of finding out which is the journal entry id, you can find this id by going to invoicing & in its document flow.)
    Now create a manual Journal entry voucher for this diff account and as you want to move this to another account, select it as offsetting.
    Thanks
    Lokesh Sharma

  • UDF is not updating in journal Entry rows

    Hi Experts,
    I have created an UDF in journal entry and trying to insert the values in it based on the transactions.
    But the UDF is not getting updated through coding where as same query if i run in the SQL database it is getting executed properly and UDF is getting updated.
    Please help in this regard
    Thank You
    Regards
    Md.nazeer Shaikh

    Hi,
    Please post the code that u are using.
    Vasu Natari.

  • Creating a file to be used by report ROIUH_LOAD_JEINTF for journal entry

    Hello everyone,
    My doubt is related to the PRA module -
    I have to create a file to be used by program ROiUH_LOAD_JEINTF for journal entry creation. There are other programs also creating a similar file to what I am expected to create.
    When I observe the existing programs, they have not used OPEN DATASET statement, instead directly used the TRANSFER dataset and then CLOSE DATASET.
    What that does is it creates a file on the app server in a different format with only 1 line even if there may be like 10 lines of journal entry. The file mainly contains # which seems like some internal coding by the system.
    When I tried using the OPEN DATASET statement, it wrote all the lines to the app server that were there in my internal table.
    However, when I do not use the OPEN DATASET statement, it creates a file with just one line and maily # instead of the actual data from internal table.
    Can any one explain what difference does it make to the system when we do not use the OPEN DATASET statement.
    You help would be highly appreciated.
    Thanks and Regards,
    Shipra.

    Hello Satish,
    Thank you for your response.
    I think I was not clear enough about my doubt. I do not have any confusion about what OPEN DATASET would do.
    In my case, there is a file being written to the app server without using an OPEN DATASET for OUTPUT statement. The Z program directly calls a TRANSFER statement.
    The file that is created on the app server looks like:
    7042008-11-01                   000200100840 ######RD##################203               #### #####10012888                #####RI01            MC3                                                                               
    This file is used by the program ROIUH_LOAD_JEINTF. There are several lines in the internal table for Journal Entry creation but only 1 line shows in the file. However, when you debug the program ROIUH_LOAD_JEINTF with the above filename, you would see that it takes up all the JE lines that were passed from the previous program (the Z program) which created this file.
    However, when I changed the Z program to have an OPEN DATASET statement, it had all the lines displayed in the file, the file was very readable.
    I just wanted to know how does the system write to app server when no OPEN DATASET statement is written in the program.
    Hope I am clear this time. Thanks again.
    Regards,
    Shipra.

Maybe you are looking for

  • Uppgrading Exchange 2007 from sp1 to sp3 on small business server 2008 sp1

    Hello everyone I know this topic has been discused many time in this froum. but i have to ask it again in my exact situation.  I have a realy unstable and unsafe server which i am planing to migrate all the apps and services to some virtual servers s

  • Working with XWindows

    Hi all, I'm working on an application where I need to spin off new processes using Runtime.exec, BUT I need to be able to hijack those processes to control the window attributes for them (i.e. the window geometry, window events like minimization, max

  • How to read records from Database view

    Hi folks, well...let me know, y im getting error as : V_T52EL is not defined in the ABAP dictionary as Table , Projection view or Database view. But actually here this View Type is : Maitenance View.   SELECT  KOART     from   V_T52EL     where ENDDA

  • Files missing in Time Machine

    Yesterday I had to refresh some local folders on my MBP from a version control system that my company maintains.  Before doing so I had copied my working copies to another folder then after the refresh copied the files I had been working on back to t

  • Netstream Object

    "The NetStream class opens a one-way streaming connection between a   Flash Player or AIR application  and Flash Media Server, or between a Flash Player   or AIR application and the local file system.   A NetStream object is a channel within a  NetCo