ENHS_BADI_ANALYZE_GENERATE_ALL is a standard Executable ABAP Report available within your SAP system (depending on your version and release level). Below is the standard documentation available for this report and a few details of other objects it interacts with such as tables, function modules, includes etc. If you would like to see the full code listing simply enter ENHS_BADI_ANALYZE_GENERATE_ALL into the relevant SAP transaction such as SE38 or SE80
PURPOSE
Generate all inconsistent BAdI definitions as well as the corresponding
implementations.
INTEGRATION
This report is automatically executed during the mass activation of
enhancements. The execution will be triggered exactly one time in each
system.
The report can be rerun at any time.
PREREQUISITES
Transports, support packages, or enhancement packages are imported that
contain Enhancement Spots with BAdI definitions. In the same transport
queue, implementations for these BAdIs are imported. After the import,
the runtime information of implementations of these BAdIs may get lost
if SAP Note 1548839 was not yet applied.
Without this runtime data the implementations of the BAdIs are not found
at runtime.
This can happen only for those implementations which have not been
imported. It does not occur if the transports contain the enhancement
spots only.
FEATURES
SELECTION
The report can be executed in Analysis (and/or generation) or Display
(of the most recent result) mode.
The following parameters are available:
Analyze (ANALYZE): Analyzes all BAdIs in the system for inconsistencies.
Check Definitions (CHK_DEF): Checks whether the runtime representations
of the BAdIs match their definitions.
Check Meta Data of Impls. (CHK_DT): Checks if all BAdIs with runtime
data have corresponding meta data in the design time repository.
Check Runtime Data of Impls. (CHK_RT): Checks if the runtime data of all
BAdI implementations are consistent.
Syntax Check (CHK_SYNT): Performs a syntax check for all
implementations.
Generate Inconsistent BAdIs (GENERATE): Runs the report in generation
mode. Inconsistent BAdI definitions and implementation will be
generated.
Log File Name (LOGFILE): The default format consists of a prefix
"BADIANALYSIS", log date, log time and a file extension that identifies
the system in which the report is executed. If this parameter is left
blank, the default format will be applied. If a custom name is provided,
it must be no longer than 28 characters to allow space for the system ID
to be appended. Any additional characters will be truncated.
Display Result of Last Run (DISP_RES): Displays the most recent analysis
result from a log file.
STANDARD_VARIANTS
OUTPUT
The output of the report is an overview of all BAdI definitions and
implementation that have been found to be inconsistent. The output is
written to the transport log, or displayed directly if the report is
executed online.
ABAP code:
ABAP code listing snippet for SAP ABAP Report ENHS_BADI_ANALYZE_GENERATE_ALL
*&-------------------------------*
*& Report ENHS_BADI_ANALYZE_GENERATE_ALL
*&
*&-------------------------------*
*&
*&
*&-------------------------------*
report enhs_badi_analyze_generate_all.
type-pools: abap.
constants: co_default_format type trfilename value 'BADIANALYSIS<DATE><TIME>.<SID>'.
parameters: analyze radiobutton group rdis modif id rbt.
selection-screen begin of block params with frame title text-par. "#EC *
parameters: chk_def type flag,
chk_dt type flag,
....See full code listing within your SAP system using transactions such as SE80 and SE38
Includes used within report:
No INCLUDES are used within this report code!
Tables used within report and the associated select statement:
EUDB
select single * from eudb into l_eudb where relid = 'XB' and name = protocol->co_eudb_key and sprsl = '' and srtf2 = 0.
BADI_MAIN
select badi_name from badi_main into table l_badis.
BADI_IMPL
select * from badi_impl into table impls where badi_name = badiname .
TADIR
select single d~ps_posid as component
from tadir as a
join tdevc as t on t~devclass = a~devclass
join df14l as d on d~fctr_id = t~component
into l_detail-component
where a~pgmid = 'R3TR' and
a~object = 'ENHS' and
a~obj_name = l_detail-spot.
TADIR
select distinct a~obj_name as enhname d~ps_posid as component
from tadir as a
join tdevc as t on t~devclass = a~devclass
join df14l as d on d~fctr_id = t~component
into corresponding fields of table l_component_dir
for all entries in ex_details_broken_badi
where a~pgmid = 'R3TR' and
a~object = 'ENHO' and
a~obj_name = ex_details_broken_badi-enhname.
E071
select max( h~as4date ) as as4date
from e071 as e
join e070 as h on h~trkorr = e~trkorr
into l_detail-transport_date
where e~pgmid = 'R3TR' and
e~object = 'ENHS' and
e~obj_name = l_detail-spot.
Function Modules used within report and the associated call statement:
SEO_CLASS_CHECK_CLASSPOOL
call function 'SEO_CLASS_CHECK_CLASSPOOL'
exporting
clskey = clskey
wb_checklist = checklist
importing
syntaxerror = error " Syntaxfehler aufgetreten
cancelled = cancelled " Syntaxfehler aufgetreten
exceptions
_internal_class_not_existing = 1
others = 2.
STRF_SETNAME
call function 'STRF_SETNAME'
exporting
* DIRTYPE = 'T'
filename = filename
subdir = 'log'
importing
file = filename_w_path
exceptions
wrong_call = 1
others = 2.
TR_INITIALIZE_LOG_WITH_FILE
call function 'TR_INITIALIZE_LOG_WITH_FILE'
exporting
file = filename_w_path.
TR_APPEND_LOG
call function 'TR_APPEND_LOG'
exporting
open_file = l_open_file
close_file = l_close_file
condense = 'X'
master_langu = ' '
accept_not_init = ' '
iv_suppress_statistics = ' '
tables
xmsg = protocol
exceptions
others = 1.
TR_FLUSH_LOG
call function 'TR_FLUSH_LOG'.
TR_READ_AND_DISPLAY_LOG
call function 'TR_READ_AND_DISPLAY_LOG'
exporting
iv_log_type = 'FILE'
iv_logname_file = filename_w_path
iv_display_level = 3
exceptions
others = 1.
Text pool values
Selection Text: LOGFILE = Log File Name
Selection Text: GENERATE = Generate Inconsistent BAdIs
Selection Text: DISP_RES = Display Result of Last Run
Selection Text: CHK_SYNT = Syntax Check
Selection Text: CHK_RT = Check Runtime Data of Impls.
Selection Text: CHK_DT = Check Meta Data of Impls.
Selection Text: CHK_DEF = Check Definitions
Selection Text: CHK_BENH = Check Existence in IMG
Selection Text: ANALYZE = Analyze
Title: Consistency Check for BAdI Definitions
Text Symbol: 025 = : Cannot be activated in IMG
Text Symbol: 024 = End of BAdI consistency check
Text Symbol: 023 = Start of BAdI consistency check (SAP Note 1548839)
Text Symbol: 022 = (Inconsistent implementatations by component)
Text Symbol: 021 = No analysis results found
Text Symbol: 020 = Results from
Text Symbol: 019 = ( Enhancement &1 )
Text Symbol: 018 = ...... Inconsistent implementations:
Text Symbol: 017 = ...... Runtime data for definition is inconsistent
Text Symbol: 016 = ...... Designtime data for definition missing
Text Symbol: 015 = ...... Runtime data for definition missing
Text Symbol: 014 = , transported: &1.
Text Symbol: 013 = (Unknown component)
Text Symbol: 012 = Hierarchical overview
Text Symbol: 011 = : Syntax error
Text Symbol: 010 = : Inconistent
Text Symbol: 009 = : Inactive
Text Symbol: 008 = ( Enhancement
Text Symbol: 007 = since &1:
Text Symbol: 006 = &1 inconsistent implementations
Text Symbol: 005 = Runtime data for definition is inconsistent
Text Symbol: 004 = Designtime data for definition missing
Text Symbol: 003 = Runtime data for definition missing
Text Symbol: 002 = Inconsistent Badi definitions:
Text Symbol: 001 = Repaired Badi definitions: