cancel
Showing results for 
Search instead for 
Did you mean: 

GUI Upload Issue

Former Member
0 Kudos

Hello Folks,

My requirement is that i will scan documents in some application server and when clicked on the link in WDA the scan document need to displayed it can be either TIF or PDF format containing more than 1 page.

I dont not need any upload element on the screen. For testing i tried uploading a file from my desk top using Function Module GUI_UPLOAD and i get an error while executing this FM saying "Access via 'NULL' object reference not possible".

the function call is as below, please suggest if there is something wrong with the call or if ther is another approach to do this. Thanks.

TYPES : BEGIN OF ty_doc ,

raw(64) TYPE x,

END OF ty_doc.

DATA : lt_doc TYPE TABLE OF ty_doc,

lf_doc TYPE ty_doc,

l_size TYPE i.

CALL FUNCTION 'GUI_UPLOAD'

EXPORTING

filename = 'C:\Documents and Settings\user\Desktop\doc.tif'

filetype = 'BIN'

IMPORTING

filelength = l_size

TABLES

data_tab = lt_doc

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

If I understand what you want to do is import a file into your WebDynpro application then the method to be followed is as shown below.

>Steps:

>> 1. Right click on the application you are creating.

>> 2. Follow the menu option: Create->Mime Objects -> Import

>> 3. You will get a popup with the header SAP Custom-Open File Menu

>> 4. Choose the file you want to import and click on Open

>> 5. You will get a new document for Creating New Document. Enter description and click on Save .

>> 6. Choose the Package and save. Your file will be stored under the same application under MIMEs.

*----


If what you want is to import a file into the system, and not to the WebDynpro application, then you can

>> 1. go to SE80.

>> 2. Choose MIME Repository. Open a folder where you want to import the file.

>> 3. Right Click on the folder that you desire to import the file to. Menu: Import MIME Objects.

>> 3. Repeat the steps 3 - 6.

Former Member
0 Kudos

Thanks Rajesh. But the file which i want to upload is dynamic the file has to be read from app server based on the tax payer number. I just need some methodology where in i can pick external files into the webdynrpo.

Former Member
0 Kudos

Hi Suri Kovela ,

i doubt, we can t use the Fm Gui upload with WDA. there are certain FMs which cannot be used with Wda

Regards

Sarath