cancel
Showing results for 
Search instead for 
Did you mean: 

How to upload the pdf file to the next view?....urgent

Former Member
0 Kudos

Hi Experts,

I need to upload the pdf file( a interactive form ) using the fileupload element in the A_view and the pdf file can be displayed in the b_view.

But I don't know how to complete the function?

Action:

0. Create a adobe form (c_form)in the R/3 using sfp with a inputfield.

1. Create a adobe interactive form (A_interactive_form)in the view(display_view) of the WDA for abap.

2. Create a context attribute(upload) in the display_view.

3. Bind the c_form to the A_interactive_form, so that the data can be transfered to the c_form.

4. Bind the "pdfSourth" property to context attribute "upload" in the A_interactive_form.

4. Type code in the WDA for abap for setting data("old") to the context.

5. Active the WDA and run the WDA.

6. In the IE, the interactive form is displayed with the value "old" in the field. Save the pdf form as "test.pdf" and close the IE.

7. Open the test.pdf, and type the inputfield "new" in the form, and save the test.pdf.

8. Create a context node(Pdfsourth) in the component controller, and create a attribute("upload") that type is xstring in the Pdfsourth.

9. Create a view(C_view), mapping the context node(Pdfsourth) in the component controller.

10. Create a fileupload element in the C_view, and the "data" property is binded the "upload" attribute in the context node(Pdfsourth).

11. Create a button(Display_form) and create the action with the outplug for upload the pdf file(test.pdf).

12. Change the window and set the C_view as default view, and set the Navigation link from the C_view to B_view.

13. Type code in the wddoinit method in the display_view for transfering the test.pdf file.

method WDDOINIT .

DATA lo_componentcontroller TYPE REF TO ig_componentcontroller .

DATA upload TYPE xstring.

lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).

lo_componentcontroller->getupload(

IMPORTING

upload = upload " xstring

).

DATA lo_nd_pdfsourch TYPE REF TO if_wd_context_node.

DATA lo_el_pdfsourch TYPE REF TO if_wd_context_element.

DATA ls_pdfsourch TYPE wd_this->element_pdfsourch.

  • navigate from <CONTEXT> to <PDFSOURCH> via lead selection

lo_nd_pdfsourch = wd_context->get_child_node( name = wd_this->wdctx_pdfsourch ).

  • get element via lead selection

lo_el_pdfsourch = lo_nd_pdfsourch->get_element( ).

  • get single attribute

lo_el_pdfsourch->set_attribute(

EXPORTING

name = `UPLOAD`

value = upload ).

endmethod.

15. Active the WDA and run the WDA.

In the fileupload of the C_view, I select the test.pdf from my local machine. and click the button(Display_form), the display_view is displayed with the A_interactive_form.

But in the A_interactive_form, the value "old" is in the field in the form rather than "new".

I hope to display the test.pdf in the A_interactive_form. I don't know how to change my code or configuration?

Do you give some example or some hint for this problem ?

Thanks & Regards,

Tao

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Now, The problem has been solved.Thanks a lot.