Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

need to change date farmate

Former Member
0 Kudos
101

hi all,

my upload program is taking only US date formate..I want change it will be take any formate...can u help me nay one....

5 REPLIES 5

former_member181962
Active Contributor
0 Kudos
77

Convert the date into the internal format using the fm: CONVERT_DATE_TO_INTERNAL

But it can't be for all the formats. The system has no intellingence of finding what format is the user using externally (IN the file).

Regards,

Ravi

Former Member
0 Kudos
77

Code:

This code yields as 12 march 2006.

DATA: ZTEMP(9).  

CLEAR: ZTEMP, ZDD, ZMMM, ZYYYY.  

CALL FUNCTION 'CONVERSION_EXIT_IDATE_OUTPUT'  
EXPORTING  
INPUT = IS_DLV_DELNOTE-HD_GEN-CREA_DATE  
IMPORTING  
OUTPUT = ZTEMP.  

ZDD = ZTEMP+3(2).  
ZMMM = ZTEMP+0(3).  
ZYYYY = ZTEMP+5(4).

http://www.sap-img.com/abap/abap-program-output-of-date-format.htm

0 Kudos
77

hi i need function module for change date formate in to users settings

Former Member
0 Kudos
77

You can not change user master record data(which are stored in a standard table usr01).But before uploading you convert dae in a single form by using your own code which would be like this.

Read current date format of the System(USR01-DATFM)(There are 6 formats)

case type-1.

date+6(2) = dd.

date+4(2) = mm

date +0(4) = yyyy.

case type-2. and so on upto 6 types.

Here dd is w_date+0(2) for type 1

Here dd is w_date+2(2) for type 2 and 3

Here dd is w_date+6(2) for type 4,5,6

similarly for mm and yyyy also.

Former Member
0 Kudos
77

if u set the required format in the user master record.it will be saved in usr01 table

which help full to fix the required date format.

once u visit usr01 table.