Skip to Content
0
Former Member
Nov 26, 2009 at 09:21 AM

How to Pass values dynamically to selection screen through SUBMIT program

635 Views

Hi experts,

How to Pass values dynamically to selection screen (to transaction FAGLL03) through SUBMIT program.

i have tried the below code, but its not working.Please check and let know..if anything i have to add to my code.

kindly give me any suggestions.

DATA: trange TYPE rsds_trange,

trange_line

LIKE LINE OF trange,

trange_frange_t_line

LIKE LINE OF trange_line-frange_t,

trange_frange_t_selopt_t_line

LIKE LINE OF trange_frange_t_line-selopt_t,

texpr TYPE rsds_texpr.

trange_line-tablename = 'BSIS'. "'FAGLFLEXA_FS'.

trange_frange_t_line-fieldname = 'PRCTR'.

trange_frange_t_selopt_t_line-sign = 'I'.

trange_frange_t_selopt_t_line-option = 'EQ'.

trange_frange_t_selopt_t_line-low = l_prctr.

trange_frange_t_selopt_t_line-high = l_prctr.

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 'RS_REFRESH_FROM_SELECTOPTIONS'

EXPORTING

curr_report = l_report

  • IMPORTING

  • SP =

TABLES

selection_table = lt_params

  • EXCEPTIONS

  • NOT_FOUND = 1

  • NO_REPORT = 2

  • OTHERS = 3

CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'

EXPORTING

field_ranges = trange

IMPORTING

expressions = texpr.

ls_params-selname = 'RLDNR'.

ls_params-low = '0L'.

APPEND ls_params TO lt_params.

ls_params-selname = 'X_NORM'.

ls_params-low = 'X'.

APPEND ls_params TO lt_params.

ls_params-selname = 'SD_SAKNR-LOW'.

ls_params-low = l_acct.

APPEND ls_params TO lt_params.

LOOP AT s_bukrs INTO lwa_bukrs.

ls_params-selname = 'SD_BUKRS-LOW'.

ls_params-kind = 'S'.

ls_params-sign = lwa_bukrs-sign.

ls_params-option = lwa_bukrs-option.

ls_params-low = lwa_bukrs-low.

ls_params-high = lwa_bukrs-high.

APPEND ls_params TO lt_params.

ENDLOOP.

IF NOT l_report IS INITIAL AND lt_params[] IS NOT INITIAL.

SUBMIT (l_report) WITH SELECTION-TABLE lt_params

WITH FREE SELECTIONS texpr AND RETURN.

ENDIF.

Regards,

PLP