Application Development 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: 

Function module issue

Former Member
0 Kudos

hello all,

can any one tell me how to use the below function module

RS_REFRESH_FROM_DYNAMICAL_SEL

which parameter i have to pass..

regards,

Krishna

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi

you have to pass the report name and it will give back a parameter(P_TRANGE) which gives the table name and field name (both primary and secondary)

TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.

TYPES: BEGIN OF RSDS_FRANGE,

FIELDNAME LIKE RSDSTABS-PRIM_FNAME,

SELOPT_T TYPE RSDS_SELOPT_T,

END OF RSDS_FRANGE.

TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.

TYPES: BEGIN OF RSDS_RANGE,

TABLENAME LIKE RSDSTABS-PRIM_TAB,

FRANGE_T TYPE RSDS_FRANGE_T,

END OF RSDS_RANGE.

DATA: WA_RSDS_RANGE TYPE RSDS_RANGE.

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

CURR_REPORT = SY-REPID

MODE_WRITE_OR_MOVE = 'M'

IMPORTING

P_TRANGE = WA_RSDS_RANGE

  • EXCEPTIONS

  • NOT_FOUND = 1

  • WRONG_TYPE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF

Regards,

Aswin

8 REPLIES 8

Former Member
0 Kudos

Hi

you have to pass the report name and it will give back a parameter(P_TRANGE) which gives the table name and field name (both primary and secondary)

TYPES: RSDS_SELOPT_T LIKE RSDSSELOPT OCCURS 10.

TYPES: BEGIN OF RSDS_FRANGE,

FIELDNAME LIKE RSDSTABS-PRIM_FNAME,

SELOPT_T TYPE RSDS_SELOPT_T,

END OF RSDS_FRANGE.

TYPES: RSDS_FRANGE_T TYPE RSDS_FRANGE OCCURS 10.

TYPES: BEGIN OF RSDS_RANGE,

TABLENAME LIKE RSDSTABS-PRIM_TAB,

FRANGE_T TYPE RSDS_FRANGE_T,

END OF RSDS_RANGE.

DATA: WA_RSDS_RANGE TYPE RSDS_RANGE.

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

CURR_REPORT = SY-REPID

MODE_WRITE_OR_MOVE = 'M'

IMPORTING

P_TRANGE = WA_RSDS_RANGE

  • EXCEPTIONS

  • NOT_FOUND = 1

  • WRONG_TYPE = 2

  • OTHERS = 3

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF

Regards,

Aswin

Former Member
0 Kudos

hi

chk this

call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'

exporting

curr_report = sy-cprog

mode_write_or_move = 'W'

importing

p_trange = *t_range

exceptions

others = 0.

Former Member
0 Kudos

Hi krishnakumar,

1. we can use it like this :

type-pools: rsds.

data: rt_dyn_trange type rsds_trange.

call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'

exporting

curr_report = sy-repid

mode_write_or_move = 'M'

importing

p_trange = rt_dyn_trange

exceptions

not_found = 1

wrong_type = 2

others = 3.

regards,

amit m.

0 Kudos

you can use

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

0 Kudos

Hi,

Use it in this way

data : var type sy-cprog.

var = sy-cprog.

call function '<b>RS_REFRESH_FROM_DYNAMICAL_SEL'</b>

exporting

curr_report = var

mode_write_or_move = 'W'

importing

p_trange = *t_range

exceptions

others = 0.

Regards,

Santosh

Former Member
0 Kudos

this works as follows :

Returns values of dynamic selections (selection screen)

DOCU_HAS_TO_BE_ELABORATED

Functionality

Like RS_REFRESH_FROM_SELECTOPTIONS, returns the current values of the dynamic selections. However, it is a requirement that the table P_TRANGE has the type RSDS_TRANGE.

(copied from Function module documentation)

regards

srikanth

Former Member
0 Kudos

Hai

Returns values of dynamic selections (selection screen)

DOCU_HAS_TO_BE_ELABORATED

Functionality

Like RS_REFRESH_FROM_SELECTOPTIONS, returns the current values of the dynamic selections. However, it is a requirement that the table P_TRANGE has the type RSDS_TRANGE.

Parameters

CURR_REPORT

MODE_WRITE_OR_MOVE

P_TRANGE

Exceptions

NOT_FOUND

WRONG_TYPE

Data : lt_dyn type rsds_trange.

refresh: lt_dyn.

call function 'RS_REFRESH_FROM_DYNAMICAL_SEL'

exporting

curr_report = 'ZProgram Name'

mode_write_or_move = 'M'

importing

p_trange = lt_dyn

exceptions

not_found = 1

wrong_type = 2

others = 3.

Thanks & regards

Sreenivasulu P

0 Kudos

hello all,

Actually i am trying to read the dynamic selections entered by the user..

But when i use this function module in the at selection-screen event it is raising the exception in all the cases as you have given..

regards,

Krishna