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: 

Inserting records and sorting a field-symbol table...

aris_hidalgo
Contributor
0 Kudos

Hello experts,

1. I am currently using a field-symbol as my internal table and I want to insert records

to particular fields. How do I do that?

2. How do I sort a field-symbol by certain fields?

3. Can I create a 'normal' internal table based on a field-symbol that is declared also as an internal table?

P.S. Can we do this in ALV?

----


  • 2005 2004 2004 2003 *

  • SDR *

----


  • USD *

----


----


*Column 1 | Column 2 | Column 3 | Column 4 | Column 5 *

----


Again, thank you guys and take care!

1 ACCEPTED SOLUTION

former_member186741
Active Contributor
0 Kudos

1. you can operate on a field-symbol table in the normal way, eg, append, insert, delete, read etc.

2. for tables which have header lines you can sort a table by component field symbols.

eg, sort <dyntab> by <component1>.

3. what do you mean by

<i>Can I create a 'normal' internal table based on a field-symbol that is declared also as an internal table?

</i>

3 REPLIES 3

former_member186741
Active Contributor
0 Kudos

1. you can operate on a field-symbol table in the normal way, eg, append, insert, delete, read etc.

2. for tables which have header lines you can sort a table by component field symbols.

eg, sort <dyntab> by <component1>.

3. what do you mean by

<i>Can I create a 'normal' internal table based on a field-symbol that is declared also as an internal table?

</i>

0 Kudos

Hi Neil,

Thanks for the reply. For example, I have a field-symbol that has 10 components, can I declare another internal table(not FS) based from the field-symbol?

Also, I just checked my program now and I found out that my field-symbol table does not have a header line. So how do I sort that?

Thanks again!

0 Kudos

Hi Viraylab,

1. no you can't create a non-field symbol table 'on the fly'.

2. you can sort a field symbol table by it's components if you know the names:

data l_name(30) value 'MATNR'.

sort <tab> by (l_NAME).