2015 Feb 11 10:32 AM
Dear Abap experts,
I want to compare the date with year. How can I do this. I tried this but error.
Regards,
Aneel
select pa2001~aedtm pa2001~begda pa2001~endda pa2001~abwtg pa2001~awart
from pa2001 into corresponding fields of table tvbap
where pa2001~pernr eq so_pernr and pa2001~endda+0(4) eq so_year.
2015 Feb 13 10:55 AM
Dear All,
I have applied this solution which is more easy I think. Giving for the help of others.
concatenate '%' so_year '%' into so_year.
select * from pa2001 into corresponding fields of table tvbap
where pa2001~pernr eq so_pernr and pa2001~endda like so_year.
Regards,
Aneel
Dear All,
I have applied this solution which is more easy I think. Giving for the help of others.
concatenate '%' so_year '%' into so_year.
select * from pa2001 into corresponding fields of table tvbap
where pa2001~pernr eq so_pernr and pa2001~endda like so_year.
Regards,
Aneel
2015 Feb 11 10:38 AM
You cannot give this in a select statement.
remove that last condition and pa2001~endda+0(4) eq so_year.
Loop tvbap into tvbap_line where endda EQ so_year.
append tvbap_line INTO tvbap_2. "copy into another table
endloop.
2015 Feb 11 10:39 AM
Hi,
The select statement seems correct just with this correction:
and pa2001~endda+0(4) IN so_year.
Regards,
Suren.
2015 Feb 11 11:19 AM
Dear Suren,
pa2001~endda+0(4) IN so_year is not working.
Regards
Aneel
2015 Feb 11 10:43 AM
2015 Feb 11 10:45 AM
Hi,
can you try like this?
declere - range : date.
take years (so_year) start date and end date and create that in date range.
and pass that to your select query.
Regards-
Makarand
2015 Feb 11 11:21 AM
Dear All,
Thanks for your help. Let me check these solution and come back to you.
Regards,
Aneel
2015 Feb 13 10:55 AM
Dear All,
I have applied this solution which is more easy I think. Giving for the help of others.
concatenate '%' so_year '%' into so_year.
select * from pa2001 into corresponding fields of table tvbap
where pa2001~pernr eq so_pernr and pa2001~endda like so_year.
Regards,
Aneel
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |