2009 Feb 03 12:04 PM
Hi Friends,
I need some information regarding MACRO's.
In my selection screen if I am giving an parameter (Eg: p_test) then in my coding I am using the Macro statement as "rp_provide_from_last p0001 p_test pn-begda pn-endda.
In case If I am giving an select option ( EG: s_test from to)
Here how can I use the macro????? If we use 's_test' in the place of subtype its not fetching the records.
so could u plz tell me in case of select options how can we use the macro statement??
Thanks in Advance,
Magesh.S
Hi Friends,
I need some information regarding MACRO's.
In my selection screen if I am giving an parameter (Eg: p_test) then in my coding I am using the Macro statement as "rp_provide_from_last p0001 p_test pn-begda pn-endda.
In case If I am giving an select option ( EG: s_test from to)
Here how can I use the macro????? If we use 's_test' in the place of subtype its not fetching the records.
so could u plz tell me in case of select options how can we use the macro statement??
Thanks in Advance,
Magesh.S
2009 Feb 03 12:15 PM
There can be only one record in the given date range .. pn-begda pn-endda
If U have a parameter then there is no problem ...
Say U have a select-option for subtype which is not the case in real time scenarios ..
Just call the macro
rp_provide_from_last p0001 space pn-begda pn-endda. < -- get the record irrespective of the
subtype and only on dates ...
and now check as below ..
if p0001-subty in s_test.
*write your coding ...
endif.
2009 Feb 03 12:19 PM
Hi.
change ur micro as it
"rp_provide_from_last p0001 p_test pn-begda = sel_option_mydate-low pn-endda = sel_option_mydate-high."
2009 Feb 03 12:18 PM
hi friend ,
when you are using a select-option in your program in thatt case it it makes a internal table with header line.
so to access the contents you have given in select option inside macro...
select-option:
s_carr for w_carr.
define macro.
loop at s_carr.
HERE YOU CAN ACCESS SELECT OPTION CONTENTS.
endloop.
end-of-defintion.
2009 Feb 03 6:01 PM
Srinivas is right, you can only get one row if you use this macro and by using a range from selection screen you intend to get multiple records.
If you realy want multiple records then so not use the macro, instead use a loop.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 2 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |