‎2008 May 07 11:28 AM
Hi,
I am doing one report. In selection screen i have given the company code , month, year.My requirement is based on the month & year it should display the sales document number generated in that month & year. That means it should generate whole month sales document numbers (ie. starting from 1st to 30 or 31st). Can anyone help me for this. I dont know how to write code for this.
‎2008 May 07 11:31 AM
HI,
Use this FM 'PERIOD_DAY_DETERMINE' and pass fiscal year, month and period then it will return first day in month and last day in month. Using these both you can find the sales orders.
Rgds,
Bujji
‎2008 May 07 11:31 AM
HI,
Use this FM 'PERIOD_DAY_DETERMINE' and pass fiscal year, month and period then it will return first day in month and last day in month. Using these both you can find the sales orders.
Rgds,
Bujji
‎2008 May 07 11:34 AM
‎2008 May 07 11:38 AM
Hi,
u cannot use it directly in select statement.
check the condition in select...endselect like below.
tables:vbak.
PARAMETERS:mon1(2),year1(4),mon2(2),year2(4).
select * from vbak.
IF vbak-erdat+4(2) > mon1 and vbak-erdat+4(2) < mon2 and
vbak-erdat(4) > year1 and vbak-erdat(4) < year2.
"your code
ENDIF.
ENDSELECT.
rgds,
bharat.
‎2008 May 07 11:50 AM
hi use this code:
if u have ccode, month and year field than use this quiry:
select * from vbak into table itab where erdat4(2) eq month and erdat0(4) eq year.
if you r giving date as parameter then first u have to get month and year. like this.
month = date+4(2).
year = date+0(2).
now use same query.
reward if useful.
‎2008 May 07 11:52 AM
Hi Hima ,
can u send me the default date setting u have.
i.e how your date is stored either in ddmmyyy or mmddyy.
or yyyyddmm.
i will send coding if you can send me the details.
Pls reward points if found helpful.
Thanks and regards,
Rajeshwar.