04-13-2010 11:02 AM
In the FORM INTERFACE of my smartform i need to declare IT_FINAL . IT_FINAL contains a structure zstruct_cfm and one more field assign. HOW DO I DECLARE IT_FINAL IN THE TABLES SECTION OF FORM INTERFACE . My code is as follows.
FORM INTERFACE
IT_FINAL LIKE ZTRUCT_CFM.
IT_FINAL LIKE assign.
IT_FINAL CONTAINS BOTH ZSTRUCT_CFM and ASSIGN. ZSTRUCT_CFM should not be changed.
Regards,
SAURAV LAHIRY
04-13-2010 11:07 AM
If you want to have them both (structure + field) in one table, you will have to create new ZSTRUCT having these two. Otherwise you can't address both at same time with one table name.
If you want this table be visible only internally in smartform, then you can use tab TYPES to declare one.
types: t_struct like ZTRUCT_CFM.
types: begin of t_new_type.
include type t_struct.
types assign type ...
types end of t_new_type.
types tt_new_type type table of t_new_type.
Now in GLOBAL DATA tab you declare table
IT_FINAL type tt_new_type.
Regards
Marcin
04-13-2010 11:19 AM
HI,
create a new structure in data dictionary and include your structure and new fileld in that new structure.
Your new str ZTRUCT_CFM_new should have both ZTRUCT_CFM and assign
Now define final table as it_final like ZTRUCT_CFM_new.
04-13-2010 11:37 AM
Hi Anurag,
the problem is i don't have the permission to create a new structure . how do i go about it ?
04-13-2010 11:54 AM
You need to declare a local table type under the TYPE tab. I think Marcin has already pointed it out for you
Cheers,
Suhas
04-13-2010 12:36 PM