Trigger workflow from ABAP webdynpro and attach an Adobe interactive form
I have a need to create an ABAP Webdynpro that will upload a completed Adobe interactive form and then route the form to multiple approvers thru workflow. I am having trouble finding any documentation or examples of passing the Adobe form in the workflow. Do I have to save the content of every field on the form to an internal table and then have every workitem call an ABAP webdynpro to render the form? Any help or suggestions would be greatly appreciated.
Hi Joyce,
This can be done as follows :
[pdf as an attachment|https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/60ff6ad3-729b-2b10-6582-fedc82680a29&overridelayout=true]
Regards,
Geet
Similar Messages
-
Trigger workflow from ABAP webdynpro (having an adobe form)
Hello All,
I have developed an Webdynpro (for ABAP) component that has an Adobe Form integrated within it. Now I have been given a requirment that the form (once filled out on the portal) needs to be routed to 2-3 persons for approval and then submitted (or processed in SAP). The approving personnel will look at their UWL on the portal and approve/dissapprove.
I do not have much hands on experience on such a Workflow scenario as above. I have already completed the adobe form part and the webdynpro section.
I will really appreciate it if anyone can advise as to how I need to proceed here.
Thanks in advance, LizHi Liz,
You can use the FM SAP_WAPI_START_WORKFLOW. In webdynpro you have the button like "Submit" right? All the process has done, the user can click the submit button to get the approval. Under the button you can call this FM.
Create one workflow based on your scenario, and pass the workflow number to this FM. So once the submit button is clicked then in back end workflow will getting triggered.
For more Informations, please have a look at following links.
SAP_WAPI_START_WORKFLOW doesn't start workflow...
SAP_WAPI_START_WORKFLOW
SAP_WAPI_START_WORKFLOW help
Thanks. -
Trigger a workflow from ABAP Webdynpro
My Scenario:
Step 1: When a user hits the SAVE button on the webdynpro form, check if that data is consistent only and trigger a message(I have a BAPI to handle this check).
Step 2: If the data is consistent, then trigger a workflow to send an alert to an agent along with the data user entered on the form.
Step 3: AGENT shall review the data(Same form from step 1 should appear here) and will have the option to SUBMIT / POST or REJECT. If SUBMITTED, data will be posted to R/3(I have a 2nd BAPI to handle this). If REJECTED, send an alert back to the USER who entered data in step 1.
I checked lots of threads from the forum, none gave me a complete idea. Can any one give me a good documentation to trigger workflow from webdynpro to handle my requirement.
I am new to webdynpro.
I checked this blogs & articles also...
/people/ginger.gatling/blog/2005/12/14/create-new-uis-for-existing-workflow-tasks-with-abap-web-dynpro-and-universal-worklist
http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/user-interface-technology/wd%20java/wdjava%20archive/using%20web%20dynpro%20java%20and%20web%20dynpro%20abap%20applications%20in%20universal%20work%20list.pdf
Thanks a lot in advance.
Best Regards,
KiranHello Kiran,
I slightly misunderstood you requirement earlier. But if I am not wrong this time, here is what you need to do:
1) The Web dynpro form that you are creating is only for data entry purpose. But the agent who is going to review the data will need an access to this form. So this means that you need to save the content of this form to the database and provide a URL in the workflow workitem which the agent can use to open the web dynpro application with the form data on it.
2) To access the correct form, you need to save the form data in a Z-table with a GUID attached to it. Generate this GUID using GUID_CREATE function module. In the window controller of the Web dynpro component, there will be a handleDefault method where you can read the parameter'GUID' from the incoming request and use it to read the form data from the database to display the form.
3) You can use Object Oriented programming approach for creating Workflow. Check the following article to learn how to do that:
[http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b0409e6c-d213-2d10-3cb6-c12d417626c1?quicklink=index&overridelayout=true]
4) Create a Z-class and use this class as object type in your workflow (instead of BOR object).
5) In the constructor of this class, pass a parameter GUID, which would be passed when you create an object of this class in the Web Dynpro forms "OnActionSave" method.
6) Create a method in this class which will do the task of calling the BAPI to save the Acct Document. This method will be used in a Background task in a workflow step (after the agent approves the workitem).
7) Create a method in the class which generates the URL to the webdynpro application with the GUID passed as parameter.
(for eg: http://urltoserver/appname?GUID='guidoftheform').
8) In your save method of WD application, call the method to raise event that triggers the workflow (using OO)
lv_guid = '04AE4546EED7101DE10000000A424026'. "use GUID_CREATE
lv_objtype = 'ZWFCLASS'. " create a Z-class of your own
TRY.
CALL METHOD cl_swf_evt_event=>raise
EXPORTING
im_objcateg = 'CL'
im_objtype = lv_objtype
im_event = 'FORM_APPROVE' " this event needs to be defined in ZWFCLASS
im_objkey = lv_guid.
CATCH: cx_swf_evt_exception.
ENDTRY.
Please read through the workflow using Object Oriented document in the URL that I have mentioned above before you read through these instructions.
There would be a way to do this using BOR objects, but this is the way that I have tried and tested to use trigger workflows from Web dynpro applications.
Best Regards,
Gaurav
Edited by: Gaurav Salkar on Apr 6, 2010 6:13 PM -
How to Trigger a Workflow from ABAP Webdynpro
Hi All Gurus,
I have the following urgent requirement, my client is implementing HR and there is a requirement, where is a ABAP Webdynpro component in which we have integrated a Adobe Interactive Form. When the user calls this from through Portal and fills out the relevant data and submits it, a Workflow in the backend ECC system should lauch,
I am not familiar with, this concept although I have worked in Workflow this is the first time I am interfacind with ABAP Webdynpro and Adobe Interactive From.
Can you please let me know in steps what needs to be done to make the workflow trigger for my scenario and also the specific settings to be done in the bacckend.
Regards,
Pratima JainHi,
If you are using HCM Processes and Forms, the Workflow and form are not directly related, thats true.
But the method in the task calls the corresponding webdynpro application which responds to the action triggered by the user in turn to trigger the workflow and update the data in the HR Master Data.
There are 3 layers 1. UI (webdynpro which launches Adobe Interactive form based on ISR Framework)
2. Workflow
3. Backend framework (used for retrieving F4 helps, default values, save data in the infotypes).
for more documentation, please refer it on help.sap.com.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/82/b6b94278560c31e10000000a1550b0/content.htm
hope this helps.
Best Regards,
Saujanya. -
GP and WD with Adobe Interactive form question - need some guidance.
Hello experts,
FYI, I'm running ECC 5.0 Support Stack 9, EP 7.0 SPS 11, NWDS 2.0.9_15 with Adobe Livecyle Designer.
I am slightly stuck with what I'm trying to do. I have created a web dynpro application that has an Adobe interactive form. I'm trying to use guided procedures to initiate a process so that this interactive form can be filled out and submitted to an approver. I need the relevant parties to receive a notification email. I have setup email templates and services, I just need to know how it will fit into the process. Once approved in the process, a BAPI should be invoked to populate some fields in the form. Should I be creating the Web Dynpro application to invoke the bapi or should a guided procedure callable object invoke the bapi? I know how to do these things, but I dont know which method I should use, in order to correctly have this process flow from point A - point B. Should the process appear in the Universal Worklist? If not, why not? Will it only appear in the GP runtime? I have pretty much read thru most of the tutorials but still cannot get this GP stuff to work as a WHOLE process.
Any guidance, suggestions, possible solutions will be greatly appreciated.
Thanks
Kunal.Hi,
It seems you have not activated the Composite Form object. Only after activation you will be able to use it to create a Callable Object of type composite form.
Hope this helps,
Ashutosh -
ABAP WD application - Dynamic filling adobe interactive form
Hi,
I am developing a WD Application which has Adobe interactive form in which when user enters an input field 1 it should automatically populate respective values for input field 2 in the same form.I have this relation maintained in ztable.
How do we handle this?
Rgds
VaraMahesh,
Sorry for the confusion.
Here is my req..
My WD application will have a parameter-Inputfield1 for entering job number
My interactive form will have
- Inputfield1 as header.
- A dynamic table with inputfield2 & inputfield3
Inputfields2 as item values - should be filled automatically after user input inputfield1 ,
inputfields3 will be manual entry from user
Finally i should take all these 3 values and submit it to SAP.I can have a SUBMIT button for this at the end of the form.
rgds
vara -
Smartforms to PDF and PDF to adobe interactive forms
Dear all,
Is there any way to convert Smartforms to PDF document and import it programatically to Adobe interactive forms(SFP) and make it interactive.
Regards
AravindHi:
Smartform to PDF
ATA: i_otf TYPE itcoo OCCURS 0 WITH HEADER LINE,
i_tline TYPE TABLE OF tline WITH HEADER LINE,
Work Area declarations
w_ctrlop TYPE ssfctrlop,
w_compop TYPE ssfcompop,
w_return TYPE ssfcrescl,
Variables declarations
v_form_name TYPE rs38l_fnam,
v_len_in LIKE sood-objlen,
v_len_out LIKE sood-objlen,
v_len_outn TYPE i.
Step 1:
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZZZ_TEST2'
importing
fm_name = v_form_name
exceptions
no_form = 1
no_function_module = 2
others = 3.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
w_ctrlop-getotf = 'X'.
w_ctrlop-no_dialog = 'X'.
w_compop-tdnoprev = 'X'.
Step 2:
CALL FUNCTION v_form_name
EXPORTING
control_parameters = w_ctrlop
output_options = w_compop
user_settings = 'X'
IMPORTING
job_output_info = w_return
EXCEPTIONS
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
OTHERS = 5.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Step 3:
i_otf] = w_return-otfdata[.
Step 4:
CALL FUNCTION 'CONVERT_OTF'
EXPORTING
format = 'PDF'
max_linewidth = 132
IMPORTING
bin_filesize = v_len_in
TABLES
otf = i_otf
lines = i_tline
EXCEPTIONS
err_max_linewidth = 1
err_format = 2
err_conv_not_possible = 3
OTHERS = 4.
IF sy-subrc 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
For Smartform to Adobe is possible
as [Adobe|http://help.sap.com/saphelp_nw2004s/helpdata/en/c8/4adf7ba13c4ac1b4600d4df15f8b84/frameset.htm]
Regards
Shashi -
How to send attachment to adobe interactive form
Hi
I have two interactive forms i.e initiator and approver from intiator i want to send an attachment(word document) to approver.can you please tell me how to do this.
Thanks
KrishnaHi,
this blog may be helpful to you,
Demystifying Attachments with SAP Interactive Forms
Regards,
ramesh -
Reagarding saving and sending the adobe interactive form as non interactive
Hi ,
I am trying to send the interactive adobe form as non-interactive form through email.The interactive form size is very large because of the interactivity.
Can anybody suggest how to do this.
Regards,
DebasisDear Antony,
Thanks for the reply.
I got you but can you pls guide me how to go about it.
I need to send the email while submiting the form.So when and how i will be mapping each data node /attibutes of the main form with the intermediate form.My interactive form is of 30 pages and it may grow upto 40 pages.My response is with the to the main form where i am showing the success message.
Regards,
Debasis Nayak -
How to trigger workflow from abap program
Hi Experts,
i have a user developed screen in which there is an option to approve (not a std tcode)
for which there is no event created.
i am very new to workflow ,
now how to create an event and also how to trigger the workflowHi,
You can run a ABAP report or call a transaction from the BOR's Method directly.
Check this link for more info.
http://help.sap.com/saphelp_nw2004s/helpdata/en/80/9a3cb3971c11d194c60000e82dec10/frameset.htm.
In order to trigger an event programmatically, we would use the function module SWE_EVENT_CREATE.
BUS1001006 ( Standard Material )
here is the sample code.
DATA: key LIKE sweinstcou-objkey.
key = '68." Material Number (hard-coded)
CALL FUNCTION 'SWE_EVENT_CREATE'
EXPORTING
objtype = 'BUS1001006'
objkey = key
event = 'CREATED'
CREATOR = ' '
TAKE_WORKITEM_REQUESTER = ' '
START_WITH_DELAY = ' '
START_RECFB_SYNCHRON = ' '
NO_COMMIT_FOR_QUEUE = ' '
DEBUG_FLAG = ' '
NO_LOGGING = ' '
IDENT =
IMPORTING
EVENT_ID =
TABLES
EVENT_CONTAINER =
EXCEPTIONS
OBJTYPE_NOT_FOUND = 1
OTHERS = 2
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ELSE.
WRITE 'Event Triggered'.
ENDIF.
COMMIT WORK.
In order to test whether the event is getting triggered or not, we can make use of Event Trace. Switch on the event trace using the transaction SWELS.
Press Switch On.
Now execute the program developed earlier. Now switch-off the event trace using the same transaction SWELS.
Now go to transaction SWEL. Here you can list out the events triggered in the particular period of time. Here is the event-trace list:
Regards -
Convert smartform to pdf from ABAP webdynpro
Hi,
I want to convert smartform to pdf from ABAP webdynpro and
I want to display pdf in ABAP wedynpro view or portal iview.
what are the steps needs to be followed?
what are the classes and interfaces needs to be used?Hi,
Please check this it might be useful.
Data: tab_otf_data type ssfcrescl,
wa_out_opt type ssfcompop,
wa_con_params type ssfctrlop.
wa_rspoid type rspoid,
parameter:p_file like rlgrap-filename no-display.
Follow control parameters
wa_out_opt-tdimmed = 'X'.
wa_out_opt-tdnewid = 'X'
wa_con_params-no_dialog = 'X '.
if you want print direct pass
wa_out_opt-tddest = 'printer' (SAP Printer)
If you are using multiple header records use loop other wise no need
note that when multple headers
pass count and count > 1 means more than one header change control parameters to create single spool for all.
Loop itabXXXX. " multiple header starts
count = count + 1.
if count > 1.
wa_con_params-no_open = ' '.
wa_out_opt-tdnewid = ' '.
endif. " multiple header ends
call function fm_name
exporting
control_parameters = wa_con_params
output_options = wa_out_opt
header_header = wa_ven
importing
job_output_info = tab_otf_data
tables
header_details = itab_final
exceptions
formatting_error = 1
internal_error = 2
send_error = 3
user_canceled = 4
others = 5.
at last. " multiple header starts
wa_con_params-no_close = ' '.
wa_con_params-no_dialog = 'X'.
endat. " multiple header ends
endloop.
you will get the otf data and spool id from 'tab_otf_data'
read table tab_otf_data-spoolids index 1 into wa_rspoid. " Now you get spool no in wa_rspoid.
" pass spool in to rstxpdft4 it converts to pdf".
submit rstxpdft4
with spoolno = wa_rspoid
with p_file = p_file
and return.
I feel that your problem will solve....
Thanks,
Hari -
Displaying both ABAP webdynpro and Java Webdynpro tasks in the UWL
Hi,
We have two an issue when trying to get the UWL to process two different types of workflow tasks : ABAP webdynpro and Java webdynpro.
Examples of these tasks are:
TS12300097 u2013 LeaveRequestApprover u2013 Java Webdynpro
TS17900100 - ASR_PROCESS_EXECUTE u2013 ABAP webdynpro
We have two backend systems configured
SAP_ECC_Financials u2013 This has the WAS host pointing to the java stack (xxx:50000)
SAP_ECC_Workflow u2013 This has the WAS host pointing to the ABAP stack (xxx.80xx)
In transaction SWFVISU all the tasks which use Java webdynpro have been configured to use the u2018Javau2019system (SAP_ECC_Financials) using the SYSTEM_ALIAS parameter
In the UWL configuration the system SAP_ECC_Workflow has been registered
In addition to this all u2018Javau2019 tasks have had an extra UWl config XML created to ensure that the SYSTEM_ALIAS is set to SAP_ECC_Financials
The system SAP_ECC_Workflow has been re-registered
The UWL cache has been cleared
However when we try to launch the java webdynpro tasks the system is trying to access the ABAP stack (It is still trying to access the Web AS location for the system SAP_ECC_Workflow even though the system alias was specified as SAP_ECC_Financials )
The ABAP webdynpro tasks (in this case a HCM process and form) are launched correctly
If we try the reverse (i.e register the Java system SAP_ECC_Financials and change the SYSTEM_ALIAS parameter for the ABAP webdynpro tasks to system SAP_ECC_Workflow) then the reverse happens. The java tasks can be launched and the ABAP tasks cannot.
Does anyone have a solution to this problem. Surely other people have implemented both ABAP and Java webdynpro workflows?
Any help much appreciated
AndrewThanks a lot for all your replies..
The workitem type registration has been done already, but still it doesn't work..
But here is the actual problem...
There is a link 'Execute Workitem' in the inbox of the approver, or the second level manager...
In the leave application, when we click on this link it is taking to the portal as the task is the Webdynpro Java application task. Whereas, when using ABAP webdynpro application task, it is taking to R/3 - which means that the user cannot access this link without R/3 access. The users are given only portal access, they don't have access to backend R/3.
The requirement is that the link has to take the user to portal directly instead of R/3 - i.e it should ask only for the portal id and password.
Since it was working fine with leave application, I changed the task to Java webdynpro task, but I think the Java Webdynpro application is not deployed in the server.
Please can anybody suggest.
Best Regards,
Sushmitha -
How to display Adobe Interactive Form from ABAP (not WDABAP)
I have created a WD ABAP application that creates an Adobe Interactive Form (ZCI) and submits it for workflow. All of the data on the form is saved in custom itables in the SAP System. The end-users are supposed to save a copy of the form at the last step in the workflow before they "Acknowledge" the task in UWL. Once the acknowledge takes place, they can no longer display the form in UWL. They want an ABAP program that will read the data from the various custom tables and display a "print" version of the form (not interactive).
I am calling FM 'FP_FUNCTION_MODULE_NAME' to get the function module for the form. I then call FM 'FP_JOB_OPEN' with the parameter IE_OUTPUTPARAMS-REQNEW set to ABAP_TRUE. The call to the form FM has the following EXPORTING parameters:
EXPORTING
/1BCDWB/DOCPARAMS =
/1BCDWB/DOCXML =
I understand the /1BCDWB/DOCPARAMS but have no idea what needs to be done to for the /1BCDWB/DOCXML parameter. Can anyone offer any advice or assistance?Joyce,
this is really simple - the reason you have that /1BCDWB/DOCXML is because you defined your form interface to have an XML based interface.
While this is great for ABAP Web Dynpro, because the XML is generated for you, this is NOT the case with regular ABAP.
You should choose ABAP Data Dictionary-Based Interface. You will then be able to add tables, structures and fields to your interface.
For instance, here's code from a program where I call the form in regular ABAP
data: ls_worksheet TYPE Zxxx_structure.
* Fill the ls_worksheet structure here.
* Call the generated function module
CALL FUNCTION ls_function
EXPORTING
/1bcdwb/docparams = fp_docparams
worksheet = ls_worksheet
IMPORTING
/1bcdwb/formoutput = ls_form_output
EXCEPTIONS
usage_error = 1
system_error = 2
internal_error = 3
OTHERS = 4.
Notice I do not have the /1BCDWB/DOCXML Exporting parameter.
Just change your interface to a Data Dictionary Based, and add the tables/structures/fields to it.
then, go to your calling program, fill them, and pass the data through the Exporting parameter. -
Generate Adobe Interactive Form in background and setpdfSource value.
Hi,
Is there any way to create Adobe Interactive Form in the background assigning R/3 data (without displaying) and assign pdfSource binary information in context attribute and later, display Adobe Interactive Form using pdfSource context attribute in a new window?
if Adobe Interactive Form is in Visible state, I'm also able to display Adobe Interactive Form in a new window using pdfSource binary context attribute, .
But, unable to create Adobe Interactive form in the background when Adobe Interactive Form Visibility is NONE and unable to assign binary data to pdfSource attribute in context and hence unable to display Adobe Interactive Form in a new window. Kindly help me if this process is possible.
Thank you in advance.
Regards
PrasadHi Prasad,
This is certainly possible. First populate the dataSource context node with the data (e.g. coming from R/3). Then use <a href="http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/adobe/api/WDInteractiveFormHelper.html">WDInteractiveFormHelper.getContextDataAsStream</a> to obtain the data.xml as a byte[] by calling toByteArray() on the ByteArrayOutputStream. The next step is to obtain the xdp template as a byte[] (I don't know exactly how to do this, but it's certainly possible using some API, just as you would read other resources deployed within your Web Dynpro). When you have both the template and the data, you can use the <a href="http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/clientserver/adobe/pdfdocument/api/package-summary.html">PDFDocument</a> API to render a PDF, something as <i>WDPDFDocumentFactory.getDocumentHandler().getDocumentContext().getDocumentCreationContext()</i>; set the data and the template and other options like interactive, call execute and retrieve the pdf byte[] from the returned object. Eventually you can assign the pdf byte[] to the pdfSource context attribute. In case you use NW04, you must use the <a href="http://help.sap.com/javadocs/NW04S/current/wd/com/sap/tc/webdynpro/pdfobject/api/package-summary.html">PDFObject</a> instead.
Besides, why would you want to create the PDF before displaying it?
Kind regards,
Sigiswald -
Copy&paste from a file excel to Adobe Interactive Form
Hi all
my project is based on WDJ and Adobe Interactive Form.
I need to know if it is possible to do a copy&paste from a file excel to my Adobe Interactive Form.
Can I copy an area of data from an Excel spreadsheet (set of contiguous rows and columns)
and paste them into a text field of my form, preserving the formatting (font, size, structure of coloums/rows,...)?
Can you help me please?
Thanks!You may try posting this question in either the Designer or Forms forum.
This forum is for the LiveCycle PDF Generator ES product - a server side document conversion module. If you want to convert the entire Excel spreadsheet to a PDF server side, then PDF Generator is the correct tool to use.
Maybe you are looking for
-
Problem reading file in tomcat
Hai I have a problem, i am working on project for which we have created a directory in the defaultroot directory of the apache tomcat server.I have written a java program to read a file.Now the problem is coming as to where to put the file and if i w
-
Hi My aperture library have more than 15.000 images. From this on , I started to have a problem after import more images. Some of them appear blurry after import ( the metada still the same ). I create another library , in another place and doesn't w
-
Servers are down to Activate iso7?
2 hrs now - cannot activate my business phone - Losing money by the second - Moving to DROID. Captialization of 464B and you can't do a simple update on your phones? ***?!!!!!!!!!!!
-
DTW - importing beginning FIFO layers.
Does anyone know how to import beginning FIFO layers in B1? I don't see the functionality in the Initial Quantity Screen or the Goods Receipt screen. Thanks for your help.
-
Using BAPI to create Personnel Number.
Greetings SAP Gurus, I have a requirement to create and fill infotypes 0000, 0001 and 0002 from a legacy system flat file. While searching the forums i have seen a few posts recommending the use of HR_MAINTAIN_MASTERDATA. Will this actually create a