‎2008 Sep 12 10:06 AM
hello everyone,
i need to make a selection of a number of a mounth ( Mounth 6 or 7 or 8 ) but the problem is that in the database table (bkpf) we have an entire date (DD/MM/YYYY) , how to do to make a select and the parameter of month selection is the number of the mounth.
thank you.
‎2008 Sep 12 10:09 AM
hi,
there are two ways to go:
1. convert the month to dates (I hope you have year as well), you can use FMs FIRST_DAY_IN_PERIOD_GET and LAST_DAY_IN_PERIOD_GET.
2. use field MONAT (which stands for month) form table BKPF
hope this helps
ec
‎2008 Sep 12 10:10 AM
IN PARAMETERS TAKE 2 CHAR..
THEN WHILE VALIDATING TAKE ENTIRE DATE
THEN USE LIKE THIS TO GET MONTH
DATE3(2)
‎2008 Sep 12 10:10 AM
hi,
bring the date from database and use the OFFSET to get the month
month = date+4(2).
and you have the number of the month
regards
prasanth
‎2008 Sep 12 10:10 AM
Hi,
Try this way
Parameters:p_month(2) type c.
Data:w_date type sy-datum.
Concatenate '%' p_month '%' into w_date.
Select * from BKPF into table itab where date like w_date.
Regards,
Sujit
‎2008 Sep 12 10:12 AM
for each month selected put de first date of the month and the last day of the month in a range with BETWEEN. Use the range in the where clause of the select.
Best Regards
Guido
Edited by: G. Bouman on Sep 12, 2008 11:12 AM
‎2008 Sep 12 10:14 AM
Hi,
Just select all by other criteria as "fetch".
LOOP AT itab.
IF itab-date+4(2) NE parameter_date.
DELETE itab.
ENDIF.
ENDLOOP.
Regards,
Alin.
‎2008 Sep 12 10:14 AM
Hi,
we ca use the offset concept to find the month and store in some other variable.
example:
date is dd/mm/yyyy.
then var1 = date+0(3).
this will give month.
thanx.
‎2008 Nov 05 4:24 PM
‎2008 Nov 05 4:37 PM
‎2008 Nov 05 4:41 PM
‎2008 Nov 05 4:44 PM
>
> no answer.
> i've received no response
I think this is the joke of the year... you got eigth answers...
‎2008 Nov 05 4:56 PM
Actually he meant :
i've received no(Nine in hindi) response
I think this is the joke for the seconds... he got no(Nine) answers now(including mine)...;-)
Cheers