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: 

Text file upload

Former Member
0 Kudos

Hi all,

I am uploading a text file like resume in presentation server to sap i have two fields in internal table, both of char type and of length 140 ch, I was able to upload the file but the thing is in the first field i am getting only 74 char and the rest are not coming. pls help. i am attaching the sample code with ths.

DATA : BEGIN OF WA_NAME ,

V_NAME(140),

V_DET(140),

END OF WA_NAME.

DATA : IT_NAME LIKE WA_NAME occurs 0 with header line .

CALL FUNCTION 'UPLOAD'

EXPORTING

  • CODEPAGE = ' '

FILENAME = ' '

FILETYPE = 'DAT'

  • ITEM = ' '

  • FILEMASK_MASK = ' '

  • FILEMASK_TEXT = ' '

  • FILETYPE_NO_CHANGE = ' '

  • FILEMASK_ALL = ' '

  • FILETYPE_NO_SHOW = ' '

  • LINE_EXIT = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • SILENT = 'S'

  • IMPORTING

  • FILESIZE =

  • CANCEL =

  • ACT_FILENAME =

  • ACT_FILETYPE =

TABLES

DATA_TAB = IT_NAME

  • EXCEPTIONS

  • CONVERSION_ERROR = 1

  • INVALID_TABLE_WIDTH = 2

  • INVALID_TYPE = 3

  • NO_BATCH = 4

  • UNKNOWN_ERROR = 5

  • GUI_REFUSE_FILETRANSFER = 6

  • OTHERS = 7

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.

Regards

Tharanatha

5 REPLIES 5

Former Member
0 Kudos

Hi,

Upload Tab delimited file from PC into internal table

<b>Please Refer this link

http://www.sapdevelopment.co.uk/file/file_uptabpc.htm</b>;

Thanks,

Aby

Former Member
0 Kudos

Hi

You can use function module GUI_UPLOAD.Check wether any extra space is there between the fiel values in the text file.

Regards

Shibin

0 Kudos

Hi ,

I am trying to upload a resume. I have two fields in my internal table. Please go through the sample code i have attched. Even though i have declared a field with length 140 ch it is getting only around 75 char pls help me in this regard.

Regards

Tharanath

former_member223537
Active Contributor
0 Kudos

Hi,

The file should be TAB DELIMITED. Open your resume file in EXCEL and click on SAVE AS.. enter the name & in TYPE select TAB DELIMITED.

Upload this file.

Best regards,

Prashant

Former Member
0 Kudos

DATA : BEGIN OF WA_NAME ,

V_NAME(140),

V_DET(140),

END OF WA_NAME.

<b>DATA : IT_NAME LIKE standard table of WA_NAME with header line .</b>

CALL FUNCTION 'UPLOAD'

EXPORTING

  • CODEPAGE = ' '

FILENAME = ' '

FILETYPE = 'DAT'

  • ITEM = ' '

  • FILEMASK_MASK = ' '

  • FILEMASK_TEXT = ' '

  • FILETYPE_NO_CHANGE = ' '

  • FILEMASK_ALL = ' '

  • FILETYPE_NO_SHOW = ' '

  • LINE_EXIT = ' '

  • USER_FORM = ' '

  • USER_PROG = ' '

  • SILENT = 'S'

  • IMPORTING

  • FILESIZE =

  • CANCEL =

  • ACT_FILENAME =

  • ACT_FILETYPE =

TABLES

DATA_TAB = IT_NAME

  • EXCEPTIONS

  • CONVERSION_ERROR = 1

  • INVALID_TABLE_WIDTH = 2

  • INVALID_TYPE = 3

  • NO_BATCH = 4

  • UNKNOWN_ERROR = 5

  • GUI_REFUSE_FILETRANSFER = 6

  • OTHERS = 7

.

IF SY-SUBRC <> 0.

  • MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO

  • WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.

ENDIF.