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

Similar Messages

  • 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

  • BADI in MIRO transaction for G/L account validation

    Hi Experts,
    Can I know the Badis availabe in MIRO transaction Code.
    and list me the procedure to findout the Badis available for a perticular t-code.
    Let me come with my exat requirement,
    I need to check whether the G/L account number assigned is valid or not.
    I think now I am clear with my requirement.
    Regards,
    Sujatha.

    Hi Anjireddy,
    that BADI contains the following methods, but they are not triggered when I do my requirement.
    CHANGE_AT_SAVE          Invoice Document at Save
    CHANGE_BEFORE_UPDATE     Invoice Document Before Update
    CHANGE_IN_UPDATE     Invoice Document During Update
    Suggest me regarding.
    Regards,
    Sujatha.

  • Regarding BADI's and Transaction

    Hi All,
    I would like to know, how to find the BADI for a particular  transaction ?
    Thanks and Regards
    Mayank

    hi,
    execute  this program, it will give allexits and badi's avilable for a transaction.
    REPORT  YMS_USEREXITBADITEST  .
    TABLES : TSTC,
    TADIR,
    MODSAPT,
    MODACT,
    TRDIR,
    TFDIR,
    ENLFDIR,
    SXS_ATTRT ,
    TSTCT.
    DATA : JTAB LIKE TADIR OCCURS 0 WITH HEADER LINE.
    DATA : FIELD1(30).
    DATA : V_DEVCLASS LIKE TADIR-DEVCLASS.
    PARAMETERS : P_TCODE LIKE TSTC-TCODE,
    P_PGMNA LIKE TSTC-PGMNA .
    DATA WA_TADIR TYPE TADIR.
    START-OF-SELECTION.
      IF NOT P_TCODE IS INITIAL.
        SELECT SINGLE * FROM TSTC WHERE TCODE EQ P_TCODE.
      ELSEIF NOT P_PGMNA IS INITIAL.
        TSTC-PGMNA = P_PGMNA.
      ENDIF.
      IF SY-SUBRC EQ 0.
        SELECT SINGLE * FROM TADIR
        WHERE PGMID = 'R3TR'
        AND OBJECT = 'PROG'
        AND OBJ_NAME = TSTC-PGMNA.
        MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
        IF SY-SUBRC NE 0.
          SELECT SINGLE * FROM TRDIR
          WHERE NAME = TSTC-PGMNA.
          IF TRDIR-SUBC EQ 'F'.
            SELECT SINGLE * FROM TFDIR
            WHERE PNAME = TSTC-PGMNA.
            SELECT SINGLE * FROM ENLFDIR
            WHERE FUNCNAME = TFDIR-FUNCNAME.
            SELECT SINGLE * FROM TADIR
            WHERE PGMID = 'R3TR'
            AND OBJECT = 'FUGR'
            AND OBJ_NAME EQ ENLFDIR-AREA.
            MOVE : TADIR-DEVCLASS TO V_DEVCLASS.
          ENDIF.
        ENDIF.
        SELECT * FROM TADIR INTO TABLE JTAB
        WHERE PGMID = 'R3TR'
        AND OBJECT IN ('SMOD', 'SXSD')
        AND DEVCLASS = V_DEVCLASS.
        SELECT SINGLE * FROM TSTCT
        WHERE SPRSL EQ SY-LANGU
        AND TCODE EQ P_TCODE.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) P_TCODE,
        45(50) TSTCT-TTEXT.
        SKIP.
        IF NOT JTAB[] IS INITIAL.
          WRITE:/(105) SY-ULINE.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
    SORTING THE INTERNAL TABLE
          SORT JTAB BY OBJECT.
          DATA : WF_TXT(60) TYPE C,
          WF_SMOD TYPE I ,
          WF_BADI TYPE I ,
          WF_OBJECT2(30) TYPE C.
          CLEAR : WF_SMOD, WF_BADI , WF_OBJECT2.
    *GET THE TOTAL SMOD.
      LOOP AT JTAB INTO WA_TADIR.
        AT FIRST.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
          WRITE:/1 SY-VLINE,
          2 'Enhancement/ Business Add-in',
          41 SY-VLINE ,
          42 'Description',
          105 SY-VLINE.
          WRITE:/(105) SY-ULINE.
        ENDAT.
        CLEAR WF_TXT.
        AT NEW OBJECT.
          IF WA_TADIR-OBJECT = 'SMOD'.
            WF_OBJECT2 = 'Enhancement' .
          ELSEIF WA_TADIR-OBJECT = 'SXSD'.
            WF_OBJECT2 = ' Business Add-in'.
          ENDIF.
          FORMAT COLOR COL_GROUP INTENSIFIED ON.
          WRITE:/1 SY-VLINE,
          2 WF_OBJECT2,
          105 SY-VLINE.
        ENDAT.
        CASE WA_TADIR-OBJECT.
          WHEN 'SMOD'.
            WF_SMOD = WF_SMOD + 1.
            SELECT SINGLE MODTEXT INTO WF_TXT
            FROM MODSAPT
            WHERE SPRSL = SY-LANGU
            AND NAME = WA_TADIR-OBJ_NAME.
            FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
          WHEN 'SXSD'.
    FOR BADIS
            WF_BADI = WF_BADI + 1 .
              SELECT SINGLE TEXT INTO WF_TXT
              FROM SXS_ATTRT
              WHERE SPRSL = SY-LANGU
              AND EXIT_NAME = WA_TADIR-OBJ_NAME.
              FORMAT COLOR COL_NORMAL INTENSIFIED ON.
          ENDCASE.
          WRITE:/1 SY-VLINE,
          2 WA_TADIR-OBJ_NAME HOTSPOT ON,
          41 SY-VLINE ,
          42 WF_TXT,
          105 SY-VLINE.
          AT END OF OBJECT.
            WRITE : /(105) SY-ULINE.
          ENDAT.
        ENDLOOP.
        WRITE:/(105) SY-ULINE.
        SKIP.
        FORMAT COLOR COL_TOTAL INTENSIFIED ON.
        WRITE:/ 'No.of Exits:' , WF_SMOD.
        WRITE:/ 'No.of BADis:' , WF_BADI.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(105) 'No userexits or BADis exist'.
      ENDIF.
    ELSE.
      FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
      WRITE:/(105) 'Transaction does not exist'.
    ENDIF.
    AT LINE-SELECTION.
      DATA : WF_OBJECT TYPE TADIR-OBJECT.
      CLEAR WF_OBJECT.
      GET CURSOR FIELD FIELD1.
      CHECK FIELD1(8) EQ 'WA_TADIR'.
      READ TABLE JTAB WITH KEY OBJ_NAME = SY-LISEL+1(20).
      MOVE JTAB-OBJECT TO WF_OBJECT.
      CASE WF_OBJECT.
        WHEN 'SMOD'.
          SET PARAMETER ID 'MON' FIELD SY-LISEL+1(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'SXSD'.
          SET PARAMETER ID 'EXN' FIELD SY-LISEL+1(20).
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
      ENDCASE.
    reward points if hlpful.

  • BADI for MIRO transaction

    Hello Experts,
    I need to capture the Serial Number during invoice entry and stored in a custom table. It is key to note that an invoice line item with a multiple quantity will require multiple serial numbers.
    I am looking for a BADI to enhance the screen to provide a input option for Serial Numbers.
    I figure out a BADI MRM_ITEM_CUSTFIELDS but not sure this is the best suitable one or not.
    Please provide your input.

    Abdul,
    General instructions for finding BAdI calls and when they happen:
    Go to transaction SE80 in a client where you can experiment with the transaction that you are interested in.
    Go to class CL_EXITHANDLER. [Select Class / Interface from the drop-down, and put CL_EXITHANDLER for the class.]
    Go to method get_instance. [Press RETURN to ensure that the contents of the Object Name frame are for CL_EXITHANDLER. Expand the Methods node. Double-click on GET_INSTANCE.]
    Insert a breakpoint just after the call to the method cl_exithandler=>get_class_name_by_interface.
    Use the transaction in which you are BAdI-hunting.
    Examine the contents of the field exit_name whenever the processing stops at the breakpoint. I have found a case where exit_name was an unknown field. Then class_name gave a good clue to the name of the BAdI.
    Hope this helps,
    John

  • 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

  • Regarding GL item tab in MIRO transaction

    Hi
    I am working on MIRO transaction.
    In GL Item tab, if we enter Account number it has to be
    checked with ZMMTABLE and display error if not available.
    In Ztable we have company code, account number(SAKNR) and ZFLG as key.
    need to fetch by key.
    How to fetch company code and account number from screen?
    I am using BADI INVOICE_UPDATE, CHANGE_AT_SAVE method.
    WHen i clic save button in MIRO transaction, the BADI is not triggered.
    I have implementation active and made break point too.
    I tried displaying invoice document in MIRO , changed the amount and clicked save button. but BADI is not triggered
    Can you tell me how to debug bad? i put break point in BADI method and opened session then execute MIRO.
    Pls advice how to go with.
    Regards
    Chandra
    Edited by: princeck on Sep 20, 2011 3:14 PM
    Edited by: princeck on Sep 20, 2011 4:11 PM

    Hi
    I want to access GL item tab account number from MIRO transaction to BADIINVOICE_BADI Method CHANGE_AT_SAVE. I entered the account number in GL account tnumber tab. but parameter TI_RBCO_NEW-BUKRS & TI_RBCO_OLD-BUKRS values are empty inside BADI method.
    Can you suggest me how to find this.
    Regards
    Chandra
    Edited by: princeck on Oct 3, 2011 2:32 PM

  • 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

  • User exit/BADi to change the header text in MIRO transaction

    Hi all,
    I am searching user exit or badi to change the header text in MIRO transaction.
    My requirement is, before post the invoice I need to populate the vendor name in Header text field(MIRO -> Details tab -> header text field ). I have tried all the user exits and BADi's related to MIRO. Doesn't work. If anybody knows please share.
    Thanks,
    Pranav

    Try BADI INVOICE_UPDATE.
    If you are in system version is ECC 6.0, you can find out a Enhancement SPOT (ES_SAPLMRMC) under Function module MRM_FINAL_CHECK, which can be used to perform this requirement
    Hope this helps.
    Thanks,
    Balaji
    Edited by: Balaji Ganapathiraman on Mar 14, 2008 4:43 PM

  • User exit/BADi to populate the header text in MIRO transaction

    Hi all,
    I am searching user exit or badi to populate the header text in MIRO transaction.
    My requirement is, before post the invoice I need to populate the some text in Header text field (MIRO -> Details tab -> header text field). I need to populate this field in the MM document as well as FI document (Accounting Document). I have tried all the user exits and BADi's related to MIRO/MRRL. Doesn't work. If anybody knows please share.
    Thanks,
    Santosh
    Edited by: Santosh Ghonasgi on May 13, 2010 4:48 PM

    Hello santosh,
    I am not sure whether a suitable exit / BADI exists to update the header text in MIRO directly.
    there is one related forum:
    User exit/BADi to change the header text in MIRO transaction
    Hope, it may helpful for you to proceed with some other parallel solution.
    Regards,
    Selva K.
    Edited by: Selvakumar Krishnan on May 13, 2010 5:29 PM

  • Required help for badi for GL tab in MIRO transaction

    Hi,
    I am working in MIRO transaction.
    I am having a requirement as below:
    While creating invoices, In the gl tab when we enter gl account number system should populate Tax jurisdiction code by default.
    I am using BADI EXTENSION_US_TAXES method MM_ITEM_TAX_MODIFY but it populates the tax jurisdiction in PO reference tab not in GL tab.
    Please advice
    Regards,
    Suvarna Nandi

    Hi
    Have you tried with enhancement FYTX0002? See also Note 302998 - Collecting fields for user-exit. It's an idea.
    I hope this helps you
    Regards
    Eduardo

  • BADI to change Item details of MIRO Transaction

    Hi Experts,
    Is there any BADI or User Exits to change Item details like 'Profit Center' in MIRO Transaction. I searched for, but nothing helps.
    Thanks in Advance.

    Hi,
    have a look at this OSS Note (search for BAdIs as of Release 6.00:):
    1156325 - BAdIs in the Logistics Invoice Verification environment
    perhaps you could consider using a substitution instead of a badi.
    Best regards.

  • User Exit/BADI's for MIRO Transaction

    Hi All,
    I need to modify the header text field  in DETAILS Tab of MIRO transaction. This text needs to be populated based on the line item conditions. I am not able to find any proper BADI or user exit where in i can get both header and line items details so that i can modify Header Text Field.
    Please help me out in same.
    Regards,
    Jayant

    Hi,
    in badi MRM_HEADER_CHECK try something like:
    * Get line item conditions
        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>.
        DATA:  lt_ydrseg TYPE STANDARD TABLE OF t_mmcr_drseg.
        lt_ydrseg[] = <fs_ydrseg>.
    IF NOT lt_dyrseg[] IS INITIAL.
    LOOP AT lt_ydrseg INTO wa_drseg.
      IF wa_drseg-mwskz = 'WHATEVER'. "HERE GOES YOUR CONDITION
    * Modify Header text
        CONSTANTS: c_bktxt(21) TYPE c VALUE '(SAPLMR1M)RBKPV-BKTXT'.
        FIELD-SYMBOLS: <fs_bktxt> TYPE ANY.
        ASSIGN (c_bktxt) TO <fs_bktxt>.
        <fs_bktxt> = 'HERE_GOES_YOUR_VALUE'.
      ENDIF.
    ENDLOOP.
    ENDIF.
    Best regards.

  • 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

  • Regarding MIRO transaction

    Hello Friends
    My user trying to post MIRO Transaction but while he posting MIRO transaction Withholding Tax not getting post
    before that i ve seen in vendor master he is assinged Withholding Tax codes and also i have seen invoice entry also Withholding Tax codes got post
    Can anybody Please give me suggestion on the same
    Regards
    vamsi

    Hello friends
    Thanks For all my problem was resloved
    Solution is
    An message has been occuring like withhold tax has been refreshed.  it is just an information message not an error message.  this message will trigger when the trans. type is non project type activity.  No back end process has been disturbed due to this message. it just passing the information to the user.
    we changed the trans. type to manufacturing activity and it is working fine.
    I hope it ll help in future
    Thanks and Regards
    vamsi

Maybe you are looking for

  • SAFARI 6.0.3 crashes/freez in facebook while zoomed in?

    Somtimes, while I use Safari on facebook,when I zoom, the whole application stop running complete freeze with the spinning wheel, I've monitored my RAM I'm above 2,5GB free. When the wheel stops, as soon as I touch the track pad, it freeze directly a

  • Document Protection Error

    After checking out books from my library and 'loading' them to my kindle I have found that i can select the book on my kindle, but it says "this document is protected by Adobe Digital Rights Management (DRM) and is not currently authorized for use wi

  • MIGO output Print Preview

    Hi, I have made settings for output determination. Now while creating MIGO , one output TAB is coming . But while entering into that TAB ,I cant find any option for print preview. Is in standard SAP , print preview is not possible? How to make settin

  • Mail Certificate Crash

    Mail crashes unceremoniously when I set it to use certificates. It doesn't matter whether it's a self-signed certificate or a CA certificate. It's OK if it's only set to use a certificate on SMTP but if I use a certificate - the same or another - on

  • Zen micro headphone jack. Can you purchase the smaller curcuitboa

    I would prefer to not deal with an RMA and do it myself. Acutally, I have already attempted to glue the jack with no success. Is it possible for me to buy the smaller motherboard from creative/internet? Since I have opened it will creative totally ig