cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Types structure in smartform layout

rnb86
Participant
0 Kudos

Hi Experts,

i have a requirement in smartforms. i have a z-structure having some fields. those fields

should be in the smartform output when we run the print program. This is working fine.

But i need to add 2 more fields to the existing z-structure. For this, i created a types

structure in the print program and added the 2 new fields and created internal tables from

that structure.

My question is how to pass this types strucure to the smartform layout. i tried to add the

structure in the tables option of the form interface.

I get the error "Form Interface - Only table types may be used as the reference type for a table parameter".

i also tried to declare the types structure. Please advise.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you create structure in se11 and select structure radio button.

In the smart form give like as

Form interface---->tables (tab)

parameter name ---I_FINAL(inernal table)

type assignment---LIKE

Associated type---ZXXXXX (structure name)

For declarations of workarea:

Global definitons----->Global data

Variable name----WA_FINAL

Type assignment---TYPE

Associated type---ZXXXXX

you declared as of above

I hope it will helpful you

Regards

Bhupal

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

In smartform's Global definitions there is a tab called initialization in that table you directly called the perform waht ever you did in the print program.

For this you should create a perform in the print program for filling the internal table and call that perform in the smartform's

Global definitions --> Initialization

PERFORM xxxx IN PROGRAM print_program_name CHANGING yyyy.

Or else you directly pass the internal table to that smart form insted of the single parameter.

valter_oliveira
Active Contributor
0 Kudos

Hello.

In se11, create a structure (if it's not a complete ztable structure) and then a table type of that structure (or that ztable). Then, declare it in the interface of the smartform.

In your print program give values to it, and in smartform create a work area (of the strucure or ztable type) so you can loop it.

Regards.

Valter Oliveira.

former_member196280
Active Contributor
0 Kudos

Try to create table type and assign to your smartform, for creation go to SE11, select radio button data type give your table type name and press create.

Now in line type(tab) of your table type add your structure and assign to smartfom.

Regards,

SaiRam