Application Development 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: 

passing internal table to smart forms

Former Member
0 Kudos
488

Hi,

I am new to smartforms.I have got a internal table in one of the programs whose type is not of standard tables type.I want to pass that table to Smart forms for printing .is it possible & if yes how will i declare the table in the form interface .

Kindly reply.

Thanks & Regards,

Malathi V.

7 REPLIES 7

Former Member
0 Kudos
67

hi

u try to create a structure of the itab type in se11 and use it in global declaration in smartform

Former Member
0 Kudos
67

Hi Malthi,

Define a table type reference to pass an internal table to the smartforms.

Cheeers

VJ

0 Kudos
67

In the form interface,there is a tab called 'TYPES'.

In that write like this:

types : begin of ty_mara,

matnr type mara-matnr,

end of ty_mara.

Then in the form interface , there is a tab called 'GLOBAL DATA'.

In that declare as below,

wa type ty_mara "for work area

itab type standard table of ty_mara "for internal table

In case of doubts, get back to me.

If problem solved , reward points and close this thread.

Former Member
0 Kudos
67

hi malathi,

create a structure in se11 and in smartforms <b>Form Interface</b> in <b>TABLES</b> tab give as

parameter name; itab like zstruct.

and declare the <b>WA in GLOBAL DEFINITIONS</b>

WA like zstruct.as u will loop the internal table into the WA.

hope this helps,

priya.

Message was edited by: Priya

Former Member
0 Kudos
67

HI Malathi

Create a structure and reference in smartform

Under Global definition

->Global data

Regards

Laxmi

Former Member
0 Kudos
67

Hi,

create a strucure with the fields present in ur internal table.use : itab type structure in the tables tab of the form interface for the application

data to be available for the Smartform to print.

regards,

keerthi.

Former Member
0 Kudos
67

Hi Malathi,

You can pass data to smartforms either through a print program or directly within smartforms.

If you want to pass int.table (not of standard table type) , you can do like this.

1) In the Form Interface ,create a variable

ITAB LIKE ZSHAIL_T1

2) In the Global definition, create a structure

STRUCT LIKE ZSHAIL_T1

3)Create a Table Node and in the DATA tab, give it as

ITAB to STRUCT.

4) You can switch on the Field list (Ctrlshiftf4) and drag and drop your text(&struct-field_name&) wherever you want it to be displayed.

5) From the main program, call the FM SSF_FUNCTION_MODULE_NAME to get the FM name and then call the generated FM name and pass the internal table name in the tables parameter.

Hope this is clear for you...

Regards,

SP.