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

Date Format

Former Member
0 Likes
577

Hi Experts,

I hope you know if we put Date in WEBUI it will give selection as MONTH,DATE AND YEAR.

Now My Requirement is I want to show in UI only Month and Year for selection ,Date should not appear.

Can any body give inputs

4 REPLIES 4
Read only

Former Member
0 Likes
539

Hi Ram,

You can do it by assigning the date to a char variable with a datatype char6.

I tried it like this.


data: v_date type sy-datum,
         v_dat type char6.

v_date = sy-datum.
v_dat = v_date.
WRITE: / v_dat .

This code will truncate the date and you will get the output as yyyymm.

Hope this is helpful.

Cheers,

Vivek.

Read only

0 Likes
539

HI Vivek,

Thanks for reply.

BUt that approach will not give popup for dateselection in WEBUI.

do u have anyother inputs

Read only

0 Likes
539

Hi,

You can create your own search help or discuss with FI consultant for report name which contain such kind of input help, I think there are may report in FI used such kind of input.

If you are using the web dynpro you have to define the OVS (Object value selector) for input search help

Kind Rgds

Read only

prakashjasti
Contributor
0 Likes
539

data : mf_monat(6) type n,

p_date_low type sy-datum,

p_date_high type sy-datum.

selection-screen begin of block b1 with frame title text-001.

parameters : p_werks type t001w-werks obligatory,

p_mon type s031-spmon obligatory.

selection-screen end of block b1.

at selection-screen output.

at selection-screen.

at selection-screen on value-request for p_mon.

move sy-datum to mf_monat.

call function 'POPUP_TO_SELECT_MONTH'

exporting

actual_month = mf_monat

importing

selected_month = mf_monat

exceptions

factory_calendar_not_found = 1

holiday_calendar_not_found = 2

month_not_found = 3

others = 4.

if sy-subrc <> 0.

message id sy-msgid type sy-msgty number sy-msgno

with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.

endif.

move mf_monat to p_mon.

form get_data .

move p_mon to p_date_low+0(6).

Prakash J