Skip to Content
0
Former Member
Jun 05, 2009 at 07:11 AM

Dynamic Internal Table with Dynamic Fields

46 Views

Hi all,

My scenario is fairly simple----

--> End user clicks a button on screen and he gets the list of HR tables.

--> Then selects a table and list of all the fields for that table gets displayed.

--> He/she selects the fields they want data to be retrieved for.

So, the requirement is, the dynamic internal table should get created with the fields selected.

The select statement should only retrieve fields which were selected by the end user

and from the table selected by the end user.

I believe the fields selected by end user can be passed by a variable of type string.

something like this---

select (fields)

from (p_table) " Table selected by end user

into dynamic internal table. " should contain columns selected by end user"

Appreciate your inputs and guidance.

Warm regards,

Hari Kiran