‎2006 Nov 15 2:06 AM
Hi All, I need to introduce two lines of ABAP code to do this:
p_datefrom less than or equal to systemdate
p_dateto greater than or equal to systemdate
What's the code that I should use? Is the variable name for systemdate also called systemdate in ABAP?
Thanks!
Regards,
Pat
‎2006 Nov 15 2:13 AM
p_datefrom <b>le</b> sy-datum.
p_dateto <b>ge</b> sy-datum.
system date in ABAP is <b>sy-datum</b>
is this what u r looking for?
Regards
- Gopi
‎2006 Nov 15 2:23 AM
Hi Gopi,
Thanks for your reply. Yes that's what I was asking for. I tried to introduce your code into the routine, but keep getting complaints that the syntax check produced errors in the form routine.
The full code is below. Can you see what's wrong? Thanks!
program conversion_routine.
Type pools used by conversion program
type-pools: rsarc, rsarr, rssm.
tables: rsldpsel.
Global code used by conversion rules
$$ begin of global - insert your declaration only below this line -
TABLES: ...
DATA: ...
$$ end of global - insert your declaration only before this line -
-------------------------------------------------------------------
form compute_time_dependent_dates
using p_infopackage type rslogdpid
changing p_datefrom type d
p_dateto type d
p_subrc like sy-subrc.
Insert source code to current selection field
$$ begin of routine - insert your code only below this line -
p_datefrom le sy-datum.
p_dateto ge sy-datum.
*....
p_subrc = 0.
$$ end of routine - insert your code only before this line -
endform.
‎2006 Nov 15 2:30 AM
Hi KMT,
The statements which i gave u are logical expressions whihc shud be used with IF Statement.
if p_datefrom LE sy-datum.
write ur code
write : 'From Date is Less than System Date'.
endif.
if p_dateto GE sy-datum.
write ur code
write : 'To Date is Greater than System Date'.
endif.
Regards
- Gopi
‎2006 Nov 15 2:35 AM
Hi Gopi,
I don't really need a logical statement, this routine is used in BW infopackage to extract data based on certain rules, and the rules I want is as follows:
p_datefrom less than or equal to systemdate
p_dateto greater than or equal to systemdate
Perhaps I should try the BW forum and see?
Regards,
KM
‎2006 Nov 15 2:48 AM
‎2006 Nov 15 2:51 AM