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 data from word documnet

Former Member
0 Likes
370

hai

how to uoload data from the word document .Is there is any function module

to do this.

r anyother method to do it.

thx in advance.

hai

how to uoload data from the word document .Is there is any function module

to do this.

r anyother method to do it.

thx in advance.

2 REPLIES 2
Read only

Former Member
0 Likes
343

Hi

I don´t think it´s possible, because you have to consider that Word files are text files with no column definition like in Excel or Access. If you upload somehow that file, then you´ll probably get just 1 column.

Try with function in function group DSVAS_MSWORD or V70T

excel files and text files can be uploaded.

data : itab type standard table of string 
            with header line.
 
 
CALL FUNCTION 'GUI_UPLOAD'
  EXPORTING
    FILENAME                      = 'C:ABCD.TXT'
   FILETYPE                      = 'ASC'
  TABLES
    DATA_TAB                      = ITAB
 EXCEPTIONS
   FILE_OPEN_ERROR               = 1
   FILE_READ_ERROR               = 2
   NO_BATCH                      = 3
   GUI_REFUSE_FILETRANSFER       = 4
   INVALID_TYPE                  = 5
   NO_AUTHORITY                  = 6
   UNKNOWN_ERROR                 = 7
   BAD_DATA_FORMAT               = 8
   HEADER_NOT_ALLOWED            = 9
   SEPARATOR_NOT_ALLOWED         = 10
   HEADER_TOO_LONG               = 11
   UNKNOWN_DP_ERROR              = 12
   ACCESS_DENIED                 = 13
   DP_OUT_OF_MEMORY              = 14
   DISK_FULL                     = 15
   DP_TIMEOUT                    = 16
   OTHERS                        = 17
          .
IF SY-SUBRC <> 0.
 MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
BREAK-POINT.
 
LOOP AT ITAB. 
  WRITE ITAB.
ENDLOOP.

Regards

Naresh

Read only

Former Member
0 Likes
343

u can't use ur report SE38 for uploading any graphical data ... i believe u can upload .doc file using LSMW... try using the extension .doc instead of .txt in GUI_UPLOAD FM...hope this will work but it will transfer only text and tabs (spaces)

hope this will help

Ashwani