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

Similar Messages

  • Manual Journal entry limitations in sap b1

    Hi friends,
                   We are creating Manual JE in sap b1. We give the access only two users for creating Manual JE. Now we will plan one more thing . Limitation of JE .  it is means, per user we will go to allow only 1000 manual journal entries only creating by the user. if they reached their limitation we block that . How i will block ? Is it possible in sap b1 ? or any store procedure is there?

    Number of Journal Entries could be limited by giving user specific document numbering series for a particular user.
    Hope this helps.
    Regards
    Iftikhar

  • Manual journal entries created in Ap did not see in Accounts Payable Trial

    Hi Experts,
    Report Accounts Payables Trial Balance, with parameter Include SLA/Manuals/Other Sources Flag set to Yes, does not show manual journal entries.
    These Manual journals entries are created in AP
    Navigation: Payables -->Accounting --> Subledger accounting --> Journal Entries.
    Ofter creating the journal entries i ran Accounts Payable Trial Balance, when i go through the output i did not see the Manual journal entries which are created in AP.
    Please help me it is very urgent.
    Regards,
    Raju.

    Pl check your 'Report Defintion' once to ensure that liability accounts that you are using in manual entries are included in report definition.
    Regards,
    Tarun

  • Is it possible to automatically trigger a Manual Journal Entry?

    Hi Forum,
    This could apply to any situation:
    Suppose when I create an A/R invoice, I would like another manual journal entry to be created automatically. Is this possible and how could it be achieved?
    Thank you.

    Hi Mahendra and Gordon:
    This is the situation:
    Relates to DropShip Order:
    1.Client create DropShip Sales Order (against drop ship warehouse).
    2. DropShip Sales Order generates PO (Note no liability accounts are hit)
    3. Client wants to invoice their drop ship customer immediately by emailing A/R invoice.
    This mean the revenue accounts are already hit and our client has registered a revenue.
    Problem : However liability accounts are not hit and our client may not receive A/P invoice for say 2 weeks. This means the books show exagerated revenue.
    I suggested - A/P reserve invoice to be created immediately, but it needs to be canceled which leaves original PO in closed state in 8.8.
    Second method I suggested to create a manual journal entry to hit deferred liability account to be reversed in two weeks. The client says, this is backoffice job and they do not want them to have access to journal entries.
    In anycase, whatever reason, our client will change business practice, however, I thought let me check what it takes to create manual deferred liability auto reversal entry automatically.
    Is there any other way to handle this situation?
    Thanks.
    Edited by: Syed Aleem on Jun 24, 2011 3:13 PM
    As soon as A/R invoice is created, a deferred payable needs to be updated also automatically at the same time. This is the requirement.

  • FC - Cross-category validation in Central Manual Journal Entries

    Hello experts,
    At a client site we are implementing several different reporting categories.  There are requirements to validate certain accounts between categories.
    Within the packages this is working fine - example:
    But when used in Central Journals the controls behave differently.
    In our issue there is a JE posted on the Category "IFRS-ACT".  We then try to post a journal on a different category (same ledger) and want to validate to make sure we are balanced between both.
    The control runs OK and recognises that there is a difference between the amounts stored in the separate categories but does not bring the amount stored on the category that it is validating against:
    Can anyone offer any advice on how to resolve the issue?  Or is it not possible?
    Many thanks!

    Hello,
    This is a known behavior. Controls and formulas using
    external data (data from another category) are not applied to local and central manual
    journal entries.
    Regards,
    Emna.

  • Exchange rate differences posting failed due to manual journal entries

    when i run exchange rate differences and try to post the result, system shows "No matching recording found 'journal entry' (OJDT) (ODBC-2028) [message 131-183]" at the bottom panel ane the posting was failed. then i found the problem is actually from manual journal entries made to a business partner. as long as i deselect the manual journal entries, the posting was successfully done.
    i am using B1 2007B with pl09. is this standard in B1 2007B that exchange rate differences posting does not work with manual journal entries of BP?

    you are right! it is a bug in 2007B.
    The posting has no problem if the base reference number is same as the transaction number in the manual JE document. however, if we define a numbering series which is different from the transaction serial number, then we have problem with the posting. System searchs for the JE records by using base reference number as transaction number. That is why it could not find the JE document and then report the error message.
    so, where should i post the bug to SAP and let them fix the bug as soon as possible?
    thanks for the help!

  • 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

  • Park and Post management review step for manual journal entries

    We are implementing SAP and want to discuss the best way to automate in SAP a high dollar/value (maybe $100K and above) "park and post" management review step for posting manual journal entries. I believe SAP does not offer dollar/value limits as standard functionality for defining a park & post process. If this correct, what have you seen from your other clients using SAP park & post? Is there a different way to get where we want without customizing a workflow or generating a new transaction set?

    Hi you could limit the authorisation for the users only to park and then a responsible person could review it and post. You can set a tolerance limit for customers and vendors.

  • CENVAT utilization by Manual Journal Entry

    Hi All,
             Can anybody explain me the process of cenvat utilization by passing Manual Journal Entry.
    Please reply fast
    Regards,
    Abhishek

    Please read the following document which explains answers to your questions
    [https://websmp205.sap-ag.de/~sapdownload/011000358700006192062006E/IndiaLocalization_2005B.pdf]
    Check page no. 29 which explains "Creating Opening Balances for PLA/ CENVAT"
    Also have a look at the following Blog, Implementing SAP Business One for India Localization
    [https://www.sdn.sap.com/irj/sdn/weblogs?blog=/cs/junior/view/wlg/10739]
    Edited by: Sridharan T on Sep 8, 2008 11:14 AM

  • How to reverse the cash journal posted entries in FBCJ

    Hi All
    In Cash journal (FBCJ) user has posted the document by mistakenly two times, is it possible to reverse the cash journal posted document. Please advise how to reverse the posted cash journal entries.
    Regards
    K.Gunasekar

    Hi,
    For reversing, select the line and then go to "Edit > Delete Entry (Shift+F2)" or "Delete Row" button at the bottom part of screen. (Deletion function reverse the document in FBCJ)
    However in case you are trying to reverse the entry after printing a receipt if you must implement OSS Note 359656 first:-
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/sapnotes/index2.htm?numm=359656]
    Regards,
    Gaurav

  • 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

  • How to reverse material ledger closing entries beyond  previous period?

    In a test system, the system does not permit reverse material ledger closing entries. The current period is 04/2008.
    Getting a message C+716 message
    You want to cancel closing entries in valuation area XXXX for period 008 in fiscal year 2007.
    You are allowed to cancel closing entries only in the previous period. Reversing closing entries for periods before the previous period is not possible.
    There are provision to run closing entries like  MUST_SETTLE in the ok code features, Are there,any such for reversal? Could there be any work-around?

    Hi David
    If you dont need to perform the close itself but would just like to get the periods in the correct status you can use the process outlined in note 645083.
    In the material ledger, it may be necessary for different reasons to manually set the period status of materials in former periods to 70 ("Closing Entry Completed") without actually carrying out the closing entry.
    It provides program Z_ML_SET_PP_STATUS_70 that will allow a manual update to the prior period status.
    There is a pre-requisite regarding revaluation amounts, but this is all described in the notes.
    /Elaine

  • Reversal of Manual BRS entries

    Hi
    We have Cash Management System. Where all the checks deposited (by customer) in bank is credit to my account on next day irrespective of the bank clearing or not (as per RBI). If check is bounced it will be debited after 2-3 days when bank clearing is done.
    Now we do FF67 (manual BRS). When i posted bank receipt from customer,
    Entry Posted:
    Incoming Bank A/c.. Dr
       To customer A/c
    When FF67 is done:
    Main Bank A/c... Dr
       To Incoming bank account.
    In FF67, above entry clears the incoming bank account line item
    Now when i come to know that check is actually bounced and again debited in my account, i want to reverse above entry (i.e. 2nd entry - FF67).
    So i want that FF67 should be able to reverse the above (already cleared entry).
    So please let me know if its possible to reset and reverse the particular accounting entry in BRS (FF67).

    Hi:
             Please note that if there has been any entry in FF67 which is posted and later on its corresponding check gets bounced, then you can reset and reverse the clearing document generated through FF67 posting but in Bank accounting it will not open that line item. It will remain as it was, instead it will reverse the document in financial accounting.I have not seen a reversal impacting a posted BRS cleared items...Alternatively you simply post a debit note to the customer for the amount of check dishonored.
    Please check this and revert back.
    Regards

  • Currency conversion rule not executing for manual journal entries.

    Hi,
    We have currency conversion business rule set in our project. THis business rule is not converting LC to other currencies for manual journal posting entries. i.e, it is audit id with DATASRC_TYPE="M".
    Can any one let me know if any specific settings are to be done for this to work?
    Regards,
    Swetha

    Hi,
    Is the currency conversion working on the other datasources?
    If yes, then try to post some record through input schedule in the M datasource, run the currency conversion, and see if the currency conversion is working fine or not.

  • Is it possible to make the attachment icon on my journals form a compulsary step when creating a new manual journal entry?

    Good day,
    Our company uses EBS 11.5.10.2. The company has a policy whereby any new manual journal needs to have the supporting documentation attached to it, using the attachment icon in the task bar.
    Users sometimes forget to do this, though. This has now prompted management to request that we try and make this process of attaching a document when creating a new manual journal compulsary to the process.
    Is this possible on the current version we are running on?

    Well, that depends on if you are using client/server or web. Currently there is a bug being investigated, which is preventing the cursor size from being altered. For client/server, do the following on the client machine (assuming Windows):
    Control Panel > Accessibility Options > Display > Cursor Width
    By increasing the width, the cursor will be more visible. The same is expected to work on the web, but currently is problematic and being investigated.

Maybe you are looking for

  • Application installer not working with PC Suit App...

    I have a Nokia E60 and Windows XP SP2. After installing PC Suite 6.82.96.4 I try to open the App. installer but it opens and closes inmediately (blinks) but do not work. I try to do the installation through the File manager, and I can see and open th

  • How do I turn off the downloads window?

    How do I turn off the downloads window? I recently upgraded FF, hated the new one, so downgraded back. When I upgraded I got the new downloads ribbon at the bottom of the screen and no longer had the downloads window. However, for whatever reason I d

  • Can't find file location.

    I recently transferred my iTunes to my laptop via the backup discs, which I thought worked well. When I tried to play some songs, iTunes told me that they couldn't be played because the original file couldn't be found. I first thought it was because

  • How to upload Image to MDM 5.5 SP3 using Java APIs

    Hi, I am trying to upload Image to Images table in MDM 5.5 using JAVA API for MDM. But. I'm not able to find particular field in Images table where I need to set the Blob object ( Image data ). I'm not aware of the method to set the Blob, there is on

  • Trouble making a CLR Function - Part 2

    I successfully made a CLR split function in c# and registered it in sql server.  Now I added another function to the assembly called FormatString. First I had to drop the function Split, and then the assembly CLRHelper, then I added the assembly and