Application Development and Automation 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: 
Read only

function module to display the selection screen values

Former Member
0 Likes
2,665

hi all,

is there any FM which can be used to display the values entered in the seletion screen as ALV header data?

regards,

sandhya.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,294

Hi Sandhya,

I hope this material will help you. Reward me if it is helpful to you.......

This step is required to get the selection screen information in the report output.

The prerequisite for this is to set the parameter LAYOUT-GET_SELINFOS of the IMPORTING structure should be populated with 'X'.

The parameters to be passed in the IS_SEL_HIDE of the REUSE_ALV_GRID_DISPLAY table are:

o mode: 'R' = only the entries passed in the internal table IS_SEL_HIDE-T_ENTRIES

Are output in the pop up. Selection info, which the list tool read in the selection screen (when called by a report with a selection screen), is replaced by the values passed.

'S' = the selection info which the list tool read in the selection screen of the calling report are modified by the entries in the table IS_SEL_HIDE-T_ENTRIES.

o t_entries: Selection info table

o t_entries-mode: 'A' = output the selection info for the current table record in the info popup.

'D' = do not output select option or SELNAME parameter selection info in the popup.

o t_entries-selname: (only used in t_entries-mode = 'D') : Name of the select option or parameter.

The following table fields are only used in t_entries-mode = 'A'. They contain the selection information to be added.

• t_entries-field: DDIC field name of the field for which selection information is to be output.

• t_entries-table: DDIC table names of t_entries-field.

• t_entries-stext: Field name in info popup.

• If t_entries-field and t_entries-table have been entered, this text is taken from DDIC.

• t_entries-valuf: Selection condition 'from' value (external format)

• t_entries-valut: Selection condition 'to' value (external format)

• t_entries-sign0: (I)nclusive (E)xclusive

• t_entries-option: All values of the select options Option field allowed.

6 REPLIES 6
Read only

JozsefSzikszai
Active Contributor
0 Likes
1,294

hi,

I am not sure if such FM exists...

At least we use a Z... FM for this purpose.

ec

Read only

0 Likes
1,294

Hi,

Define the class to display the values of selection screen as ALV Header Data.

See the below code.

&----


  • Class defintion for TOP-OF-PAGE

&----


CLASS lcl_event_receiver DEFINITION.

PUBLIC SECTION.

METHODS: top_of_page

FOR EVENT top_of_page

OF cl_gui_alv_grid

IMPORTING e_dyndoc_id.

ENDCLASS. "lcl_event_receiver DEFINITION

&----


  • Class implementation for TOP-OF-PAGE

&----


CLASS lcl_event_receiver IMPLEMENTATION.

METHOD top_of_page. "implementation

DATA : lv_text TYPE sdydo_text_element.

  • Selection Criteria

CONCATENATE text-032 ' : ' INTO lv_text SEPARATED BY space.

CALL METHOD go_dyndoc_id->add_text

EXPORTING

text = lv_text

sap_style = cl_dd_area=>key.

  • Company code

CALL METHOD go_dyndoc_id->new_line.

CONCATENATE text-007 ' : ' p_bukrs INTO lv_text SEPARATED BY space.

CALL METHOD go_dyndoc_id->add_text

EXPORTING

text = lv_text

sap_style = cl_dd_area=>key.

  • Root Cause Code

CALL METHOD go_dyndoc_id->new_line.

CLEAR lv_text.

CONCATENATE text-026 p_rccode INTO lv_text SEPARATED BY space.

CALL METHOD go_dyndoc_id->add_text

EXPORTING

text = lv_text

sap_style = cl_dd_area=>key.

CALL METHOD go_dyndoc_id->new_line.

  • Customer Number

IF s_kunnr IS NOT INITIAL.

CLEAR lv_text.

CONCATENATE text-030 s_kunnr-low INTO lv_text SEPARATED BY space.

IF s_kunnr-high IS NOT INITIAL.

CONCATENATE lv_text text-029 s_kunnr-high INTO lv_text SEPARATED BY space.

ENDIF.

CALL METHOD go_dyndoc_id->add_text

EXPORTING

text = lv_text

sap_style = cl_dd_area=>key.

CALL METHOD go_dyndoc_id->new_line.

ENDIF.

IF go_html_cntrl IS INITIAL.

CREATE OBJECT go_html_cntrl

EXPORTING

parent = go_parent_html.

ENDIF.

DATA: lv_background_id TYPE sdydo_key VALUE space.

CALL FUNCTION 'REUSE_ALV_GRID_COMMENTARY_SET'

EXPORTING

document = go_dyndoc_id

bottom = space.

CALL METHOD go_dyndoc_id->merge_document.

CALL METHOD go_dyndoc_id->set_document_background

EXPORTING

picture_id = lv_background_id.

go_dyndoc_id->html_control = go_html_cntrl.

CALL METHOD e_dyndoc_id->display_document

EXPORTING

reuse_control = abap_true

parent = go_parent_html

EXCEPTIONS

html_display_error = 1.

IF sy-subrc <> 0.

MESSAGE i014.

ENDIF.

ENDMETHOD. "TOP_OF_PAGE

ENDCLASS. "lcl_event_receiver IMPLEMENTATION

Read only

Former Member
0 Likes
1,294

Hi,

Use FM

CALL FUNCTION 'RS_COVERPAGE_SELECTIONS'

EXPORTING

report = w_program

variant = ''

no_import = 'X'

TABLES

infotab = mtab_sel_options

I hope this helps,

Regards,

Raju chitale

Read only

uwe_schieferstein
Active Contributor
0 Likes
1,294

Hello Sandhya

You can use the following two function modules:

RS_REFRESH_FROM_SELECTOPTIONS (Read current select options from selscreen)
RS_LIST_SELECTION_TABLE ("print" current select options)

Regards

Uwe

Read only

Former Member
0 Likes
1,295

Hi Sandhya,

I hope this material will help you. Reward me if it is helpful to you.......

This step is required to get the selection screen information in the report output.

The prerequisite for this is to set the parameter LAYOUT-GET_SELINFOS of the IMPORTING structure should be populated with 'X'.

The parameters to be passed in the IS_SEL_HIDE of the REUSE_ALV_GRID_DISPLAY table are:

o mode: 'R' = only the entries passed in the internal table IS_SEL_HIDE-T_ENTRIES

Are output in the pop up. Selection info, which the list tool read in the selection screen (when called by a report with a selection screen), is replaced by the values passed.

'S' = the selection info which the list tool read in the selection screen of the calling report are modified by the entries in the table IS_SEL_HIDE-T_ENTRIES.

o t_entries: Selection info table

o t_entries-mode: 'A' = output the selection info for the current table record in the info popup.

'D' = do not output select option or SELNAME parameter selection info in the popup.

o t_entries-selname: (only used in t_entries-mode = 'D') : Name of the select option or parameter.

The following table fields are only used in t_entries-mode = 'A'. They contain the selection information to be added.

• t_entries-field: DDIC field name of the field for which selection information is to be output.

• t_entries-table: DDIC table names of t_entries-field.

• t_entries-stext: Field name in info popup.

• If t_entries-field and t_entries-table have been entered, this text is taken from DDIC.

• t_entries-valuf: Selection condition 'from' value (external format)

• t_entries-valut: Selection condition 'to' value (external format)

• t_entries-sign0: (I)nclusive (E)xclusive

• t_entries-option: All values of the select options Option field allowed.

Read only

Former Member
0 Likes
1,294

Look at IS_PRINT parameter of the ALV function module. It should have some flags to display/hide selection values.