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

uploading flat file

Former Member
0 Likes
804

hi all,

In my flat file suppose its having the currency and date fields. If i want to upload this flat file, before this do i need to do any conversions for these fields. if yes how can we do?

Thanks & Regards.

Laxman.P

B'lore.

1 ACCEPTED SOLUTION
Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
782

Hi,

For the currency fields declare ur itab as character value, it will solve the problem

For the date fields.Use ' Date Mask '.

It will solve the problem..

Cheers,

Simha.

Reward all the helpful answers...

hi all,

In my flat file suppose its having the currency and date fields. If i want to upload this flat file, before this do i need to do any conversions for these fields. if yes how can we do?

Thanks & Regards.

Laxman.P

B'lore.

5 REPLIES 5
Read only

Former Member
0 Likes
782

hi,

You need to convert the date to the User format in the BDC,

DATA: date1 type Sy-datum,

date2(10) type c.

Date1 = sy-datum.

write DAte to Date2.

So, here we need to pass the DATE2 field in the BDC ..

Coming to the Currency fields,

http://www.sapdevelopment.co.uk/fmodules/curr_saptodis.htm

Read only

Simha_
Product and Topic Expert
Product and Topic Expert
0 Likes
783

Hi,

For the currency fields declare ur itab as character value, it will solve the problem

For the date fields.Use ' Date Mask '.

It will solve the problem..

Cheers,

Simha.

Reward all the helpful answers...

Read only

Former Member
0 Likes
782

Hi Laxman,

No conversion is not required, but it is always better practise to convert currency as 1,000 to 1000 as it may cause issue while uploading.

And as date is cnsidered, define the internal table field for date as char10 and then after uploading convet date to internal format using FM CONVERT_DATE_TO_INTERNAL.

Reward points if useful.

Regards,

Atish

Read only

Former Member
0 Likes
782

HI,

Make your currency field as character while declaring.

Read only

Former Member
0 Likes
782

Declare both date and currency fields as of char type in ur itab. After uploading them, convert them to user specific format using the following statements:

write date to date1 (here "date" should be of DATS type and in YYYYMMDD format and "date1" should be of char type)

write amount CURRENCY <currency> to amount1 (here "amount" should be of CURR type and "amount1" should be of char type)