10-06-2008 5:19 PM
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 different criteria, 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?
Thanks in advance,
Ricard.
10-08-2008 8:30 AM
Hi Naimesh,
When I try to run this code, appears the following message: u201Cu201CIS_BIL_INVOICE-IT_GENu201D is a table of the kind SORTED. You cannot use the SORT command with this type of tableu201D. So, is it impossible to sort a sorted table?
Thanks in advance,
Ricard.
10-06-2008 5:23 PM
You can copy the sorted table to a temporary internal table which is not of type sorted and sort it the way you want.
10-06-2008 5:26 PM
You can add progarm lines node in the Smartform in the very first window of the Smartform.
You can use the code like:
SORT LBBIL_INVOICE-IT_GEN BY BIL_NUMBER ITM_NUMBER
You can also use the "Form Routines" in the "Global Definitions" to write the code in the Smartforms.
Regards,
Naimesh Patel
10-08-2008 8:30 AM
Hi Naimesh,
When I try to run this code, appears the following message: u201Cu201CIS_BIL_INVOICE-IT_GENu201D is a table of the kind SORTED. You cannot use the SORT command with this type of tableu201D. So, is it impossible to sort a sorted table?
Thanks in advance,
Ricard.
10-08-2008 9:00 AM
Yes it is impossible to sort a sorted table to a different sort order. You must copy the table to a sorted table (with or without a unique key) with the different sort order. Exactly as Aparna Shekhar already said.
If you control the definition of the internal table, then you can specify secondard indexes in later versions of Netweaver.
matt