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: 

about date Format

former_member294729
Participant
0 Kudos
145

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

Former Member
0 Kudos
72

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

amit_khare
Active Contributor
0 Kudos
72

Check this thread -

Regards,

Amit

Reward all helpful replies.

Former Member
0 Kudos
72

Hi,

Use "Edit Mask" and try it.

Regards,

Ravi

Former Member
0 Kudos
72

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.

Former Member
0 Kudos
72

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

Former Member
0 Kudos
73

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

Former Member
0 Kudos
72

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.