Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • avatar image
    Former Member
    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 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

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded

  • 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 comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 16, 2007 at 07:25 AM

    Hi,

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

    Regards,

    Aravind

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    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 comment
    10|10000 characters needed characters exceeded