on 01-11-2008 7:38 AM
Hi Experts,
I need to submit the data in the adobe interactive form to the R/3 in the offline mode .
But I don't know how to complete the submit code in the adobe form in the offline mode?
Action:
1. create a adobe interactive form (a_interactive_form)in the view of the WDA for abap.
2. create a adobe form (b_form)in the R/3 using sfp with a inputfield and submit button.
3. bind the b_form to the a_interactive_form, and bind the context to the b_form so that the data can be transfered to the b_form.
4. type code in the WDA for abap for setting data to the context.
5. active the WDA and run the WDA.
6. Save the pdf form as "test.pdf" and close the IE and close the pdf file.
7. Open the test.pdf, and type the inputfield "ssssss" in the form, and save the test.pdf.
8. Click the submit button in the test.pdf, and the test.pdf can call a webdynpor application for abap(ZTEST001), and transfer the data to the webdynpor application for abap(ZTEST001).
now, the step 1 to 7 is ok. But I don't know how to complete the submit code in the adobe form so that the called WDA may get the data "ssssss"?
Do you give some example or some hint for this problem ?
Thanks & Regards,
Tao
I will definitely guide you on the email.
but first thing I want to know what is the problem you are facing with the upload.
If upload problem is resolved do you still need the email.
One thing i would like to inform you ... You can send the same PDF file through email.
It is not necessary that you can only send the XML files.
Basically i would lie to mention that you can send the same PDF file as an attachment through email. but it is not that straight forward.
If you need that I will provide you all the helps.
Cheers
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Satyabrata,
Thanks a lot for your help in advance.
If fileupload problem is resolved using the fileupload element in the WDA, I will not need the email.
If fileupload problem isn't resolved using the fileupload element in the WDA, I have to use the email to transfer the data in the pdf file.
The following is code of the WDA for upload the data:
method ONACTIONON_UPLOAD .
DATA XCONTENT TYPE XSTRING.
DATA: CONTENT TYPE STRING .
DATA: MIME_1 TYPE STRING .
DATA: NAME TYPE STRING .
DATA:
ROWS TYPE STANDARD TABLE OF STRING ,
WA_ROWS(300) TYPE C .
DATA: CONV TYPE REF TO CL_ABAP_CONV_IN_CE.
DATA: INPUT TYPE REF TO IF_WD_CONTEXT_NODE.
INPUT = WD_CONTEXT->GET_CHILD_NODE( 'INPUT' ).
INPUT->GET_ATTRIBUTE( EXPORTING NAME = 'UPLOAD' IMPORTING VALUE = XCONTENT ).
INPUT->GET_ATTRIBUTE( EXPORTING NAME = 'FILENAME' IMPORTING VALUE = NAME ).
INPUT->GET_ATTRIBUTE( EXPORTING NAME = 'MIMETYPE' IMPORTING VALUE = MIME_1 ).
CONV = CL_ABAP_CONV_IN_CE=>CREATE(
ENCODING = '8400'
INPUT = XCONTENT
).
CONV->READ( IMPORTING DATA = CONTENT ).
SPLIT CONTENT AT CL_ABAP_CHAR_UTILITIES=>CR_LF INTO TABLE ROWS .
LOOP AT ROWS INTO WA_ROWS .
*WA_PIPE-LINE = WA_ROWS.
*APPEND WA_PIPE TO IT_PIPE.
ENDLOOP.
endmethod.
If the uploaded file is txt or excel file, the transfered data is right, but if the uploaded file is pdf file, the transfered data is confusion code. I think the transfered pdf file have been transform xml file so that I don't get the data in the WDA.
I don't know how to solve the problem. Do you give me some advice?
Thanks a million for your help.
Thanks again.:)
Best regards,
tao
Hi Satyabrata,
Thank you very much in advance.
Now, I meet a intractable problem. I hope to get your suggestion.
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 ? my email: tao.wang@besuretech.com
Thanks & Regards,
Tao
The scenario .. You are specifying will not work for offline PDF.
Once you save the PDF file to the local machine, it is offline PDF file.
And from offline PDF file you can not submit data .. directly to SAP R/3.
Only from online application you can submit data directly to SAP R/3 through submit button.
Cheers
Satya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, Satyabrata,
Thanks a lot for your help in advance.
For the offline mode, I try to use the fileupload element in the WDA for abap, but I only get the confusion data in the WDA for abap when I debug the WDA. So I don't find other way to slove the problem for transfer the data to the WDA in the R/3 except using e-mail, but I worry about that I also get the confusion data through e-mail to transfer the pdf file.
Do you give me some advice for transfer the data with offline?
Thanks a million for your help.
Thanks again.:)
Best regards,
tao
Hi, Satyabrata,
Thanks a lot for your help in advance.
If I use the e-mail to transfer the data in the PDF file, I have to extract the xml file that is created by the PDF file in the WDA( because transfering data from the pdf file is through xml file. ). whereas, the most important, I don't know how to integrate the e-mail server and my WDA programe so that the WDA programe can read the xml file from the e-mail and get the data through extract the xml file that is created by the PDF file
Thanks a million for your help.
Thanks again.:)
Best regards,
tao
User | Count |
---|---|
79 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.