cancel
Showing results for 
Search instead for 
Did you mean: 

Need a simple example program code to use SF_EXAMPLE_01

Former Member
0 Kudos

Hi all,

I have just try to learn smartforms. As i have SAP NW4 for learning.

I found SF_EXAMPLE_01 in the system.

Can any body help me out how to use this example in abap program code?

Thanks.

rob

Accepted Solutions (1)

Accepted Solutions (1)

former_member196280
Active Contributor
0 Kudos

Smart Forms, try this steps.. it will teach you how to create smart form and how to use it.

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 "to know function module name goto smartform and execute the smart form name it will give you the function module name.

If your question is answered, close the thread and reward all useful answers...

Regards,

Sairam

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi all,

I've found what I was looking for how to use form SF_EXAMPLE_01 within SAP NW4 Test Drive.

To find/run the report program using smartforms:

1. Go to tcode SE80

2. Program: SF_EXAMPLE_01 --> Display

3. Execute

4. We can use the default value.

5. Execute

6. Output device: LP01 (or another available in our system), press Print Preview button.

7. Print preview of smartforms SF_EXAMPLE_01 should appear with data as well.

To find form SF_EXAMPLE_01 that used in reporting program:

1. Go to tcode SMARTFORMS.

2. Form: SF_EXAMPLE_01 --> Display.

Thanks to response to my questions.

robiton

Former Member
0 Kudos

Hi,

1.In smartforms screen itself, give ur smartform name as SF_EXAMPLE_01 and click execute button.

2.It will display function module name, again click execute button with default input value again click execute button.

3.It will ask for output device, give ur local printer name and click print preview button.

4.U can see the output hereitself.

There is no need to write the program.

Former Member
0 Kudos

hi all,

thanks Sairam and Vinay for the response.

right, that was my first posting in SDN.

some of your links are refers to 4.6C and the examples inside using tables that are not available on my system (SAP NW4 test drive version).

Vinay could you please explain what is the driver program?

example report program using 'SF_EXAMPLE_01' will help me out at much.

Thanks

rob

Former Member
0 Kudos