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

Regarding data upload from word file

sreeramkumar_madisetty
Active Contributor
0 Likes
611

Hello Friends

I am here writing to know the clarification on one issue:

Till now I was uploaded the data into sap from flat files(Excel Files,Text Files etc).

But now my doubt is: Is it possible to upload using the falt file(Microsoft word) format.

Regards,

Sree

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
589

HI,

YOU CAN DO IN THE NORMAL WAY ONLY

Hello Friends

I am here writing to know the clarification on one issue:

Till now I was uploaded the data into sap from flat files(Excel Files,Text Files etc).

But now my doubt is: Is it possible to upload using the falt file(Microsoft word) format.

Regards,

Sree

4 REPLIES 4
Read only

Former Member
0 Likes
589

Yes u can do it.

Give the type of file as DOC.

VAsanth

Read only

0 Likes
589

Hi Vasanth

Thanks for your promt response.

If you send me the sample program on this.

I will be greatful to you.

Regards,

Sree

Read only

0 Likes
589

Hello,

Check this.


REPORT ZV_TEST_UPLOAD .

PARAMETERS: SP_FILE LIKE RLGRAP-FILENAME.

DATA: BEGIN OF L_T_OUT OCCURS 0,
        MATNR    LIKE Z48M_MATDATA-MATNR,
        ERSDA    LIKE MARA-ERSDA,
        MAKTX    LIKE Z48M_MATDATA-MAKTX,
        ZZBCODE  LIKE Z48M_MATDATA-ZZBCODE,
        WRKST    LIKE Z48M_MATDATA-WRKST,
        LAENG    LIKE MARA-LAENG,
        BREIT    LIKE MARA-BREIT,
        HOEHE    LIKE MARA-HOEHE,
        ZZELKEN  LIKE MARA-ZZELKEN,
        MFRNR    LIKE MARA-MFRNR,
        MFRPN    LIKE MARA-MFRPN,
        TDETAIL1 LIKE Z48M_MATDATA-MAKTX,
        TDETAIL2 LIKE Z48M_MATDATA-MAKTX,
        TDETAIL3 LIKE Z48M_MATDATA-MAKTX,
        KLART    LIKE KSSK-KLART,
        CLASS    LIKE KLAH-CLASS,
        ATINN    LIKE AUSP-ATINN,
        ATWRT    LIKE AUSP-ATWRT,
        MATKL    LIKE MARA-MATKL,
     END OF L_T_OUT.

CALL FUNCTION 'WS_UPLOAD'
      EXPORTING
*        CODEPAGE                      = ' '
   FILENAME                      = SP_FILE
   FILETYPE                      = 'ASC'  " Change to DAT
*        HEADLEN                       = ' '
*        LINE_EXIT                     = ' '
*        TRUNCLEN                      = ' '
*        USER_FORM                     = ' '
*        USER_PROG                     = ' '
*        DAT_D_FORMAT                  = ' '
*      IMPORTING
*        FILELENGTH                    =
  TABLES
    DATA_TAB                      = L_T_OUT
      EXCEPTIONS
        CONVERSION_ERROR              = 1
        FILE_OPEN_ERROR               = 2
        FILE_READ_ERROR               = 3
        INVALID_TYPE                  = 4
        NO_BATCH                      = 5
        UNKNOWN_ERROR                 = 6
        INVALID_TABLE_WIDTH           = 7
        GUI_REFUSE_FILETRANSFER       = 8
        CUSTOMER_ERROR                = 9
        OTHERS                        = 10
          .
IF SY-SUBRC <> 0.
  MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
          WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.

VAsanth

Read only

Former Member
0 Likes
590

HI,

YOU CAN DO IN THE NORMAL WAY ONLY