Application Development and Automation 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: 
Read only

conversion routine

Former Member
0 Likes
491

if i have a data in flat file like a date = 30.10.2010 so this date i want to convert in sap format and sap allow only 10/30/2010 . how to do that with bdc

Moderator message - Please see before posting - post locked

Edited by: Rob Burbank on Mar 21, 2010 6:45 PM

4 REPLIES 4
Read only

former_member70391
Contributor
0 Likes
463

Hello Kapoor,

It is always better to change the date format according to date format in user settings. You can check it via SU3->Default.

User belongs to different countries use different date format so u can need to write a code in such way that it will not create problems for any date format. I have given the code below which will help you to achieve this goal.

Moderator message - Please respect the 2,500 character maximum when posting. Post only the relevant portions of code

Thanks,

Nagaraj

Edited by: Rob Burbank on Mar 21, 2010 6:44 PM

Read only

Former Member
0 Likes
463

Hi,

This shud do the trick..

date = 30.10.2010

concatenate date3(2) '/' date0(2) '/' date+6(4) into date1.

Use date1 it will have the format you require. Pls note date and date1 should be character or string variables.

Thanks

Mani

Read only

andreas_mann3
Active Contributor
0 Likes
463

use fm CONVERT_DATE_TO_INTERNAL

A.

Read only

ThomasZloch
Active Contributor
0 Likes
463

basic date question...locked.

Thomas