2007 Mar 16 8:37 AM
hi all experts,I met a problem about date format.
I created a select-option refer to VBEP-EDATU(char 10), but I hope to set the display format as YYYY/(.)MM or MM/(.)YYYY.just like selecting the Month planning period in T-code :MD61
How to realize it ?
thanks in advance.
regrads.
2007 Mar 16 8:54 AM
Execute the code
data : yrmon type spmon .
select-options : s_date for yrmon.
initialization.
yrmon = sy-datum+0(6).
s_date-low = yrmon.
append s_Date.
Regards,
Vijay
2007 Mar 16 8:42 AM
2007 Mar 16 8:42 AM
2007 Mar 16 8:49 AM
Hi,
Create CONVERSION EXIT for the field " VBEP-EDATU ",at domain.
You can get your desired format that for the particular field that your looking for,
like YYYY..MM or MM.YYYY.
You do it using this CONVERSION EXITS.
<b>Reward,if helpful.</b>
Regards,
V.Raghavender.
2007 Mar 16 8:53 AM
Hi Lin,
Split the string,
DAta : yr type char4,
mnt type char2,
day type char2.
yr = vbep-edatu+0(4).
mnt = vbep-edatu+4(2).
Concatenate yr mnt day into t_date separated by '/' .
Rgds,
Jothi.P
2007 Mar 16 8:54 AM
Execute the code
data : yrmon type spmon .
select-options : s_date for yrmon.
initialization.
yrmon = sy-datum+0(6).
s_date-low = yrmon.
append s_Date.
Regards,
Vijay
2007 Mar 16 9:25 AM
EDATU
10.08.2006
11.08.2006
10.08.2006
11.08.2006
11.08.2006
11.08.2006
It will come in the format as specified in your user profile. (USR01 table)
Use the date format in the USR01 table and based on that write logic to display DATE in your desire format.