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

Create Parameter in Smartforms Interface table tab signed as local type

Former Member
0 Likes
2,229

Error Message:

Form Interface Only table types may be used as the reference type for a table parameter

What I did:

I have created a table in <i>tables tab</i> of <b>Form Interface</b> like this:

Parameter Name: IT_1
Type Assignemnt: TYPE
Associate Type: TYT

**TYT is defined in <i>Types</i> tab under <b>Global Definition</b> like this:

TYPES: BEGIN OF tys,
vbeln LIKE vbap-vbeln,
posnr LIKE vbap-vbeln,
END OF tys.

TYPES: tyt TYPE TABLE OF tys.

I understand that if I create these two structure in data dictionary then It will work.

But my question is :

Can I create tables parameter with locally declared type. If no, I will appreciate if you can explain the reason

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
1,522

You cannot declare the local types and use that reference for the parameters of the form. The reason being, when the form is being activated it checks for the ref. parametes in the data dictionary just like how a function module is done.

Regards,

Ravi

Note : Please mark all the helpful answers

6 REPLIES 6
Read only

Former Member
0 Likes
1,523

You cannot declare the local types and use that reference for the parameters of the form. The reason being, when the form is being activated it checks for the ref. parametes in the data dictionary just like how a function module is done.

Regards,

Ravi

Note : Please mark all the helpful answers

Read only

0 Likes
1,522

> You cannot declare the local types and use that

> reference for the parameters of the form.

Hi Ravikumar Allampallam ,

We can, in case you are using importing / exporting

Read only

former_member480923
Active Contributor
0 Likes
1,522

Hi,

Theres a much easier way to declare tables in Samrtforms, try this:

1) Declare your TYPE declaration under TYPES TAB

2) Declare your tables in global definition by assiging TYPE TABLE OF <your Type>.

3) If you are using a custom structure to pas value from your driver program to your SF then you have to declare the structure in SE11.

Hope this Helps

Anirban

Read only

0 Likes
1,522

Hi,

But I can pass table (signed as local type) thru Import / Export tab of smartforms Interface.

So in the same way it sud allow me to pass thru tables too.

Read only

former_member480923
Active Contributor
0 Likes
1,522

Hi,

The form Interface for Smartform works equal to the interface to any Function Module like in any function module if you declare a internal table in the Function gruop top declaration you cannot use that as reference to the passign parameter in the FM same is the case with Smartform, the type declaration is very much to be used within the Smartform itself and will not be recognised when used in passing parameters.

Hope it helps

Anirban

Read only

Former Member
0 Likes
1,522

Hi

Yes u can create a local type and use it to define IMPORT/EXPORT parameters, but you can't use a table type to be used for TABLE parameters.

Anyway I think it would be better to use the local types only to define local variable.

But the interface of SM is the gate to link the smartform to external enviroment so I believe it doesn't make a sense to create a parameter as local type because only sf can use that type and so it should re-define it in every program where the sf has to be used.

Max