2014 Sep 30 7:12 AM
Hi All,
I am currently working on smartform development. In my smartform,the month in date format should be display as character, date and year should be in number format..for example , 06.05.2013 should be display as May 06,2013. How can I acheive this?
2014 Sep 30 8:35 AM
Hi Ganesh,
Try this too,
DATA: v_output(11),
v_fin(11).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
input = '20130506'
IMPORTING
OUTPUT = v_output
.
CONCATENATE v_output+4(3) v_output+0(2) ',' v_output+8(4) INTO v_fin.
Regards
Anoop
Hi All,
I am currently working on smartform development. In my smartform,the month in date format should be display as character, date and year should be in number format..for example , 06.05.2013 should be display as May 06,2013. How can I acheive this?
2014 Sep 30 7:25 AM
Hi Ganesh,
You can use these function modules to get the month name
ISP_GET_MONTH_NAME
MONTH_NAMES_GET
or you can use this function module
DATA : l_begda(60) TYPE c,
CALL FUNCTION 'CONVERSION_EXIT_SDATE_OUTPUT'
EXPORTING
input = pn-begda
IMPORTING
output = l_begda.
you can pass it through your driver program to smartform .
Regards
Arun VS
2014 Sep 30 7:31 AM
I don't think there is super silver bullet which can achieve your goal. If I were you , I would create a specify function for it.
It's very simple.
Suppose, the import parameters is our 'DATE" type (name: d_in) and export parameters is string (name:output).
CASE d_in+2(2).
WHEN '01'.
output = 'Jan'.
WHEN '02'.
output = 'Feb'.
.
.
WHNE '12'.
output = 'Dec'.
ENDCASE.
CONCATENATE output d_in+0(2) ',' d_in+4(4) INTO output SEPARATED BY space.
2014 Sep 30 7:35 AM
I assume myself, that my knowledge is very narrow right now, this is what I'm going to do.
2014 Sep 30 8:00 AM
HI Ganesh,
DATA : l_date(11) TYPE c,
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
input = sy-datum
IMPORTING
output = l_date.
concatenate l_date+2(3) space l_date(2) ',' l_date+5(4) into l_date.
2014 Sep 30 8:19 AM
Hi Ganesh,
Hope it help full.
Pass the month to t247 table to get the corresponding long text and short text of month Description.
Eg:
SELECT SINGLE ktx FROM t247 INTO t247-ktx WHERE spras EQ sy-langu AND MNR = lv_date+04(02).
CONCATENATE lv_date+06(02) t247-ktx lv_date(04) INTO lv_sysdat SEPARATED BY '-'.
Regards,
Venkat.
2014 Sep 30 8:20 AM
Dear
you can follow the link
Changing Date Format in Smartforms [SOLVED] - Toolbox for IT Groups
Regards
2014 Sep 30 8:35 AM
Hi Ganesh,
Try this too,
DATA: v_output(11),
v_fin(11).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
input = '20130506'
IMPORTING
OUTPUT = v_output
.
CONCATENATE v_output+4(3) v_output+0(2) ',' v_output+8(4) INTO v_fin.
Regards
Anoop
2014 Sep 30 8:58 AM
Hi Ganesh,
Currently in your code, how the date is being dispalyed? I mean to say in which format?
Thanks & Regards,
Swati
2014 Sep 30 9:40 AM
The exit CONVERSION_EXIT_LDATE_OUTPUT should help you in achieving the requirement.
Regards,
Satish
2014 Sep 30 11:29 AM
Hi Ganesh,
Use FM : CONVERSION_EXIT_LDATE_OUTPUT
Regards,
Pankaj
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |