cancel
Showing results for 
Search instead for 
Did you mean: 

Code for uploading file

Former Member
0 Kudos

Hi all,

I'm trying to upload file into webdynpro. Please provide the code for this.

Can we use datasets in webdynpro? If so please provide the code..

Reagards

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mahati,

Please use UI element FILE UPLOAD in your view.

This will automatically have the browse file, and when you click on it, it opens a file dialog to select the file.

NOTE: you need to bind the 'DATA' property of that UI element to a node in your context.

The attribute should be either of type XSTRING, or SXIVERI_BINARY.

This attribute will contain your uploaded file.

Now you read the Node in your WDDMODIFYVIEW, and then get the attribute of that node into a local variable.

Pass this local variable to this FM 'SCMS_STRING_TO_XSTRING '.

This converts it into string type.

I hope it is helpful and easy to understand.

Good day!

Regards,

Shashikanth. D

Answers (2)

Answers (2)

pranav_nagpal2
Contributor
0 Kudos

Hi Mahathi,

Refer this link for help...

https://forums.sdn.sap.com/click.jspa?searchID=20520062&messageID=6313181

regards

Pranav

Former Member
0 Kudos

Hi,

Go through the following thread :

[How to upload file from Web Dynpro into R/3|;

Thanks,

Nitesh Jain