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: 

uploading flat file

Former Member
0 Kudos
115

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

Simha_
Advisor
Advisor
0 Kudos
93

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...

5 REPLIES 5

Former Member
0 Kudos
93

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

Simha_
Advisor
Advisor
0 Kudos
94

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...

Former Member
0 Kudos
93

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

Former Member
0 Kudos
93

HI,

Make your currency field as character while declaring.

Former Member
0 Kudos
93

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)