cancel
Showing results for 
Search instead for 
Did you mean: 

Smartforms for beginner

Former Member
0 Kudos

hello everyone,

i am new to SAP particularly SMARTFORMS. i am planning to create a simple letter which later i want to call in my abap program.

example:

TO:<b> variable_name</b>

<b>variable_address</b>

(main body)

Dear <b>variable_name</b>,

blah blah blah... blah blah blah..

thank you,

mrm.

now, any suggestions/help/tip in declaring the variables in smartforms? i absolutely have no idea how. :(.

thanks for future responses.

Mark

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Mark,

Go thru the link othere have given it would be make u learn lot abt smartforms.... For ur requirement U need to have 2 things as every smartforms have..... a Print program .... then ur smartforms for it.

Goto SE38 & create a print program.... as follows

DATA: v_fm_name TYPE rs38l_fnam,

v_name type text20,

variable_address type text20.

v_name = ' Mark Ronald Magat'.

v_address = 'Address'.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = < Ur smartform name within single quotes'

IMPORTING

fm_name = v_fm_name

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3.

CALL FUNCTION '/1BCDWB/SF00000183'

EXPORTING

v_variablename = v_name

v_address = v_address

  • IMPORTING

  • DOCUMENT_OUTPUT_INFO =

  • JOB_OUTPUT_INFO =

  • JOB_OUTPUT_OPTIONS =

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.

Now Go to smartforms....

In form Interface give :

v_variablename type text20

v_address type text20

Create a a text element in a window . now go to the text element and give

TO: & v_variablename &

&v_addrerss&

Dear & v_variablename & ,

blah blah blah... blah blah blah..

Thank You

mrm.

Save check activate.... u are done.....

When u are clicking execute u find a function module being created take that name and paste it in SE38 program @ second call function... in the above code it is /1BCDWB/SF00000183'... but will change for each smartform.

Reward if u find it useful.

Arun T

Answers (3)

Answers (3)

Former Member
0 Kudos
Former Member
0 Kudos

hi

just refer to the link below

http://www.sapmaterial.com/?gclid=CN322K28t4sCFQ-WbgodSGbK2g

<b>step by step procedure with screen shots</b>

regards

ravish

<b>plz dont forget to reward points if helpful</b>

former_member196280
Active Contributor
0 Kudos

Follow the below steps, it will help you to create SF

sMART fORM

uSING TABLE IN Smart Form

1) Tcode --> SmartForms

2) Form name --> Z_SF_TEST Create

3) Under Global settings

a) Form Interface

Table Tab

ITAB LIKE EKPO

b) GLOBAL Definitions

WA_NETPR LIKE EKPO-NETPR

In smart forms if we want to display quantity and currency fields. We can't directly display currency field and quantity fields

For that we have to create an extra variable in global definitions

Ex: netpr FIELD of EKPO

CREATE program lines and specify WA_NETWR = itab-netpr.

4) RT CLick on main Window

CREATE --> TABLE

Click Table painter

DEFAULT %LTYPE will be Created

a) If you want more like Header footer etc add by rt click on %LTYPE1

Table (Tab)

%LTYPE Radio(SELECT) 5 CM 5 CM 6 CM

CLICK on DATA (Tab)

INTERNAL TABLE ITAB LIKE ITAB

5)RT click on table control and create --> program lines

General attribute (Tab)

INPUT PARAMETER OUTPUT PARAMETER

itab WA_NETPR

Code Area

WA_NETWR = ITAB-NETPR.

6) RT CLcick on table ctl and create 3 text to display the fields

a) % text1 +button(insert field)

FIELD name &itab-ebeln&

Output options (tab)

Check New line LINETYPE %Ltype1

check new cell

b) % text2

& itab-ebelp&

output options

check new cell

c) % text2

& wa_netpr&

output options

check new cell

Report ac

Tables ekpo.

Data: itab1 like ekpo occurs 0 with header line.

select * into table itab1 from ekpo.

Call function module

Regards,

Sairam

Former Member
0 Kudos

hello sai ram reddy,

could you plz guide us for the next steps after creating smartform.i have created the smartform as per your instructions but facing problem in calling that form.so please guide