2008 Feb 04 4:35 AM
Hi,
the datacontainer has 5 fields such as
subty begda endda pernr telnr
separated by #.
I need to sort this data container based on pernr(4th column).
Is it possible to do this..? if it so guide me..
Thanks in advance.
2008 Feb 04 4:38 AM
2008 Feb 04 4:42 AM
Hi,
Populate an internal table from this data container using split...
then sort that internal table based on that fields..
Reward if helpful..
GAURAV J.
2008 Feb 04 4:49 AM
since am moving the data container to application server i dint populate that to internal table and also number of fields available in data container will be unknown till the user uploads... so how is it possible to do it..?
2008 Feb 04 4:56 AM
Hi try this,
in your start routine, you can sort a data_package with
sort data_package by <component name1>.... <component name n>.
Additionally you can append new records to it with
append <specified workarea> to data_package.
Please check out the F1-help for the statements additionally. You get a lot more information about the use of the statements.
kind reward,
Gaurav J.
2008 Feb 04 5:02 AM
actually the program loads the data container using GUI_UPLOAD from the text file in presentation server.
So, we need to sort it after uploading..? then , how do we do it..?
2008 Feb 05 12:39 AM
hi,
i find this addition to the sort statment in 6.0 ECC.
try this way.
DATA: BEGIN OF datacontainer OCCURS 0,
string(100),
END OF datacontainer.
datacontainer-string = '0001#19990101#99991231#99999999#122222'.
APPEND datacontainer.
datacontainer-string = '0001#19990101#99991231#98888889#122222'.
APPEND datacontainer.
datacontainer-string = '0001#19990101#99991231#88888999#122222'.
APPEND datacontainer.
datacontainer-string = '0001#19990101#99991231#99988888#122222'.
APPEND datacontainer.
SORT datacontainer ASCENDING BY string+23(8).
regards
Marco
2008 Feb 05 3:03 AM
Hi Tarani
As per my previous post sort by <4th_field> will help ur requirement.
upload using gui_upload.
sort using ur 4th field..
then loop the table
open dataset
transfer
close dataset
endloop.
your file in app server will be sorted with 4th field.