11-11-2008 7:16 AM
HI ABAPers,
I have a select query, i want to pass all the selected values from this query to the
selection screen fields of another program and check how many of these values are executed correctly.
please help me in that.
thanks in advance.
Lokesh
11-11-2008 7:26 AM
Hi Lokesh,
You can use internal table of type RSPARAMS which will hold Selection screen values.
Refer to the following code to populate selection fields.
PERFORM populate_sel_screen_values USING:
'P_WERKS' 'P' 'I' 'EQ' wa_tab-werks space,
'S_MESORD' 'S' 'I' 'EQ' wa_tab-aufnr space.
*********************************
FORM populate_sel_screen_values USING pv_selname TYPE any
pv_kind TYPE any
pv_sign TYPE any
pv_option TYPE any
pv_low TYPE any
pv_high TYPE any.
MOVE:
pv_selname TO wa_rspar-selname,
pv_kind TO wa_rspar-kind,
pv_sign TO wa_rspar-sign,
pv_option TO wa_rspar-option,
pv_low TO wa_rspar-low,
pv_high TO wa_rspar-high.
APPEND wa_rspar TO i_rspar.
CLEAR wa_rspar.
ENDFORM.
*****************************************
Regards,
Vikas.
11-11-2008 7:26 AM
Hi Lokesh,
You can use internal table of type RSPARAMS which will hold Selection screen values.
Refer to the following code to populate selection fields.
PERFORM populate_sel_screen_values USING:
'P_WERKS' 'P' 'I' 'EQ' wa_tab-werks space,
'S_MESORD' 'S' 'I' 'EQ' wa_tab-aufnr space.
*********************************
FORM populate_sel_screen_values USING pv_selname TYPE any
pv_kind TYPE any
pv_sign TYPE any
pv_option TYPE any
pv_low TYPE any
pv_high TYPE any.
MOVE:
pv_selname TO wa_rspar-selname,
pv_kind TO wa_rspar-kind,
pv_sign TO wa_rspar-sign,
pv_option TO wa_rspar-option,
pv_low TO wa_rspar-low,
pv_high TO wa_rspar-high.
APPEND wa_rspar TO i_rspar.
CLEAR wa_rspar.
ENDFORM.
*****************************************
Regards,
Vikas.