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: 

how to upload legacy data into sap

Former Member
0 Kudos

how to upload legacy data into sap

4 REPLIES 4

Former Member
0 Kudos

Hi,

Please check the code below:

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = gv_file

filetype = 'ASC'

has_field_separator = gc_x

TABLES

data_tab = gt_dummy

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 NE gc_zero_num.

MESSAGE e006.

ENDIF.

  • Check if the input file is blank

IF gt_dummy[] IS INITIAL.

MESSAGE i007.

LEAVE LIST-PROCESSING.

ENDIF.

Regards

Kannaiah

Former Member
0 Kudos

Narendra,

You can upload data by using

1. BDC

2.LSMW

pls. reward ifuseful...

Former Member
0 Kudos

Hi Narendra,

You can use the BDC method, where you use the <b>GUI_UPLOAD</b> FM to upload the data from Legacy to SAP System.

Other than this, you can also use the BAPI FM to do the same.

Hope this resolves your query.

Reward all the helpful answers.

Regards

shishupalreddy
Active Contributor
0 Kudos

hi,

use the following funtion modules ..

gui_upload to upload

regards