Skip to content

Commit

Permalink
Update 2 objects
Browse files Browse the repository at this point in the history
  • Loading branch information
mbtools committed Apr 5, 2021
1 parent a43075e commit d2a204b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 18 deletions.
16 changes: 10 additions & 6 deletions src/#mbtools#bw_listcube.fugr.#mbtools#bw_view_infoprov.abap
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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)
Expand Down
44 changes: 32 additions & 12 deletions src/#mbtools#cl_bw_listcube.clas.abap
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
CLASS /mbtools/cl_bw_listcube DEFINITION
PUBLIC
FINAL
CREATE PUBLIC .
CREATE PUBLIC.

************************************************************************
* MBT Listcube
*
* (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.
Expand All @@ -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
Expand All @@ -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.
Expand Down Expand Up @@ -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 <ls_params>.
APPEND INITIAL LINE TO et_params ASSIGNING <ls_params_out>.
MOVE-CORRESPONDING <ls_params> TO <ls_params_out>.
<ls_params_out>-option = <ls_params>-opt.
" Always output to list
IF <ls_params_out>-selname = 'L_R1'.
<ls_params_out>-option = 'EQ'.
<ls_params_out>-low = abap_true.
ELSEIF <ls_params_out>-selname BETWEEN 'L_R2' AND 'L_R5'.
<ls_params_out>-option = 'EQ'.
<ls_params_out>-low = abap_false.
ELSEIF <ls_params_out>-selname = 'L_TN'.
<ls_params_out>-option = 'EQ'.
<ls_params_out>-low = ''.
ENDIF.
ENDLOOP.

ENDMETHOD.
Expand Down

0 comments on commit d2a204b

Please sign in to comment.