cancel
Showing results for 
Search instead for 
Did you mean: 

data for smartforms

Former Member
0 Kudos

Dear Friends,

I'm a newbie in SAP-ABAP and i hope you will entertain my layman questions. I'm exploring smartforms and i want to print a Purchase Order using smartforms. I want to know which of the following approaches is convenient,

1. Pass only PO number to smartform and retrieve the entire data for printing PO in smartforms.

2. Fetch the data in form of internal table in driving abap program and pass this internal table to smartforms for printing.

Hoping for a reply.

Thanks & Best Wishes,

Mac.

Accepted Solutions (0)

Answers (3)

Answers (3)

Pranil1
Participant
0 Kudos

Hi Mac,

mac as per my knowledge normally PO smartform print is taken through me23n transaction code.

if u want to make any changes in output print u can copy the standard program n make changes in it.

program assignment is done NACE transaction for standard me23n tcode.

So please 1st confirm with ur functional people they wnat it through me23n or customized tcode..

Then I can help u in detail.

Thanx.

Pranil.

Former Member
0 Kudos

hey,

The first method is adopted by the standard smartforms already present in SAP.The second method is the way which we can do the calculations and the retrivel of data into a report and then passing that data to the smartforms.Both methods are ok.If you are good at the coding in smartforms you can pass PO number to smartforms otherwise you can do the manupulations in a report and then pass that to the smartforms.

Regards,

Midhun abraham

Former Member
0 Kudos

Hi Folks,

Thanks for prompt replies. Since i'm not too comfortable with smartforms, i may code in the second way i.e. fetch data in driving program and store it in internal table. How do i pass this internal table to smartforms? I understand we have to define import variables in "import" tab of form interface. How do i declare my internal table there ? Should i define a separate types using transaction SE11 for my internal table and use that type for my internal table. I apologize once again for my layman questions.

Bye

Former Member
0 Kudos

hey,

In smartfoms there are global attributes at the begining there just declare the internal table.

Example: you are having an internal table itab ,just create a structure in se11 in the same order of fields as in the progran .In the global attributes in smartfom dive itab type <structure> created ok.

The passing of internal table takes place by the function module .Inorder to call smartform we call the function module ,in that function module you can pass the tables.

check this,

http://help.sap.com/saphelp_erp2004/helpdata/en/a9/de6838abce021ae10000009b38f842/frameset.htm

Regards,

Midhun Abraham

Edited by: Midhun Abraham on Oct 15, 2008 5:15 PM

Former Member
0 Kudos

Hi,

You can call smartform in the driver program using the below code:

  • Call the smart form

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = w_formname -


Form name

  • VARIANT = ' '

  • DIRECT_CALL = ' '

IMPORTING

fm_name = w_impform

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3

.

you processed all your data and fetched in several internal tables and pass them to the FM generated during run time.

CALL FUNCTION w_impform

EXPORTING

archive_index = toa_dara

archive_parameters = arc_params

control_parameters = ls_control_param

mail_recipient = ls_recipient

mail_sender = ls_sender

output_options = ls_composer_param

user_settings = ' '

im_bill_text = bill_text

IMPORTING

document_output_info = i_document_output_info_p

job_output_info = i_job_output_info_p

job_output_options = i_job_output_options_p

TABLES

t_output = t_output -


internal table which is having data

t_item_list = t_item_list----


internal table which is having item data

t_condition = t_condition----


internal table which is having condition data

t_additional = t_additional----


internal table which is having additional data

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.

so you have to pass t_output, t_item_list, t_condition, t_additional to the smartform.

in the smartform in form interface declare this table t_output with the same type as in print program and use in different nodes of the smartform.

Thanks,

Sree.

Former Member
0 Kudos

USE THE SECOND METHOD THIS IS AS PER MY KNOWLEDGE