‎2006 Jul 04 12:48 PM
dear all,
i have a program which run follwing variable will have following value
d_date1 = 22072003, d_date2 = 23072003
variable are declare like this
d_date1 like vbap-aedat,
d_date2 like vbap-aedat,
select is build like this.
Select VBELN POSNR
into corresponding fields of table ITAB
from VBAP
where AEDAT between d_date1 and d_date2.
like that no value are selected.
therefore
Select VBELN POSNR
into corresponding fields of table ITAB
from VBAP
where AEDAT between 22072003 and 23072003.
3000 records are selected.
Why ? what's happen ?
‎2006 Jul 04 12:52 PM
Hi luminy13,
1. The date format should ALWAYS BE be YYYYMMDD.
2. give like this.
<b>date1 = 20030722, d_date2 = 20030723</b>
(and not date1 = 22072003, d_date2 = 23072003)
regard,
amit m.
‎2006 Jul 04 12:52 PM
I think that something is happening with the formatting. All date fields in the system are stored as YYYYMMDD. Your dates must be in this format.
I think that this may be a better way to do your selection.
select-option: s_aedat for vbap-aedat.
Select VBELN POSNR
into corresponding fields of table ITAB
from VBAP
where AEDAT in s_aedat.Regards,
Rich Heilman
‎2006 Jul 04 12:52 PM
Hi luminy13,
1. The date format should ALWAYS BE be YYYYMMDD.
2. give like this.
<b>date1 = 20030722, d_date2 = 20030723</b>
(and not date1 = 22072003, d_date2 = 23072003)
regard,
amit m.
‎2006 Jul 04 12:56 PM
Select VBELN POSNR
into corresponding fields of table ITAB
from VBAP
where AEDAT between 20030722 and 20030723.
3000 records are selected.
now check above select code it gives d same as ur 1st selection.
date has to passed as like yyyymmdd
Ramesh.
‎2006 Jul 04 1:03 PM
Hi,
Case 1:
select-option: s_date for vbap-aedat.
Use "s_date" in the select query in the IN clause.
Case 2:
select-option: s_date for sy-datum.
Use "s_date" in the select query in the IN clause.
Note:
In case 2, user need to enter the date like 31.12.9999.
Regs,
Venkat Ramanan
Message was edited by: Venkat Ramanan Natarajan
Message was edited by: Venkat Ramanan Natarajan