To extend the select-option fields of MM tab and/or extend the ALV that results from search, the following steps can be followed:
Step 1. Creating the enhancement
Through transaction SE18 we access the enhancement spot /EDGE/ II_MONITOR_REPROCESO. Within it we access the BAdI /EDGE/BADI_SII_MON_REPROCE_ECC and create an implementation of it (if there is no one yet).
Once created, access the option "Sccreen Implementation" to see the detail of the image and the subscreen area generated.
The image corresponding to fields MM enhancement is the number 202 subscreen SUBSCREEN_MM_SEL.
The image corresponding to fields MM enhancement is the number 202 subscreen SUBSCREEN_SD_SEL.
Step 2. Creating the Function Group
Through transaction SE80 we create a new group of functions and declare a selection subscreen in the corresponding include (if this BAdI was implemented for FI can be reused the Function Group.
In this selection screen the select-options fields required in FI are introduced. MM fields should have the ID mm and for SD the ID sd:
Next, inside the group functions, create two function modules (one for MM fields and another one for SD fields) with the objective to get the introduced values on select-options declared in the selection screen of the own functions group. These should have as EXPORTING the parameter CT_CAMPOS_PANTALLA with reference type /EDGE/SII_TT_CAMPO_SELECT_OP:
Step 3. Referencing the function group and creating methods in the enhancement
Once the previous steps have been performed, you must reference in the BAdI implementation the function group and subscreen created. The function group always has to have the SAPL * nomenclature when it is indicated as a program.
Step 4. BAdI methods implementation
In the methods of the implementation we will have to program the recovery of the values of the select-options that we have declared and also the filtering using the recovered values.
These methods will be (for MM):
GET_DATA_MM: In this method the function module should be called to get the select-options values:
RECUPERA_DATOS_MM: In this method the filter for the search result should be done, that is, restrict the table CT_ALV and CT_DATOS_MM informed with the standard search to our filter of selection-options Z. This method is for online runs. If also is requeried to enhancement the ALV that results from this search, should to enhancement the structure /EDGE/SII_REPROCESO_ALV_LOGIST with the corresponding append and to inform of these new fields in this method:
RECUPERA_DATOS_BCKG_MM: In this method must be done the filter of our search, that is, restrict the table CT_EDOCS informed with the standard search, to our filter of select-options Z. This method is for background runs:
Finally, make sure that the implementation is active:
And check that the fields are in the selection screen and filter is working correctly as online and in the background (if report is going to be executed in background).
To emplement fields for SD follow the same indicated steps but for SD methods: GET_DATA_SD, RECUPERA_DATOS_SD y RECUPERA_DATOS_BCKG_SD.