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

Help needed for the FM

Former Member
0 Likes
792

Hi ,

Can any one tell me what is the use of the FM 'RS_REFRESH_FROM_DYNAMICAL_SEL',

Thank you..

Srihasa

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
634

While processing a report with dynamic selections we go for the function module RS_REFRESH_FROM_DYNAMICAL_SEL.

This returns an object of the type RSDS_TRANGE() which a subsequent function module E_SELECTIONS_RANGE_2_EX then converts to an object of the type RSDS_TEXPR (texpr is an internal table of the type RSDS_TEXPR(see type pool RSDS)). In this way, you can pass on the dynamic selections of the current report with SUBMIT

Hi ,

Can any one tell me what is the use of the FM 'RS_REFRESH_FROM_DYNAMICAL_SEL',

Thank you..

Srihasa

3 REPLIES 3
Read only

Former Member
0 Likes
634

Hi...

you could use RS_REFRESH_FROM_DYNAMICAL_SEL to get the values entered by the users in the dynamic selection.

regards

vivek

Read only

Former Member
0 Likes
634

Hi Srihasa,

RS_REFRESH_FROM_DYNAMICAL_SEL - Returns values of dynamic selections (selection screen)

*"---------------------------------------------------------------------- 
*" Macro MAKE_RANGE &1 
*"---------------------------------------------------------------------- 
*"*"Local interface: 
*"    <= &1 first_date 
*"    <= &2 last_date 
*"    => &3 DAY_IN 
*"    => &4 date 
*"---------------------------------------------------------------------- 
DEFINE make_range. 
  &1-SIGN   = 'I'. 
  &1-OPTION = ld_rsdsexpr-option. 
  &1-LOW    = ld_rsdsexpr-low. 
  &1-HIGH   = ld_rsdsexpr-high. 
  APPEND &1. 
END-OF-DEFINITION."make_range 

*&--------------------------------------------------------------------* 
*&      Form  GET_DYNAMIC_SELECTION 
*&--------------------------------------------------------------------* 
*       text 
*---------------------------------------------------------------------* 
form GET_DYNAMIC_SELECTION. 

  data: g_repid        like sy-repid. 
  data: rt_dyn_trange  type rsds_trange. 
  DATA: it_dyn_texpr   type rsds_texpr  with header line. 

  data: ld_rsds_expr type rsds_expr, 
        ld_rsdsexpr  type rsdsexpr. 

  REFRESH: it_dyn_texpr. 
  REFRESH: r_racct_ru, r_rzzlokkt_ru, 
           r_racct_ua, r_rzzlokkt_ua, 
           r_racct_kz, r_rzzlokkt_kz, 
           r_racct. 

  g_repid = sy-repid. 
* get report dynamic selections: 
  call function 'RS_REFRESH_FROM_DYNAMICAL_SEL' 
    exporting 
      curr_report        = g_repid 
      mode_write_or_move = 'M' 
    importing 
      p_trange           = rt_dyn_trange 
    exceptions 
      not_found          = 1 
      wrong_type         = 2 
      others             = 3. 
  if sy-subrc ne 0. 
    exit. 
  endif. 
* delete rt_dyn_trange where tablename ne 'BSIS'.                "740027 
  call function 'FREE_SELECTIONS_RANGE_2_EX' 
    exporting 
      field_ranges = rt_dyn_trange 
    importing 
      expressions  = it_dyn_texpr[]. 

  loop at it_dyn_texpr into ld_rsds_expr. 
    loop at ld_rsds_expr-expr_tab into ld_rsdsexpr. 

      CASE ld_rsds_expr-tablename. 
      WHEN 'ZSLI01T'. 
        make_range r_racct. 
      WHEN 'ZSLRU'. 
        IF ld_rsdsexpr-fieldname EQ 'RACCT'. 
          make_range r_racct_ru. 
        ELSEIF ld_rsdsexpr-fieldname EQ 'RZZLOKKT'. 
          make_range r_rzzlokkt_ru. 
        ENDIF. 
      ENDCASE. 
    endloop. 
  endloop. 
endform.                    "GET_DYNAMIC_SELECTION

www.sapnet.ru

Regards,

Chandra Sekhar

Read only

Former Member
0 Likes
635

While processing a report with dynamic selections we go for the function module RS_REFRESH_FROM_DYNAMICAL_SEL.

This returns an object of the type RSDS_TRANGE() which a subsequent function module E_SELECTIONS_RANGE_2_EX then converts to an object of the type RSDS_TEXPR (texpr is an internal table of the type RSDS_TEXPR(see type pool RSDS)). In this way, you can pass on the dynamic selections of the current report with SUBMIT