cancel
Showing results for 
Search instead for 
Did you mean: 

gui_upload in BSP controller

Former Member
0 Kudos

Hi all,

Can someone please tell me, how to use gui_upload FM in BSP controller ?

I'm trying to get the data of text file into internal table on a specific event, but the FM gui_upload or the method cl_gui_frontend_services=>gui_upload is giving an exception, "CNTL_ERROR" .

Can anyone please guide me?

Accepted Solutions (0)

Answers (4)

Answers (4)

RenaldWittwer
Contributor
0 Kudos

Hi,

to protect the user and the data on the users PC it is not allowed for a browser to access data direct. The only way to get a file from the client is htmlb:fileUpload or the html tag <input type=file>.

The only chance to break that rule is a Java-Applet and perhaps ActiveX.

Best regards

Renald

Former Member
0 Kudos

Hi,

thanks for suggession but, I don't want to upload a file in foreground, I want to create an internal table from the text file, like what gui_upload does.

Please tell me if there is any other way than htmlb:fileUpload.

former_member191062
Active Contributor
0 Kudos

Hi,

the problem is not only the dialog user, but the fact that the client can not be reached. The class 'cl_gui_frontend_services' requieres active SAPGui connection to the forntend, wich is not the case when you are using BSP. The htmlb:fileUpload will be the solution for you.

Regards,

Dezso

Former Member
0 Kudos

Hi Hemant,

You can't use cl_gui_frontend_services=>gui_upload in BSP. You can use this method only if you have logged on as a dialog user which is not the case when using BSP, instead try to use htmlb:fileUpload element. For more details see page FileUpload.bsp in BSP Application SBSPEXT_HTMLB.

Regards,

narinder Hartala