From d2a204bb78fed8eb7dcaf392a06ebf69398a27c7 Mon Sep 17 00:00:00 2001 From: Marc Bernard Date: Mon, 5 Apr 2021 13:45:11 +0000 Subject: [PATCH] Update 2 objects --- ...stcube.fugr.#mbtools#bw_view_infoprov.abap | 16 ++++--- src/#mbtools#cl_bw_listcube.clas.abap | 44 ++++++++++++++----- 2 files changed, 42 insertions(+), 18 deletions(-) diff --git a/src/#mbtools#bw_listcube.fugr.#mbtools#bw_view_infoprov.abap b/src/#mbtools#bw_listcube.fugr.#mbtools#bw_view_infoprov.abap index ea4becd..f0988c3 100644 --- a/src/#mbtools#bw_listcube.fugr.#mbtools#bw_view_infoprov.abap +++ b/src/#mbtools#bw_listcube.fugr.#mbtools#bw_view_infoprov.abap @@ -26,7 +26,16 @@ FUNCTION /mbtools/bw_view_infoprov. DATA: lx_error TYPE REF TO /mbtools/cx_exception, lv_skip TYPE abap_bool, + lv_genrep TYPE sy-repid, lt_params TYPE /mbtools/cl_bw_listcube=>ty_params. + + /mbtools/cl_bw_listcube=>get_variant( + EXPORTING + iv_repnm = i_repnm + IMPORTING + ev_skip = lv_skip + ev_genrep = lv_genrep + et_params = lt_params ). *<<< MBT Listcube Enhancement DATA: @@ -56,7 +65,7 @@ FUNCTION /mbtools/bw_view_infoprov. USING i_infoprov i_s_dta i_t_dta_dime i_show_dimids i_show_sids i_use_db_aggregation i_tech_nms - i_repnm i_tc_no i_tc_id + lv_genrep i_tc_no i_tc_id CHANGING c_t_ioinf lt_selscr lt_body lt_init lt_tables lt_datadef lt_seltxts. @@ -108,11 +117,6 @@ FUNCTION /mbtools/bw_view_infoprov. RETURN. ENDTRY. - /mbtools/cl_bw_listcube=>get_variant( - IMPORTING - ev_skip = lv_skip - et_params = lt_params ). - " Call generated selection report IF lt_params IS INITIAL. SUBMIT (lv_repnm) diff --git a/src/#mbtools#cl_bw_listcube.clas.abap b/src/#mbtools#cl_bw_listcube.clas.abap index 3ec1a6f..274aba5 100644 --- a/src/#mbtools#cl_bw_listcube.clas.abap +++ b/src/#mbtools#cl_bw_listcube.clas.abap @@ -1,7 +1,7 @@ CLASS /mbtools/cl_bw_listcube DEFINITION PUBLIC FINAL - CREATE PUBLIC . + CREATE PUBLIC. ************************************************************************ * MBT Listcube @@ -9,9 +9,11 @@ CLASS /mbtools/cl_bw_listcube DEFINITION * (c) MBT 2021 https://marcbernardtools.com/ ************************************************************************ PUBLIC SECTION. - TYPES ty_param TYPE rsparamsl_255 . + TYPE-POOLS icon. + + TYPES ty_param TYPE rsparamsl_255. TYPES: - ty_params TYPE STANDARD TABLE OF ty_param WITH DEFAULT KEY . + ty_params TYPE STANDARD TABLE OF ty_param WITH DEFAULT KEY. CONSTANTS: c_listcube_variant TYPE c LENGTH 20 VALUE '/MBTOOLS/VARIANT' ##NO_TEXT. @@ -20,23 +22,26 @@ CLASS /mbtools/cl_bw_listcube DEFINITION IMPORTING !iv_infoprov TYPE rsinfoprov RETURNING - VALUE(rv_result) TYPE rstxtlg . + VALUE(rv_result) TYPE rstxtlg. CLASS-METHODS get_variant_description IMPORTING !iv_infoprov TYPE rsinfoprov !iv_variant TYPE rsvariant RETURNING - VALUE(rv_result) TYPE rstxtlg . + VALUE(rv_result) TYPE rstxtlg. CLASS-METHODS f4_variant IMPORTING !iv_infoprov TYPE rsinfoprov EXPORTING !ev_variant TYPE rsvariant - !ev_vartxt TYPE rstxtlg . + !ev_vartxt TYPE rstxtlg. CLASS-METHODS get_variant + IMPORTING + !iv_repnm TYPE sy-repid EXPORTING + VALUE(ev_genrep) TYPE sy-repid VALUE(ev_skip) TYPE abap_bool - VALUE(et_params) TYPE ty_params . + VALUE(et_params) TYPE ty_params. CLASS-METHODS backup_variants IMPORTING !iv_infoprov TYPE rsddatatarget @@ -51,17 +56,17 @@ CLASS /mbtools/cl_bw_listcube DEFINITION !it_ioinf TYPE rsdq_t_iobj_info RAISING /mbtools/cx_exception. - METHODS initialize . - METHODS pbo . + METHODS initialize. + METHODS pbo. METHODS pai CHANGING - !cv_ok_code TYPE sy-ucomm . - METHODS screen . + !cv_ok_code TYPE sy-ucomm. + METHODS screen. METHODS call_listcube IMPORTING !iv_infoprov TYPE rsinfoprov !iv_variant TYPE rsvariant - !iv_skip TYPE abap_bool . + !iv_skip TYPE abap_bool. PROTECTED SECTION. PRIVATE SECTION. @@ -344,15 +349,30 @@ CLASS /mbtools/cl_bw_listcube IMPLEMENTATION. IMPORT infoprov = lv_infoprov variant = lv_variant skip = ev_skip FROM MEMORY ID c_listcube_variant. FREE MEMORY ID c_listcube_variant. + ev_genrep = iv_repnm. + SELECT * FROM /mbtools/bwvarsp INTO CORRESPONDING FIELDS OF TABLE lt_params WHERE infoprov = lv_infoprov AND variant = lv_variant. CHECK sy-subrc = 0. + ev_genrep = ''. + LOOP AT lt_params ASSIGNING . APPEND INITIAL LINE TO et_params ASSIGNING . MOVE-CORRESPONDING TO . -option = -opt. + " Always output to list + IF -selname = 'L_R1'. + -option = 'EQ'. + -low = abap_true. + ELSEIF -selname BETWEEN 'L_R2' AND 'L_R5'. + -option = 'EQ'. + -low = abap_false. + ELSEIF -selname = 'L_TN'. + -option = 'EQ'. + -low = ''. + ENDIF. ENDLOOP. ENDMETHOD.