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

Sapform problem.

Former Member
0 Likes
890

hello,

i have a structure for form.

how can i sort it and remove duplicate from this structure ?

7 REPLIES 7
Read only

Former Member
0 Likes
789

Hi,

Strucutres cannot have data in them. Try to identify the table which holds the data.

Cheers

VJ

Read only

Former Member
0 Likes
789

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

Read only

0 Likes
789

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

Read only

0 Likes
789

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,

Read only

Former Member
0 Likes
789

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

Read only

0 Likes
789

I work with SapScript From (SE71).

Read only

Former Member
0 Likes
789

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