on 08-15-2008 4:04 PM
how to convert date format,
from DD.MM.YYYY i.e. (07.08.2008)
to DD-MMM-YYYY i.e. (07-AUG-2008) , in smartforms.
select single fkdat from
vbrk into INVOICE_DATE
where vbeln = invoice_no.
case invoice_date+4(2).
WHEN '01'.
month = 'January'.
WHEN '02'.
month = 'February'.
WHEN '03'.
month = 'March'.
WHEN '04'.
month = 'April'.
WHEN '05'.
month = 'May'.
WHEN '06'.
month = 'June'.
WHEN '07'.
month = 'July'.
WHEN '08'.
month = 'August'.
WHEN '09'.
month = 'September'.
WHEN '10'.
month = 'October'.
WHEN '11'.
month = 'November'.
WHEN '12'.
month = 'December'.
WHEN OTHERS.
ENDCASE.
CONCATENATE month invoice_date6(2) ',' invoice_date0(4)
INTO datum_text SEPARATED BY space.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
DATA: ZTEMP(9),ZMONTH(15), ZDD(2), ZMMM(15),ZYYYY(4),
INPUTDATE TYPE SY-DATUM VALUE '20080101'.
DATA field(8) TYPE c.
CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.
CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
EXPORTING
INPUT = sy-datum
IMPORTING
OUTPUT = ZTEMP.
ZDD = ZTEMP+3(2).
ZMMM = ZTEMP+0(3).
ZYYYY = ZTEMP+5(4).
CASE ZMMM.
WHEN 'JAN'.
ZMONTH = 'JAN'.
WHEN 'FEB'.
ZMONTH = 'FEB'.
WHEN 'MAR'.
ZMONTH = 'MAR'.
WHEN 'APR'.
ZMONTH = 'APR'.
WHEN 'MAY'.
ZMONTH = 'MAY'.
WHEN 'JUN'.
ZMONTH = 'JUN'.
WHEN 'JUL'.
ZMONTH = 'JUL'.
WHEN 'AUG'.
ZMONTH = 'AUG'.
WHEN 'SEP'.
ZMONTH = 'SEP'.
WHEN 'OCT'.
ZMONTH = 'OCT'.
WHEN 'NOV'.
ZMONTH = 'NOV'.
WHEN 'DEC'
ZMONTH = 'DEC'.
ENDCASE.
concatenate ZDD ' - ' ZMONTH ' - ' ZYYYY into ZDATE.
Regards
vachana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try either one of this two.
/: SET DATE MASK = 'MMMM DD, YYYY'
OR
USe FM CONVERT_DATE_TO_EXTERNAL
Rgds,
SaiRam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
To covert the month to its name please use program lines to get the name of the month in a variable of type FCLTX declared in the global definitions.
in the program lines write...
SELECT SINGLE ltx FROM t247
INTO invoice_month_long
WHERE spras = nast-spras
AND mnr = date+4(2).
then in the text node
print with offset
&invoice_month_long+0(3)&
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Use offsets like below.
&date6(2)& - &date4(2)& - &date+0(4)&
Regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.