cancel
Showing results for 
Search instead for 
Did you mean: 

how to use 3 different tables inside a smartform

Former Member
0 Kudos

hi experts,

i have to design a test cerificate where fields comes from 3 different tables .i know to bring values from one table into smartforms.Now how to bring three tables inside a smartform.what we have to do in form interface ,global definition,table lines etc.these three tables have a common field lotno.

consider that i have an internal table final which has all the values i required to print the form.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

HI,

if u have an internal table which is final, you can directly send that to the smartform using the option Table (right click on window, say Create-> Table)

in the Data menu of this table give internal table name & loop this into local structure. now you can use this structure fields in the Header & Main Area of the Created table.

This works as looping within the internal table, fetching all the contents.

Reward Points if useful.

Regards,

Seema

Answers (4)

Answers (4)

former_member480923
Active Contributor
0 Kudos

Dont have to pass any data from outside, just pass your where clause condition from the driver program into the SF interface and then declare a Internal table type in the TYPES Tab and a n internal table of the same type in the global data and join the 3 tables using FOR ALL ENTRIES / JOIN condition in a Select query in the Initialization Tab.

Hope that Helps

Anirban M.

Former Member
0 Kudos

hi manikandan,

you just define one structure in se11 which includes all ouput fields(from three itabs),

with reference of this structure u can define one global itab in driver program, with same struture u can define one itab in smartform form interface,

in driver program,

in loop u can pass all output fields into these global itab from three itabs with reference of field <b>lotno</b>.

then from this global itab u can pass for the windows.

regards,

seshu.

Former Member
0 Kudos

hi maniknandan,

u can do one thing...just populate all the data within smartforms using select queries based on input selections...just pass the input values to smartforms and write the select queries in intialization of ur smartform...

for that define the internal table in smartform..in TYPES tab...

and just populate that data in ur smartforms...

hope this will help u out...

Please reward points in case usefull

Regards,

Prashant

Former Member
0 Kudos

Hi Manikandan,

Pass them from the function module that is either genrated or thro SSF_FUNCTION_MODULE_NAME and pass them individually or consolidate all three tables into one single internal table using READ TABLE or Modify table.

This should solve your query.

Reward Points if useful.

Thanks,

Tej..