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

about date Format

former_member294729
Participant
0 Likes
1,024

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.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
951

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

6 REPLIES 6
Read only

amit_khare
Active Contributor
0 Likes
951

Check this thread -

Regards,

Amit

Reward all helpful replies.

Read only

Former Member
0 Likes
951

Hi,

Use "Edit Mask" and try it.

Regards,

Ravi

Read only

Former Member
0 Likes
951

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.

Read only

Former Member
0 Likes
951

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

Read only

Former Member
0 Likes
952

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

Read only

Former Member
0 Likes
951

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.