cancel
Showing results for 
Search instead for 
Did you mean: 

How can you add form routene to print program in smartforms or adobe form ?

Former Member
0 Kudos

What is the need of form routene for configuring the form and print program? Is it needed to have form routene for executing the form? How can i create form routene for print program?

Rewards to all.

Regards,

Anu

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

<i>

Hi Anupama,

Generally the concept of form routines , better known as subroutine

pools is used in sap scripts. A different program is created in SE 38

& the program is of Type S (subroutine pool). This is generally done

when we do not modify the standard driver program. This subroutine

pool becomes very handy when the standard driver program cannot

be modified, yet we need to fetch some more data from the database.

There is a standard communication structure provided by SAP which

is ITCSY, which acts as an interface between the layout set &

the subroutine pool program.

Please close the thread once the issue is resolved. If you need the code

for this please let me know, Thank you.

</i>

Answers (2)

Answers (2)

Former Member
0 Kudos

hi

good

Use the Tcode : SFP

https://www.sdn.sap.com/sdn/developerareas/was.sdn?page=AdobeForms.htm

Check these links on Adobe forms

http://help.sap.com/saphelp_nw04/helpdata/en/1e/05853ff8ec2c17e10000000a114084/content.htm

https://www.sdn.sap.com/irj/sdn/interactiveforms

http://www.sap.com/solutions/solutionextensions/pdf/BWP_Interactive_Forms_Adobe.pdf

It contains lots of useful information, documentation, and e-learning materials teaching you the basics.

http://help.sap.com/saphelp_nw2004s/helpdata/en/b7/64348655fb46149098d95bdca103d0/frameset.htm

follow these links.

https://www.sdn.sap.com/irj/sdn/interactiveforms

http://www.sapfinug.fi/downloads/2006/seminaari/uudet/SAP_Adobe.pdf

https://weblogs.sdn.sap.com/weblogs/topic/45?x-o=50

Interactive Forms based on Adobe software is SAP's new solution for forms development. Its first release has the focus on interactive use of forms. High-volume printing is supported in principle, but - being a new solution - the performance has not yet reached the same level as Smart Forms or SAPscript, two established solutions that had years to grow. Interactive Forms is the only solution that will continue to be enhanced with new features, while SAPscript and Smart Forms will be supported without limitations.

When (or if) to move to Interactive Forms depends on your requirements. For interactive forms usage, i.e. the new functions, you have no choice, as the existing solutions don't support it. High-volume print scenarios need to be carefully analyzed to see whether your concrete requirements can be met at this point.

However, it is possible to move to Smart Forms and design your forms in such a way that a migration at any point in the future would be but a small step. Smart Forms offers from Web AS 6.40 a migration wizard to Interactive Forms. Technically, everything can be migrated, but we recommend against things like ABAP program nodes, for example.

You are not forced to ever go to Interactive Forms if you don't want to. It really depends on whether your client needs any of the new features in Interactive Forms. Also, if they are currently working with JetForms, they could enquire with Adobe directly what migration path they offer to the joint solution.

go thru this links

http://help.sap.com/saphelp_nw04/helpdata/en/d2/4a94696de6429cada345c12098b009/frameset.htm

example

To get an overview idea about Adobe forms ,

Using SFP Tcode , first you need to create a interface . in interface you can declare the import and export parameters and also the declaration part, coding etc : This is nothing but similar to Function module interface.

And now we have to create the Form which is interactive. Create the form and enter the interface name which you have created in first step, so that the parameters , declarations of fields etc : will be copied and available in the form layout. So that you can drag and drop these declared fields ( dclared fields of interface ) to the layout.

Create the context and layout in the form.

The layout generated can be previewed and saved as PDF output.

Now we need to integrate the driver program and the PDF form to get the final output as per the requirement.

On activating and executing the form you will get a function module name just similar to smartforms.

The driver program needs to call this FM.

Refer to the below sample code :

DATA : is_customer TYPE scustom.

DATA : it_bookings TYPE ty_bookings.

DATA : iv_image_url TYPE string.

DATA : iv_sending_country TYPE adrc-country.

DATA : it_sums TYPE TABLE OF flprice_t.

DATA : docparams TYPE sfpdocparams.

DATA : formoutput TYPE fpformoutput.

DATA : outputparams TYPE sfpoutputparams.

PARAMETERS : pa_cusid TYPE scustom-id.

SELECT SINGLE * FROM scustom INTO is_customer

WHERE id = pa_cusid.

SELECT * FROM sbook

INTO CORRESPONDING FIELDS OF TABLE it_bookings

WHERE customid = pa_cusid.

outputparams-nodialog = 'X'.

outputparams-getpdf = 'X'.

*outputparams-adstrlevel = '02'.

CALL FUNCTION 'FP_JOB_OPEN'

CHANGING

ie_outputparams = outputparams

EXCEPTIONS

cancel = 1

usage_error = 2

system_error = 3

internal_error = 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.

docparams-langu = 'E'.

docparams-country = 'US'.

docparams-fillable = 'X'.

CALL FUNCTION '/1BCDWB/SM00000043'

EXPORTING

/1bcdwb/docparams = docparams

is_customer = is_customer

it_bookings = it_bookings

  • IV_IMAGE_URL =

iv_sending_country = 'US'

  • IT_SUMS =

IMPORTING

/1bcdwb/formoutput = formoutput

EXCEPTIONS

usage_error = 1

system_error = 2

internal_error = 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.

CALL FUNCTION 'FP_JOB_CLOSE'

  • IMPORTING

  • E_RESULT =

EXCEPTIONS

usage_error = 1

system_error = 2

internal_error = 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.

thanks

mrutyun^

former_member196280
Active Contributor
0 Kudos

Routine is mostly used to fecth data to your form that does not exists in your driver program(note: if driver program is not in your control)

To fetch data we use the following code inside your SAPscript...

Ex:

Go through this example

Ex.

/: PERFORM <Subroutine name> IN PROGRAM <subroutine prog name>

/:USING &<field name>&

/:CHANGING &<field name1&

/:ENDPERFORM

Then create subroutine pool program and you have to write the code.

FORM ><subroutine name> tables int_cond structure itcsy

outt_cond structure itcsy.

data : value(20), value1(20). "do your own declarations

Read int_cond table index 1.

value = int_cond-value.

value1 = value1 + value.

Read outt_cond table index 1.

outt_cond-value = value1.

Modify outt_cond index 1.

ENDFORM.

Just rough idea given above.

Regards,

Sairam