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 for dynamic selections

Former Member
0 Kudos
132

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

Former Member
0 Kudos
77

Hi,

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

Rgds,

5 REPLIES 5

Former Member
0 Kudos
77

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

Former Member
0 Kudos
78

Hi,

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

Rgds,

0 Kudos
77

Hello,

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

Thanks,

krishna

0 Kudos
77

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

0 Kudos
77

Hello Matt,

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

Thanks,

krishna