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

changing date format in smartforms

hello abapers,

could any one tell me the procedure how to change the date format in smartforms.thanks in advance...

regards,

santosh

Add a comment
10|10000 characters needed characters exceeded

Related questions

5 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Jan 11, 2007 at 02:19 PM

    HI,

    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

    Sudheer

    Add a comment
    10|10000 characters needed characters exceeded

    • Hi,

      In most print programs there is a function module called as below.

      By setting the export parameter PI_COUNTRY one can set the form to print all dates according to country without any further coding.

      CALL FUNCTION 'WFMC_PREPARE_SMART_FORM'

      EXPORTING

      PI_NAST = NAST

      PI_COUNTRY = IS_DLV-LAND

      PI_ADDR_KEY = IS_ADDR_KEY

      PI_REPID = LF_REPID

      PI_SCREEN = XSCREEN

      IMPORTING

      PE_RETURNCODE = CF_RETCODE

      PE_ITCPO = LS_ITCPO

      PE_DEVICE = LF_DEVICE

      PE_RECIPIENT = CS_RECIPIENT

      PE_SENDER = CS_SENDER.

      If your problem is solved please set the question as answered.

      Kind Regards,

      Marius

  • author's profile photo Former Member
    Former Member
    Posted on Jan 12, 2007 at 09:00 AM

    CONCATENATE sy-datum+6(2) text-035

    sy-datum+4(2) text-035

    sy-datum(4) INTO wa.

    this may work...

    U can write the coding in the initalization...........

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Jan 12, 2007 at 09:04 AM

    Hi,

    Create program lines by clicking the node.

    Use concatenate statement to change the format.Give the date variable as input parameter and the modified date variable as export parameter.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 07:25 AM

    Hi,

    Use SET COUNTRY-KEY keyword. I think it will work.

    Regards,

    Aravind

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Jan 16, 2007 at 01:49 PM

    Hi

    You need to write code in program lines , it will totally depend on which format u want.

    you need to fetch the same format from sy-datum and conctenate into one variable.

    Please try u will get any format.

    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.