Skip to Content
0
Former Member
Feb 08, 2009 at 07:54 AM

Date formatting

19 Views

Hi Gurus,

I am using a variable to capture the data for Current month(Minus) 3,like the one shown below, my problem is now when i am pulling the data for last year i.e i want for 11th month from this month i get the below value for t-moth (1-/08/2009)

in debugging mode and my select query is failing. Could you help me in getting the correct month stored in the variable. Thanks in advance

DATA : v_year(4) TYPE c,

v_mon(2) TYPE c,

v_day(2) TYPE c,

t_month(10) type c.

v_year = sy-datum+0(4).

v_mon = sy-datum+4(2) - 3.

v_day = sy-datum+6(2).

CONCATENATE v_mon'/' v_day'/' v_year INTO t_month.

Best Regards

Meenakshi