|
Suppose a date is given in the format 20050428 how to
get the output in the format 28th Apr 2005.
FORM set_text_date. DATA: month(9),
CASE p_frd+4(2). WHEN '01'.
WHEN '02'.
WHEN '03'.
WHEN '04'.
WHEN '05'.
WHEN '06'.
WHEN '07'.
WHEN '08'.
WHEN '09'.
WHEN '10'.
WHEN '11'.
WHEN '12'.
WHEN OTHERS. ENDCASE. WRITE p_frd+0(4) TO year. WRITE p_frd+6(2) TO date. CONCATENATE month date ',' year INTO return_date SEPARATED BY space. CONDENSE return_date. ENDFORM. ABAP Tips by : Kiran Currently my date is getting printed in format 05262005.
Code: This code yields as 12 march 2006. DATA: ZTEMP(9). CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY. CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'
ZDD = ZTEMP+3(2).
ABAP Tips by : Sujana |
|
Fast Links:
Get help for your ABAP problems
SAP Books
More ABAP Tips
SAP Basis, ABAP Programming and Other IMG Stuff http://www.erpgreat.com All the site contents are Copyright © www.erpgreat.com
and the content authors. All rights reserved.
|