cancel
Showing results for 
Search instead for 
Did you mean: 

Can i make a program for calender

Former Member
0 Kudos

can i make a program for calender actually i have to run a calender logic and select the date and modify them with some value.

I just need to ask is there any function module that runs a calender logic by picking the input date .

Eg if i put a input date say 03.04.2005 the program then automatically run for all the date of that month and year, i mean i can get the all the dates for that month and year...

Please help

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mave,

If your requirement is to get all the days between two dates then you can use this fm DAY_ATTRIBUTES_GET.

for ex, if the date is 03.04.2005 then you can specify

it <b>date_from</b> importing parameter and specify last day of the year in the <b>date_to</b> parameter.

Then it will give back all the days between these two dates in the internal table <b>day_attributes</b>.

You can loop at this table and then do whatever you are required to do..

Sri

Former Member
0 Kudos

what should be the structure for the internal tables.

Now i have given you 10 points.

Anyway thanks a lot.

Regards

mave

athavanraja
Active Contributor
0 Kudos

the internal table for day attributes should be declared as below.

data: itab_day_attributes type standard table of CASDAYATTR .

how to find what should be the type of the itab/variable to be passed to a FM.

go to transaction SE37 to view the definition of the function and see whats the referece variable used.

Hope this helps.

Regards

Raja

Former Member
0 Kudos

why don't you use where used list button

there are at least 12 programs where this FM is used

regards

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Mave ,

If you want an internal table with the dates of the month

just try this -- . Instead of sy-datum you can pass any date and see the output .

parameters Pdate like sy-datum.

data : begin of itab occurs 0 ,

date like sy-datum,

end of itab.

Data Month(2) type N.

itab-date = pdate.

itab-date+6(02) = 01.

month = itab+4(2).

do .

if itab+4(2) NE month.

exit.

endif.

append itab .

itab-date = itab-date + 1.

enddo.

loop at itab.

write 😕 itab-date.

endloop.

Former Member
0 Kudos

Hi,

See if you can us FM - DAY_ATTRIBUTES_GET

Sri

Former Member
0 Kudos

what is this funtion for?

Former Member
0 Kudos

"i mean i can get the all the dates for that month and year..."

if you requirement is to get the dates then you can use this fm..

Former Member
0 Kudos

hi sri,

i have given you points now tell me how to use it.

Regards

mave

Former Member
0 Kudos

what should i use the for the day attributes in the function.

Regards

mave