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: 

Smartform Cannot loop at internal table sent as parameter

Former Member
0 Kudos

Hi

I have a smartform and i sent as parameter to my function module that builds it, an internal table that i wish to display in form of a table.

I have declarated it in the Form Interface->Import-> gt_s type ddic-structure

I also have in the window Global definitions->Global data->gs_s type ddic structure

Later i have added a window with a table where i try to use their loop option(the one in the tab DATA).I have written there gt_s into gs_s.

When i try to compile it,it tells me that gt_s is not known.What am i doing wrong?I have seen several examples where an itab has been sent as parameter at the Exporting section of the Function module and it worked just fine like this,with all those declaration.

Can someone please help?

1 ACCEPTED SOLUTION

Former Member
0 Kudos

ddic structure means a Structure declared in the Dictionary. You are supposed to use the name of the type,like the one you declared in your program.

15 REPLIES 15

former_member203305
Active Contributor
0 Kudos

Hi

how did u pass the table to the smartform?

in ur smartform, check the interface of the form. if u r using a table, u need to add it in the table parameter, otherwise u need to add it in IMPORT.

un ur code, when u call the smartfrom, u need to add in EXPORT or u can add a table in TABLES

Just the check the parameters inside the smartforms.

Good luck

Regards.

Former Member
0 Kudos

ddic structure means a Structure declared in the Dictionary. You are supposed to use the name of the type,like the one you declared in your program.

0 Kudos

Hello,

Here is my call:

CALL FUNCTION lf_fm_name

EXPORTING

output_options = gs_composer_param

gt_hu = gt_hu "This is my table that i send as param

EXCEPTIONS formatting_error = 1

internal_error = 2

send_error = 3

user_canceled = 4.

In the code i have declared it like this :

gt_hu TYPE TABLE OF zshu . "zshu is a structure that i declared in SE11

And here are my declarations in the Smartform:

Form Interface->Import-> gt_hu type ddic-structure

Global definitions->Global data->gs_hu type ddic structure

and in the newly created table when i try to loop it tells me that my gt_hu is unknown.

0 Kudos

When you loop internal table, it should have header line or need to use external work area.

0 Kudos

Hi,

Can you please tell me how to declare a table type for my ddic structure in the dictionary?

thanks

Edited by: seba seba on Mar 11, 2009 9:06 AM

0 Kudos

Hi,

SE11 -> Data type -> (Name of the table type ) -> Click TABLE TYPE -> Short description, Name of the Dictionary Structure for which u want to create the table type.

Save and Activate.

Now the table type is created for that structure.

Thanks,

Nithya

0 Kudos

Hi

I managed to declare the table type in the ddic but now when i try to show something in my table ,my work area is always empty.I declared my wa in the global definitions like this

wa type ddic_structure

Does anybody have a clue why it is not working?

0 Kudos

Hi,

Have u given In Table Node -> Data -> Internal table name and Workarea name.

Thanks,

Nithya.

0 Kudos

hello,

yes,i have said to loop from my itab into the wa

Is the wa declaration correct like this: wa type ddic_stru ???

0 Kudos

try using wa like this:

data: wa like line of itab.

now loop at itab in to wa.

кu03B1ятu03B9к

0 Kudos

Hi,

I dont think there is a problem with work area declaration.Check ur population of internal table data.\

Thanks,

Nithya

0 Kudos

Hi

I tried declaring the variable like you said with like line of itab but it tells me that the itab is not known.

I have debugged the abap code and my internal table has always at least one entry and is not initial.

Maybe i did not build the table right

I have made a table in which i have a few columns.In the header of the table i have inserted the name of each column.In the body i have placed all the fields of my wa.The problem is that only the header is printed and the body is not.I have als placed some text in one of the textfields for my body and still nothing is displayed.

Help

Thanks for all the other fast replies,they helped me getting here

0 Kudos

Hi,

Check whether u have given the && symbol before after the field in the editor.

If that doesnt work Try this,

Click the Field List On/Off button which is left to the Form painter Button.Now,In the left bottom, u will have all the global,import,export,system fields.Drag and drop all the fields into the editor.Sometimes this will work.

Thanks,

Nithya

0 Kudos

Nithya thanks for the advice.It seems that the window was the problem.I tried making the same things in the main window and it displayed everything ok.I do not know what it is with this main window or why it did not display my info in the other window.The important thingis that now it works.I have given you points for the answers.Thank you very much for the help and fast responses

Former Member
0 Kudos

Hi,

Declare a table type for that std ddic struct.

and use that table type to declare the internal table.