on 01-11-2008 10:26 AM
Hi Experts,
I have a variable(gv_date) in which i get date in the following format
20.12.2007.
But i need to get it printed in the
20 December 2007
Hi karthick,
Check this code.It might be of use.
DATA: v_date TYPE string.
CASE p_date+4(2).
WHEN 01.
CONCATENATE 'January' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 02.
CONCATENATE 'Febuary' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 03.
CONCATENATE 'March' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 04.
CONCATENATE 'April' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 05.
CONCATENATE 'May' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 06.
CONCATENATE 'June' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 07.
CONCATENATE 'July' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 08.
CONCATENATE 'August' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 09.
CONCATENATE 'September' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 10.
CONCATENATE 'October' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 11.
CONCATENATE 'November' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 12.
CONCATENATE 'December' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
ENDCASE.
WRITE:/ v_date.
Or else check this code:
DATA V_MONTH(11).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
INPUT = SY-DATUM
IMPORTING
OUTPUT = V_MONTH.
WRITE:/ 'CURRENT MONTH IN WORDS:', V_MONTH+3(8).[/code]
Reward if useful
thanks
swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi karthick,
Check this code.It might be of use.
DATA: v_date TYPE string.
CASE p_date+4(2).
WHEN 01.
CONCATENATE 'January' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 02.
CONCATENATE 'Febuary' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 03.
CONCATENATE 'March' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 04.
CONCATENATE 'April' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 05.
CONCATENATE 'May' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 06.
CONCATENATE 'June' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 07.
CONCATENATE 'July' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 08.
CONCATENATE 'August' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 09.
CONCATENATE 'September' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 10.
CONCATENATE 'October' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 11.
CONCATENATE 'November' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
WHEN 12.
CONCATENATE 'December' p_date+6(2) 'th,' p_date(4)
INTO v_date SEPARATED BY space.
ENDCASE.
WRITE:/ v_date.
Or else check this code:
DATA V_MONTH(11).
CALL FUNCTION 'CONVERSION_EXIT_LDATE_OUTPUT'
EXPORTING
INPUT = SY-DATUM
IMPORTING
OUTPUT = V_MONTH.
WRITE:/ 'CURRENT MONTH IN WORDS:', V_MONTH+3(8).[/code]
Reward if usefull.
Regards,
Kashyap Ivaturi
Edited by: Kashyap Ivaturi on Jan 11, 2008 11:37 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The language dependent names of the months are stored in table T015M, so you'll need to write some ABAP to take the month part of your date and the logon language to read the table. Then combine that with the day and year into a new variable.
As you don't say whether you're using SAPscript, Smartforms or Adobe forms I can't be more specific.
Regards,
Nick
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.