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

Select Statment

Former Member
0 Likes
808

Hi All,

Here i am retrieving field names of particular table from dd03l table ,but i am facing the problem is..

I need to get the field names as they are in Table, but here I am getting in Ascending order , because they are stored like that in DD03L table..

So how to solve this issue.

regards,

vinesh.

1 ACCEPTED SOLUTION
Read only

sachin_mathapati
Contributor
0 Likes
775

Hi ,

There is a field called 'Table Position' in table DD03L ..

select field names and table position from DD03l where tablename = ''.

Sort the table ascending by table position ..

Reward points if Helpful..

Regards,

Sachin M M

6 REPLIES 6
Read only

Former Member
0 Likes
775

hi check this

after the select statement use the sort by tablename fieldname..

Read only

sachin_mathapati
Contributor
0 Likes
776

Hi ,

There is a field called 'Table Position' in table DD03L ..

select field names and table position from DD03l where tablename = ''.

Sort the table ascending by table position ..

Reward points if Helpful..

Regards,

Sachin M M

Read only

Former Member
0 Likes
775

Hi,

Try this.

tables:
  dd03l.
parameters :
  s_tabnam like dd03l-tabname.

data :
  t_dd03l like standard table of dd03l.

data :
  fs_dd03l like line of t_dd03l.

select tabname
          fieldname
   from dd03l
   into  corresponding fields of table t_dd03l
 where tabname in s_tabname.

sort t_dd03l by tabname fieldname ascending.

loop at t_dd03l into fs_dd03l.
  at new tabname.
   write :/ fs_dd03l-tabname.
  endat.
  
   write :/ fs_dd03l-fieldname.
endloop.

Regards,

Swapna.

Edited by: NagaSwapna Thota on Jul 3, 2008 2:28 PM

Edited by: NagaSwapna Thota on Jul 3, 2008 2:30 PM

Read only

Former Member
0 Likes
775

Hi,

In your select add one more field called POSITION from ddo3l

and finally sort in ascending by position.

You will get it as you want.

regards,

rama.

Read only

Former Member
0 Likes
775

Thank you all..

Sachin and Ram..your answer solved the problem..

thanks

Read only

Former Member
0 Likes
775

Hi,

Sorry ignore my post. It doesn't meet your requirement.

Regards,

Swapna.