cancel
Showing results for 
Search instead for 
Did you mean: 

How to give Values while running smartforms?

Former Member
0 Kudos

I am trying to generate an appointment letter using Smartforms. I have created a smartform and INCLUDED TEXT i.e. linked an associated Standard Text (SI) which looks as follows:

Appointment letter for: &P0001-ENAME& &P0001-PERNR&.

This appointment letter is being generated starting today July29th,2008.

Regards

ABC

- - -

But when I execute the form, the value of the field is being displayed as :

Appointment letter for: 00000000.

How do I give this value for ENAME and PERNR to the form while testing?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

if ur using just the ename and perner then execute the function module in se37 and under import parameters u will find ur ename/perner(if u have used them as a import parameter in SF). Click and enter the values there and execute.

to get the function module name click environment->function module name

Former Member
0 Kudos

Hi,

if you want to pass values to the smartform at runtime... then declare pernr and date in form interface and when you execute the function module...you can give the values

regards

padma

Former Member
0 Kudos

Thanks for the help. I have understood what you've explained. Am new to Smartforms and ABAP.

Is it possible for you to paste sample code of a "simple/basic" program which calls a SMARTFORM?

Former Member
0 Kudos

Hi Vikrant,

Declare the fields to be populated at runtime in your import parameters of the form Interface in your smartform.

when you execute the function module You get the screen to enter the values... provide the input values and execute

if you want to call the smartform using print program then call the function module in your driver program... use the same name as that of the generated function module for calling for first time.

you get the fields to be imported to the function module in your export parameters... Give the values and execute the driver program...

eg.

call function <function module name generated by SF>

  • EXPORTING

  • ARCHIVE_INDEX =

  • ARCHIVE_INDEX_TAB =

  • ARCHIVE_PARAMETERS =

  • CONTROL_PARAMETERS =

  • MAIL_APPL_OBJ =

  • MAIL_RECIPIENT =

  • MAIL_SENDER =

  • OUTPUT_OPTIONS =

  • USER_SETTINGS = 'X'

pernr = w_pernr

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

tables

t_final = t_final

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.

here pernr is variable declared in the form interface and the w_pernr is the value that is passed at the runtime

regards

padma

Former Member
0 Kudos

Please also note that I am trying to run the smartform using SE37.

Do I need to invoke the smartform through an application/program to provide it with the data needed (PERNR etc)?

How do I invoke a smartform though an application/program?

Edited by: Vikrant on Jul 29, 2008 12:11 PM

Former Member
0 Kudos

Hi,

We can use the SSF_FUNCTION_MODULE and pass the FM generated and call that FM

Or

In se38, after develpoing the entire smartform one FM is generated and copy that.

call this function modle diretly in the program using Pattern Button then we can pass the dynamic values to this FM.

In the Form Interface of SF, declare the variables that you want to pass dynamically from the program.

Like decalre variable PERNR in bot SE38 and SF(form interface). Pass this PERNR in the FM (in SE38) then this value is recieved by the PERNR field of SF(form interface)

Thanks & Regards,

Chandralekha.