Skip to Content
author's profile photo Former Member
Former Member

first date

Hi all,

Is there any function module to find the first date of the month by taking the input date...

I.e. if i give 15/10/2007 as input date it should convert the date as 1/10/2007.

Thanks in advance,

Karthi.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 06:45 AM

    Hi

    Use the FM HR_JP_MONTH_BEGIN_END_DATE.

    CALL FUNCTION 'HR_JP_MONTH_BEGIN_END_DATE'

    EXPORTING

    iv_date = sy-datum

    IMPORTING

    EV_MONTH_BEGIN_DATE = f_date

    EV_MONTH_END_DATE = l_date.

    regards

    karthik,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 06:48 AM

    Hi,

    parameters:

    p_date like sy-datum.

    w_date = p_date+4(2).

    w_date = p_date - w_date.

    this is the logic for the first date of the given month.

    i guess u can create the function module on ur own.

    reward points if it helps.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 06:50 AM

    Hi

    Please also check CK_F_GET_FIRST_DAY_OF_DATE

    Regards

    Arun

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 08:11 AM

    Hi,

    try with isb_get_first_day.

    test this module with date in format dd.mm.yyyy.

    nperanz = 1.

    periv = 22.

    if u want to calculate it urself then do this.

    data dd(2) type n,

    mm(2) type n,

    year(4) type n.

    data final_date(11) type c.

    suppose date = 12/3/2007.

    then do this.

    split date at '/' into dd mm year.

    concatenate '01' mm year into final_date separated by '/'.

    hope this helps.

    reward if useful.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Nov 22, 2007 at 08:28 AM

    Hi it is simple,

    data: date type sy-datum.

    date = sy-datum.

    write:/ date..

    date+6(2) = '01'.

    write:/ date.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Nov 22, 2007 at 08:36 AM

    Hi,

    Better to hard code 1st date n to find last day use FM

    RP_LAST_DAY_OF_MONTH

    \Regards,

    Prashant

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.