cancel
Showing results for 
Search instead for 
Did you mean: 

FileUploadUI Element in WDA and WDJ

Amey-Mogare
Contributor
0 Kudos

Hi all,

In FileUploadUIElement, we need to bind a Resource to property of this element.

In WDA, we bind it to type XSTRING and in WDJ we bind it to type IResource.

Now I am developing a RFC which uploads a file on SAP Content Server using this FileUploadUIElement. I want use this RFC from both WDJ as well as from WDA.

So what type of import parameter I should use?

Considering that I could convert IResource to InputStream at Java side, how to I pass it to RFC? Which is the data type to be used?

Thanks and regards,

Amey Mogare

Accepted Solutions (1)

Accepted Solutions (1)

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

I would recommend XSTRING as the inporting parameter. I would recommend following the importing parameters of SO_DOCUMENT_SEND_API1 (datatype SOLIX ( RAW length 255 )). That function module is old and was restricted by the limtations of pre-4.6c where you couldn't use XSTRING. XSTRING is much easier to use than a RAW internal table - especially from other environements. You are going to want to convert your IResource to something compatible with an ABAP XSTRING (perhaps InputStream - or maybe a ByteArray). That is not a question for the Web Dynpro ABAP forum however.

Amey-Mogare
Contributor
0 Kudos

Thank you for reply Thomas.

I agree that I was bit confused about where to post this question? on WDJ forum or WDA forum. So it was a mistake from my side.

:(. Sorry for this.

I have kept import parameter as XSTRING.

As per your opinion, if I convert IResource to InputStream/ byte[] at java side, I can directly put it into XSTRING type i/p parameter in RFC model?

Thanks and regards,

Amey Mogare

thomas_jung
Developer Advocate
Developer Advocate
0 Kudos

That would be my GUESS from the Java side. That is the data type that matches up to the ABAP XSTRING data type. However I'm not proficient in the capabilities of JCo or other Java processing to say if that is the correct interfacing approach from the Java Side. That is where you really need to consult with someone who is a Java programmer.

Amey-Mogare
Contributor
0 Kudos

Ok Thomas, That was extremely helpful advice. I would post this question on WDJ forum.

May be I can get some detailed info on this interfacing scenario.

Thank you once again.

With regards,

Amey Mogare

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Look at the FM SO_DOCUMENT_SEND_API1 the attachment content is passed using a table of datatype SOLIX ( RAW length 255 )

Use the same to create your RFC.

You can use this for both web dynpro java and web dynpro ABAP.

Abhi