Skip to Content
1
Jun 12, 2020 at 02:12 PM

Need to get current layout field CL_SALV_TABLE

952 Views

Hi Friends,

I am having a layout parameter on the selection screen. We have passed the saved layout in the parameter.

Now ALV is displayed properly.

Now the requirement is before display the ALV send a mail with output attachment.

The attachment is based on selection screen LAYOUT.

How to get the LAYOUT columns only(saved layout data).

IF p_layout IS NOT INITIAL.
lr_layout->set_initial_layout( p_layout ).
ENDIF.

DATA(lr_columns) = gr_alv->get_columns( ). ==> gives all the fileds of output internal table
DATA(ltt_columns) = lr_columns->get( ). ==> gives all the fileds of output internal table

perform sed_mail.

gr_alv->display( ).

Thanks with Regards,

Vallamuthu M