BADi INVOICE_UPDATE

Hi All,
I am using Badi INVOICE_UPDATE to change the value of 'Tax Amount' with some other value when i am going to create a Invoice for the Purchase Order. I am not able to set the flag inside the BADi which for which i need to make the changes.  So please any of have worked on the same scenario plz suggest me.
Waiting for quick replies from your end.
Thnks in advance.
Santosh

Hi ,
You achieve this using the ABAP memory:
From the place you want to capture the FLAG:
export flag to memory id 'YOURID'.
At the place you want to check the FLAG and do some operations:
import flag from memory id 'YOURID'.
Now when you have the FLAG value, you can check that and do the desired operations.
Hope these option might have clarified most of your doubts.
Regards,
Ashish Arora

Similar Messages

  • BAdI 'INVOICE_UPDATE' could be used in MIR7/MIR4 ??

    Hello,
    Our customer implemented  BAdI implementation to check qty and currency ammount in the following BAdI.
       BAdI      BAdI  INVOICE_UPDATE
       method  CHANGE_AT_SAVE
       Then I found that note 1156325 describes as folloes;
    The BAdI 'INVOICE_UPDATE' was only designed to execute checks during document entry or document posting in transaction MIRO.
    This seems to restrict only in transaction 'MIRO', but it seems to work in other transaction, such as MIR7, MIR4.
    We should not use this BAdI and should use 'MRM_HEADER_CHECK' ?
    Could anyone give me your recomendation/suggestion?
    Thank you
    Yuko

    Try use field symbol assign to change the field value.
    First make sure that the field can be assigned to a field symbol. Usually the field must be declare in global top include program.
    If yes. Then
    ASSIGN (l_v_field) TO <l_fs>. 
    CHECK sy-subrc EQ 0.
    <l_fs>  = new_value.  " change value here
    l_v_field is char type. l_v_field = (PROGRAM-NAME)FIELD-NAME.
    Good luck.
    Edited by: Chris Xu on Dec 25, 2007 11:47 AM

  • BAdi INVOICE_UPDATE   for MIRO

    Hi, we're having following issue  after the implementation of badi INVOICE_UPDATE in MIRO:
    Commitment item data in report S_ALR_87013620 is not matching data in KSB2
    Total record in S_ALR_87013620  is not equal to line item total in KSB2.
    Which two table can compare for total and  cost center line items.
    Thanks,
    sa

    Resolved

  • MIRO BADI 'INVOICE_UPDATE'

    I am using BADI 'INVOICE_UPDATE' to update a flag 'ZLSPR' in header data on SAVE in MIRO transaction. but the method 'CHANGE_AT_SAVE' in this BADI only has import parameters. No export parameters. Can anyone advice:
    1) if I can use this method to change values?
    2) is there anyother badi available for this transaction.
    Thank you.

    Hi,
       Can you pls help me as my requirment is also same.I have to change the "Base Line Date" i.e. ZFBDT field of BSIK which is there in the Importing Parameters of method "CHANGE_AT_SAVE". Can i change the importing parameters..
    If you get any alternate solution for the same, pls suggest me
    Regards,
    Rushikesh

  • BADI INVOICE_UPDATE Removing error message

    Hi
    I have implemented some validations in BADI INVOICE_UPDATE and I raise the ERROR_WITH_MESSAGE exception in case of incorrect data entered via MIRO.
    But after user corrects the error and presses ENTER, the Error message still remains in the message tab.
    Is there any way to delete the error message?
    Thanks and Regards
    Radha

    Hi,
    when you say:
    I directly press "SAVE' in MIRO
    are you holding RBKP-RBSTAT = ' ',
    parking RBKP-RBSTAT = 'A',
    or saving  as complete RBKP-RBSTAT = ' B'
    the document?
    According to SAP Note 1156325 - BAdIs in the Logistics Invoice Verification environment:
    Definition name: INVOICE_UPDATE
    Usage
    The BAdI 'INVOICE_UPDATE' was only designed to execute checks during
    document entry or document posting in transaction MIRO.
    According to SAP Note 392342 - MIRO: No data change through Bussiness Add In
    Symptom
    In the logistics invoice verification MIRO, you cannot change data using
    Business Add In 'INVOICE_UPDATE'.
    Additional key words
    BAdI, SE18, MRM_BADI_INVOICE_CHECK,
    Cause and prerequisites
    This system behavior is correct.
    BAdI 'INVOICE_UPDATE' was only designed to execute checks during the
    document entry or document posting in Transaction MIRO. Therefore, it has
    only import parameters. There are no export parameters. This means that the
    data changed in the BAdI is not processed further in standard program MIRO.
    Best regards.
    Edited by: Pablo Casamayor on May 11, 2010 4:56 PM

  • Get Invoice number in BADI INVOICE_UPDATE

    Hi all.
    It`s posible to get a invoice number in badi invoice_update. I create invoice in tc MIRO. I create my implementation and i call my function group (here i need number just creating invoice)
    Thx
    Grzegorz

    HI,
       Check the methods parameters for CHANGE_AT_SAVE method: S_RBKP_NEW or S_RBKP_OLD.
    S_RBKP_NEW-BELNR will ahve the document number.
    Regards,
    Ravi

  • Data in BADI "INVOICE_UPDATE"

    Hey,
    im using the BAdI INVOICE_UPDATE to run some checks when an invoice is posted. Within that i need the resulting prices of each position after the calculation of discount (skonto) etc.
    In fact i need the values shown when you click on Simulate.
    Now i have the data for discount, accounting and position values etc but they are not cumulated. So i would need to calculate them myself. I guess there must be a method doing that. Is anyone able to guide me with that ?
    Thanks for your help - which will be rewarded.
    oliver

    Thanks venu for the reply. But i cant see a table containing the spread of position prices over the accounting.
    I need the following. Assume you have 2 positions, one with single, one with multiple accounting.
    Tax 10%
    POS1: 20Eur
    POR2: 20Eur, Acc1 50%  Acc2 50%
    Now i need the following like its shown when you preas Simulate in MIRO.
    Pos1  22EUR   GLAccount xyz1_1
    Pos2  11EUR   GLAccount xyz2_1
    Pos2  11EUR   GLAccount xyz2_2
    I dont want to calculate that myself in case there are some things i might forget about. So i need a correct way to retrieve these values.
    The import-parameters of the badis doesnt seem to have these values.
    Any help is appreciated. Thanks,
    oliver

  • Regarding BADI , INVOICE_UPDATE ( MIRO transaction )

    Hi All,
    In Miro transaction, I need to do some manipulationwith  the amount field ( WRBTR ) from the line items of the invoice.
    I have found the BADI 'INVOICE_UPDATE' and method for this is 'CHANGE_AT_SAVE'. I can see all the line items entered on the miro screen into the the internal table TI_RSEG_NEW.
    However in the method it does not allow me to write the code to change the TI_RSEG_NEW table.
    Please help me out in achieveing this requirment.
    -Sanjay

    Hai.
    check this.
    User exit in the invoice
    USEREXIT_NUMBER_RANGE (module pool SAPLV60A, program RV60AFZZ)
    The internal set of numbers used in the standard is given in the table of kind of invoice and can be changed in this user exit. This user exit is called only when putting on the invoice.
    USEREXIT_ACCOUNT_PREP_KOMKCV (module pool SAPLV60A, program RV60AFZZ)
    In this user exit additional fields for the account identification are taken up in the communication structure KOMKCV (head fields), which is not intended in the standard.
    USEREXIT_ACCOUNT_PREP_KOMPCV (module pool SAPLV60A)
    In this user exit additional fields for the account identification in the communication structure become KOMPCV (position fields) aufenommen, which is not intended in the standard.
    USEREXIT_NUMBER_RANGE_INV_DATE (module pool SAPLV60A, program RV60AFZC)
    Dependent on the set of numbers over the table TVFKD the invoice date is set (country-specific requirement from Italy).
    During the use of this user exit the user exit USEREXIT_NUMBER_RANGE is automatically inactively switched.
    USEREXIT_FILL_VBRK_VBRP (module pool SAPLV60A, program RV60AFZC)
    This user exit is called only when putting on the invoice. It is used, in order to supply the head and the position of the invoice which can be provided with deviating or additional data.
    USEREXIT_PRINT_ITEM (module pool SAPLV61A, program RV61AFZB)
    Printing the position line of an invoice can be supplemented or changed.
    USEREXIT_PRINT_HEAD (module pool SAPLV61A, program RV61AFZB)
    Printing the headline of an invoice can be supplemented or changed.
    User exit in the program RV60AFZD
    A short description of the user exits are contained in the program:
    o USEREXIT_RELI_XVBPAK_AVBPAK
    o USEREXIT_NEWROLE_XVBPAK_AVBPAK
    o USEREXIT_NEWROLE_XVBPAP_AVBPAK
    USEREXIT_FILL_VBRK_VBRP (module pool SAPLV60A, program RV60AFZC
    Use RV60AFZZ Include
    regards.
    sowjanya.b

  • UPDATE FIELDS USING BADI INVOICE_UPDATE

    I have a requirement to change item level fields based on some condition during transaction MIRO, but the BADI INVOICE_UPDATE does not have any exporting parameters and thus not allow changing the fields. So is there any other way to do it? Appreciate your help.
    Thank you,
    Rohit
    Edited by: Julius Bussche on Mar 19, 2009 9:24 PM
    Please dont use CAPS-LOCK. It is generally interpreted as SHOUTING

    Hi,
    you could try to do something via field-symbols (but be careful):
    e.g.
    CONSTANTS: c_ydrseg(18) TYPE c VALUE '(SAPLMR1M)YDRSEG[]'.
      DATA: wa_drseg TYPE mmcr_drseg.
      CLEAR wa_drseg.
      FIELD-SYMBOLS: <fs_ydrseg> TYPE table.
      ASSIGN (c_ydrseg) TO <fs_ydrseg>.
      CLEAR lt_drseg.
      REFRESH lt_drseg.
      lt_drseg[] = <fs_ydrseg>.
      IF NOT <fs_ydrseg>[] IS INITIAL.
        LOOP AT lt_drseg INTO wa_drseg.
      * do something with EREKZ
        ENDIF.
      ENDIF.
    Best regards

  • BADI INVOICE_UPDATE - MIRO Transaction

    Hi,
    can anyone let me know how to code the BADI INVOICE_UPDATE.
    I'm trying to get the PO number and based on the PO, need to get few more info from another table. i have already went to SE19 and created a implementation for this Badi. And then in the method, i need to code this.
    Please help.
    Thanks.

    i have successfully triggered the BADI. But one more question, since i'm using CHANGE_BEFORE_UPDATE, it is generating the Invoice Document. And i'm checking in the BADI, that the PO number can be used for the Material Invoice or Service Invoice, based on the Document Type.
    Since i couldn't get the PO number in the MIRO User Exit, so i tried BADI. But the new invoice document is getting generated and if it is wrong PO, it comes out from the screen and the invoice document number range is missing.
    So is there any other BADI, upon entering the PO number, i need to validate.
    Thanks

  • How to change PRCTR filed value thru (Badi) INVOICE_UPDATE

    Hi Friends,
    While posting MIRO, the price diff amount going to defualt profit center instead of the PO or actual profit center and the field is an inactive mode (not able to change it). I've tried in available 3 method functions of INVOICE_UPDATE but its not shwoing the records.
    In INOVICE_UPDATE badi, no available parameters(structures) showing the accounting line items of the invoice. (in MIRO, When go for simulate it shows one table window where it has line items of the a/c assignment transaction).Its showing only the invoice update details in TI_MRMRSEG as single item.
    Pls help me how to add or change the value of the filed 'PRCTR'.
    Thanks &regards
    Sankar.
    Edited by: sankar babu on Aug 20, 2008 1:55 PM

    hi,
    use this exit.
    LMR1M001                                User exits in Logistics Invoice Verification
    EXIT_SAPLMR1M_002
    VALUE(I_DRSEG) TYPE  MMCR_DRSEG.

  • Regarding BADI  INVOICE_UPDATE, method CHANGE_AT_SAVE

    Hi there,
    I'm implementing this Badi so i can make some checks at the time of saving an edited preliminary (parked) document. If the total of the invoice is higher than the old one, i do the checks (against a Z table, a Z function module, etc) and if i have to stop saving, i trigger an error message raising ERROR_WITH_MESSAGE exception. As the only method that gets called in all the cases I need, and allows me to trigger messages, is CHANGE_AT_SAVE, I use this one.
    The okcodes that i'm interested in are:
    <i>PARK (Save parked document)
    COMP (Save as completed)
    BU (Post)</i>
    The problem is, to do all the processing, i compare the method parameters
    S_RBKP_OLD vs. S_RBKP_NEW.
    When the okcode is PARK or COMP it's ok, but <b>when posting (BU) the S_RBKP_OLD doesn't get populated</b>! Anyone knows why is that and what the workaround would be?
    Update: i've searched throught OSS but there's no note related to this.
    Thank you very much.

    Hi Narendran, thanks for your help,
    But my problem is that i need to compare the new total of the invoice (s_rbkp_new-rmwwr) versus the old one (s_rbkp_old-rmwwr), so that if the new one is higher, i check that the difference between them is not higher than a set limit, otherwise i must stop saving/posting.
    I could retrieve the values from RBKP table itself (which should still be the "old" ones at the time the BADI executes) but then, what is s_rbkp_old for?
    Edit: Requirements changed and now i need to do the checks for every changed line of the invoice. As in the original problem, when posting, TI_RSEG_NEW has all the new values but TI_RSEG_OLD is initial. I've been debugging a little and got to the MRM_DOCUMENT_CHANGE_PREPARE function, which is not calling the MRM_*_READ functions since i_xupda (update flag) is 'I' when posting, although no new line has been inserted.
    PLEASE, if you implemented this BADi method before, post your comments or example code. Documentation is scarce and on the internet there isn't much info neither.
    I've been also looking at exits but they don't seem to serve this purpose.
    By the way, i'm on 4.6C.
    Many thanks

  • BADI INVOICE_UPDATE for tcode MIRO

    Hi
    May I request you to kindly help me about implementing the BADI INVOICE-UPDATE . I do not know how to implement BADI , it will be great help for me if you can please suggest the steps involved .
    We want to implement the BADI , to change the invoice party from Account Payable to post to GL account during MIRO. Your great help is appreciated.
    Regards
    Kang Ring

    Hi,
    At first you can go to trasaction se18, and there u can display this Badi, please go through the documentation of this badi, whic in turn will help you to understand what this BADi about, what are the restrictions etc...
    Now in order to implement Badi , go to trasaction Se19, and create a Z- implementation. Put some break points inside each methods and activate the implmentation.Now try to excecute the transaction, control will go through the methods  and by that way you can came to a conclusion that in which method you have to write your code.
    Once every thing is ready activate the implementation.
    I think this info will help you to a certain extent, if you need detailed info let me know.
    Regards,
    Antony Thomas

  • How to determine transaction for MIRO badi - invoice_update?

    Dear All:
           As subject. Because I want to print report when transaction is credit memo.
           But i have not fine any parameter is for transaction, please help.
           Thanks a lot!!
    Best Regards,
    Nicole

    Hi,
    This will help you out....
    MIRO: BAPI_INCOMINGINVOICE_CREATE
    Thanks,
    Krishna...

  • Using BADI for changing the Profit Center in FI Document during MIRO

    Hi,
    We have an requirement of changing the profit center in FI/CO Document while doing MIRO which is different than the one which is posted at the time MIGO.The system is not allowing us to do this and the field profit center during MIRO is not changeble mode and the business requirement is to change this through any SAP enhancements or program.
    How can I do this ?
    Is there is any standard BADI or User Exit is available for this.
    Pleease help me in this and will give valuable points.

    Hey,
    Use the BADI INVOICE_UPDATE and try with this. Otherwise you try to create Enhancement point to implement your code.
    Note: Inside BADI we can't change the runtime value. So, try to use enhancement point.
    Rewert back for any clarification.
    Regards,
    Saravanan M

Maybe you are looking for

  • Android orientation lock does not work within the ADPS App

    Hi, and another Android App Bug for today. The Android orientation lock feature does not work in Apps created with ADPS. If orientation lock is enabled and I turn the tablet, the orientation off the ADPS Apps will turn with the tablet. My Test Tablet

  • How do I determine what version of Apache I'm using?

    How do I determine what version of Apache, 1.3 or 2.0, I'm using?

  • Problem in Process Chains

    Hi, While checking the regular status of Process Chains, for one of the process chain i am getting message "Status Change of Process CHAIN CS_MDT_F. Save status and trigger events if required". This message is showing as same without displaying next

  • Assigning digital Spidf in / out put in logic LE using TC KONNEKT 24 D

    hi there.. i know LE doesnt support digital in/out puts but ive been told i have to configure is manually through my KONNECT 24d audio interface.. that i have no clue how to configure and assign these in/out puts... if any one knws how to do that ..

  • Run Time prompts

    Is there a way to input TEXT string in HBR run time prompts using Global Variable (type string) and to save them against accounts(data type text) in Planning 9.3.1? In BR the assignmnt is Account_Name=[Global_Variable]; I think this is the issue as I