Skip to Content
0

HowTo enhance subscreen of SAP-Standard report

Dec 23, 2016 at 07:05 AM

72

avatar image

Hi all,

I wonder if it is possible to enhance the selection-dynpro on an ABAP.

I found the following Coding-lines. Are thoose for an enhancement? How can I achieve this?

*----- Empty dummy subscreen - used if error in BAdI determination
SELECTION-SCREEN BEGIN OF SCREEN 2001 AS SUBSCREEN.
SELECTION-SCREEN END OF SCREEN 2001.

The ABAP is:

/IDXGC/RP_PDOC_MONITORING

(available for SAP IS-U)

Many Thanks

Regards, Mario

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Dec 23, 2016 at 07:17 AM
0

First you must read Enhancement spot ISU_IDE_SWTDOC_MON documentation. (But be aware that a business function (ISU_MCOMM_1) can change its behavior if activated, also some industry solutions can already use this Enhancement.)

Regards,
Raymond

Share
10 |10000 characters needed characters left characters exceeded
Mario Müller Dec 23, 2016 at 07:09 AM
0

I found some more coding lines; it seems to be possible. But I wonder how to do enhance the subscreen? Which transaction do I need?

*----- Initialization
INITIALIZATION.
* Instanciate BAdI
 PERFORM get_mon_badi CHANGING g_mon_badi.

* Determine and include subscreen from BAdI
 PERFORM get_subscreen_new CHANGING addsel-prog addsel-dynnr.
*&---------------------------------------------------------------------*
*& Form GET_MON_BADI
*&---------------------------------------------------------------------*
* Check if EhP4 is active, and if so: Instanciate BAdI reference for
* monitoring BAdI ISU_IDE_SWTDOC_MON
*----------------------------------------------------------------------*
FORM get_mon_badi CHANGING xy_mon_badi TYPE REF TO isu_ide_swtdoc_mon.

* check for activated EhP4
 IF cl_isu_ehp4_sfw_tools=>get_bf_for_mcomm( ) = cl_isu_flag=>co_true.

* get instance of BAdI for handling additional data
 TRY.
 GET BADI xy_mon_badi.
 CATCH cx_badi_not_implemented. "#EC NO_HANDLER
 " no handling if BAdI not implemented
 ENDTRY.
 ENDIF.

ENDFORM. " GET_MON

*&---------------------------------------------------------------------*
*& FORM GET_SUBSCREEN
*&---------------------------------------------------------------------*
* get subscreen for selection-screen enhancement
*&---------------------------------------------------------------------*
FORM get_subscreen_new CHANGING y_addselprog TYPE any
 y_addseldynnr TYPE any.

 DATA: l_badi_dynpro TYPE scradnum,
 l_badi_program TYPE program.

*--------------------------------------------------------------------*
* default: use dummy screen
 y_addseldynnr = co_dummysubscreen.
 y_addselprog = '/IDXGC/RP_PDOC_MONITORING'.

 CHECK g_mon_badi IS NOT INITIAL.

* get implemented subscreen (dypro number and program)
 TRY.
 CALL METHOD
 cl_enh_badi_runtime_functions=>get_prog_and_dynp_for_subscr
 EXPORTING
 badi_name = co_badi_name
 calling_dynpro = co_main_dynpro
*** SL
* calling_program = '/IDXGC/RP_PDOC_MONITORING' "co_program_new -> changed
 calling_program = co_program
***
 subscreen_area = co_subscreen_area
* filter_values =
 IMPORTING
 called_dynpro = l_badi_dynpro
 called_program = l_badi_program.

 y_addselprog = l_badi_program.
 y_addseldynnr = l_badi_dynpro.

 CATCH cx_enh_badi_inconsistent
 cx_enh_badi_no_such_extension
 cx_enh_badi_not_found
 cx_enh_badi_mulitple_impls
 cx_enh_badi_filter_missing. "#EC NO_HANDLER
* no further exception handling (use dummy screen as default)
 ENDTRY.

ENDFORM. "get_subscreen
Share
10 |10000 characters needed characters left characters exceeded