on 02-16-2012 4:37 AM
Hi all,
I have spent the entire day searching and I see many posts about embedding Adobe forms in WD4A but no one gives an answer on how to print without seeing the PDF first. This seems like it is a standard feature many would want.
I have built an application that displays project forecasting data. When the user presses print it jumps to a view containing an interactive form (XML interface). This is perfect. Now the user has informed me that they would like to print the forecasting of all WBS elements on a project in one go. I.E. not pressing print on the screen each time.
First I thought I'd write a SAPGUI program to do it but then realised I have no way to write the XML for the interface.
Secondly I built a new WD4A application for mass printing. This has the potential to work as I start with a selection screen then once 'EXEC' is pressed I collect all the data. For each WBS I can call the view containing the PDF element and somehow print it without displaying.
Does anyone have any idea's on this one?
I have tried calling the PDF view and returning straight back to the main view hoping that the XML of the PDF including the data would be in my context so that I could then use the standard OPEN/CLOSE JOB way of sending it to the printer. This does not load any XML into the context (yes it is bound). The reason for this probably that my outbound plug is in the initialization method.
Any thoughts?
Thanks all!!!
Ok, sorted it out myself.
For furure reference, here is the code:
DATA: lo_node TYPE REF TO if_wd_context_node,
lv_xml TYPE xstring.
lo_node = wd_context->get_child_node( name = wd_this->wdctx_detail_pdf_data ).
CREATE OBJECT lo_adobe
EXPORTING
i_form_name = 'FORM NAME'.
lv_xml = lo_adobe->get_wd_context_as_xml( data_source = lo_node ).
wd_this->print_pdf( xml_data = lv_xml ).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It's a method I wrote. Within it I just call the normal function modules for printing a form passing the XML to the form function. By normal functions, I'm talking about:
OPEN_JOB
(the one to get the dynamically generated function from the form name)
Call the dynamic function
CLOSE_JOB
Sorry I can't be more helpful, I'm not at work at the moment.
Cheers
How to print the PDF raw data
wd_this->print_pdf( xml_data = lv_xml )
Thanks,
Kaleel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Sorry about missing that off. It's kind of important:
lo_adobe type ref to cl_wd_adobe_services,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No one???
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
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.