Application Development and Automation 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: 
Read only

function module HR_PSD_DATES_ADD_MONTHS

former_member632991
Active Contributor
0 Likes
947

hi ,

while using

call function 'HR_PSD_DATES_ADD_MONTHS'

exporting

v_date = itab2-rrdate

v_months = 12

importing

e_date = var_wpsd

  • EXCEPTIONS

  • NOT_POSITIVE = 1

  • OTHERS = 2

.

if sy-subrc <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

endif.

var_wpsd is not giving correct value

it is declared of the type e_date

plz help its very very urgent

6 REPLIES 6
Read only

Former Member
0 Likes
789

Hi,

In debug mode, check the format of itab2-rrdate, is it in teh form YYYYMMDD,

and also try giving 12 within quotes '12'.

Regards

Subramanian

Read only

0 Likes
789

THNX A LOT

Read only

0 Likes
789

hi,

pls mark all useful answers.

Regards

Anver

Read only

Former Member
0 Likes
789

i think this fm will give you the last day of month after addind with the date.

check this fm MONTH_PLUS_DETERMINE whether it solves your problem or not?

regards

shiba dutta

Read only

Former Member
0 Likes
789

Hi,

You can also use 'MONTHS_PLUS_DETERMINE' to derive the date.

Pass positive value to add months and negative value to deduct months.

Regards

Subramanian

Read only

anversha_s
Active Contributor
0 Likes
789

hi,

try this.

data : wa_date type sy-datum.
 
call function 'RP_CALC_DATE_IN_INTERVAL'
exporting
date = sy-datum
days = 0 
months = 12 --------------------> give ur required month
years = 0
signum = '+'
importing
calc_date = wa_date.
 
write :/ wa_date. -> new date

Note

signum = '+' "

signum = '-' "

Regards

Anver