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

capturing the dynamic selections given by user

Former Member
0 Likes
1,041

Hello all,

I am using a function Module RS_REFRESH_FROM_DYNAMICAL_SEL to read the dynamic selections given by user.

But its not returning any values.

DATA : IT_TRANGE TYPE RSDS_TRANGE.

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

curr_report = SY-REPID

mode_write_or_move = M

IMPORTING

P_TRANGE = IT_TRANGE

EXCEPTIONS

NOT_FOUND = 1

WRONG_TYPE = 2

OTHERS = 3.

Any one please help in this .

Regards,

Kranthi

Hello all,

I am using a function Module RS_REFRESH_FROM_DYNAMICAL_SEL to read the dynamic selections given by user.

But its not returning any values.

DATA : IT_TRANGE TYPE RSDS_TRANGE.

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

curr_report = SY-REPID

mode_write_or_move = M

IMPORTING

P_TRANGE = IT_TRANGE

EXCEPTIONS

NOT_FOUND = 1

WRONG_TYPE = 2

OTHERS = 3.

Any one please help in this .

Regards,

Kranthi

7 REPLIES 7
Read only

Former Member
0 Likes
923

Hi,

Try this..

Instead of SY-REPID, create a variable and assign the sy-repid and pass it to the FM..Changes marked in bold..

<b>DATA: v_repid TYPE syrepid.

v_repid = sy-repid.</b>

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

curr_report = <b>v_REPID</b>

mode_write_or_move = M

IMPORTING

P_TRANGE = IT_TRANGE

EXCEPTIONS

NOT_FOUND = 1

WRONG_TYPE = 2

OTHERS = 3.

Thanks,

Naren

Read only

0 Likes
923

Hi Naren,

I tried with your suggestions but i didn't find any change. I still have the same problem.

Thanks,

Kranthi.

Read only

0 Likes
923

Naren,

it's just giving a message

"No user selection exist".

Thanks,

Kranthi.

Read only

0 Likes
923

Do not use SY-repid and use sy-cprog

and you get exact results.

Read only

0 Likes
923

Hi Surender,

I think i still have problem. I have like 26 fields in dynamic selections. I am filling one field and checking for that one in the program. Below is my program and please let me know where i doning wrong

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-cprog

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.

Read only

0 Likes
923

Use FM Like

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

curr_report = sy-cprog

mode_write_or_move = space

IMPORTING

p_trange = gt_rsds_trange

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.

Read only

Former Member
0 Likes
923

Hi,

Uncomment the Exceptions part then check what exception you are getting..

EXCEPTIONS

NOT_FOUND = 1

WRONG_TYPE = 2

OTHERS = 3

Thanks,

Naren