cancel
Showing results for 
Search instead for 
Did you mean: 

internal table in smartform

Former Member
0 Kudos

I am creating internal table in smartform by defining it in form itnerface->tables as itab like intab and I have declared intab in Global Definitions->types as begin of intab, 4 fields forn one table only. Also passed as input para in program lines but still I am getting dump saying ""INTAB" must be a flat structure. You cannot use internal tables, strings, references, or structures as components. -" I want to fetch data in itab and process it and accordinly apply condition. In smartform only not in print program. Is anybody know how to do?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi,

If u r not getting data from print program then do not declare that itab under tables tab in form interface. There is a tab called types in fglobal definitions under that declare ur itab with types keyword and define it global data tab.

And write the retrieving logic under initialization tab in global definitions, and after that u can use that through out the smartform.

Reward points if helpful.

Former Member
0 Kudos

Thanks sujata but when I did teh same it is sayign ITAB is not defined under TABLES and not an internal table. what to do?

Former Member
0 Kudos

Hi Deva,

1) Create TYPES in Types tab of Global definitions.

for example: -

TYPES: Begin of ty_mara,

matnr type mara-matnr,

mtart type mara-mtart,

End of ty_mara.

2) Go to "Global Data " Tab in Global definitions.

<u>Variable Name Type Assighnment Associated Type</u>

declare table as - IT_MARA TYPE TABLE OF TY_MARA.

Hope This will work.

Reward Points If Helpful

Regards

Avi...

Former Member
0 Kudos

try to define the itab using command lines in the smartforms...

also the itab that you are defining should be of type structure.. so create a structure of the desired type and then define your itab accordingly...

Former Member
0 Kudos

Thanks Sharayu, Already I have declared structure with name intab in Types tab of global interface still iats occuring dump. How to create itab using command line want more explaination.

Former Member
0 Kudos

in smartform.. right click on window and create command line...

CREATE -> FLOW LOGIC -> COMMAND

here you can define your itab the way you do in any abap report...