cancel
Showing results for 
Search instead for 
Did you mean: 

Interactive online form - How to get binary data for attachment??

Former Member
0 Kudos

Hi experts,

I have created an online interactive form within my web dynpro application and it works. In order to use a standard BAPI for adding an attachment (SAP_WAPI_ATTACHMENT_ADD) I want to send my interactive pdf document within that bapi. When the user opens that document, he fills some additional data and should start a method for that bapi within that document by pushing a button like "submit document".

My question is, how can I create a binary file from that pdf document? When the document is open, the binded parameter pdfSource is NULL.

What must I do? Could anyone support me with coding or something else? What are the necessary steps?

Regards,

Frank

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Frank,

What I understood from this is you a Interactive pdf form and you want to pass binary code of that form to a function module. but I don't get you when you say that document is open when you call any webDynpro action you should be able to read context attribute bind to pdfSource property.

If this is not happening we can do workaround like navigating to another view and reading attribute in that view by sharing it through Component Controller. This way when you move to another view interactive form open in previous view will be closed automatically, but this is a workaround and it will affect the performance and complication level of the application

Ninad

Former Member
0 Kudos

Yes, you are right.

When I close the interactive form, then I see this value in the contex tlelement pdfsource: [B@610b610b

But is this the whole binary information of that interactive pdf file? It seems a little bit strange for me.

Anyway, I see, that the RFC (SAP_WAPI_ATTACHMENT_ADD) parameter is type XSTRING. So must I convert from BIN to XSTRING in WebDynpro or can I directly send this value [B@610b610b to this parameter?

Frank

Answers (0)