cancel
Showing results for 
Search instead for 
Did you mean: 

to transfer table values to output thru smartform

Former Member
0 Kudos

Hi Techis

Will any body pls tell me d complete steps to transfer values from table to smartform output..

I want to tranfer name1 land1 from kna1 table to my smartform output pls giv me detail steps with example

as i m new to smartforms..

Your help will be highly helpful.

rewards will b given for each help ful ans..

Regards

santosh

Accepted Solutions (0)

Answers (3)

Answers (3)

mahaboob_pathan
Contributor
0 Kudos

hi ,

Creating Structure : SE11 like zmm_structure with the filelds which u need to print.

EXAMPLE - SMARTFORM to define the report layout and below program to populate the data into internal table itab.

&----


*& Report ZAPRIL_SMART *

*& *

&----


*& *

*& Purpose : Example of smart form with multiple table example *

*& *

*& Note : zmm_structure is an externally described data structure *

*& Also note that data structure cannot include another structure *

*& as one of its field definition. *

*& WERKS field is actually another structure but in the above *

*& structure it was defined as char 4 which is its attrib. *

&----


REPORT ZAPRIL_SMART .

Data itab like zmm_structure occurs 0 with header line.

*Select aMATNR aM ATKL bWERKS FROM MARA as a inner join MARC as b on aMATNR = b~MATNR

*into table itab.

  • Three tables joined (inner join)

Select aMATNR aMATKL bWERKS cmaktx FROM MARA as a

inner join MARC as b on aMATNR = bMATNR

inner join MAKT as c on aMATNR = cMATNR

into table itab.

CALL FUNCTION '/1BCDWB/SF00000043'

TABLES

ITAB = itab.

  • IF SY-SUBRC <> 0.

    • test

  • ENDIF.

----


End -

The below document shows with snapshots that how the ‘SMARTFORM’ report was created.

Create a new document, transcation code - SMARTFORMS

Double click on each nodes to create the related attributes. See below the Output tab selection of “Form Attributes” node and observe style. Style has to be created separately for paragraphs and characters.

Form Interfact – Double click

Click on ‘Tables’ node

ZMM_STRUCTURE is the name of the externally described data structure and ITAB is the parameter ITAB which is received from the calling program “ZAPRIL_SMART”.

GLOBAL DEFINITION : Double click

WA is a work area defined, so that it can be used to get the field values printed on the report.

Right Click on %PAGE1 New Page to get the below options.

Click on the %Window nodes and it takes you to the below screen. TABLES, WINDOWS, ROWS, COLUMNS have to be created. (same as window was created)

Note : The Table node is very important as it allows you to get the data into WA (work area from the parameter table).

Watch the %TEXT1 New Text 1 node and the corresponding General Attributes below – The fields have been defined to display on the form.

Note : The “Txt Editor” on the right side pane where the pen icon is shown on writing on the text is important if one wishes to define the fields and the paragraph style. See below

Footer Portion as shown below.

Former Member
0 Kudos

Hi Mehbooh

Thanks a tone for ur reply but will u pls explain further redardingin global defination in detail and program lines in

details..

ur help will b highly imp for me

Regards

Santosh L

Former Member
0 Kudos

Hi,

There are two important things in the transaction ‘SMARTFORMS’

1. Global settings

2. Pages and windows

Under Global settings again there are three things,

1. Form attributes

2. Form interface

3. Global definitions

1. FORM ATTRIBUTES:

WHAT IS ‘GENERAL ATTRIBUTES’ AND ‘OUTPUT OPTIONS’ IN ‘FORM ATTRIBUTES’?

Before creating this smartform,

a. one has to define the form’s width height

b. what language has to be used?

c. characters per inch, lines per inch

d. style (Which we created in ‘SMARTSTYLE’ )

e. Output format (standard).

2. FORM INTERFACE:

This form interface is not with regards to creation of a form attribute, but

Something related to the data which has to be printed in the smartform.

This ‘FORM INTERFACE’ has parameters like,

1. IMPORT

2. EXPORT

3. TABLES

4. EXCEPTIONS

And hence, it is a function module which accepts some input values through the ‘IMPORT’ parameter and gives back some values either through ‘EXPORT’ or in the form of ‘TABLES’, ‘EXCEPTIONS’ is there for error handling.

3.GLOBAL DEFINITION:

WHAT IS GLOBAL DEFINITON?

Global definition is a place where the declared datas can be accessed anywhere in the smartform program.

There are six tabs in this ‘GLOBAL DEFINITIONS’, they are:

1. GLOBAL DATA:

The data’s which has to be accessed anywhere in the smartform.

2. TYPES:

The structure, internal table and the work area which has to be global can be accessed globally through this tab.

3. FIELD SYMBOLS:

Even field symbols could be declared and used globally through this tab.

4. INITIALIZATION:

This tab is like the event ‘INITIALIZATION’ in the classical report, which is used for initializing the values in it.

5. FORM ROUTINES:

In form routines tab we enter routines that we want to use in the form via the program lines node. Within these form routines we cannot access any global data unless you explicitly pass them to the form routine interface.

In general it is like an include for all the performs that are in the program code lines and defined in the global definitions.

6. CURRENCY AND QUANTITY FIELDS:

This tab is used for declaring the reference field for the currency and the quantity fields.

nivin_varkey
Active Participant
0 Kudos

Hello santosh,

Please create a structure in SE11, with the said fields. Now, In the smartofrm interface section, in the Import tab add this structure. then while calling the smartform function module, pass values to this structure.. hope this clears ur doubt.if yes..Please assign Points .if no..Please feel free to reply with ur doubt.

former_member195383
Active Contributor
0 Kudos