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

to extend SAP user date and to add months to the current date

Hi All,

I need to extent the user date in SAP based on one condition.

If the condition is true extend the date by 12 monthd if false 6 months from the current date.

Can i have the FM for user date extentions and FM for getting the date.

Thanks,

Chandu.

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

8 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:24 AM

    Hi ,

    You can use this FM for exteding the date.

    CALL FUNCTION 'BAPI_USER_CHANGE'

    EXPORTING

    username = us_username

    logondata = e_bapilogond

    logondatax = e_bapilogondx

    TABLES

    return = i_return.

    u need to pass date and correspoing flag also.

    For extension of the date by months u can use this FM.

    CALL FUNCTION 'MONTH_PLUS_DETERMINE'

    EXPORTING

    months = 6 or 12 ( depending up on ur logic)

    olddate = sy-datum

    IMPORTING

    newdate = us_expdate.

    Thanks and regards.

    Sham

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:23 AM

    Hi Chandu,

    Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

    Regards,

    Babul.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Aug 27, 2009 at 07:24 AM

    Hi,

    You can get user details including valid date using BAPI_USER_GET_DETAIL. Just pass user id and you will receive all the details. You can change the dates using BAPI_USER_CHANGE. Do not forget to pass X in logondatax parameter along with date in LOGONDATA.

    KR Jaideep,

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:23 AM

    Hi Chandu,

    Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

    Regards,

    Babul.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:24 AM

    Hi Chandu,

    Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

    Regards,

    Babul.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:24 AM

    Hi Chandu,

    Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

    Regards,

    Babul.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:24 AM

    Hi Chandu,

    Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

    Regards,

    Babul.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Aug 27, 2009 at 07:24 AM

    Hi ,

    You can use this FM for exteding the date.

    CALL FUNCTION 'BAPI_USER_CHANGE'

    EXPORTING

    username = us_username

    logondata = e_bapilogond

    logondatax = e_bapilogondx

    TABLES

    return = i_return.

    u need to pass date and correspoing flag also.

    For extension of the date by months u can use this FM.

    CALL FUNCTION 'MONTH_PLUS_DETERMINE'

    EXPORTING

    months = 6 or 12 ( depending up on ur logic)

    olddate = sy-datum

    IMPORTING

    newdate = us_expdate.

    Thanks and regards.

    Sham

    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.