2.1.11.1.1.2. BADI Search for AEAT Invoice ID
At this point the creation of a screen BAdI enlargement for the Cockpit tab "Search for AEDT Invoice ID" will be treated.
This extension will consist of adding select-option fields in the selection dynode of the tab "Search for AEDT Invoice ID" and in addition the values entered in them are considered as a filter during execution.
Step 1. Creating the Enhancement
Through transaction SE18 we access the enhancement point /EDGE/SII_COCKPIT. Within it we access the BAdI /EDGE/BADI_SII_COCKPIT_SEL and create an implementation of it.
Once created, access the option "Screen Implementing" to see the detail of the screen and the subscreen area generated. The picture corresponding to this extension is the number 17. Next to these fields, we can see another two that can be completed called "Program" and "Subscreen" that will indicate how to complete in a later step.
Step 2. Function Group Creation
Through transaction SE80 we create a new group of functions and declare a selection subscreen in the corresponding include.
In the subscreen made for this example you enter the select-options fields to be considered in the dynpro and the subsequent data selection. In the example the fields considered are EDOTYPE-EDOC_TYPE and EDOPROCSTATUS-PROC_STATUS (eDoc type and eDoc status).
Then, within the aforementioned function group, a new function is created in order to retrieve the values entered in the select-options declared in the subscreen of the function group itself (in the example, S_TYPE and S_STATUS values) .
Step 3. Referencing the function group and creating methods in the extension
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.
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. The methods to use are the following (only used in the tab we are dealing with):
In the first method we retrieve the values of the select-options through the function previously developed in point 2 (Z_GET_DATA_ID_FAC). Code is shown for the proposed example:
In the second the filtering of the information to be displayed is performed from the values completed in the select-options. Code is shown for the proposed example:
Avvale 2024