Possibility to get the fieldcatalog with mandt (#732)

* Possibility to get the fieldcatalog with mandt

In some cases i need the mandt in the table.
Normally it is hidden but can be displayed if necessary

* adjusted code style
This commit is contained in:
Pascal Möller 2021-02-10 09:08:57 +01:00 committed by GitHub
parent 976c3c1d3c
commit bd8975ec66
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,6 +101,7 @@ public section.
class-methods GET_FIELDCATALOG
importing
!IP_TABLE type STANDARD TABLE
!IV_HIDE_MANDT type ABAP_BOOL default ABAP_TRUE
returning
value(EP_FIELDCATALOG) type ZEXCEL_T_FIELDCATALOG .
class-methods NUMBER_TO_EXCEL_STRING
@ -845,7 +846,7 @@ METHOD get_fieldcatalog.
<fcat>-dynpfld = 'X'. " What in the world would we exclude here?
" except for the MANDT-field of most tables ( 1st column that is )
IF <fcat>-position = 1 AND lo_salv_column_table->get_ddic_datatype( ) = 'CLNT'.
IF <fcat>-position = 1 AND lo_salv_column_table->get_ddic_datatype( ) = 'CLNT' AND iv_hide_mandt = abap_true.
CLEAR <fcat>-dynpfld.
ENDIF.