Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

smartforms

Former Member
0 Likes
655

Hi.

Please give me simple example for creating a table in a page and process data into it.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
632

Hi Swapna,

if u want to pass the data from internal table in print program to Smartform.. there is only way.. that is using form interface..

1. goto se11, create a structure same as the itab in the print program.ex. z_itab

2. create line type... se11>select radio button-DATA type>z_it_itab >press create>then select>TABLE Type> then entrer some text--> in the line type Field in giveth Str name u have created in STEP 1. activate it.

3. got SMARTFORMS-> form inteface>tables tabe--> give some name ex IT_tab type z_it_itab.

then acivate it.. then in the driver progam pass this table data.

Example

CALL FUNCTION fp_v_fm_name

EXPORTING

archive_index = toa_dara

archive_parameters = arc_params

control_parameters = fp_st_control_parameters

user_settings = space

output_options = fp_st_output_options

wa_vbdkr = fp_st_vbdkr

IMPORTING

job_output_info = l_it_ssfcrescl

job_output_options = l_it_ssfcresop

TABLES

IT_tab = z_it_itab (or table in driver program)

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.

Another way is cteate a type in Globaldifination-->types tab..

ex:

types: begin of ty_itab,

matnr type matnr,

meins type meins

vrkme type vrkme,

end of ty_itab,

ty_it_itab type standard table of ty_itab.

then GLOBAL DIFINATION>GLOBAL DATA TAB>IT)ITAB TYPE TY_IT_ITAB.

BUT In this u can't pass the data from the print Program.. if u want to populate data in to this table... u have to write the Select query in the GLOBAL DIFINATIONS-->INITILIZATIONS TAB.

Regards,

KK

5 REPLIES 5
Read only

Former Member
0 Likes
632

Have a look at smartforms SF_EXAMPLE_01 and SF_EXAMPLE_02

Read only

Former Member
0 Likes
633

Hi Swapna,

if u want to pass the data from internal table in print program to Smartform.. there is only way.. that is using form interface..

1. goto se11, create a structure same as the itab in the print program.ex. z_itab

2. create line type... se11>select radio button-DATA type>z_it_itab >press create>then select>TABLE Type> then entrer some text--> in the line type Field in giveth Str name u have created in STEP 1. activate it.

3. got SMARTFORMS-> form inteface>tables tabe--> give some name ex IT_tab type z_it_itab.

then acivate it.. then in the driver progam pass this table data.

Example

CALL FUNCTION fp_v_fm_name

EXPORTING

archive_index = toa_dara

archive_parameters = arc_params

control_parameters = fp_st_control_parameters

user_settings = space

output_options = fp_st_output_options

wa_vbdkr = fp_st_vbdkr

IMPORTING

job_output_info = l_it_ssfcrescl

job_output_options = l_it_ssfcresop

TABLES

IT_tab = z_it_itab (or table in driver program)

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.

Another way is cteate a type in Globaldifination-->types tab..

ex:

types: begin of ty_itab,

matnr type matnr,

meins type meins

vrkme type vrkme,

end of ty_itab,

ty_it_itab type standard table of ty_itab.

then GLOBAL DIFINATION>GLOBAL DATA TAB>IT)ITAB TYPE TY_IT_ITAB.

BUT In this u can't pass the data from the print Program.. if u want to populate data in to this table... u have to write the Select query in the GLOBAL DIFINATIONS-->INITILIZATIONS TAB.

Regards,

KK

Read only

0 Likes
632

Hi kishore,

what u said is exactly correct.I knew this way of populating data.

but how to design a seperate templates

and some depth in it are required ( complex object). can u help me in this.

Thanks

Read only

0 Likes
632

Hi these links wil provide u simple and complex smart forms

Ya, You Can Directly go to Smart Forms. The thing is Smartforms is the Advanced topic of SAPScript.

Go through the following Links, here u can find example with step

by step.

http://smoschid.tripod.com/How_to_do_things_in_SAP/How_To_Build_SMARTFORMS/How_To_Build_SMARTFORMS.h...

Check these step-by-step links

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/ccab6730-0501...

https://sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/8fd773b3-0301-001...

https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/library/uuid/3c5d9ae3-0501...

Check these links also.

http://www.sap-basis-abap.com/sapsf001.htm

http://www.sap-press.com/downloads/h955_preview.pdf

http://www.ossincorp.com/Black_Box/Black_Box_2.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sapgenie.com/abap/smartforms.htm

for Smartforms material

http://www.sap-basis-abap.com/sapsf001.htm

http://www.sap-press.com/downloads/h955_preview.pdf

http://www.ossincorp.com/Black_Box/Black_Box_2.htm

http://www.sap-img.com/smartforms/sap-smart-forms.htm

http://www.sap-img.com/smartforms/smartform-tutorial.htm

http://www.sapgenie.com/abap/smartforms.htm

How to trace smartform

http://help.sap.com/saphelp_47x200/helpdata/en/49/c3d8a4a05b11d5b6ef006094192fe3/frameset.htm

http://www.help.sap.com/bp_presmartformsv1500/DOCU/OVIEW_EN.PDF

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

http://www.sap-img.com/smartforms/smart-006.htm

http://www.sap-img.com/smartforms/smartforms-faq-part-two.htm

Thanks.

Reward If Helpful.

Read only

Former Member
0 Likes
632

This message was moderated.