2007 May 11 11:36 PM
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
2007 May 11 11:41 PM
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
2007 May 11 11:47 PM
Hi Naren,
I tried with your suggestions but i didn't find any change. I still have the same problem.
Thanks,
Kranthi.
2007 May 11 11:49 PM
Naren,
it's just giving a message
"No user selection exist".
Thanks,
Kranthi.
2007 May 11 11:59 PM
Do not use SY-repid and use sy-cprog
and you get exact results.
2007 May 12 12:10 AM
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.
2007 May 12 1:02 AM
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.
2007 May 12 12:28 AM
Hi,
Uncomment the Exceptions part then check what exception you are getting..
EXCEPTIONS
NOT_FOUND = 1
WRONG_TYPE = 2
OTHERS = 3
Thanks,
Naren
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |