cancel
Showing results for 
Search instead for 
Did you mean: 

Smart form

0 Kudos

Hi:

In my driver program in have declard internal table as:

DATA : BEGIN OF itab_final OCCURS 0,

srlno TYPE i,

pernr LIKE pa0001-pernr,

name LIKE pa0001-ename,

desig(30),

category TYPE t503t-ptext,

trfgr LIKE pa0008-trfgr,

payscale(30),

END OF itab_final.

I want to display the data in my inter table i.e. itab_final in my smartforms.

shegar

Edited by: Shegar Rajamani on Aug 4, 2009 2:29 PM

Accepted Solutions (0)

Answers (1)

Answers (1)

alex_m
Active Contributor
0 Kudos

Pass the internal table to the smartform and use that in Mainwindow TABLE and display that in text element.

0 Kudos

Dear Alex:

Please advice me how to tranfer the internal table to smart form.

What to enter in Form Interface and Global Definition.

Shegar.

alex_m
Active Contributor
0 Kudos

In form defenition you need to define your import parameters, you mention your internal table as Import parametr which get called from driver porgram..

Global defenition you also define the work area type same as the internal table passed in form interface, In table loop mention the table name and the work area..

For more info, pls see the below document.

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

Former Member
0 Kudos

Hi,

In Form Interface, Tables tab define an Internal Table which to be used to transfer data from Driver program to Smartform.

The TYPE associated to this internal table must be declared globally (create a structure using SE11).

Now, u define another internal table with same global structure type in Driver program.

Now, u call the Smartform FM, here u ill see the internal table declared in Form Interface of smartform as in Tables of FM.

eg:

Smartform:

Form Interface

Import Export Tables

itab LIKE z_itab_sturct

Driver Program:

data : gtab TYPE standard table of z_itab_sturct.

data : l_c_form TYPE tdsfname,

l_f_fname TYPE tdsfname.

CALL FUNCTION 'SSF_FUNCTION_MODULE_NAME'

EXPORTING

formname = l_c_form

IMPORTING

fm_name = l_f_fname (U ill get the Smartform FM name)

EXCEPTIONS

no_form = 1

no_function_module = 2

OTHERS = 3 .

IF sy-subrc = 0.

CALL FUNCTION l_f_fname " '/1BCDWB/SF00000132'

EXPORTING

control_parameters = l_t_control

output_options = l_t_out

user_settings = space

p_langu = p_langu

TABLES

itab = gtab

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.

ENDIF.

Hope it helps!!

Rgds,

Pavan