I am submitting the report "FAGL_ACCOUNT_ITEMS_GL" from a custom report on alv_user_command. From my report, I am unable to pass the FAGLL03 free selections.
trange_line-tablename = 'ACDOCA_FS'.
trange_frange_t_line-fieldname = 'RMVCT'.
trange_frange_t_selopt_t_line-sign = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low = 'Z20'.
APPEND trange_frange_t_selopt_t_line
TO trange_frange_t_line-selopt_t.
APPEND trange_frange_t_line TO trange_line-frange_t.
APPEND trange_line TO trange.
CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'
EXPORTING
field_ranges = trange
IMPORTING
expressions = lt_texpr.
SUBMIT fagl_account_items_gl
VIA SELECTION-SCREEN
WITH SELECTION-TABLE lt_rspar
WITH x_opsel EQ abap_false
WITH x_aisel EQ abap_true
WITH FREE SELECTIONS lt_texpr
AND RETURN.
Let me know if i am missing something.
EDIT: Reworked after feedback from Suncather.
You can leave the Parameters SELECTION-TABLE lt_rspar blank
and still include
with selection-table
in the submit statement.Thats is not why the free selections are ignored. The test program below suffers from the same type of problem and confirms the issue you report. It does look like a free parameter transfer isnt working as expected.
Suggested Solution. See Suncatcher Post.
The test program,