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 data to smartforms

Former Member
0 Kudos

Hi,

I have to pass the my internal table data to the smartforms.my internal table declaration is like this:

DATA: BEGIN OF i_data OCCURS 0,

sel,

seqno type i,

pernr TYPE pernr-pernr,

ename TYPE p0001-ename,

trfgr type p0008-trfgr,

begda type p0000-begda,

orgeh type p0001-orgeh,

orgtx type t527x-orgtx,

kostl TYPE p0001-kostl,

ktext type cskt-ktext,

CTEXT4 LIKE HRP1000-SHORT, "Current subsection desc.

CTEXT3 LIKE HRP1000-SHORT, "Current section desc.

CTEXT2 LIKE HRP1000-SHORT, "Current department desc.

CTEXT6 LIKE HRP1000-SHORT, " division

CTEXT1 LIKE HRP1000-SHORT,

n_late_att TYPE t_num,

s_late_att TYPE t_scr,

n_paid_mc TYPE t_num,

s_paid_mc TYPE t_scr,

n_unpaid_lv TYPE t_num,

s_unpaid_lv TYPE t_scr,

n_unpaid_mc TYPE t_num,

s_unpaid_mc TYPE t_scr,

n_hospitalz TYPE t_num,

s_hospitalz TYPE t_scr,

s_total TYPE t_scr,

END OF i_data.

i retrieved all the data into i_data. so i need to pass this data to smart form. i know about the function module but how to kept declaration in smartform??

can anyone suggest on this??

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hello friend,

Create a structure with same fields in SE11. Ie as a global structure because you can specify only global types in smart forms.

After creating structure you can create a table type using that.

Declare a structure and internal table using the respective structure and internal table in the global definition of smart forms.

Then you can use it with the form and can process the data.

I hope you will be much clear after reading this if you still have queries please revert back to me will help you.

Thanks,

Sri Hari

5 REPLIES 5

Former Member
0 Kudos

Hi Arjun,

After fetching the data into internal , call the smartforms from your program then you can use this internal table in your smartform by giving input of smartform name and function module name.By looping that internal table you can display the data in smartform print preview.

Regards,

G.Aditya

former_member222709
Contributor
0 Kudos

Hi Arjun,

You need to define the structure 'i_data' as a dictionary object (T. Code: SE11).

Then this structure can be referred to in the Global Definition of the SMARTFORM.

Regards,

Pranav.

Former Member
0 Kudos

Hello friend,

Create a structure with same fields in SE11. Ie as a global structure because you can specify only global types in smart forms.

After creating structure you can create a table type using that.

Declare a structure and internal table using the respective structure and internal table in the global definition of smart forms.

Then you can use it with the form and can process the data.

I hope you will be much clear after reading this if you still have queries please revert back to me will help you.

Thanks,

Sri Hari

former_member186077
Active Participant
0 Kudos

Hi,

You either need to create a structure in SE11 with the same list of fields and then Create a table type and use in both the print program as well as smartform.

Or you can create a structure in smartform types tab ( in Global definitions ) and then declare a table type of standard table of the structure defined and use it in the interface.

Thanks and Regards,

Sriranjani Chimakurthy.

0 Kudos

Hi all,

thanks for replies.problem has been solved.