‎2006 Aug 27 7:19 AM
hello,
i have a structure for form.
how can i sort it and remove duplicate from this structure ?
‎2006 Aug 27 8:27 AM
Hi,
Strucutres cannot have data in them. Try to identify the table which holds the data.
Cheers
VJ
‎2006 Aug 27 11:35 AM
Hi,
Check the driver program/Print program which is calling the Form and sending data to it. The internal table can be sorted. The syntax for sorting an internal table is :
SORT ITAB.
Place the cursor on SORT and press F1 to get more details about it.
Best regards,
Prashant
‎2006 Aug 29 9:11 AM
Hi again,
i'll rephrase my post.
in my form there is constructor with data,
i want to sort tha data and remove duplicate in the structure.
how can i do this>??
10X
‎2006 Aug 29 9:25 AM
Hi,
As the strucuture can hold single record at any point of time, it is difficult to compare the records and delete the duplicates, identify the internal table inside the smartform which has similar structure as the one you are checking and sort & delete the duplicates,
Hope this helps,
Rgds,
‎2006 Aug 29 9:20 AM
hello,
You can always add program lines in your smartform or add code in the initialisation.
Deleting adjacent duplicates as well as sorting can be done there.
If it's an internal table (based upon a type) containing data in the smartform you can sort it upon looping around it.
Christoph
‎2006 Aug 29 9:36 AM
‎2006 Aug 29 10:12 AM
create subroutine in an external program:
form sort tables itab structure... .
endform.
Call this form in the sapscript code: perform sort(progname).
Et voila... .
If usefull, don't hesitate to reward, thanx!
Message was edited by: Christoph Balduck