Catching JE Event (before posting the JE)

Hi there,
can anyone tell me how can i cacth the Journal Entry event, and change it before its posted to the system?
Example, when I click the "add button" on the A/R Invoice, catching the posting event before it gets posted and change it (add 2 more lines,1 debit and one credit)
Thank you.
LB

Hello Luis,
YOU ARE NOT ABLE TO MODIFY THE JE RELATED TO INVOICE
What you can do is add a new JE with your adjusments !
Use the following in SBO_SP_TransactionNotification
ALTER   proc [dbo].[SBO_SP_TransactionNotification]
@object_type nvarchar(20),                     -- SBO Object Type
@transaction_type nchar(1),               -- [A]dd, <u>pdate, [D]elete, [C]ancel, C[L]ose
@num_of_cols_in_key int,
@list_of_key_cols_tab_del nvarchar(255),
@list_of_cols_val_tab_del nvarchar(255)
AS
BEGIN
-- Return VALUES
declare @error  int                    -- Result (0 for no error)
declare @error_message nvarchar (200)           -- Error string to be displayed
SELECT @error = 0
SELECT @error_message = N'Ok'
DECLARE @docnum nvarchar(50)
if not exists (select * from sysobjects where name = 'T_TransactionNotification')
begin  
     create table T_TransactionNotification(
     TransactionDate datetime,
     ObjectType nvarchar(20),
     TransactionType nchar(1),
     NumOfColsInKey int,
     ListOfKeyColsTabDel nvarchar(255),
     ListOfColsValTabDel nvarchar(255) );
end;
insert into T_TransactionNotification
(     TransactionDate,
     ObjectType,
     TransactionType,
     NumOfColsInKey,
     ListOfKeyColsTabDel,
     ListOfColsValTabDel)
values( getdate(),
          @object_type,
          @transaction_type,
          @num_of_cols_in_key,
          @list_of_key_cols_tab_del,
          @list_of_cols_val_tab_del);
-- SELECTthe return VALUES
SELECT @error, @error_message
END
then issue and invoice, and see the results:
-- all records
select * from T_TransactionNotification order by
-- Invoices with JE numbers only
select T1.Transid, * from T_TransactionNotification T0, OINV T1 where T0.ListofColsValTabDel = T1.DocEntry and T0.ObjectType = '13'
As a next step, write your DI API Code, and do the adjusment based on the result of the Query (transid)
This solution is can be extended for every documents
Edited by: János Nagy on Oct 7, 2009 12:03 PM

