06-12-2006 9:28 AM
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?
07-14-2006 1:34 PM
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
06-12-2006 9:30 AM
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.
06-12-2006 9:40 AM
Stuart,
Can you use WS_UPLOAD(Desktop) or Use OPEN DATA SET (from Application Server)
06-12-2006 9:54 AM
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.
06-12-2006 10:40 AM
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.
07-14-2006 1:34 PM
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
07-14-2006 1:38 PM
07-14-2006 3:51 PM
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
07-17-2006 8:18 AM
You should be able to view my email address on my BC now.
Thanks again.
08-23-2006 8:16 AM
Hi Stuart,
did you succeed ???
Can you please send me the code.
My email-adress is on my business card.
11-08-2006 9:55 PM
11-08-2006 10:05 PM
11-08-2006 10:06 PM
03-21-2007 1:53 PM
10-27-2010 11:01 AM