‎2008 Jan 17 8:00 AM
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
‎2008 Jan 17 8:09 AM
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
‎2008 Jan 17 8:09 AM
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
‎2008 Aug 11 12:00 PM
I have done it by creating different smartforms with different fieldlist....