Similar Messages

  • Is it possible to post a good issue movement before post the good receipt m

    Is it possible to post a good issue movement before post the good receipt  movement for the same material, into the same period?
    We try to explain better, today we've done a test:
    Step 1 :   We have created a material, wich material type is HAWA, with price control V, and 1 euro for 1 ST.
    Step 2 :   We have post a good receipt movement, 561 of this material  with 1000 ST of stock, and on posting date: 05.05.2011.
    Step 3 :   Then, we have post a good issue movement, 562 of the same material, with 500 ST of stock,  on posting date: 01.05.2011 ( so that, the posting date of the 562 is before from the posting date of 561).
    And it has worked, so that on trx "mb51" for this material we saw:
    PLANT1-----STO1---- 562-----  Mat. Doc.101.05.2011--
    500-   ST
    PLANT1-----STO1---561Mat. Doc.205.05.2011--
    1000  ST
    And with "fbl3n" for this G/L account , the same situation:
    G/LAccount1--DocumentNo101.05.2011--99--
    500-  EUR
    G/LAccount1--DocumentNo205.05.2011--89--
    1000  EUR
    We don't like this fact, someone knows how is it possible? The negative stocks aren't flagged!!!!
    Edited by: Ariana Serrano Aguila on May 5, 2011 5:50 PM

    Hi,
    Though sap allows like this ,, the document created will be with the date of the actual posting system date. If you look into the MSEG table you will get to know this.
    In theory .. this kind of practice should not be allowed .
    since this is a 562 which is a individual  entry may be system would have allowed.you try a 102 .
    Regards,

  • Is it possible to post a good issue movement before post the good receipt

    Is it possible to post a good issue movement before post the good receipt  movement for the same material, into the same period?
    We try to explain better, today we've done a test:
    Step 1 :   We have created a material, wich material type is HAWA, with price control V, and 1 euro for 1 ST.
    Step 2 :   We have post a good receipt movement, 561 of this material  with 1000 ST of stock, and on posting date: 05.05.2011.
    Step 3 :   Then, we have post a good issue movement, 562 of the same material, with 500 ST of stock,  on posting date: 01.05.2011 ( so that, the posting date of the 562 is before from the posting date of 561).
    And it has worked, so that on trx "mb51" for this material we saw:
    PLANT1           STO1         562           Mat. Doc.1           01.05.2011            500-  ST
    PLANT1           STO1         561           Mat. Doc.2           05.05.2011           1000  ST
    And with "fbl3n" for this G/L account , the same situation:
    G/LAccount1            DocumentNo1            01.05.2011        99            500-  EUR
    G/LAccount1            DocumentNo2            05.05.2011        89            1000  EUR
    We don't like this fact, someone knows how is it possible? The negative stocks aren't flagged!!!!
    Edited by: Ariana Serrano Aguila on May 5, 2011 5:50 PM

    SAP only checks if there is enough quantity in the period (month), it does not check if there is enough stock at date level.
    there is no stock stored in any table for a given date. SAP would need to run the logic of MB5B to calculate the stock at a certain date, this would cause tremendous performance issues.
    you either have to do this calculation yourself in a user exit, or you better train your users.

  • FB50&FBCJ, before post the document, print option is available ?

    Dear Expert,
    Herewith i have attached the screen shot of FB50 document, after simulation, before posting(Document no not generated), in the menu the print option is available , how is it possible is there any user control level seting requred to stop it ? kindly reply me
    Thanks & Regards
    ILAVARASAN TD

    Hi, I doubt, if standard SAP provides option to control such print.
    Check with your ABAP team, if it can be controlled with Transaction Variant.
    Check with Basis/GRC team, if it can be controlled with Role Authorisation.
    Thanks, Deepanshu

  • Bank Balance check before posting the payment entry

    Hello Experts,
    In my company we have ecc6, EHP4, & we have following requirements.
    At the time of posting any payment entry through transaction F-53, or F-58 or F-48, (or even customer payment) system should check the balance availanle in the ledger.
    For Example, I am posting vendor payment for Rs.50000/- and if the balance in my receipt+main acocunt is less than 50000, sap should stop or warn me at the time of entry.
    Is it posisble to do by any way.
    Please advise.
    SAJ

    Hi,
    I think this is possible through the userexit/ABAP programme
    Contact your  technical team.
    BR

  • Catch Outbound Email Before Leaving The LAN

    Does anyone know of a way to have a program listen for any outbound emails leaving the network? I would like to scrub these emails and based on their content let them pass through or stop them. If they are stopped, I will be encrypting them and storing them in a db. I would then like to send the intended repipient a link to a secure web system that retrieves their message from the db.
    I am looking for a java solution to this problem. I realize that there are vendors out there that already have this. We are trying to figure out what is going to be most cost effcient for us.
    Any help is appreciated.
    Thanks,
    Paul Zepernick

    We are trying to figure out what is going
    to be most cost effcient for us.Buy one off the shelf! These products have significant design and development time and if you get away with better than 6 man months then you will have done realy well. Here in the UK this would equate to a minimum of �30,000 . I bet you can buy one for less than that!

  • Catching DI Event (JE)

    Hi All,
    I want whenever a Journal Entry is entered in system (e.g. after Invoice, Manual) this JE to be checked and trigger next actions.
    Is there a way to catch the event? I would prefer not to use transaction_notification (if it is possible)
    Thanks in Advance,
    Vangelis

    Vangelis,
    Have a look at this post ...
    Catching JE Event (before posting the JE)
    Eddy

  • FI Report showing Discount amount before posting a Document

    We are paying Vendor's invoices.  While creating document, we enter Discount base amount and payment terms. Discount amount appears only after document is posted.  Is there any way I can print/display discount amount before posting the document?
    Thank you

    Ashok, it's F-43 to create a Vendor Invoice.   After creating, when you display the document through FB03, on screen 302, you will find Disc Base, payment term.  The Disc Amount would be blank, as it is not yet posted.
    Thanks

  • ASN user exit, before posting DESADV IDOC.

    Hi
    I have a requirement to compare the sales order quantity and delivery quantity before posting the outbound DESADV IDOC to the external system. Can anyone tell me which use exit to be used.
    If there is no exit, can anyone please tell me the alternative way to achieve the same functionality.
    Regards
    Rinku

    If you use NW 7.0, you may use an implicit enhancement option at the end of the FM, to set status 68 (it's an export parameter)
    Otherwise, create your own FM which calls idoc_input_delvry, and set status 68 in your FM. You must customize transaction WE57 to call your FM instead of idoc_input_delvry.

  • MSI 790GX-G65 delay before post

    Sorry for hijacking that other thread
    So I press the power button on my computer, then the case/mobo lights and fans (inc. cpu fan) turn on, but I have to wait about 20-30 seconds and then it posts.
    I built this system in June '09 but this problem didn't start til maybe October. This problem started happening BEFORE I updated/flashed, however I tried updating to solve the problem to no avail.
    I don't remember doing anything different when that problem started.
    My system:
    MSI 790GX-G65 motherboard
    AMD Phenom II x3 720 BE 2.8 ghz (not OC)
    G Skill 2x2GB ddr3 1600 ram (@ 1333 because of no OC)
    WD Caviar blue 320 GB 7200rpm hard drive
    HP 22x DVD burner 1170i w/ light scribe
    case: ABS Aplus el diablo
    monitor: HP 2009m 20" (DVI)
    Power Supply: Raidmax Hybrid 2 530 watt Modular (although I doubt that's the problem because power seems to be working - cpu fans turn on and mobo lights come on long before post)
    the power for the HD uses a 4-pin to SATA converter (for easier wiring) but I've tried it with regular SATA power cables
    I've tried running one ram stick
    swapped CD/dvd and Hard drive places on mobo (swapped HD from sata_0 to sata_1 etc)
    my case has a lot of wires for fans and lights, so just to make sure i disconnected those and left whatever was necessary connected
    I've tried changing the boot order HDD first, and also tried CD first just in case, didn't help
    none of these things helped :(
    if I left anything out that may help please say so
    EDIT: using onboard VGA (set as default display device in BIOS), OS is Windows 7 64bit RC in case those might help
    I currently have my case fans connected directly to molex power connectors from PSU, and hard drive and optical are both connected to regular SATA power connectors, regular SATA cables

    Quote from: Svet on 11-February-10, 15:38:52
    disconnect all storages and see how its goes,
    also do >>Clear CMOS Guide<< with power cord removed.
    if problem persist, write down and paste here what's written on the screen when the delay is happening.
    Quote from: CSN9 on 24-February-10, 05:24:10
    Yes! Disconnecting the hard drive stops the delay from happening. I had already cleared the CMOS the way the guide says, but I just did it again while the hard drive was disconnected. However, with the hard drive connected there is still the delay.
    Now that we know it has to do with the hard drive, does this mean I need a new one? I mean, I've always had the same hard drive and this problem didn't happen from the beginning. So does it mean I should reformat it or something?
    What hard drive is that? and where is connected?

  • How to catch event before retrieving data in table?

    Hello
    I use Oracle JDeveloper 11.1.1.2.0
    I need to set parameters session (Package Vars) before any refresh my page (I retrieve data from views that use this vars).
    For this reason I have created method setUserSessionParameters(int[] parameters) in AppModuleImpl.java and I am able to call it from my backing bean.
    It's working fine, but I need to call it before any retrieving data in my tables.
    May be, there is a usual way to catch event before retrieving data is started?
    I'd call my method in that place. I think it would be perfectly well decision.

    Hi,
    you can define a PhaseListener method on the f:view component (it has pre and post properties for this). In the after RestoreView phase, you can access the binding container and call teh AM method to set the values. This way, before the page renders, the value is set
    Frank

  • How to get the event before the session end?

    Currently i using a connection pool (dbpool). I need to release my pool when user logout or closing the browser. I have a session that keeping the user information and the connection pool manager.
    How i detect the event when session end? I need to know is that can catch an event and perform release() command before the session that store login information ended.
    Or have other solution to release the pool (it acually is only 1 pool, it will close the pool when no user(s) using it)

    you do not need to do this.
    In your db code, when you use
    conn.close(); your connection will be released to the pool.
    If you do not do this you will get connection pool leaks.
    There is no benefit in using a pool if you try and keep a connection for a single user, the idea is to SHARE connections between many users.
    If you want to detect session expiry yoyu need to use a 'session listener', if you search the forums you can easily find out how to do this.
    The main thng is NOT to tie your connections up in this way, you MUST use conn.close(); to release your connections back to the pool as soon as you have finished using them.

  • Post the planned profit-related flows before creating the closing report.

    Hi all,
    I would need some assistance in the posting of bonds scheduled nominal interest.
    Currently I have been able to configure the system to post the accrual of interest but not the recognition of interest revenue upon coupon date. I have encounter this warning message asking me to post the planned profit-related flows before creating the closing report.
    I thought the processing of the nominal interest earned will be very much similar to Fixed Deposits, but it seems like under the cash flow tab, none of the nominal interest flows have been created.
    Wonder if anyone has the experience in this area for bonds accounting and can point me to the correct transaction code to post the earned nominal interest for bonds.
    Many thanks.
    Bryan Goh

    Hi,
    I had the same problem and found the following workaround: apart from overriding MFMailComposeViewController's shouldAutorotateToInterfaceOrientation, I also added implementations for
    _preferredInterfaceOrientationGivenCurrentOrientation
    and
    _isSupportedInterfaceOrientation
    in a category of UIViewController in the native code.
    Then, in the Actionscript code, added an event listener for StageOrientationEvent.ORIENTATION_CHANGING (with high priority and use_capture = true) in Actionscript to prevent resizing of the stage, which can occur even if the orientation doesn’t change.
    This fixed it for me, but, as it messes with UIViewController, it makes it tricky to have views which have different orientation behaviour (if you want one view to be able to rotate in all directions, but others only to support Landscape, for example).
    I've posted details and example code here: http://blog.diadraw.com/native-extensions-for-mobile-air-apps-getting-round-the-orientatio n-issue/

  • My media can no longer playback in the event browser (post-upgrade?) any ideas?

    I'm not quite sure when (possibly post the latest upgrade to 10.07?), but I have stopped being able to playback files in the event browser.
    Up until recently, I've been able to playback clips in the browser just by positioning the playhead and pushing spacebar (same way I playback in the timeline viewer).
    I don't think I'm running any new plugins, and have been Googling around and haven't found anyone with similar issues. Any ideas? I also checked to see but didn't see any notes on anything like this in the upgrade notes (apologies if I missed it).
    Right now, when I click on a clip in the event browser and press spacebar, nothing happens. I can still skim. I've also tried command-L (just to test if it was something funny about the selection), but still nothing.
    I was definitely able to do this until not so long ago. Makes working in the event browser pretty tricky, would be grateful for any advice, and apologies if I've missed something obvious.

    That solved it (should have thought of that). Much thanks for the quick reply.

  • Enhancement for MB01 - Need to check the document before post

    Hi All,
    I need to check a material document before posting in MB01 for a field "GR/GI Slip No" which we are using to enter "gate entry no".The issue now is as i'm using a table control screen to post GRs in bulk . i want to avoid duplicate GRs of a particular gate entry.during analysis i found that an exit/Badi at MB01 - end  may serve my purpose well.
    thanks and regards,
    sachin soni

    Hi,
    You may try the EXIT:
    MBCF0005  Material document item for goods receipt/issue slip
    or BADIs:
    MB_BAPI_GOODSMVT_CREATE
    MB_BATCH_MASTER
    MB_DOCUMENT_BADI
    Regards,
    Renjith Michael.

Maybe you are looking for

  • Input credit on Service tax after making payment to vendors

    Dear Friends, Vendor invoice has been entered with Input service tax and payment has been made to the vendor. After making the payment, it is only clearing the vendor balance and not the input service tax G/L accounts entered on the invoice. We tried

  • Adjusting date and time in Elements Organizer

    Hi! Is there any way to adjust the date and time in Elements Organizer, to a specific date and time that includes not only hours and minutes, but also seconds? My version of Elements Organizer is version 13.0 (20140904.m.62073) x64, for Mac. Thanks!

  • Search help in Web Dynpro in ABAP

    Hi, I am starting with WD for ABAP (NW04s). I am using PA0022 table as model and displaying these values on the view. By default most of the fields like country, education centre, Faculty, Branch, Score come with an F4 option. But the value displayed

  • My program closed on me when i was downloading videos

    it just closed on me when i had 9 videos downloading and that thing popped up "send error report" or whatever and i did and then it closed on me. i lost all my files that were downloading and i spent money on them and i dont even get redeemed? I WANT

  • Problem with Text Entry BoX in Adobe Captivate 6

    I could not enter correct responses for my text entry box. Plus, the "success" and " failure" options were greyed out for me under properties>options. I notice my icon is IAB for text entry box, whereas some users have a placeholder sign for the icon