2006 Nov 10 12:28 PM
I have created type group named zkttp. In that I have created a data type named zkttp_ty_sflight. I did include that in my smartform zrkt_sform_saplane. But it is showing error. This I am trying because I dont want to send all fields of sflight table in smartform. is this the right way? in smartform i have defined internal table with like as the the above datatype. still it is giving error as "TYPE ZKTTP_TY_SFLIGHT NOT ALLOWED IN THIS CONTEXT".
2006 Nov 10 2:24 PM
Hi Ruby,
Whenever we use a Type Group in Report Program, we have to give <b>TYPE-POOLS</b> statement ( <b>TYPE-POOLS zkttp</b>, in your case ). Can we give such statement in SMARTFORM?
Regards,
Abdul
P.S: Mark Points, if useful!
2006 Nov 10 2:27 PM
Ruby,
obviously there is no official way to use type-pools in SMARTFORMS, I assume what you created as type group is what you include in ABAP programs as TYPE-POOLS ZKTTP_TY_SFLIGHT.
If you put this statement inside a FORM, you can use the included types locally.
Yo don't need to define anything what is existing. In the SMARTFORMS TYPES section, you may define your own type as
TYPES:
begin of zkttp_ty_sflight,
...
end of zkttp_ty_sflight.
Then You can use it.
Regards,
Clemens
2008 Feb 05 12:39 PM
Hi Clemens,
Regarding the 'If you put this statement inside a FORM, you can use the included types locally' , it is not syntactically possible.
The best trade off to circumvent this problem, without creating numerous customer dictionary data types (Z structures, et al), is to create a function module, that takes input of a select few parameters and delivers a processed output as an exporting parameter. Only these exporting and/or the importing parameters are required to be created in the Data Dictionary. The function module should be made in the same function group in which the type pool has been created.
-Abhijeet.
Edited by: Abhijeet Kulkarni on Feb 5, 2008 6:11 PM
2006 Nov 10 2:29 PM
You cannot access TYPE_POOLS in the smart form parameters. So, create that data type as a strucutre in the dictionary (SE11) and your problem should be resolved.
Regards,
Ravi
Note - Please mark all the helpful answers