1

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.

Manoj
  • 11
  • 7
  • so I checked fagl_account_items_gl uses a logical DB: SDF. So in theory it should be ok. – phil soady Nov 18 '22 at 07:02
  • 1
    As a side note. Logical DBs are seriously old school. Rarely used any more. The Logical DB SDF was created in 1992. Last changed in 2003. The report fagl_account_items_gl that uses the LDB was added in 2009. But given the nature of the report. Why not.... – phil soady Nov 18 '22 at 07:09
  • nothing obvious wrong with the code. I built a similar test program to confirm its an issue on current level systems. Suncatcher is very likely right, this is a SAP bug, and you should apply a note. Or notes. Did you try the note they suggested? – phil soady Dec 02 '22 at 20:28

2 Answers2

1

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.

Suncatcher
  • 10,355
  • 10
  • 52
  • 90
0

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.
phil soady
  • 11,043
  • 5
  • 50
  • 95