‎2008 Aug 23 2:06 PM
Hello
Please can someone explain me what does this line mean
l_txt4 = syst-datum(4).
l_period = syst-datum+4(2).
Now what i want to understand is for eg.
i have a date 22.08.2008.this is the system date.
if i only want to pick up the period from this(08) or if i only want to pic up the year from this. How will i give the statement.
I hope it makes sense to you..
thanks
‎2008 Aug 23 2:31 PM
Well, that exactly what this statement does:
l_txt4 = syst-datum(4).
l_period = syst-datum+4(2).
The date is represented as follows in SAP: yyyymmd, for example: 21.08.2008 = 20080821.
So when you want to have the year use this:
lv_year = sy-datum+0(4).
Month:
lv_month = sy-datum+4(2).
etc.
‎2008 Aug 23 2:31 PM
Well, that exactly what this statement does:
l_txt4 = syst-datum(4).
l_period = syst-datum+4(2).
The date is represented as follows in SAP: yyyymmd, for example: 21.08.2008 = 20080821.
So when you want to have the year use this:
lv_year = sy-datum+0(4).
Month:
lv_month = sy-datum+4(2).
etc.