Application Development and Automation 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: 
Read only

Create a data object "NAME" dynamically

Former Member
0 Likes
629

Hi All

I need to create an Internal Table which can be named dynamically.

i know how an internal table can be created at runtime, but i want to know if the name can also be specified at runtime.

Ex:

field-symbol : <fs> type any table.

now i can create <fs> to hold any kind of table structure and data.

the requirement is to rename <fs> itself at runtime.......

Any pointers???

Regards

Ravish

5 REPLIES 5
Read only

Former Member
0 Likes
588

HI,

Check this WIKI link if it helps you.

[https://wiki.sdn.sap.com/wiki/x/UYA_Bg ]

Regards,

Ankur Parab

Read only

0 Likes
588

Hi Ankur

as i mentioned, i already know how to create an itab at runtime. what i wanted to know is if i can rename it dynamically, i.e if iv declared it as <fs> can i rename it to IT_ITAB or sumthing at runtime?

Cheers

Ravish

Read only

0 Likes
588

Hi,

Assign the required internal table to the field symbol so that it points to the coresponding internal table.

I am not able to understand your exact requirement. Can you explain it with an example?

Regards,

Ankur Parab

Read only

0 Likes
588

Hi

here goes....

in my FM, i enter a table-fieldname, which has to serve as a field for dynamic where clause in my select query.

Now to include the field, i have to generate a range which holds the values entered by the user.

this generated range has to be correctly mapped to the select query(i have multiple select queries),

so essentially i wud want to generate ranges on a need basis, rather than declaring them beforehand.

as an example u can see the code of std. fm "REUSE_ALV_BLOCKLIST_APPEND". it has 29 <fs> declared to hold values at runtime. But i dont want to do tht, coz the no of table reqd can be variable...

Regards

Ravish

Read only

Former Member
0 Likes
588

Hi

Solved my req with the FM "FREE_SELECTIONS_RANGE_2_WHERE".

Cheers

Ravish