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: 

sort an internal table witout header line

former_member480606
Participant
0 Kudos

Hi all,

I'm inside a smartform wiht in input an an iternal table witout header line: I want to sort it by a field. How can I do?

Gino

6 REPLIES 6

bbalci
Contributor
0 Kudos

Hi

- Go to "Global Definitions" > "Initilazion" Tab in your smartform.

- Enter the name of your internal table to "Input Parameters" and "Output Parameters" parts

- write the sort code SORT itab BY field1.

You don't need header line to sort.

0 Kudos

Hi Bulent,

thank you for your replay.

I didn't write you that the internal table that I want to sort is a standard table of type LE_T_DLV_IT_GEN.

The message that appears is the following one:

You may only read from table "IS_DLV_DELNOTE-IT_GEN" . reading. reading. reading. reading. reading.

Bye

Gino

Former Member
0 Kudos

Hi,

We will perform the sort operation on the Table it self, not on the header line..

Please follow this link it helps you..

http://help.sap.com/saphelp_nw70/helpdata/en/fc/eb3800358411d1829f0000e829fbfe/content.htm

Hope this answer will help you.

Regards,

Kiran

Former Member
0 Kudos

Hi

If you are using a Table node or loop node to display the data in the internal table , then you can use the Sort criteria of the table or loop node. In sort criteria , you can specify the field name on which you want to sort the internal table used for table or loop nodes.

Hope this helps you.

Regards,

Debaraj

SuhaSaha
Advisor
Advisor
0 Kudos

Did you check the table type carefully ??

The table type is Sorted with non-unique key components DELIV_NUMB & ITM_NUMBER. It's already sorted based on the key fields. And not to mention you can't SORT sorted table !!

BR,

Suhas

0 Kudos

I solved my problem: maybe you didn'ty see well how is made the input strucure IS_DLV_DELNOTE: it is a structure with structures and internal tables. I had to sort the data of one of this tables by field STGE_BIN!

I removed the error I received creating an internal table Txxx with structure equal to LEDLV_IT_GEN and sorting this one the goal was reached.

thank to all

Gino