Date Format - Function module !

Martin Maguth martin.maguth at dolphin-corp.com
Mon Jun 9 22:56:46 EDT 2003


try function module 'DATUMSAUFBEREITUNG' (= german for 'date
processing'). it converts dates to any date format you want.
 
let me know, if you have more questions.
 
- martin
 
> Susie,
> If all your users use MM/DD/YYYY then you may as well change WF-
BATCH to use that format as well.
> In any case all date fields are technically held as YYYYMMDD
regardless of user formats.  When passing date fields between function
modules, programs, etc. technical format is usually used.   User
formats is only a problem if your background method/function module
uses batch input.  In which case you are better off changing your
function module to accept the date in the usual technical format and
then use the ABAP statement "WRITE datefield TO screenfield
MM/DD/YYYY." to put it into the appropriate format.
> Jocelyn Dart
>
> -----Original Message-----
>> From: ASSY, SOSTHENE [mailto:s.assy at afdb.org]
> Sent: Monday,9 June 2003 1:02 AM
> To: SAP-WUG at MITVMA.MIT.EDU
> Subject: Re: Date Format
>
>
> 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.
>
>
 
--
Martin Maguth
dolphin IT Project and Consulting Corporation
1025 Andrew Drive, Suite 130
West Chester, PA 19380
610-662-7111  direct
610-701-9825  main
martin.maguth at dolphin-corp.com
 


More information about the SAP-WUG mailing list