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: 

DBF Upload

Former Member
0 Kudos

Hi all,

I need to upload a DBF (Fox Pro, DBase) file into an internal table within an ABAP program.

I have looked at the function module "GUI_UPLOAD", but I have 2 problems with it:

- I need it to work in background mode, on the application server

- It does not that the 'DBF' filetype option on our system.

Does anyone have an alternative?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello Stuart,

I have programmed a DBase file importer that extracts the file definition and moves each corresponding table field dynamically into a predefined internal table according to it's structure (inclusive data conversion for the most well-known fields: char, numeric, date)

If you're interested I could mail you the coding.

Best wishes,

Florin

14 REPLIES 14

Former Member
0 Kudos

Hi stuart,

1. I need it to work in background mode, on the application server

Yes, it will not work.

(bcos it needs an active front-end)

So u will have to use OPEN DATASET, READ DATASET , CLOSE DATASET

commands for reading file from app server.

2.

It does not that the 'DBF' filetype option on our system

I think it would be quite difficult

for reading a BINARY DBF file

and making sense out of it.

*----


3. Your requirement can be stated in another way like this :

To upload .XLS file

from application server

in background mode

(This is pure .XLS file, not Tab delimited file)

4. While using OPEN DATASET,

we read the BINARY CONTENTS OF THE FILE,

which will not make any sense of the XLS format.

regards,

amit m.

Former Member
0 Kudos

Stuart,

Can you use WS_UPLOAD(Desktop) or Use OPEN DATA SET (from Application Server)

0 Kudos

WS_UPLOAD, afaik is just an older version of GUI_UPLOAD.

OPEN DATASET only works with plain text files. I guess the only alternative is to have an intermediate step - convert the dbf to, say, cvs then import it into SAP using OPEN DATASET.

0 Kudos

Hi again,

1. Yes u are right.

2. Thats the only best possible and practical approach.

3. Convert the DBF file into text/csv file,

and then upload using OPEN DATASET.

regards,

amit m.

Former Member
0 Kudos

Hello Stuart,

I have programmed a DBase file importer that extracts the file definition and moves each corresponding table field dynamically into a predefined internal table according to it's structure (inclusive data conversion for the most well-known fields: char, numeric, date)

If you're interested I could mail you the coding.

Best wishes,

Florin

0 Kudos

That would be great!

0 Kudos

you don't have an email adress maintained in your user's business card.

would you please provide one in your b-card or send one to me?

Best regards,

Florin

0 Kudos

You should be able to view my email address on my BC now.

Thanks again.

0 Kudos

Hi Stuart,

did you succeed ???

Can you please send me the code.

My email-adress is on my business card.

0 Kudos

Hi, Can you send the source to me too?.

0 Kudos

done. you're welcome.

0 Kudos

Hi Stuart,

did you succeed ???

Can you please send me the code.

0 Kudos

Hi Stuart,

did you succeed ???

Can you please send me the code.

0 Kudos

Hi Florin,

can u send me the code too?

Thank you.

LB