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

Text to DBF format conversion

Former Member
0 Likes
585

Hi All,

Can we convert text file into DBF Format for Foxpro, Actually Client want to directly use it as a database file.

Thanks in Advance

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
508

Hi,

Go thru the Following Link,

http://help.sap.com/saphelp_nw04/helpdata/en/d2/cb40cb455611d189710000e8322d00/frameset.htm

You try this,

DATA: BEGIN OF ITAB_MATNR OCCURS 0,

MATNR LIKE MARA-MATNR,

COUNT TYPE I,

END OF ITAB_MATNR.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

FILENAME = P_FILE

<b>filetype = 'DBF'</b>

TABLES

DATA_TAB = ITAB_MATNR

EXCEPTIONS

CONVERSION_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_READ_ERROR = 3

INVALID_TABLE_WIDTH = 4

INVALID_TYPE = 5

NO_BATCH = 6

UNKNOWN_ERROR = 7

GUI_REFUSE_FILETRANSFER = 8

OTHERS = 9.

IF SY-SUBRC <> 0.

MESSAGE E699(PP) WITH 'Unable to load input file' P_FILE.

ENDIF.

Regards,

Padmam.

1 REPLY 1
Read only

Former Member
0 Likes
509

Hi,

Go thru the Following Link,

http://help.sap.com/saphelp_nw04/helpdata/en/d2/cb40cb455611d189710000e8322d00/frameset.htm

You try this,

DATA: BEGIN OF ITAB_MATNR OCCURS 0,

MATNR LIKE MARA-MATNR,

COUNT TYPE I,

END OF ITAB_MATNR.

CALL FUNCTION 'WS_UPLOAD'

EXPORTING

FILENAME = P_FILE

<b>filetype = 'DBF'</b>

TABLES

DATA_TAB = ITAB_MATNR

EXCEPTIONS

CONVERSION_ERROR = 1

FILE_OPEN_ERROR = 2

FILE_READ_ERROR = 3

INVALID_TABLE_WIDTH = 4

INVALID_TYPE = 5

NO_BATCH = 6

UNKNOWN_ERROR = 7

GUI_REFUSE_FILETRANSFER = 8

OTHERS = 9.

IF SY-SUBRC <> 0.

MESSAGE E699(PP) WITH 'Unable to load input file' P_FILE.

ENDIF.

Regards,

Padmam.