2005 Aug 01 7:09 PM
Hello,
I have once come across a technique of loading a range using a macro that was stored in table TRMAC. Has anyone seen anything similar to this? I copied the code to a jump drive but have misplaced it. It was really a cool way to load a range with individual values.
Thanks,
Joe
2005 Aug 01 7:12 PM
You don't have to store it in that TABLE. You can define the macro in your program.
ranges: r_datum for sy-datum.
Define build_range.
r_datum-sign = 'I'.
r_datum-option = 'EQ'.
r_datum-low = &1.
append r_datum.
end-of-definition.
* Now use the macro
build_range sy-datum.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
2005 Aug 01 7:12 PM
You don't have to store it in that TABLE. You can define the macro in your program.
ranges: r_datum for sy-datum.
Define build_range.
r_datum-sign = 'I'.
r_datum-option = 'EQ'.
r_datum-low = &1.
append r_datum.
end-of-definition.
* Now use the macro
build_range sy-datum.
Regards,
Rich Heilman
Message was edited by: Rich Heilman
2005 Aug 01 7:25 PM
2005 Aug 01 7:54 PM
Thanks guys. One more thing. If I wanted to send a list of individual dates to that macro, what would the syntax look like? Would it be macro_name: date1,
date2,
date3.
I think this is what I saw once before.
2005 Aug 01 7:58 PM
Yes, but without the commas. Here is an example:
set_fldcat_typ 'BLDAT' 'C' '13' 'Vend Doc Date' ' ' ' '.
-John
2005 Aug 01 8:00 PM
2005 Aug 01 8:16 PM
Thanks again guys. Got it. I wanted to pass numerous single values to the macro and accomplished it like:
Build_macro: '64', '65', '66'.
This loaded the range with those three values.
2005 Aug 01 8:26 PM