Skip to Content

A very basic sample call a form create using SFP and called by a report program.

Create an interface:

/wp-content/uploads/2016/01/pic_865709.jpg

Add a few import parms to the interface:

/wp-content/uploads/2016/01/pic_865709.jpg

Create a form which will use the interface and drag the interface import fields over to the Context of the form:

/wp-content/uploads/2016/01/pic_865709.jpg


Change layout Type to “ZCI Layout”


/wp-content/uploads/2016/01/pic_865709.jpg

Start Adobe LiveCycle and choose the “Layout” tab page and then “Utilities” -> “Insert Web Dynpro Script”.


Add three “ISR Text Edit” fields to the layout:


    From the Data View, drag over and bind each input field from the interface to one of the input fields on the layout of the form.


/wp-content/uploads/2016/01/pic_865709.jpg


Activate the form.


Pressing F8 will execute the form as a function module.  Input values for the 3 interface parameters and then make note of the function name (/1BCDWB/SM00000205).  Do a print preview to verify it looks ok.



Abap Code for Report Program to call the form:

Code to call from a standard abap report:

report ytest_sfp_form.

start-of-selection.

data :fp_outputparams   type sfpoutputparams.

fp_outputparamsnodialog = ‘X’.
fp_outputparams
preview  = ‘X’.
*  fp_docparams-FILLABLE    = ‘N’.
fp_outputparams
device   = ‘PRINTER’.
fp_outputparams
connection = ‘ADS’.
fp_outputparams
bumode = ‘-‘.
fp_outputparams
dest = ‘LPDF’.
fp_outputparams
dataset = ‘PBFORM’.
fp_outputparams
pdltype= ‘pdf’.
fp_outputparams
xdcname = ‘acrobat6.xdc’.

call function ‘FP_JOB_OPEN’
changing
ie_outputparams
= fp_outputparams
exceptions
cancel         
= 1
usage_error    
= 2
system_error   
= 3
internal_error 
= 4
others          = 5.
if sysubrc <> 0.
message id symsgid type symsgty number symsgno
with symsgv1 symsgv2 symsgv3 symsgv4.
endif.

data: lv_char50_1 type char50, lv_char50_2 type char50, lv_char50_3 type char50.

lv_char50_1 = ‘Test Parm 1’.
lv_char50_2
= ‘Test Parm 2’.
lv_char50_3
= ‘Test Parm 3’.

call function ‘/1BCDWB/SM00000205’
exporting
lv_char50_1
= lv_char50_1
lv_char50_2
= lv_char50_2
lv_char50_3
= lv_char50_3.

if sysubrc <> 0.
*   Implement suitable error handling here
endif.

call function ‘FP_JOB_CLOSE’
exceptions
usage_error   
= 1
system_error  
= 2
internal_error
= 3
others         = 4.
if sysubrc <> 0.
*   Implement suitable error handling here
endif.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply