Add custom fields in standard MIRO header screen through BADI_FDCB_SUBBAS01

Custom fields in SAP MIRO
Share on Facebook6Share on LinkedIn12Tweet about this on TwitterShare on Google+0
Please Share!!

In this post, I would show how to add custom fields in the standard SAP MIRO header screen using BADI ‘BADI_FDCB_SUBBAS01’.

Allowance and Vendor Invoice IDoc number are the two custom fields added in MIRO header.

BADI implementation steps and configuration of custom subscreen:

1) Implementation of this BADI BADI_FDCB_SUBBAS01 is bit tricky. We have to create one custom implementation to add the new custom fields (SAP has provided example implementations for our reference). There are two methods PUT_DATA_TO_SCREEN_OBJECT and GET_DATA_FROM_SCREEN_OBJECT to put and get data to and from MIRO screen.

2) We have to configure Subscreens for the new custom fields.

Go to the Subscreens Tab in the created Implementation.

The Subscreen area column program should be SUBBAS01(check the example implementation for reference). The Program called column program ‘SAPLZO_CUSTOM_FIELD_IN_MIRO’ is custom module pool program which is a copy of standard SAP example program ‘SAPLBADI_EXAMPLE_FDCB_BAS’.

The Screen Number is 900 will hold the new custom fields, which is present in called program ‘SAPLZO_CUSTOM_FIELD_IN_MIRO’.

Append new custom fields:

Say the new fields are ZZ_ALLOWANCE and ZZ_IDOCNUM. Since these two fields are to be added to the MIRO header, we have to be append these fields into table RBKP, structures INVFO, ACMM_VENDOR_COMP (as shown below). These structures and tables would be used in the BADI implementation to add the new fields in the MIRO screen.

Code snippet to enhance the screen:

As mentioned earlier, we have to create a module pool custom program and attach as sub-screen. For the ease of development, we can copy the SAP standard program SAPLBADI_EXAMPLE_FDCB_BAS and make change in that program.

Remove the fields from the example screen and add the custom fields which we want to add in MIRO.

The standard SAP example is adding Lots Number. We have to comment it and add our new custom fields as highlighted below.

Result of the above implementation:

With the above simple steps, you would be able to enhance the standard SAP MIRO screen.

The custom fields would be saved in the standard SAP table RBKP.


——————————-Updated 26th Feb 2015——————————-

One of our reader was not able to save the data in RBKP table. He missed to add the code in the two methods. Please check if you also need to add logic in the below methods..


* fill interface attributes from importing paramters
me->if_ex_badi_fdcb_subbas01~invfo  im_invfo.



* fill export parameters from interface attributes
ex_invfo  me->if_ex_badi_fdcb_subbas01~invfo.


You might like to check our other post on Steps to add custom Tab in MIRO screen using a BADI.



Image source : (modified)

Share on Facebook6Share on LinkedIn12Tweet about this on TwitterShare on Google+0
Please Share!!

About the Author

SAP Yard
SAP Yard
SAPYard is one stop page for all Technical Folks in SAP. You would find un-conventional explanations, tutorials, and tricks. Please like our Facebook Page and also join our LinkedIn Group.

6 Comments on "Add custom fields in standard MIRO header screen through BADI_FDCB_SUBBAS01"

  1. Hi SAP Yard,

    Above tutorial for the enhancement is working as expected.
    however i want to limit the enhancement for MIRO only as i have checked in FV60 it is already effect.

    How can i limit it for MIRO only.

    Thanks in advance.

  2. Hi i have fallowed the above tutorial but it seems its not take affect in my output. our requirement is to display the Tax number 2 in the header info below the balance field. please help us resolved this problem. Looking forward.

  3. Sanja – You can have multiple implementations. Try to implement BADI_FDCB_SUBBAS01. It should work.

    Team SAPYard.

    • Thank you for your reply. I tried , but keep getting error:
      There are already implementations active

      Message no. ENHANCEMENT311


      The BAdI definition this is based upon cannot be used more than once. Other active implementations already exist for the same BAdI definition.

      System Response

      This implementation cannot be activated.


      Deactivate one of the other active implementations with the same BAdI definition.

      • Hi Sanja – We take our words back. That BADI cannot have multiple implementations.

        Go to the implementation of the BADI which SAP has provided (I think it is an example implementation). Go to change mode and hit the Deactivate button. It would ask for transport.

        If it works, you create a Z Implementation and put whatever was in SAP’implementation in the two methods. On top of it, put your new field.

        It should work.

        Please do update us.

        Team SAPYard.

  4. We have a requirement to display the “Tax Number 3” value of the vendor in MIRO screen vendor info – header. Problem is that all of the BADIs (BADI_FDCB_SUBBAS01, BADI_FDCB_SUBBAS02, BADI_FDCB_SUBBAS03 and BADI_FDCB_SUBBAS04)are already been implemented by SAP. Do you have any advice how to proceed?

Leave a comment

Your email address will not be published.