cancel
Showing results for 
Search instead for 
Did you mean: 

To Convert type Resource into Xstring

Former Member
0 Kudos

Hi,

Am doin file upload from Webdynpro portal.

My function module has got an importing parameter of type Xstring

i want the file to be uploaded converted to Xstring and then pass it into my FM , please suggest me the ways to convert my Resource type of the upload UI element into Xstring and then passit to my FM .

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi

Try this link -

Regards

K Ravi Shankar

Former Member
0 Kudos

Hi Jenifer,

This is Ravi Shankar from Emergys..

I came to know about your Problem thro' Vijay Sir..

wdContext.currentZpocnov_Proc_InputElement().setFile_Data(...);

In setting the Value to the RFC Attribute - it's of Byte[] type.

Try using

byte[] buffer = new byte[1024];

try {

resource.read(true).read(buffer);

} catch (IOException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

then set

wdContext.currentZpocnov_Proc_InputElement().setFile_Data(buffer);

Try this code

Regards

K Ravi Shankar

Former Member
0 Kudos

Hi,

You can check the below:

In that, check the answer posted by Aviad Levy.

Hope this will help you.

Note: Also if you want to convert XSTRING to IResource, you can refer the below link.

Regards,

Jithin

anand_govardhan
Active Participant
0 Kudos

Hi,

Check this forum [Thread|]. It might be helpful.

Regards,

Anand G