Professional Documents
Culture Documents
An SAP Consultant - Integration of SAP Adobe Forms With Web Dynpro ABAP Application
An SAP Consultant - Integration of SAP Adobe Forms With Web Dynpro ABAP Application
An SAP Consultant: Integration of SAP Adobe Forms with Web Dynpro ABAP Application
An SAP Consultant
HOME
ABAP
ALV
SMART FORMS
ADOBE FORMS
HR ABAP
WORKFLOW
HCM
Want to Contribute ?
ABAP application.
Tutorial Steps
Step 1: Create the Form Interface
Step 2: Create and Design the Form
An SAP Consultant
Check Simple ADOBE Form and calling it from ABAP Program for Step 1 & Step 2.
Like
Create Web Dynpro Component(ZOVH_WD_ADOBE) with window name W_WINDOW with default iview
V_VIEW.
Followers
Join this site
w ith Google Friend Connect
Members (30)
Popular Posts
http://www.an-sap-consultant.com/2014/04/Integrating-Adobe-forms-in-Webdynpro-ABAP.html
1/5
10/18/2014
An SAP Consultant: Integration of SAP Adobe Forms with Web Dynpro ABAP Application
9
10
ABAP-Categories
SAP ABAP - (00)-Enhancement
SAP ABAP - (01)-BADIs
SAP ABAP - (02)-User Exits
SAP ABAP - ALV
SAP ABAP - Application Server
SAP ABAP - Background jobs
SAP ABAP - BDC - Batch Input Session
SAP ABAP - BDC related
SAP ABAP - Class
Layout tab: Insert screen element ADOBE_FORM(of type InteractiveForm) to display Adobe form in PDF
format.
Goto ADOBE_FORM element properties->Bind PdfSource property with ADOBE_FORM attribute for
Context.
http://www.an-sap-consultant.com/2014/04/Integrating-Adobe-forms-in-Webdynpro-ABAP.html
2/5
10/18/2014
An SAP Consultant: Integration of SAP Adobe Forms with Web Dynpro ABAP Application
Websites I follow
HTML/CSS/Javscript Generator
Easy CSS3 Generator
Digital Inspiration
Shout ME Loud
Twitter Feed
Methods tab->WDDOMODIFYVIEW method. Here we write code to get the PDF format of ADOBE form.
Get the function module of generated Form using FP_FUNCTION_MODULE_NAME. Set GETPDF to 'X'
Open the spool job using function module FP_JOB_OPEN.
Call the generated function module. Get PDF data
Close the spool using function module FP_JOB_CLOSE.
Pass PDF to Context attribute for PDF.
Code
METHOD wddomodifyview .
TYPES:
ty_outputparams TYPE sfpoutputparams, "Form Parameters for Form Processing
ty_docparams
TYPE sfpdocparams,
"Form Processing Output Parameter
ty_fpformoutput TYPE fpformoutput.
DATA:
wa_outputparams TYPE ty_outputparams,
wa_docparams
TYPE ty_docparams,
wa_fpformoutput TYPE ty_fpformoutput.
DATA:
gv_fm_name
TYPE rs38l_fnam,
gv_pernr
TYPE pa0001-pernr,
gv_ename
TYPE pa0001-ename,
gv_bukrs
TYPE pa0001-bukrs.
DATA lo_el_context TYPE REF TO if_wd_context_element.
DATA ls_context
TYPE wd_this->element_context.
DATA lv_adobe_form TYPE wd_this->element_context-adobe_form.
DATA:
c_pernr TYPE pernr_d VALUE '10008289'.
" Sets the output parameters and opens the spool job
wa_outputparams-device
= 'PRINTER'.
wa_outputparams-dest
= 'LP01'.
wa_outputparams-nodialog = 'X'.
wa_outputparams-preview
= 'X'.
wa_outputparams-getpdf
= 'X'.
CALL FUNCTION 'FP_JOB_OPEN'
CHANGING
ie_outputparams = wa_outputparams
http://www.an-sap-consultant.com/2014/04/Integrating-Adobe-forms-in-Webdynpro-ABAP.html
3/5
10/18/2014
An SAP Consultant: Integration of SAP Adobe Forms with Web Dynpro ABAP Application
EXCEPTIONS
cancel
=1
usage_error
=2
system_error
=3
internal_error = 4
OTHERS
= 5.
IF sy-subrc <> 0.
" <error handling>
ENDIF.
" Get the name of the generated function module
CALL FUNCTION 'FP_FUNCTION_MODULE_NAME'
EXPORTING
i_name
= 'ZOVH_SIMPLE_FORM'
IMPORTING
e_funcname = gv_fm_name.
IF sy-subrc <> 0.
"<error handling>
ENDIF.
wa_docparams-langu
= 'E'.
wa_docparams-COUNTRY = 'SG'.
" Fetch the Data and store it in the Internal Table
SELECT SINGLE pernr ename bukrs
FROM pa0001
INTO (gv_pernr, gv_ename, gv_bukrs)
WHERE pernr EQ c_pernr.
CALL FUNCTION gv_fm_name
EXPORTING
pernr
= gv_pernr
ename
= gv_ename
bukrs
= gv_bukrs
IMPORTING
/1bcdwb/formoutput = wa_fpformoutput
EXCEPTIONS
usage_error
=1
system_error
=2
internal_error
= 3.
lv_adobe_form = wa_fpformoutput-pdf.
" Close the spool job
CALL FUNCTION 'FP_JOB_CLOSE'
EXCEPTIONS
usage_error
=1
system_error
=2
internal_error = 3
OTHERS
= 4.
IF sy-subrc <> 0.
" <error handling>
ENDIF.
* get element via lead selection
lo_el_context = wd_context->get_element( ).
* set single attribute
lo_el_context->set_attribute(
NAME = `ADOBE_FORM`
VALUE = lv_adobe_form ).
ENDMETHOD.
http://www.an-sap-consultant.com/2014/04/Integrating-Adobe-forms-in-Webdynpro-ABAP.html
4/5
10/18/2014
An SAP Consultant: Integration of SAP Adobe Forms with Web Dynpro ABAP Application
0 comments:
Post a Comment
Your use ful com m e nts, sugge stions are appre ciate d.Your com m e nts are m ode rate d.
Comment as:
Publish
Google Account
Preview
An SAP Consultant
Contact US
About US
Follow US
Facebook
Follow by Email
Email address...
Privacy Policy
LinkedIn
Google
http://www.an-sap-consultant.com/2014/04/Integrating-Adobe-forms-in-Webdynpro-ABAP.html
5/5