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

Splitting and sorting

Former Member
0 Likes
315

hi,

I have a text file which i have put into a data container. The text file has details llke,

INFTY SUBTY COUNTRYCODE PERNR E-MAIL

0105 2 CA 000000006 xyz@yahoo.com

0105 2 CA 000000004 xyz@yahoo.com

0105 2 CA 000000001 xyz@yahoo.com

in my data container it will be like this,

INFTY#SUBTY#COUNTRYCODE#PERNR#EMAIL

0105#2#CA#000000006#xyz@yahoo.com

0105#2#CA#000000004#xyz@yahoo.com

0105#2#CA#000000001#xyz@yahoo.com

I need to find the position of the pernr and do the other process.i found out the position of the pernr using the split command.Is there any command to get data of a particular column (for example 4th position(column) here)

in the datacontainer.I need to take the first record pernr and second record pernr and compare.So i need to get the pernr values. Also Is there any possibility to sort the contents in the data container.

please help me out with this,

Thanks in advance,

1 ACCEPTED SOLUTION
Read only

former_member156446
Active Contributor
0 Likes
294

hi


  loop at itab into wa_1 index '1' transporting no fields.

  read table itab into wa_2 index '2'. " <<check the syntax

       if sy-subrc eq 0.

       you code for comparison..

       endif. 

endloop.
endloop.

or 


loop at itab into wa_1 index '1' transporting no fields.

loop at itab into wa_2 index '2' transporting no fields.

       if sy-subrc eq 0.

       you code for comparison..

       endif. 

endloop.
endloop.

1 REPLY 1
Read only

former_member156446
Active Contributor
0 Likes
295

hi


  loop at itab into wa_1 index '1' transporting no fields.

  read table itab into wa_2 index '2'. " <<check the syntax

       if sy-subrc eq 0.

       you code for comparison..

       endif. 

endloop.
endloop.

or 


loop at itab into wa_1 index '1' transporting no fields.

loop at itab into wa_2 index '2' transporting no fields.

       if sy-subrc eq 0.

       you code for comparison..

       endif. 

endloop.
endloop.