2008 Dec 16 11:29 AM
hello all,
i have two date fields BLDAT & BLDAT1 in selection-screen, and i hardcoded the second date in program. but problem is that when i m picking data by passing BLDAT1(that is hardcoded date) then its making no effect and picking all data from table. can anyone please help me?
code :
bldat1-low = '20080101'.
bldat1-high = '20080131'.
g = '2008'.
IF ITAB[] IS NOT INITIAL.
SELECT bldat awkey FROM bkpf INTO TABLE itab2 WHERE bldat IN bldat1
AND blart = 'RE'
AND bukrs = '1000'
AND gjahr = g.
endif.
regards saurabh.
2008 Dec 16 11:31 AM
Hi saurabh,
You need to also provide values for SIGN (I) and OPTION (EQ).
You need to APPEND the bldat1 to the internal table bldat1.
So,
bldat1-sign = 'I'.
bldat1-option = 'BT'. " u can also use 'EQ'
bldat1-low = value.
bldat1-high - value.
append bldat1 to bldat1.
Best Regards,
Ram.
Hi saurabh,
You need to also provide values for SIGN (I) and OPTION (EQ).
You need to APPEND the bldat1 to the internal table bldat1.
So,
bldat1-sign = 'I'.
bldat1-option = 'BT'. " u can also use 'EQ'
bldat1-low = value.
bldat1-high - value.
append bldat1 to bldat1.
Best Regards,
Ram.
2008 Dec 16 11:31 AM
Hi saurabh,
You need to also provide values for SIGN (I) and OPTION (EQ).
You need to APPEND the bldat1 to the internal table bldat1.
So,
bldat1-sign = 'I'.
bldat1-option = 'BT'. " u can also use 'EQ'
bldat1-low = value.
bldat1-high - value.
append bldat1 to bldat1.
Best Regards,
Ram.
2008 Dec 16 11:33 AM
Hello Saurabh,
Try this:
bldat1-sign = 'I'
bldat1-option = 'BT'.
bldat1-low = '20080101'.
bldat1-high = '20080131'.
APPEND bldat1.
@ Ram: You cannot use EQ for HIGH & LOW values )
Hope this helps.
BR,
Suhas
Edited by: Suhas Saha on Dec 16, 2008 12:37 PM
2008 Dec 16 11:34 AM
Hi,
You will have to append the values to the selection table before applying it in the select query.
e.g.
bldat1-low = '20081201'.
bldat1-high = '20081231'.
bldat1-sign = 'I'.
bldat1-option = 'BT'.
append bldat1.
now use it in the select statement.
select f1 f2 from table name where bldat in bldat1.
Regards,
Sachin Dargan
2008 Dec 16 11:36 AM
Hi....
Select option contain 4 field. SIGN, OPTION, LOW and HIGH.
use the your code as below...
bldat1-sign = 'I'.
bldat1-option = 'BT'. -
> It should be BT as you have passed value in HIGH
bldat1-low = '20080101'.
bldat1-high = '20080131'.
g = '2008'.
IF ITAB[] IS NOT INITIAL.
SELECT bldat awkey FROM bkpf INTO TABLE itab2 WHERE bldat IN bldat1
AND blart = 'RE'
AND bukrs = '1000'
AND gjahr = g.
endif.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |