You are on page 1of 4

Add custom fields in standard MIRO header screen through BADI_FDCB_SUBBAS01

by Raju | Sunday, October 23, 2011 in BADI_FDCB_SUBBAS01 | In this post, I would show how to add custom fields in the standard SAP MIRO header
screen using BADI 'BADI_FDCB_SUBBAS01'.

IDoc

number

are

the

two

custom

Allowance and Vendor fields added in MIRO

Invoice 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.

You might also like