Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos
361

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.

1 ACCEPTED SOLUTION

Former Member
0 Kudos
153

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

8 REPLIES 8

Former Member
0 Kudos
153

Hi Chandu,

Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

Regards,

Babul.

Former Member
0 Kudos
153

Hi Chandu,

Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

Regards,

Babul.

Former Member
0 Kudos
153

Hi Chandu,

Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

Regards,

Babul.

jaideepsharma
Active Contributor
0 Kudos
153

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,

Former Member
0 Kudos
153

Hi Chandu,

Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

Regards,

Babul.

Former Member
0 Kudos
153

Hi Chandu,

Please check BAPI_USER_CHANGE & BAPI_USER_GET_DETAIL.

Regards,

Babul.

Former Member
0 Kudos
154

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

Former Member
0 Kudos
153

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