2008 Jul 28 9:46 AM
Hi,
How to use READ statement to read the records lying in between two years..Can I use BETWEEN..?
Help needed.
Reg,
Prabakaran.S
hiiii
you can only use EQ with READ statement..for your requirement you can only use LOOP statement with condtition..not READ.
regards
twinkal
2008 Jul 28 9:49 AM
hi,
no you cant use like that ...you can use loop and endloop
with loop at table where condition....
2008 Jul 28 9:50 AM
Hi,
I think you can not use READ statement with between or any other clause except WITH KEY.
May be you can use Loop Where.....or some other.
Hope this helps!!!
Regards,
Lalit
2008 Jul 28 9:50 AM
Hi,
you better work with key value in the READ statement and put the value of the year in it.
For detail.
http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
Regards,
Anirban
2008 Jul 28 9:50 AM
Hi
READ statement always reads only one single record from the internal table
Instead of that what you can do if write the READ statement in side a LOOP ...ENDLOOP.
Regards
Pavan
2008 Jul 28 9:50 AM
hiiii
you can only use EQ with READ statement..for your requirement you can only use LOOP statement with condtition..not READ.
regards
twinkal
2008 Jul 28 9:51 AM
hi,
With read table you can use either equal to value or index of the table. In your case you should make a loop and there use "in" with range type.
loop at i_table where field in r_values.
....
endloop.
/wg
2008 Jul 28 9:52 AM
Hi,
loop the internal table which has the year records and in the where condition give the condition.
2008 Jul 28 9:52 AM
Hi,
No...Use Loop and Endloop.
check the read statement..
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb35f8358411d1829f0000e829fbfe/content.htm
Regards,
Omkaram.
2008 Jul 28 9:53 AM
Hi Prabhakaran,
You cannot use BETWEEN with READ Statement.
You can try the following:
Loop at itab where <conditon>
endloop.
In the WHERE condition you can specify you date range.
Hope this helps you.
Regards,
Chandra Sekhar
2008 Jul 28 9:55 AM
Hi,
There is no option in READ statement to use BETWEEN and WHERE conditions.
You can use LOOP AT .... WHERE .
Regards,
Rajitha.
2008 Jul 28 9:57 AM
HI,
Try with this,
if Datefield GE ('DD/MM/YYYY')
and Datefield LE ('DD/MM/YYYY').
Read table
If sy-subrc <> 0.
error message
Endif.
endif.
Mohinder
| User | Count |
|---|---|
| 6 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |