Date Format

ASSY, SOSTHENE s.assy at afdb.org
Sun Jun 8 11:01:37 EDT 2003


You can read user profile using table USR01.
You can format the date according to the user profile.
THis is an example. In your method, write ABAP code to retrive user profile.
 
Don't hesitate if you need help
 
FORM CONVERT-DATE.
 
  SELECT SINGLE * FROM USR01 WHERE BNAME = SY-UNAME.
  CASE USR01-DATFM.
   WHEN '1' OR '2' OR '3'.   "JJ.MM.AAAA
     WA_JJ    = SY-DATUM(2).
     WA_MM    = SY-DATUM+2(2).
     WA_AAAA  = SY-DATUM+4(4).
   WHEN '4' OR '5' OR '6'.  " AAAA.MM.JJ
      WA_JJ    = SY-DATUM+6(2).
      WA_MM    = SY-DATUM+4(2).
      WA_AAAA  = SY-DATUM(4).
     ENDCASE.
ENDFORM.
 
-----Original Message-----
From: Norris, Susie [mailto:Susie.Norris at sabre-holdings.com]
Sent: Friday, June 06, 2003 8:28 PM
To: SAP-WUG at MITVMA.MIT.EDU
Subject: Date Format
 
 
                Dear Workflow-ers,
 
                We are using SAP version 46.c.  We trigger workflows from
SAP system status changes on  Project System network activities. One of our
custom WS  tasks uses a method/function module to retrieve a date field  and
return the date field to the task and workflow container and then on to a
second task.  The date field is defined as a date field from a SAP table.
The second task displays the date field  in the text title of the user's
SAP inbox message. The date format appears in the format DD.MM.YYYY.
                WF-Batch is user type system and date format of DD.MM.YYYY.
The user profile defaults involved in the WF are set to date format
MM/DD/YYYY.  To get the date to display in the MM/DD/YYYY format we had to
change the date field to a char 10 field and move subsets of the date field
into the char 10 field.
                Is there a WF configuration parameter that controls the date
display in the SAP inbox title or a better way to accomplish the date
format?
                Thanks,
                Susie
 
 
 
This e-mail and any attachment sent with it are confidential and intended
solely for the use of the individual to whom it is addressed. If you have
received this e-mail by error please delete it immediately. No reference
should be made of the information contained in this e-mail.  The views or
opinions expressed in this message, unless otherwise clearly indicated, are
solely those of its author and do not necessarily represent those of the
ADB.  Unauthorized publication, use, dissemination, forwarding, printing or
copying of this e-mail and its associated attachments is strictly
prohibited.  ADB believes but does not warrant that this e-mail and any
attachments are virus-free.  You must therefore take full responsibility for
checking for viruses therein. ADB disclaims any responsibility and liability
arising from your unauthorized use of the contents of this e-mail or your
failing to ensure that it is virus-free.
 


More information about the SAP-WUG mailing list