on 10-21-2006 7:43 PM
Hi every one
I'm doing an A/R invoice where I've pull some sale orders from de BP, the problem is that the invoice seems to be sorting those sale orders by the number of the documents (ORDR.DocNUM) and I need them to be sort in the order y ctrl+click them in the 'Choose from list window', because i have several columns that need to be sorted in that order and since those are not number columns I cannot simple dbl click the colum to get the sort done
Thanks in advance
enso
Have you tried to change the sort order of documents in CFL (ctrl-shift-S)?
AFAIK, the order of lines is determined first by the order of documents in the CFL
then by the docline nbr.
If that does not satisfy your requirement then you may
want to consider the following workaround:
- 'steal' one column (or make a UDF) for sorting purposes
- generate a sort value for each line using Formatted Search on that column.
-
Here I'm calculating the sort value using line description
[code]declare @s as varchar(50)
set @s = $[$38.3.0]
if len(@s)=0 SELECT 0
if len(@s)=1 SELECT ascii(substring(@s,1,1))*1000
if len(@s)>1 SELECT ascii(substring(@s,1,1))*1000 + ascii(substring(@s,2,1))[/code]
- doubleclick to sort
HTH
Juha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Juha
Thanks for the reply, teoreticaly your reply solve my problem but there is a detail, the column i need to sort is a UDF Alphanumeric(10) and it contains values like 1/2, 3/4,
5/6 (packages numbers)the problem is that when i sort it it came out like 1, 11/12, 13/14, 2, 20/21
here is an screenshoot http://www.v-motion.net/sap.jpg
is there any possibility that the query in the UDF sort this kind of field correcty?, I tried to change the field type to number but it sent me an error,
thanks in advance
regards
enso
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.