Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

detail popup using cl_salv_table not displaying blank fields

Former Member
0 Kudos
343

When using cl_salv_table, how do you get the detail screen (magnifying glass) to display fields that are empty?

Thanks!

Jim

4 REPLIES 4

Former Member
0 Kudos
76

If you are using ALV grid using OO (set_table_for_first_display method) set your layout field DETAILINIT ( lvc_s_layo-detailinit) to 'X'.

if you are using REUSE* fm, Set your layout field detail_initial_lines (type SLIS_LAYOUT_ALV)

0 Kudos
76

Thanks, Kris, but I'm not using thos products.

The question is for <b>CL_SALV_TABLE</b> (and related objects).

uwe_schieferstein
Active Contributor
0 Kudos
76

Hello Jim

Perhaps the following objects and method calls are what you are looking for.

*&---------------------------------------------------------------------*
*& Report  ZUS_SDN_CL_SALV_TABLE
*&
*&---------------------------------------------------------------------*
*&
*&
*&---------------------------------------------------------------------*

REPORT  zus_sdn_cl_salv_table.


TYPE-POOLS: abap.


DATA:
  gt_knb1        TYPE STANDARD TABLE OF knb1.


DATA:
  go_table       TYPE REF TO cl_salv_table,
*  go_layout      TYPE REF TO cl_salv_layout,
  go_display     TYPE REF TO cl_salv_display_settings.
*  go_columns     type ref to CL_SALV_COLUMNS_TABLE.


START-OF-SELECTION.

  SELECT        * FROM  knb1 INTO TABLE gt_knb1
         WHERE  bukrs  = '1000'.


  TRY.
      CALL METHOD cl_salv_table=>factory
*    EXPORTING
*      LIST_DISPLAY   = IF_SALV_C_BOOL_SAP=>FALSE
*      R_CONTAINER    =
*      CONTAINER_NAME =
        IMPORTING
          r_salv_table   = go_table
        CHANGING
          t_table        = gt_knb1.
    CATCH cx_salv_msg .
  ENDTRY.

*  go_layout  = go_table->get_layout( ).

  go_display = go_table->get_display_settings( ).
  go_display->set_suppress_empty_data( abap_false ).



  go_table->display( ).


END-OF-SELECTION.

Regards

Uwe

Former Member
0 Kudos
76

Thanks, Uwe, but your code is for a table I want to display all the fields -- whether blank or not -- when the <b>DETAILS</b> icon is clicked.

In other flavors of ALV it was controlled by DetailInit, but I can't find it for the CL_SALV_TABLE-related objects.