Skip to Content
author's profile photo Former Member
Former Member

SmartForms

How can we change the format of the date from mm/dd/yyyy to dd-mmm-yyyy in SmartForms?

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

6 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2008 at 07:16 AM

    hi,

    create a program line where ur passging the date ,and use concatenate statement and display....

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2008 at 07:18 AM

    Hi mayank,

    You can write the code fo this one in the Flow logic --> program lines, In the Program line, just write this lines.

    Lets say your date field id G_date.

    Data: L_date type sy-datum.

    Data: C_date(10) type C.

    Move G_Date to L_Date.

    Write L_date to C_Date.

    So, here the C_Date field will have the user format date.

    Regards

    Nikunj shah

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2008 at 07:38 AM

    Hi,

    data: v_date(10) TYPE c, '' declared by global

    l_date(10) TYPE c,

    I_FINAL-DATE = 07/17/2008.

    write below code in program logic

    move I_FINAL-DATE TO v_date.

    concatenate v_date3(2) '-' v_date0(2) '-' v_date+6(4) INTO l_date.

    in text elements write &l_date&.

    if help ful reward points

    Regards,

    Bhupal

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 17, 2008 at 08:43 AM

    Hi

    for this i ve a code snippet which will help u

    DATA: l_wa_month TYPE ty_month.

    v_creation_date = sy-datum+4(2).

    IF v_creation_date IS NOT INITIAL.

    *Read internal table it_month for the month in numeric form to the month

    *in text form

    READ TABLE it_month INTO l_wa_month WITH KEY

    mnr = v_creation_date.

    IF sy-subrc = 0.

    CLEAR v_creation_date.

    CONCATENATE sy-datum+6(2)

    l_wa_month-ltx

    INTO v_creation_date

    SEPARATED BY v_slash.

    CONDENSE v_creation_date.

    CONCATENATE v_creation_date

    v_slash

    INTO v_creation_date.

    CONCATENATE v_creation_date

    sy-datum(4)

    INTO v_creation_date.

    CONDENSE v_creation_date.

    ENDIF.

    ENDIF.

    regards

    palak

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jul 23, 2008 at 12:42 PM

    We need to make sure that all dates are printed in the format DD-MMM-YYYY where MMM is a description (ie Jan, Feb, Mar, etc)

    Use the SET DATE MASK In order to get this done.

    Example:

    /: SET DATE MASK = 'DD- MMM-YYYY'

    &DATE&

    To get the abbreviated and full forms of the names of the months are stored in the language dependent TTDTG table under the following keys

    u2022 %%SAPSCRIPT_MMM_mm: abbreviated month name

    This gives month in MMM format u2013 example u2013 JUN

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jul 23, 2008 at 05:34 PM

    Hi.

    Please note that SDN has a well structured list of different forums. Always use the forum best matching to your question. Here you are in the ABAP general forum. This forum's topic are questions regarding ABAP that are not subject of one of the other more specialized forums. As your posting is not in the proper forum this thread will be locked.

    Best regards,

    Jan Stallkamp

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.