cancel
Showing results for 
Search instead for 
Did you mean: 

Conversion routine for flat file date format YYYY-MM-DD

Former Member
0 Kudos

Hello,

I have a flat file source data where in the Date is coming as YYYY-MM-DD. Can some one help me on what conversion Routine do I use in the Transfer Structure to convert the date to the Internal format?

They are not willing to give me YYYYMMDD.

Thanks

Srini

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Srini,

For your case you make use of ABAP routine in the transfer rules and remove the "-". This should solve yor problem.

Alternatively you can also try writing a macro in your excel OR using excel functions to remove the "-" before loading the file. This would however depend on whether you have access to edit the file.

Bye

Dinesh

Former Member
0 Kudos

Hi,

The foll.code is from a previous posting in SDN. It works for sure.

DATA: ZT1 LIKE SY-DATUM,

S1(4) TYPE C,

S2(2) TYPE C,

S3(2) TYPE C.

SPLIT TRAN_STRUCTURE-/BIC/ZDAT AT '-' INTO S1 S2 S3.

CONCATENATE S1 S2 S3 INTO ZT1.

RESULT = ZT1.

  • give the field name of ur tranfer structure instead of ZDAT. Yes u can solve this problem by writing a routine in tfr rules.

Message was edited by: ravi raj

Former Member
0 Kudos

Thank you all for your help. My issue has been resolved with your help.

Thanks again.

Srini

Former Member
0 Kudos

Hi,

If you referred to my message, in the future you'd better post your message as a reply to mine.

Here you extracted a code from a link I posted and placed your message before mine as if you were the first.

Former Member
0 Kudos

Hi Eugene,

i'm sorry about the confusion. in my posting i referred that it was from a previous SDN posting and also i posted it after u did. i shd have gone through ur link before posting. absolutely no offense. Don't mistake me. Sorry again.

Ravi

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Srini,

Look at code here:

Best regards,

Eugene