‎2006 Jul 05 6:42 AM
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
‎2006 Jul 05 6:46 AM
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
‎2006 Jul 05 6:46 AM
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
‎2006 Jul 05 6:54 AM
> 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
‎2006 Jul 05 6:50 AM
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
‎2006 Jul 05 6:53 AM
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.
‎2006 Jul 05 7:49 AM
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
‎2006 Jul 05 8:07 AM
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