cancel
Showing results for 
Search instead for 
Did you mean: 

date format in flat file

Former Member
0 Kudos
95

Hi,

I have a flat file which contains date format as MM/DD/YYYY,how to convet this into SAP format YYYYMMDD.

Pls update me..................

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Yes... You need update to YYYYMMDD

Former Member
0 Kudos

Hi,

Please use Excel Function to convert the dateformat. How many date fields do u have ??

Arun

Former Member
0 Kudos

It is a continuous process,so i have to make permanent solution.

Every time flat file load i have to change the format,so i have written the code as follows:

DATA: BILL_DATE LIKE SY-DATUM,

S1(4) TYPE C,

S2(2) TYPE C,

S3(2) TYPE C.

SPLIT TRAN_STRUCTURE-BILL_DATE AT '/' INTO S1 S2 S3.

CONCATENATE S3 S1 S2 INTO BILL_DATE.

RESULT = BILL_DATE.

Former Member
0 Kudos

But still i am not getting the required format like YYYYMMDD.

Former Member
0 Kudos

Try this one...

DATA: BILL_DATE LIKE SY-DATUM,

S1(2) TYPE C,

S2(2) TYPE C,

S3(4) TYPE C.

SPLIT TRAN_STRUCTURE-BILL_DATE AT '/' INTO S1 S2 S3.

CONCATENATE S3 S1 S2 INTO BILL_DATE.

RESULT = BILL_DATE.

Answers (0)