FREE SELECTIONS not getting Passed to SUBMIT Report FAGLL03

824 views Asked by At

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.

2

There are 2 answers

2
phil soady On

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,

  Report ZZSELTEST.
     DATA: lt_rspar TYPE TABLE OF rsparams,
          rspar_line LIKE LINE OF lt_rspar,
          lt_texpr TYPE rsds_texpr,
          trange TYPE rsds_trange ,
          trange_line type rsds_range ,
          trange_frange_t_line type rsds_frange ,
          trange_frange_t_selopt_t_line type rsdsselopt .

rspar_line-selname = 'SD_SAKNR'.
rspar_line-low = '*6*'.
rspar_line-option = 'CP'.
rspar_line-sign = 'I'.
APPEND rspar_line to lt_rspar.

trange_line-tablename = 'BSIS_FS'.
trange_frange_t_line-fieldname = 'BLART'.
trange_frange_t_selopt_t_line-sign   = 'I'.
trange_frange_t_selopt_t_line-option = 'EQ'.
trange_frange_t_selopt_t_line-low    = 'SA'.
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.
0
Suncatcher On

Check SAP Note 2391686 - FAGLL03: custom selections doesn't work or error MSITEM103 occurs, very likely your S4H system might be affected by this issue as well.

I check on my system, though it is not S4HANA it doesn't work either.