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

Regarding Function module: function module change numeric to text

Former Member
0 Likes
369

Hi ,

can any help me what is the function module used for : function module change numeric to text

suppose:

if i give :

Input: 11/12/2007

Output: 11 December 2007

What is the FM used for same?

Plz help me out

2 REPLIES 2
Read only

Former Member
0 Likes
347

I'm not sure if there is a FM that will directly change Your date to the right format but You can write simple code to do this:

DATA: lv_subrc LIKE sy-subrc,
      lt_month TYPE TABLE OF t247,
      ls_month TYPE t247,
      lv_odate TYPE string,
      lv_ndate TYPE string,
      lv_char1 TYPE char1.


lv_odate = '11/12/2007'.

CALL FUNCTION 'MONTH_NAMES_GET'
  EXPORTING
    language              = sy-langu
  IMPORTING
    return_code           = lv_subrc
  TABLES
    month_names           = lt_month
  EXCEPTIONS
    month_names_not_found = 1
    OTHERS                = 2.
IF sy-subrc = 0.
  LOOP AT lt_month INTO ls_month WHERE mnr = lv_odate+3(2).
    CONCATENATE lv_odate(2) ls_month-ltx lv_odate+6(4) INTO lv_ndate SEPARATED BY lv_char1.
  ENDLOOP.
ELSE.
* MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
*         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

Read only

0 Likes
347

Hi can u tell me is there any standard function module for this problem ,

plz help me .