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: 

WANT BEFORE MONTH DATE

vallamuthu_madheswaran2
Active Contributor
0 Kudos

Hi friends,

I want to get the opening balance amount for particular G/L a/c

in selection screen i am using date field s_budat.

now i want to get the before month amount. how to get before month & date.

Thanks & Regards,

Vallamuthu

1 ACCEPTED SOLUTION

Former Member
0 Kudos

then previous month = month - 1.

**Reward points if it was helpful**

Message was edited by:

Shibu David

5 REPLIES 5

Former Member
0 Kudos

Just split the current date like

year = sy-datum+0(4).

month = sy-datum+4(2).

date = sy-datum+6(2).

0 Kudos

Hi,

try:

L_DATE = SY-DATLO.

MOVE '01' TO L_DATE+6(2).

L_DATE = L_DATE - 1.

prev_mth = L_DATE+4(2).

A.

Former Member
0 Kudos

then previous month = month - 1.

**Reward points if it was helpful**

Message was edited by:

Shibu David

andreas_mann3
Active Contributor
0 Kudos

Hi,

or :

zdate = sy-datum - sy-datum+6(2).

write / zdate+4(2).

A.

Former Member
0 Kudos

Hi Vallamathu,

Use the Function module 'CCM_GO_BACK_MONTHS' ...

when u execute this function module give the Date (which date u need) and the number of months you need to go back as input parameter.... it will give u that previous date..

Use this it is really helpful and easy when u compare using offsets

If u find it is helpfull plz reward points .

Regards

Kali Pramod