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: 

Dynamic Fields in Smartforms - Is it Possible?

Former Member
0 Kudos

Hi Gurus,

I have a requirement in which before calling the smartform the fields would be dynamically selected and the selected fields only have to be printed.

For Example, I have all values(28 fields) in a internal table but before printing the user will select only whatever fields he whats to be in the printout.

Say for the first time if he want 15 fields he will select that fields, and the next time he may select another set of fields...

My doubt was, is this possible in smartform?

If Possible how i have to proceed....

Please suggest some ideas.....

Thanks in advance...

Regards

Karthik D

1 ACCEPTED SOLUTION

0 Kudos

Hi karthik,

You need to first creat your field catalog of your selected fields.

Then pass this catalog to below method -

call method cl_alv_table_create=>create_dynamic_table

exporting

fieldcatalog = ** Your field catalog **

importing

ep_table = <dy_table>. ( field symbol type any )

Now use ASSIGN syntax to feed value in <dy_table>.

Pass this dynamic table <dy_table> to smartform.

Hope this will help you.

Regards

Nimesh S. Patel

2 REPLIES 2

0 Kudos

Hi karthik,

You need to first creat your field catalog of your selected fields.

Then pass this catalog to below method -

call method cl_alv_table_create=>create_dynamic_table

exporting

fieldcatalog = ** Your field catalog **

importing

ep_table = <dy_table>. ( field symbol type any )

Now use ASSIGN syntax to feed value in <dy_table>.

Pass this dynamic table <dy_table> to smartform.

Hope this will help you.

Regards

Nimesh S. Patel

Former Member
0 Kudos

I have done it by creating different smartforms with different fieldlist....