Populate Custom Table when Posting an Invoice

Hi All,
I need to populate a custom table when an invoice is posted, the custom table needs to hold the actual FI document number. We post invocies via a variety of means, manually through the transactions FB60 and MIRO and in the background via BAPI's.
Does anyone know a user exist/BTE or BADI that can be used to populate a custom table at the time the SAP FI document is posted for an invoice?
Regards
Chris

Hi
You can use BADI AC_DOC_POST.. Pardon me, i dont remember the name exactly.. You can search the badis in SE18 based on this name
Ask your abaper to write the code  so that when the COMMIT happens, it also updates the Z table
Other Options: BTE 1120
br, Ajay M

Similar Messages

  • Not Updating Customized Table when System having Performance Issue

    Hi,
    This is actually the same topic as "Not Updating Customized Table when System having Performance Issue" which is posted last December by Leonard Tan regarding the user exit EXIT_SAPLMBMB_001.
    Recently we changed the program function module z_mm_save_hide_qty to update task. However this causes more data not updated. Hence we put back the old version (without the update task).  But now it is not working as it used to be (e.g. version 1 - 10 records not updated, version 2 with update task - 20 records not updated, back to version 1 - 20 records not updated).
    I tried debugging the program, however whenever I debugged, there is nothing wrong and the data is updated correctly.
    Please advise if anyone has any idea why is this happening. Many thanks.
    Regards,
    Janet

    Hi Janet,
    you are right. This is a basic rule not to do any COMMIT or RFC calls in a user exit.
    Have a look at SAP note 92550. Here they say that exit EXIT_SAPLMBMB_001 is called in the update routine MB_POST_DOCUMENT. And this routine is already called in UPDATE TASK from  FUNCTION 'MB_UPDATE_TASKS' IN UPDATE TASK.
    SAP also tells us not to do any updates on SAP system tables like MBEW, MARD, MSEG.
    Before the exit is called, now they call 'MB_DOCUMENT_BADI' with methods MB_DOCUMENT_BEFORE_UPDATE and MB_DOCUMENT_UPDATE. Possibly you have more success implementing the BADI.
    I don't know your situation and goal so this is all I can tell you now.
    Good luck!
    Regards,
    Clemens

  • Error when posting AR Invoice with serial

    Hi experts, just want to ask what is the problem when posting AR Invoice with serial number. The error is "Internal error (-5002) occurred [الرسالة 131-183]"
    Here's my code :
                                If Not oSerial Is Nothing Then
                                    oSerial.DefaultView.RowFilter = "product_reference_code = '" & oDrView("product_reference_code") & "' " 'AND site_reference = '" & oDrView("site_reference") & "' "
                                    For Each oDrSerial As DataRowView In oSerial.DefaultView
                                        Try
                                            .Lines.SerialNumbers.Quantity = 1
                                            .Lines.SerialNumbers.InternalSerialNumber = oDrSerial("serial_no")
                                            .Lines.SerialNumbers.Add()
                                        Catch ex As Exception
                                        End Try
                                    Next
                                End If

    Hi Bryan,
    Have you try to debug it , which line is causing problem.
    With serial numbers you don't have to set the qty.
    other fields that need to be set are :
    for (int count = 0 ; count < totalcount; count ++)
         if (count > 0)
              .Lines.SerialNumbers.Add();
         .Lines.SerialNumbers.SystemSerialNumber = SysSerialNum;
         .Lines.SerialNumbers.ManufacturingSerialNumber = ManufacturingNum;
         .Lines.SerialNumbers.InternalSerialNumber = internalserialnumber;
         Count++ ;
    Hope it will help.
    Regards

  • Customer discount when posting payments

    Hi All,
    I would like to know how to use the customer discount when posting payments.  When using F-28.What is the configuration required for that? Please advise me...
    good answers r appreciated.
    regards
    Karnam

    Hi,
    Steps for Cash Discount allowed to customers:
    1. Create Terms of Payments in  OBB8
    2. Mention your Terms of Payments in Customers Master data:
    Go to FD02: Give your company code and customer a/c number and press enter
    Click on company code data ---> Go to Payment Transactions.
    Give your Terms of Payments here and save the data
    3. Go to the TCode: OBXI
    Give your Chart of Accounts and press Enter
    Here give your Cash Discount Granted a/c or Cash Discount allowed GL a/c number
    Note: Create Cash Discount Allowed or Granted Account with post automatically  in FS00.
    4. Go to F-28 to post Incoming Payments
    Give necessary details and click on Process Open Items
    Select the amount which you want post.
    Note:
    1.Discount  allowed a/c gets posted automatically.
    2. In OBA4, we have to Discount Rate. For ex. 10%.
    3. In OBB8, while determining Terms of Payments we can give discount rate within 10% which we have mentioned in Tcode: OBA4.
    Hope this helps you in detail
    Regards,
    Kannusamy S
    Edited by: Kannusamy.S on May 29, 2009 7:39 AM

  • Tax error when posting vendor invoice

    Dear Friends ,
    I am posting this 3rd time, I am geting this error when poatin vendor invoice , I am geting this error in production system before GOLIVE ,when we are doing live data entry test . All the seting related to taxes has been testing more than 10times , But we are unable to find the problem . We had checked with all past messages and best possible solution in SDN ......but problem is not solved . Said error is as follows ....
    Tax code V0 country IN does not exist in procedure TAXINN
    Message no. FF713
    Diagnosis
    You entered a tax code which is not defined for the country of the company code to be posted to in the tax calculation procedure.
    System Response
    Procedure
    Check and, if necessary, correct the entry.
    Procedure for System Administration
    If it is not an input error, check and possibly change the system settings.
    To do this, choose Maintain entries (F5).
    Check whether the company code is assigned to the correct country and whether the correct tax calculation procedure has been entered for the company code country.
    Create a new tax code if necessary.
    Caution:
    Since it is possible that the tables in question are being updated at a different time on another computer, it can take a certain amount of time for the tax code to be on all local machines in client server architectures after saving the new code.
    Raghu

    hi
    go to ftxp choose tax code v0
    here in first input field give 00
    then select that field and click on gl acct tab
    here mention a gl or go to ob40 and mention gl for the acct key of that field
    try finding
    Tax code country IN does not exist in procedure TAXINN
    on SDN u will get many threads
    Tax code XX country IN does not exist in procedure TAXINN (MIRO Error)
    conclusion is u must get acct for at least one condition in the tax code
    regrads
    kunal
    award if helpful

  • How to populate custom table field value into standard DFF

    Hi Gurus
    I am newbie to the OAF
    I have a requirement to populate the custom table field value into standard DFF. we enabled the DFF in ReqDistDFFOnAcct(po_req_distributions_all). On the requisition tab as soon as i click on the checkout button, the custom field value has to be shown in the requisition distributions DFF field along with the standard Columns like charge account, percent, qty and when we click on the next button, it has to hit the base table ie., po_req_distributions_all.
    the standard columns data is showing the screen. how to acheive this requirement programatically
    There is a EO for the req distributions table. please help me how to achevie this requirement.
    Any help woud be greatly appreciated.
    Thank You!
    Krishna

    Thanks Aj. Finally i made some progress....but i am getting an error in the inst_top OPMN folder 10/10/08 15:37:14 Error: <connector name="OracleASjms" path="OracleASjms.rar" /> will not be bootstrapped since corresponding module declaration was not found in application.xml. I cleared the cache, bounced the webserver. Could not able to understand what is this error
    Following is the code that i have written. I am not able to find out what is the error. please help me how to fix this error. there is no changes in the page and the value is not auto populating. the page is having the normal behaviour as the standard one.
    Thanks in Advance for your help...
    public class xxCheckoutDistsCO extends CheckoutDistsCO
    public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    String UnitId="";
    //First get the Application Module
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAViewObject vo = (OAViewObject)am.findViewObject("PoRequisitionLinesVO");
    String Reqlineid="";
    String Linenum="";
    String DeliverLoc="";
    if(vo.first() !=null)
    Reqlineid= vo.first().getAttribute("RequisitionLineId").toString();
    Linenum = vo.first().getAttribute("LineNum").toString();
    DeliverLoc = vo.first().getAttribute("DeliverToLocationId").toString();
    // if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    // pageContext.writeDiagnostics("TEST >", Reqlineid,1);
    // pageContext.writeDiagnostics("TEST >", Linenum,2);
    // pageContext.writeDiagnostics("TEST >", DeliverLoc,3);
    UnitId=null;
    String Querry="select amli_icx_oaf_utils.get_blding_unit_id (?,?,?) from dual";
    try
    PreparedStatement ps=am.getOADBTransaction().getJdbcConnection().prepareStatement(Querry);
    ps.setInt(1,Integer.parseInt(Reqlineid));
    ps.setInt(2,Integer.parseInt(Linenum));
    ps.setInt(3,Integer.parseInt(DeliverLoc));
    ResultSet rs=ps.executeQuery();
    // ps.execute();
    // am.getOADBTransaction().commit();
    while (rs.next())
    System.out.println(" Query Results ");
    UnitId= rs.getString(1);
    System.out.println(" first > ");
    rs.close();
    ps.close();
    catch(SQLException a)
    System.out.println(" Error "+a);
    System.out.println(" Second > ");
    System.out.println(" Third > "); ----the program is executing upto here...it is not setting the value after this.
    OAViewObject povo = (OAViewObject)am.findViewObject("PoReqDistributionsVO");
    if(povo.getCurrentRow()!=null ) --------If i remove this condition i am getting the nullpointer exception in page.....
    System.out.println(" Fourth > ");
    povo.getCurrentRow().setAttribute("Attribute12",UnitId);
    // if(pageContext.isLoggingEnabled(OAFwkConstants.STATEMENT))
    // pageContext.writeDiagnostics("TEST >", UnitId, 1);
    Thanks
    krishna

  • Custom Table for Verifying Duplicate Invoice against Legacy Invoice Data

    Hi All,
    We are trying to upload legacy invoice data in a custom table. Then we want to use SAP duplicate invoice check functionality to look for the potential duplicate invoice from this custom table as well apart from the standard SAP tables.
    If you know of some user exit or any function module which I can use to link this custom table with the standard SAP duplicate invoice check functionality then it would be of great help.
    Regards,
    Sanjay

    Hi Jurgan!
    Thanks for the reply,
    We are using ECC6,
    Support pack : SAPKH60013
    Settings for Duplicate Invoice Check In Vendor Master is correct
    Customization setting OMRDC transaction, tick mark for invoice reference no. only
    If all the cited characteristics match, the system displays a
    customizable message. M8462 (if logistics invoice documents are found) or M8108 (if accounting documents are found).
    I have ensured that message M8108 (if accounting documents are found) is maintained as an error message in OMRM.
    Still system is allowing duplicate invoices for the reference nos. 00082 and 00072.
    For other reference Nos. which are previously used for other documents, system issues error message successfully.
    I dont want to delete archived accounting doc. and if I maintaind BKPF entris of this archived doc manually it will create probelm in FI.
    is this happen due to life span of secondory index of archived accounting doc. is completed ?.
    Please Help
    Many Thanks
    Vikas

  • Error Message M8 534 when posting vendor invoice

    Hello Guru's!
    My client has a BSP application that the purchasers are using to approve and post vendor invoices.
    When the user is approving the invoice, we have a WF setup to automatically post the invoice to FI.
    We're using standard SAP functionality. BUS2081, method PreliminaryPost.
    First, this method is reading the preliminary invoice using method MRM_INVOIC_READ, then it goes on to try to post the invoice, using MRM_PARKED_INVOICE_POST.
    In about 50% of the approvals, the invoice is posted to FI but the other 50% kicks out with a message M8 534 - Balance not zero: &  debits: &  credits: &.
    Then the system is setup to generate a new WI in order to post the invoice manually.
    The issue, is that before the method PreliminaryPost is carried out, there is a check online to make sure the document ís OK.
    So, i know that there is no balance on the document, and it should be ok to post.
    This issue arised recently after my client went through an upgrade from ECC 5 to ECC 6.
    I have seearched OSS for notes, adn related notes are implemented.
    Any thoughts on this
    Thank you for sharing your wisdom.
    Lars

    The functions that i'm using are SAP developed functions and used by the bapi 'BAPI_INCOMING_INVOICE'
    However, i found out from SAP that these functions are only supported from SAP using 3 standard workflows.
    WS20000397 Release of invoice blocked due to price
    WS20001003 Parking: Complete invoice
    WS20001004 Parking: Release complete invoice documents
    They hinted that i should try the function MRM_DBTAB_REFRESH.
    Havent had time to try this yet, but will do, soon.
    Regards
    /lars

  • When posting an invoice,a line itemthat is already invoiced is still coming

    Hi,
    When I am trying to post an invoice against above PO, a line item that is already
    fully invoiced is still pulling through.
    Could you please let me know why this is happening?
    Thanks
    Venkat

    Hi
    Please check following settings:
    T code VTFA select your combination of SO type to Billing type.
    Left hand side double click on "Item", there check "Billing quantity" field, it should be 'A'
    and "Pos./neg quantity" field should be '+'.
    try and revert.

  • Default profit center when posting vendor invoices thru MIRO, FB60 and FB65

    Hi,
    My requirement is to default profit center at item level while posting vendor invoices using transactions MIRO, FB60 and FB65.
    can anyone please provide some inputs on this.
    Thanks for your help.
    Lucky

    Hi,you need to customize doc splitting.
    1.You need to clasify all accounts from future document in  Document Splitting-Classify G/L Accounts for Document Splitting(e.g. all accounts 2000) 03000-VENDOR.
    2.in IMG: Classify Document Types for Document Splitting    check for Document type  transaction and Variant (e.g. Doc=KR, Trans.=1010, Variant= 0001)
    3.In IMG:  Activate Document Splitting   check  assigned method(e.g. 000012)
    4. in IMG- Document Splitting-Extended Document Splitting-Define Document Splitting Rule
    For find your method and transaction(e.g. Method=00012, trans.=1010) and double click on Item categories(on left of the top of screen)
    There'd be record with category from first step (e.g. Cat.=0300), select one and double click on Base item cat. - there'd be Category 0300 and with check box Automatically split.
    I hope it'd be helpful

  • Other solution during stock shortage when posting several invoice item?

    Hi Experts,
    Referring to Note 362037, posting an invoice with price variance to a material with moving average price , the stock quantity coverage is less than the posting quantity.
    The standard SAP system perform the stock shortage exam considering each posting item, not the whole quantity.
    And, according to the note, no solution is provided in the SAP standard system.
    In some cases, this may cause the material price extremely high and lead to misunderstandings.
    So, is there any solution to this VARIANCE POSTING?
    Example as follows:
    The following FI postings are generated:
                                Debit Credit
    Creditor                        2000
    Stock account   960                        for item 0001
    PRD account    40
    Stock account   960                         for item 0002
    PRD account    40
    However, you expected the following:
                                Debit Credit
    Creditor                         2000
    Stock account     960                          for item 0001
    PRD account      40
    Stock account     0                            for item 0002
    PRD account      1000

    Hi,
    Its not possible to post the 1000 to PRD account. You need to do GR for shortage quantity and balance the quantity. Thanking you.

  • Updating Custom table when updating infotype

    HI
    A custom transaction needs to be created for maintenance of the table in future as the values could change. Whenever infotype 0015 values are changed are updated this custom table  values should need to update.Could you please suggest me..

    I also suggest you to lock only the entry that will be updated (and not the whole table!) : you will have then far less problems of conflict with updating this table.
    For that, you have to create a lock object on your table (via SE11 - for example EZ_MY_TABLE). This will create 2 function modules named ENQUEUE_E<name of your lock object> (in my example ENQUEUE_EZ_MY_TABLE) and DEQUEUE_E<...>.
    You can then call those FM like this :
    CALL FUNCTION 'ENQUEUE_EZ_MY_TABLE'
      EXPORTING
        MODE_RSTABLE = 'S'
        KEYFIELD1 = ld_keyfield1  " Here are the key values for the entry that you have to update
        KEYFIELD2 = ld_keyfield2
      EXCEPTIONS
        FOREIGN_LOCK = 1
        SYSTEM_FAILURE = 2
        OTHERS = 3.
    Best regards,
    Samuel

  • Populate custom table

    Hi friends,
    I got a task to do .
    Populated Goods Movement details in a custom Z table each time a goods movement is created through MIGO or PGI by using MB_DOCUMENT_BADI
    Could anyone tell the process to do..
    With regards,
    Naren

    Hi,
    MB_DOCUMENT_BADI is a BADI. You can see this BAPI using transaction SE18. These two methods in this BADI
    <b>1</b>. MB_DOCUMENT_BEFORE_UPDATE - Exit after Writing a Material Document. Not in 'update task'
    <b>2</b>. <b>MB_DOCUMENT_UPDATE</b>                - When Writing a Material Document. In 'Update task'.
    You should use the second method "MB_DOCUMENT_UPDATE  " because this is called where all validation are finished and data is being updated.
    To use this method first you will have to create a implementation of this BADI.  Follow these steps to  implement BADI.
    -->  Go to transaction SE19.
    -->  Enter Implementation name "Z_MB_DOCUMENT_UPDATE" ( you can enter any other meaningful name too) and hit create.
    -->  When asked for "definition name" , enter "MB_DOCUMENT_UPDATE".
    -->  On the screen which opens, enter meaningful description. and hit save.
    -->  When asked, enter your custom development class and create a transport request.
    -->  Now, select "interface" tab.
    -->  Here you can do two things. <u><b>a).</b></u> double-click on method "MB_DOCUMENT_UPDATE" and it will directly take you to the place where you write your code to update custom Z table. <b>OR</b> <u><b>b).</b></u> Double-click on the "implementation class" . This you will fine under interface name and it would be line "ZCL_IM__MB_DOCUMENT_UPDATE".
    -->  If you double-click on "implementation class", it will take you to the screen ( this is same as SE24 screen where you implement can see classes and interfaces ) where you can see method, what parameters are available etc. From here also you can double-click on method and do to the place where you can implement you code.
    For more information on BADI, please refer to this link.
    http://help.sap.com/saphelp_46c/helpdata/EN/ee/a1d548892b11d295d60000e82de14a/frameset.htm
    Let me know if you have any question.
    Regards,
    RS

  • User exits when posting purchase document and goods movement (GR)

    I want to update some custom tables when posting PO and goods movement (GR) .
    Please suggest user exits for both posting.

    Check the below exists
    FOR PO
    LMEDR001            Enhancements to print program
    LMELA002            Adopt batch no. from shipping notification when posting a GR
    LMELA010            Inbound shipping notification: Transfer item data from IDOC
    LMEQR001            User exit for source determination
    LMEXF001            Conditions in Purchasing Documents Without Invoice Receipt
    LWSUS001            Customer-Specific Source Determination in Retail
    M06B0001            Role determination for purchase requisition release
    M06B0002            Changes to comm. structure for purchase requisition release
    M06B0003            Number range and document number
    M06B0004            Number range and document number
    M06B0005            Changes to comm. structure for overall release of requisn.
    M06E0004            Changes to communication structure for release purch. doc.
    M06E0005            Role determination for release of purchasing documents
    ME590001            Grouping of requsitions for PO split in ME59
    MEETA001            Define schedule line type (backlog, immed. req., preview)
    MEFLD004            Determine earliest delivery date f. check w. GR (only PO)
    MELAB001            Gen. forecast delivery schedules: Transfer schedule implem.
    MEQUERY1            Enhancement to Document Overview ME21N/ME51N
    MEVME001            WE default quantity calc. and over/ underdelivery tolerance
    MM06E001            User exits for EDI inbound and outbound purchasing documents
    MM06E003            Number range and document number
    MM06E004            Control import data screens in purchase order
    MM06E005            Customer fields in purchasing document
    MM06E007            Change document for requisitions upon conversion into PO
    MM06E008            Monitoring of contr. target value in case of release orders
    MM06E009            Relevant texts for "Texts exist" indicator
    MM06E010            Field selection for vendor address
    MMAL0001            ALE source list distribution: Outbound processing
    MMAL0002            ALE source list distribution: Inbound processing
    MMAL0003            ALE purcasing info record distribution: Outbound processing
    MMAL0004            ALE purchasing info record distribution: Inbound processing
    MMDA0001            Default delivery addresses
    MMFAB001            User exit for generation of release order
    MRFLB001            Control Items for Contract Release Order
    AMPL0001            User subscreen for additional data on AMPL
    For Goods Movement
    LMR1M001            User exits in Logistics Invoice Verification
    LMR1M002            Account grouping for GR/IR account maintenance
    LMR1M003            Number assignment in Logistics Invoice Verification
    LMR1M004            Logistics Invoice Verification: item text for follow-on docs
    LMR1M005            Logistics Inv. Verification: Release Parked Doc. for Posting
    LMR1M006            Logistics Invoice Verification: Process XML Invoice
    MRMH0001            Logistics Invoice Verification: ERS procedure
    MRMH0002            Logistics Invoice Verification: EDI inbound
    MRMH0003            Logistics Invoice Verification: Revaluation/RAP
    MRMN0001            Message output and creation: Logistics Invoice Verification

  • Error message when posting invoice : Day-end closing not defined

    Hi,
    In our training environment we migrated from FAGLFLEXT to FMGLFLEXT and activated fund management.
    Now when posting an invoice the system provides an error message: "FQ252 Day end closing not defined".
    There is no configuration related to F845 but we are prevented from posting the document due to this error message.
    Any idea of where this could come from and of what need to be done to prevent this from happening?
    Rgds
    Sophie

    Hi Sophie,
    Can you check if you have entries in either PSO43 or PSO43USER tables (can be accessed via F8O2 transaction)?
    Regards,
    Eli

Maybe you are looking for

  • What's wrong with this simple code?

    What's wrong with this simple code? Complier points out that 1. a '{' is expected at line6; 2. Statement expected at the line which PI is declared; 3. Type expected at "System.out.println("Demostrating PI");" However, I can't figure out them. Please

  • Problem with decision

    Hello, I have a huge problem with my iPhone 5. After drop a loudspeaker(on the top) doesn't work, so I'm unable to talk with people. Also my front glass is broken, but it's not such a big problem. The question is should I try to sell iP5 and buy iP 5

  • How do I Convert cassette music to a CD using my Mac?

    How do I Convert cassette music to a CD using my Mac?

  • PPT for BDC

    Hi, I need to train some entry level users to process failed  BDC's . I anybody having a presentation to work in BDC ie reprocess, to see error log like that. Please provide me the link or send me some presentation files to my mail id [email protecte

  • 10gR3 Contributor Performance

    Hello. A site is being migrated from v7.1.1 to 10gR3. A layout page had 27 elements in a region with a mix of WYSIWYG, static lists, and plain text elements. In 7.1.1 it loaded quickly, however, the 10gR3 is using ephox editor which is loading very s