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

problem in ws_upload

Former Member
0 Likes
609

in one program i m uploading the data in excel file into SAP.through BDC recording

im using ws_upload for uploading the records in EXCEL sheet into the internal table gt_tab .

but when i see in debugging mode the records are not uploaded into the internal table .

but the sy-subrc is 0.

plz tell me why the records are not uploaded into Internal table ??

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
582

upload from excel ..I think it has to be different FM ..

I guess here u need to use FM

ALSM_EXCEL_TO_INTERNAL_TABLE.

WS_UPLOAD will not pick from excel directly .. Please cehck ..

4 REPLIES 4
Read only

Former Member
0 Likes
582

pls check the file type you specified

it is DAT for excel..

suggested: gui_upload (ws_* are obsolete)

Read only

former_member386202
Active Contributor
0 Likes
582

Hi,

Use below FM to upload data from excel

CALL FUNCTION 'TEXT_CONVERT_XLS_TO_SAP'

EXPORTING

i_field_seperator = 'X'

i_tab_raw_data = it_rawdata

i_filename = p_xlfile

TABLES

i_tab_converted_data = <dyn_table>

EXCEPTIONS

conversion_failed = 1

OTHERS = 2.

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,

Prashant

Read only

Former Member
0 Likes
583

upload from excel ..I think it has to be different FM ..

I guess here u need to use FM

ALSM_EXCEL_TO_INTERNAL_TABLE.

WS_UPLOAD will not pick from excel directly .. Please cehck ..

Read only

abdul_hakim
Active Contributor
0 Likes
582

HI

Please paste ur code here. ALso dont use WS_UPLOAD as it is obsolete. Use GUI_UPLOAD.

Cheers,

Hakim