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

Function Module for dynamic selections

Former Member
0 Likes
707

Hello,

There is an problem when i try to capture the dynamic selections given by the user using the below function module

RS_REFRESH_FROM_DYNAMICAL_SEL

DATA: hlp_repid LIKE rsvar-report,

hlp_flg,

hlp_range TYPE rsds_trange.

hlp_repid = sy-repid.

CALL FUNCTION 'RS_REFRESH_FROM_DYNAMICAL_SEL'

EXPORTING

curr_report = hlp_repid

mode_write_or_move = hlp_flg " M OR W

IMPORTING

p_trange = hlp_range

EXCEPTIONS

not_found = 01.

IF sy-subrc EQ 0.

MESSAGE e422.

ENDIF.

The problem is it always returns sy-subrc equal to 1 even the dynamic selections are active.

have anybody worked on this.

Thanks,

krishna

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
652

Hi,

Can you give the details of the transaction ( Tcode ) from which you are trying to run this,

Rgds,

5 REPLIES 5
Read only

Former Member
0 Likes
652

Hello,

maybe not_found = 01. is the error.

take not_found = 0.

and ask

IF sy-subrc EQ 0. "not found

MESSAGE e422.

ENDIF.

Mario

Read only

Former Member
0 Likes
653

Hi,

Can you give the details of the transaction ( Tcode ) from which you are trying to run this,

Rgds,

Read only

0 Likes
652

Hello,

I am trying to read this from a custom report where i am using Logical database PNP with Dynamic selections.

Thanks,

krishna

Read only

0 Likes
652

This is a bit of a guess, but do you need to set the hlp_flag to 'W'?

Read only

0 Likes
652

Hello Matt,

I tried with all the options W, M and Space..

Thanks,

krishna