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

re: variants

Former Member
0 Likes
616

Hi,

Iam using one logical databse to retrieve the data from bsis table. I have to run this program by using submit by using another program along with the parameters.

I could able to send the parameters on the selection screen values. But i could not able to send the dynamic selection-screen values. How it is possible to give the values for the dynamic selection-screen. Any idea.

I appreciate your help.

rgds

p. krishna prasad

Hi,

Iam using one logical databse to retrieve the data from bsis table. I have to run this program by using submit by using another program along with the parameters.

I could able to send the parameters on the selection screen values. But i could not able to send the dynamic selection-screen values. How it is possible to give the values for the dynamic selection-screen. Any idea.

I appreciate your help.

rgds

p. krishna prasad

2 REPLIES 2
Read only

Former Member
0 Likes
540

Hi paluri,

1. Submit statement has an extension of

WITH SELECTION-TABLE rspar .

2. use this extension to do what u require.

3. Please see F1 help on submit.

4. ==== from help

... WITH SELECTION-TABLE rspar

Effect

If you specify this addition, parameters and selection criteria on the selection screen are supplied from an internal table rspar. You must specify an internal table with the row type RSPARAMS for rspar. The structured data type RSPARAMS is defined in the ABAP Dictionary and has the following components, all of which are data type CHAR:

SELNAME (length 8),

KIND (length 1),

SIGN (length 1),

OPTION (length 2),

LOW (length 45),

HIGH (length 45).

To supply parameters and selection criteria for the selection screen with specific values, the lines in the internal table rspar must contain the following values:

SELNAME must contain the name of a parameter or selection criterion for the selection screen in block capitals

KIND must contain the type of selection screen component (P for parameters, S for selection criteria)

SIGN, OPTION, LOW, and HIGH must contain the values specified for the selection table columns that have the same names as the selection criteria; in the case of parameters, the value must be specified in LOW and all other components are ignored.

If the name of a selection criterion is repeated in rspar, this defines a selection table containing several lines and passes it on to the selection criterion. If parameter names occur several times, the last value is passed on to the parameter.

The contents of the parameters or selection tables for the current program can be entered in the table by the function module RS_REFRESH_FROM_SELECTOPTIONS.

regards,

amit m.

Read only

Former Member
0 Likes
540

Hi

This an extract of my old report where I call a std report with free selections, I hope it can be usefull for you:

RANGES: dd_augdt FOR sy-datum,

dd_budat FOR sy-datum,

kd_budat FOR sy-datum,

dd_faedt FOR sy-datum.

DATA: trange TYPE rsds_trange,

range TYPE rsds_range,

frange TYPE rsds_frange,

selopt LIKE rsdsselopt.

DATA: texpr TYPE rsds_texpr.

DATA: x_aisel TYPE c,

x_clsel TYPE c,

x_opsel TYPE c.

RANGES ro_augdt FOR bsik-augdt.

  • Data di registrazione

IF NOT budat IS INITIAL.

dd_budat(3) = 'ILE'.

dd_budat-low = budat.

APPEND dd_budat.

ENDIF.

  • Co.Ge. speciale

LOOP AT so_umskz.

MOVE-CORRESPONDING so_umskz TO selopt.

APPEND selopt TO frange-selopt_t.

ENDLOOP.

IF sy-subrc = 0.

frange-fieldname = 'UMSKZ'.

APPEND frange TO range-frange_t.

ENDIF.

  • Modalità di pagamento

REFRESH frange-selopt_t.

LOOP AT so_zlsch.

MOVE-CORRESPONDING so_zlsch TO selopt.

APPEND selopt TO frange-selopt_t.

ENDLOOP.

IF sy-subrc = 0.

frange-fieldname = 'ZLSCH'.

APPEND frange TO range-frange_t.

ENDIF.

IF p_now = space.

dd_augdt(3) = 'IEQ'.

dd_augdt-low = '00000000'.

APPEND dd_augdt.

dd_augdt(3) = 'IBT'.

dd_augdt-low = budat.

dd_augdt-high = '99991231'.

APPEND dd_augdt.

x_opsel = space.

x_clsel = space.

x_aisel = 'X'.

ELSE.

x_opsel = 'X'.

x_clsel = space.

x_aisel = space.

kd_budat[] = dd_budat[].

REFRESH dd_budat.

ENDIF.

IF NOT range-frange_t[] IS INITIAL.

range-tablename = 'BSIK'.

APPEND range TO trange.

CALL FUNCTION 'FREE_SELECTIONS_RANGE_2_EX'

EXPORTING

field_ranges = trange

IMPORTING

expressions = texpr.

ENDIF.

SUBMIT rfitemap

WITH kd_augdt IN dd_augdt

WITH kd_blart IN so_blart

WITH kd_budat IN kd_budat

WITH kd_bukrs = p_bukrs

WITH kd_lifnr = l_total-lifnr

WITH so_budat IN dd_budat

WITH so_faedt IN dd_faedt

WITH x_aisel = x_aisel

WITH x_apar = space

WITH x_clsel = x_clsel

WITH x_merk = space

WITH x_norm = 'X'

WITH x_opsel = x_opsel

WITH x_park = space

WITH x_shbv = 'X'

WITH FREE SELECTIONS texpr AND RETURN.

Max