cancel
Showing results for 
Search instead for 
Did you mean: 

sorting problem in samrtform

Former Member
0 Kudos

Hi,

Iu2019m developing the invoice smartform. The used structure is u201CIS_BIL_INVOICE type LBBIL_INVOICEu201D. It is a sorted table (I need to sort it with material number, concretely its IT_GEN component). How can I sort it (I cannot use SORT command)? Do I have to modify the main program? Or does exist a different way?

I am tried copied in zlbbil_invoice and also change table type with another sort order

but still IS_BIL_INVOICE-IT_GEN table not sorted properly.

Thanks in advance,

Sandeep.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Sandip,

Copy the contents of the sorted table in to another table with same fields declared as standard table and then do a sort

as per your requirement.

Example:

Types: Begin of ty_struct1,

abc type c

bbc type i

cbc type text

end of ty_struct1.

data : it_tab type standard table of ty_struct1,

wa_itab like line of it_tab.

it_tab[ ] = yourtab[ ].

BR

Dep

Answers (2)

Answers (2)

Former Member
0 Kudos

solved

madhu_vadlamani
Active Contributor
0 Kudos

Hi Sandeep,

Create one more table like your final one. It will work.

Regards,

Madhu.

Former Member
0 Kudos

Thanks for reply ,

very helpful answer