Application Development 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: 

Declaring internal table in the form interface of the smartform

former_member574106
Participant
0 Kudos

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

5 REPLIES 5

MarcinPciak
Active Contributor
0 Kudos

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

Former Member
0 Kudos

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.

0 Kudos

Hi Anurag,

the problem is i don't have the permission to create a new structure . how do i go about it ?

0 Kudos

You need to declare a local table type under the TYPE tab. I think Marcin has already pointed it out for you

Cheers,

Suhas

0 Kudos

issue solved. thanks a lot.

SAURAV LAHIRY