2012 Dec 20 8:25 PM
Hi, I need to pass data from one range structure to a dynamic range.
The problem is that the program dump in the append line.
Here it's the code
DATA: lv_rangename TYPE char10 VALUE 'LR_RANGE1'.
FIELD-SYMBOLS: <fs-range> TYPE TABLE.
....
CONCATENATE 'LR_RANGE'
lv_count
INTO lv_rangename.
ASSIGN (lv_rangename) TO <fs-range>.
....
lr_range-sign = 'I'.
lr_range-option = 'EQ'.
lr_range-low = gt_bon_param-fieldvalue.
APPEND lr_range TO <fs-range>.
How can I do this?
Regards,
Mariano.
2012 Dec 20 8:59 PM
Hi Mariano
I tried replicate your problem, and I think the solution is this:
*For example I have a table of range.
SELECT-OPTIONS:LR_RANGE FOR usr02-bname.
* Is requeride uses the characters [] in description of table
DATA:lv_rangename TYPE char10 value 'LR_RANGE[]' .
FIELD-SYMBOLS: <fs_range> TYPE TABLE .
*&---------------------------------------------------------------------*
*& START-OF-SELECTION
*&---------------------------------------------------------------------*
START-OF-SELECTION.
ASSIGN (lv_rangename) TO <fs_range>.
LR_RANGE-sign = 'I'.
LR_RANGE-option = 'I'.
LR_RANGE-low = '10'.
APPEND LR_RANGE TO <fs_range> .
THe result is table LR_RANGE with data.
2012 Dec 20 8:59 PM
Hi Mariano
I tried replicate your problem, and I think the solution is this:
*For example I have a table of range.
SELECT-OPTIONS:LR_RANGE FOR usr02-bname.
* Is requeride uses the characters [] in description of table
DATA:lv_rangename TYPE char10 value 'LR_RANGE[]' .
FIELD-SYMBOLS: <fs_range> TYPE TABLE .
*&---------------------------------------------------------------------*
*& START-OF-SELECTION
*&---------------------------------------------------------------------*
START-OF-SELECTION.
ASSIGN (lv_rangename) TO <fs_range>.
LR_RANGE-sign = 'I'.
LR_RANGE-option = 'I'.
LR_RANGE-low = '10'.
APPEND LR_RANGE TO <fs_range> .
THe result is table LR_RANGE with data.
2012 Dec 21 2:31 PM
Thanks my friend!!
The problem was that I forget the "[]" in the range name.
Have a happy new year.
Regards.
Mariano.
2012 Dec 20 9:13 PM
Hi Mariano,
Check this thread, it well explains what you need: http://scn.sap.com/thread/1725739
Edgar