Application Development and Automation 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: 
Read only

Use internal table in Smartform

Former Member
0 Likes
586

Hi All,

I want to use the internal table in program in smartform.

For that i have declare that table in TABLES attribute of the function module and trying to declare that table in form interface in smartform.I have created one stucture in data dictionary of same type for the associated type of that table.But it showing me error that only table types can be used as reference type for a table parameter.

Can anybody give me the solution or atleast tell me what is problem?

Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
562

Hi,

First you define an internal table in your Driver program and populate the same with the data and put it in the Export parameters.

Then, in your Smartform, in the Form interface parameter's declarations, specify the name which you gave in the Driver program ( the Left hand side name in the interface list of the Function Module ) and specify it as type of the internal table you have used in the Driver program.

Please define in the same way as mentioned and let me know how it worked for you or still any issues on this.

Thanks,

Vishnu.

Hi All,

I want to use the internal table in program in smartform.

For that i have declare that table in TABLES attribute of the function module and trying to declare that table in form interface in smartform.I have created one stucture in data dictionary of same type for the associated type of that table.But it showing me error that only table types can be used as reference type for a table parameter.

Can anybody give me the solution or atleast tell me what is problem?

Thanks.

4 REPLIES 4
Read only

Former Member
0 Likes
562

Hi

in form interface define the parameter name and it's associated type.

remember in smartform we can carry only work area.

Declare multiple tables in the Global Data part of smartform and use those table's data in the smartfrom

Check the following link:

http://sap-img.com/smartforms/internal-table-in-smartform.htm

Regards,

Read only

dhruv_shah3
Active Contributor
0 Likes
562

Hi,

You have to declare the internal table with the type of the structure you created.

HTH

Regards,

Dhruv Shah

Read only

Former Member
0 Likes
563

Hi,

First you define an internal table in your Driver program and populate the same with the data and put it in the Export parameters.

Then, in your Smartform, in the Form interface parameter's declarations, specify the name which you gave in the Driver program ( the Left hand side name in the interface list of the Function Module ) and specify it as type of the internal table you have used in the Driver program.

Please define in the same way as mentioned and let me know how it worked for you or still any issues on this.

Thanks,

Vishnu.

Read only

Former Member
0 Likes
562

Hi

Declare like this

L_XEKPO LIKE EKPO

L_XEKPA LIKE EKPA

dont use TYPE REF TO

use LIKE

regards

Shiva