Sorting permutations
Hello. I was hoping if someone could help me with this. i have a two dimensional table , with elements such as {{1,2,3,4,6,7,9},{4,6,7,8,9,10,11},{1,2,3,5,6,8,12}}. now i wanted to search for permutations of the lenght i chose. if i type 3, it will return combination 1 2 3, and that it appears twice. i got this to work, but only on a small number of elements. it stops working for more of them. if someone would be willing to help, i'll gladly post the source code.
Hello. I was hoping if someone could help me with this. i have a two dimensional table , with elements such as {{1,2,3,4,6,7,9},{4,6,7,8,9,10,11},{1,2,3,5,6,8,12}}. now i wanted to search for permutations of the lenght i chose. if i type 3, it will return combination 1 2 3, and that it appears twice. i got this to work, but only on a small number of elements. it stops working for more of them. if someone would be willing to help, i'll gladly post the source code.
Similar Messages
-
Finding Permutations of an Array
I was hoping I could get a little help on finding a way to cycle through an array and print all of the permutations of its elements. I have a short example of what I am trying to do. If someone could fill in the blank, I could understand how to use it in future programs.
The goal of the code below is to write a line to line, comma delimited listing of the elements of an int array 1 through 5. The order of the output does not matter to me, I'd just like to try and get all 120 permutations listed into a new file passed as an arg. I've tried thinking of how to switch the elements around, but I don't know the most efficient way of doing so. Any help would be appreciated.
// PermutationTest.java: Create a comma delimited text file of permutations of an array
import java.io.*;
public class PermutationTest {
/** Main method: args[0] is the output file **/
public static void main(String[] args) {
// Declare print stream
PrintWriter pw = null;
// Check usage
if (args.length != 1) {
System.out.println("Usage: java PermutationTest file");
System.exit(0);
File tempFile = new File(args[0]);
if (tempFile.exists()) {
System.out.println("The file " + args[0] +
" already exists, delete it, rerun the program");
System.exit(0);
// int array
int[] permArray = {1, 2, 3, 4, 5};
// Write data
try {
// Create data output stream for tempFile
pw = new PrintWriter(new FileOutputStream(tempFile), true);
* loop/sort of some kind to generate permutation *
// After finding a permutation, print a comma delimited output and repeat until all 120 permutations were written.
pw.println(permArray[0] + "," + permArray[1] + "," + permArray[2] + "," + permArray[3] + "," + permArray[4]);
catch (IOException ex) {
System.out.println(ex.getMessage());
finally {
// Close files
if (pw != null) pw.close();
}Given a current permutation of a not necessarily unique sequence
p[0] p[1] p[2] ... p[n-1], the next permutation can be found as follows:
1) find a largest i such that p[ i ] < p[ i+1 ]; if no such i can be found, stop;
2) find a largest j > i such that p[ i ] < p[ j ]; such a j can always be found;
3) swap elements p[ i ] and p[ j ]
4) reverse the tail p[ i+1 ]... p[ n-1 ].
Repeat the steps above until step 1) fails.
kind regards,
Jos -
Generate Permutations of array recurssive function.
Producing consecutive permutations.Need to develop a method that lists one by one all permutations of the numbers 1, 2, �, n (n is a positive integer).
(a) Recursive method . Given a verbal description of the algorithm listing all permutations one by one, you are supposed to develop a recursive method with the following header:
public static boolean nextPermutation(int[] array)
The method receives an integer array parameter which is a permutation of integers 1, 2, �, n. If there is �next� permutation to the permutation represented by the array, then the method returns true and the array is changed so that it represents the �next� permutation. If there is no �next� permutation, the method returns false and does not change the array.
Here is a verbal description of the recursive algorithm you need to implement:
1. The first permutation is the permutation represented by the sequence (1, 2, �, n).
2. The last permutation is the permutation represented by the sequence (n, �, 2, 1).
3. If n a ,...,a 1 is an arbitrary permutation, then the �next� permutation is produced by
the following procedure:
(i) If the maximal element of the array (which is n) is not in the first position of the array, say i n = a , where i > 1, then just swap i a and i-1 a . This will give you the �next� permutation in this case.
(ii) If the maximal element of the array is in the first position, so 1 n = a , then to find
the �next� permutation to the permutation ( ,..., ) 1 n a a , first find the �next�
permutation to ( ,..., ) 2 n a a , and then add 1 a to the end of thus obtained array of (n-1) elements.
(iii) Consecutively applying this algorithm to permutations starting from (1, 2, �, n),you will eventually list all n! possible permutations. The last one will be (n, �, 2, 1).For example, below is the sequence of permutations for n = 3 , listed by the described algorithm:
(0 1 2) ; (0 2 1) ; (2 0 1) ; (1 0 2) ; (1 2 0) ; (2 1 0)
Please help...i have done the iterative one..but unable to figure out the recursive..
Thank you in advance..
Please helpThanks for your reply...it would be great if a code is provided..i am try to do but this not working here is my code
* Permutations.java
* Created on April 25, 2006, 12:42 PM
package javaapplication1;
* @author ismail
public class Permutations {
// print N! permutation of the elements of array a (not in order)
public static boolean nextPermutation(int a[]) {
int N = a.length;
int[] t = new int[N];
/* for (int i = 0; i < N; i++)
t[i] = a;*/
return(perm2(a, N));
private static boolean perm2(int [] a, int n) {
int i=n-1;
// start from last but 2
for (; i>0; i--) if (a[i]<a[i+1]) break;
if (i <0) return false;
for (int j = 0; j < n; j++) {
swap(a, j, n-1);
perm2(a, n-1);
// swap(a, j, n-1);
return true;
// swap the characters at indices i and j
private static void swap(int[] a, int i, int j) {
int c;
c = a[i]; a[i] = a[j]; a[j] = c;
private static final int num = 3; // number of elements to permutate
private static int [] a = new int[num]; // permutations array
private static int qkCounter = 0; // Counter for Quick sort
private static int mrgCounter = 0; // Counter for Merge sort
private static int qkSum = 0; // Total sum for Quick sort
private static int mrgSum = 0; // Total sum for Merge sort
public static void main(String s[]){
int count=1;
int [] qkArray = new int[num]; // Quick Sort array
int [] mrgArray = new int[num]; // Merge Sort array
int avgQuick = 0;
int avgMerge = 0;
// Initialize array
for(int i=0;i<num;i++){
a[i]=i;
// call nextPermutation to generate possible permutations - iterative method
for (int j=0; nextPermutation(a);j++){
count++; // Count number of records
// print the permutation array
for(int i=0;i<num;i++){
System.out.print(a[i]);
not working means-- it keeps on printing 012 -
Any trick to sort columns?
I have a particular issue to solve. I have a table as follows:
CREATE TABLE Trunk (
Port1 NUMBER,
Port2 NUMBER,
Port3 NUMBER
I will use a complex query to select 3 values from other places to populate Trunk table. On insertion, I'll have to make sure that Port1 < Port2 < Port3. Is there an easy trick to accomplish this?
So far I have this kind of stupid way to do it. As any savvy can see, if I have 4 columns to sort out, I will need a permutation of 24 subqueries in a big UNION. Doesn't scale well.
Please help. Thanks.
Matt
INSERT INTO Trunk VALUES (Port1, Port2, Port3)
SELECT x.Port, y.Port, z.Port FROM x, y, z
WHERE <expr> AND x.Port < y.Port AND y.Port < z.Port
UNION ALL
SELECT x.Port, z.Port, y.Port FROM x, y, z
WHERE <expr> AND x.Port < z.Port AND z.Port < y.Port
UNION ALL
SELECT y.Port, x.Port, z.Port FROM x, y, z
WHERE <expr> AND y.Port < x.Port AND x.Port < z.Port
UNION ALL
SELECT y.Port, z.Port, x.Port FROM x, y, z
WHERE <expr> AND y.Port < z.Port AND z.Port < x.Port
UNION ALL
SELECT z.Port, x.Port, y.Port FROM x, y, z
WHERE <expr> AND z.Port < x.Port AND x.Port < y.Port
UNION ALL
SELECT z.Port, y.Port, x.Port FROM x, y, z
WHERE <expr> AND z.Port < y.Port AND y.Port < x.Port;Hi Friend
Inserting the values directly with insert,select statement is bit complex. i ve tried the combinations along with the functions decode and sign but it is too complex. the best alternative solution is like this . create a function as described below
create or replace function rec(a number, b number , c number) return varchar2 is
v varchar2(200);
begin
if (a>=b) and (b >=c) then /* a>b>c */
v:= a||'|'||b||'|'||c;
elsif (a >=b ) and (c >=b) and (a >c )then /* a>c>b */
v:= a||'|'||c||'|'||b;
elsif (b >=a) and (a >=c) then /* b>a>c */
v := b||'|'||a||'|'||c;
elsif (b >=a) and (c >=a) and (b > c) then /* b>c>a */
v:= b||'|'||c||'|'||a;
elsif (c>=a) and (a>=b) then /* c>a>b */
v:= c||'|'||a||'|'||b;
else /* c>b>a */
v:= c||'|'||b||'|'||a;
end if;
return v;
end;
create table tt(n1 number,n2 number,n3 number);
values are inserted like this
n1 n2 n3
3 2 1
3 1 2
2 1 3
2 3 1
1 2 3
1 3 2
select n1,n2,n3 , rec(n1,n2,n3) from tt;
output is like this
N1 N2 N3 RESULT
3 2 1 3|2|1
3 1 2 3|2|1
2 1 3 3|2|1
2 3 1 3|2|1
1 2 3 3|2|1
1 3 2 3|2|1
As you can see the result of the three columns coming thru a single column. what u need to do is just extract the required value to the required column using substr and instr functions.
Hope this helps you :-)
Please change the values and formatting as required if u want n1<n2<n3 , Pls make the necessary change in the
program .
Pls let me know if any difficulties
Rgds
Prakash Eranki
[email protected]
[email protected] -
Sorting Numbers stored in variables....using if/else
Hey there, I'm curious, how would you sort 3 integers using only five if's and five elses and no other operators besides a < (less than) operator? Some help would be much appreciated! thanks. ishan
well with the topic i brought back there, didnt
really follow the boolean, and i couldnt figure out a
way to simply use only if's elses' and > rather than
using boolean, and what not.. like for integer a, b,
c; would i go into the possible permutations and
start from there? not sure how to go about it..You will need to put them in an array or List. Then you can quicksort them.
Hmmm let me think....
if
length<2 return
choose pivot
if less than pivot
put in left bucket
else
put in right bucket
recurse left bucket
recurse right bucket
returnThat's 2 if's and one else. -
Saving a Custom (Manual) Sort
I searched and searched through Bridge and found NO way to save a custom sort (manual) with a name (or a collection if you prefer). I created a manual custom sort in a folder and ran a PS action to reduce the size of each photo and put them into a new folder. When I opened the new folder the sort was alpha, not like the old folder. I now have to manually sort over 300 photos in new folder.
Is there a way to do this and if not, can a script be written for it. I create slide shows and no of hundreds of examples of how I would use this. It is really labor intensive to put the photos in a special order and then have no way to save it for future use.
Any suggestions or help would be appreciated. If I have to pay someone to do this, I will. thanks.I am using Bridge (Version 1.0.4) and CS2 on WinXP, SP2. I am extremely disappointment in a limitation in Bridge that seems to be related to JamesAGrover's challenge to save a manual sort that he has created in a collection.
A review of topics related to manual sorting in these Adobe forums indicate that there is a general limitation to sorting a collection. This limitation seems to exist in any of the Adobe products for Mac or PC that offer the ability to view "collections" of images, for example, Lightroom and Bridge.
A "collection" seems to be a set of file names that are handled independently of the real files themselves. The magic resides in the user's experience of handling the "collection" of filenames as if they were the actual files themselves.
Of course, there is no "magic"; the collection is working with some kind of pointer to the actual files, where ever they may truly reside.
There are many powerful reasons for offering functionality of this kind. The one that primarily interests me is that by working with pointers to the same file from different collections, I can create different subsets of images and unique sort orders without copying the original files. I avoid filling my harddrive with copies, but I can burn thousands of CDs and DVDs each with different selections and sorts.
But unfortunately, inside a "collection", I am unable to execute a manual sort at all. The problem exists if my collection includes files from a single directory or from several different directories (folders). Since this seems to contradict the basic promise of a "collection" of filenames, I keep thinking that I misunderstand the user's interface.
I have set the "View - Sort" menu with every permutation of checks and unchecks for "Ascending Order" and "Manually" with no luck.
I have discovered a workaround to my problem: I have been able to manually sort, and save, a direct view of a real file system directory from the Bridge interface. But that has forced me to create copies of my images in one unique new directory for every selection and sort that I need.
To tie this back to the first post in this topic, I must observe that for me, after creating and manually sorting a collection, I will want to save the collection with its unique and idiosyncratic, manual sort. I don't want to copy the original files umpteen times! It seems that I will encounter the problem described by JamesAGrover.
I wonder if any forum member, or any one at Adobe, has a comment. Specifically I wonder about two things:
1) Am I misunderstanding the user's interface? Is there a setting that I have not discovered?
2) Is there a basic limitation with "collections" that has been removed in CS3? -
Generating permutations of data between two tables
Hi everyone,
Wondering if someone can help me with problem am I facing at work.
To keep it simple, I will just assume three tables (in reality there are more).
I have the following tables:
Employees
Jobs
Employee_Job_Ratings
So, the Employees table holds a list of employees, the Jobs table a list of Jobs and the Employee_Job_Ratings table holds a number which represents how "good" the employee is on a particular job.
I am trying to write a query which will determine how best to assign people to jobs within a team. Ie. what combination gives the best total utilization of skills. So, I could have three jobs and three people like this:
Job
A
B
C
Person
1
2
3
Ratings
A/1: 4
A/2: 2
A/3: 4
B/1: 3
B/2: 1
B/3: 2
C/1: 2
C/2: 3
C/3: 4So - as you can see above, I could assign the people to jobs in the following permutations:
*1*
A - 1
B - 2
C - 3
Total: 9
*2*
A - 1
B - 3
C - 2
Total: 9
*3*
B - 1
C - 2
A - 3
Total: 10
*4*
B - 1
C - 3
A - 2
Total: 9
*5*
C - 1
A - 2
B - 3
Total: 7
*6*
C - 1
A - 3
B - 2
Total: 7But - I obviously want the best people on each job. It would be silly for me to pick say 5 over 3 because the total score of competency for the whole team is 7 vs 10.
So what I am effectively looking to do is work out all the possible combinations that I can have people on each job, then I can do a SUM of their scores and effectively give a "score" for each combination. This will then allow us to see how best to distribute jobs within a team. Ie, do what I did above but automatically.
The above is a trivial example but in reality we have many teams with many jobs in each team. This is currently done manually however I know it can be done automatically - all the data is in our database so it would be excellent to be able to say to the users "this is your best strategy of job assignments", or at least give them an idea. The people in charge of this planning might not use what the system tells them but it allows them to at least get an idea.
I am fine with doing everything above, apart from getting the permutations into rows, ie, from tables A and B with three rows in each, getting the six possible combinations out. A cartesian join unfortunately doesn't do the job.
A person will only ever been assigned to a single job.
I know it's a tall ask and I apologise for not providing any code I have wrote myself, however it's unfortunately the very first step I'm stuck on - once I have that done then I will hopefully be fine! :) It's not as simple as just putting a person with a level 4 on one job because they might be a 3 on another whereas everyone else is a 1 and so they would be better used on that other job (ie on a level 3 job instead of a level 4).
Cheers,/dev/null wrote:
Hi,
Thanks for the quick response. I am using a 10g database. I have tried using eval_number but get the following error (even when just selecting from dual):
ORA-37002: Oracle OLAP failed to initialize. Please contact Oracle OLAP technical support.
ORA-33262: Analytic workspace EXPRESS does not exist.
ORA-06512: at "SYS.DBMS_AW", line 203
ORA-06512: at "SYS.DBMS_AW", line 212 It's hard to suggest what you can do differently when I don't know what you're doing.
Post a complete script (including CREATE PACKAGE or CREATE FUCNTION, as well as the query) that re-creates the problem.
Here is the test data I've been using: ...Thanks; that looks good.
So from this I would expect to get 18 rows back, group into six "strategies". It could be possible that there are more people than jobs however I will deal with that once I have it sorted for the same numbers - hopefully the solution will scale easily!
So my output in the above example would hopefully be something like this:
strategy person_id job_id rating
1 1 1 4
1 2 2 1
1 3 3 4
2 1 1 4
2 2 3 2
2 3 2 3
3 1 2 2
3 2 1 3
3 3 3 4
4 1 2 2
4 2 3 2
4 3 1 2
5 1 3 4
5 2 1 3
5 3 2 3
6 1 3 4
6 2 2 1
6 3 1 2Hope this illustrates a bit better?Now I see!
The query I posted earlier finds the strategy with the highest total rating. That's not what you want.
You want all the possible strategies, regardless of their ratings. Here's one way to do that:
WITH got_job_num AS
SELECT job_id
, ROW_NUMBER () OVER (ORDER BY job_id) AS job_num
, COUNT (*) OVER () AS job_cnt
FROM xxjobs
WHERE job_name IN ('Mechanic', 'Painter', 'Welder')
, permutations AS
SELECT SYS_CONNECT_BY_PATH (p.person_id, ', ') AS person_path
, SYS_CONNECT_BY_PATH (r.rating, '+') AS rating_path
FROM xxpeople p
JOIN xxratings r ON p.person_id = r.person_id
JOIN got_job_num j ON r.job_id = j.job_id
WHERE LEVEL = j.job_cnt
START WITH j.job_num = 1
CONNECT BY NOCYCLE j.job_num = PRIOR j.job_num + 1
SELECT DENSE_RANK () OVER (ORDER BY pe.person_path) AS strategy
, REGEXP_SUBSTR ( pe.person_path
, '[^ ,]+'
, 1
, jn.job_num
) AS person_id
, jn.job_id
, REGEXP_SUBSTR ( pe.rating_path
, '[^+]+'
, 1
, jn.job_num
) AS rating
FROM permutations pe
CROSS JOIN got_job_num jn
WHERE NOT REGEXP_LIKE ( pe.person_path || ','
, '( [^ ,]+,).*\1'
ORDER BY strategy
, person_id
;Since you're not concerned with the total rating, you don't need eval_number, or anything like it.
Aside from that, rhe sub-queries got_job_num and permutations are wjhat I psoted yesterday, except that they use your actual table- and column names. If you don't want to use the person_name, then the xxpeople table isn't needed at all in this problem, and you can remove it from permutations.
The main query is quite different.
The query above will display all 6 strategies, and number them 1 through 6. I assume that you don't really care which strategy gets which number. The query above uses strategy=4 where you had strategy=5, and vice-versa. If that's a problem, I'm sure it can be fixed.
Here's the output I get:
STRATEGY PERSON_ID JOB_ID RATING
1 1 1 4
1 2 2 1
1 3 3 4
2 1 1 4
2 2 3 2
2 3 2 3
3 1 2 2
3 2 1 3
3 3 3 4
4 1 3 4
4 2 1 3
4 3 2 3
5 1 2 2
5 2 3 2
5 3 1 2
6 1 3 4
6 2 2 1
6 3 1 2 -
Permutations (difficult one)
Hi,
We're tyring to find the best way to solve the following, hope you can help please.
We have a fairly large table of users (2500+) and the users belong to 1 or more groups (at the moment the max number of groups a user is in is 32 but it changes daily).
A sample data set looks like:
Usr | Grp
==============
SmithA | GrpA
SmithA | GrpB
MouseM | GrpD
MouseM | GrpB
MouseM | GrpC
The result set we need would be:
SmithA | GrpA
SmithA | GrpB
SmithA | GrpA,GrpB
MouseM | GrpB
MouseM | GrpC
MouseM | GrpD
MouseM | GrpB,GrpC
MouseM | GrpB,GrpD
MouseM | GrpC,GrpD
MouseM | GrpB,GrpC,GrpD
Note the alphabetical order of the grps - it's not particularly imporant but if they aren't sorted alphabetical then we'd need all combinations.
Any ideas please?Note the alphabetical order of the grps - it's not particularly imporant but if they aren't sorted alphabetical then we'd need all combinations.
Any ideas please?
Please elaborate this statement.
Apart from that can you tell why is it that you need this ResultSet. It makes no sense at all. I am assuming that either you are mapping this with AD, LDAP or Kerberos. If you are using Kerberos, the TMS already have these
combinations(not permutations); (in your case -> 3C1 + 3C2 + 3C3=7). If you are mapping with AD or LDAP then I am not quite sure where is that stored but in case of LDAP, I believe that the search operation will take care
of all the LDAP DN.
But I am still not clear, why do you need this. What will you achieve with this that a role is assigned to a user in some group.(that too all the combinations of the group.
It means if the results aren't alphabetically ordered then, for MouseM, we'd need to additionally see.
MouseM | GrpC,GrpB
MouseM | GrpD,GrpC....etc etc
The result set is so that I can join the result set of this query to it and retrieve the user's roles
SELECT DISTINCT RoleName
, STUFF((SELECT ', '+GroupName
FROM @Role S2
WHERE S1.RoleName = S2.RoleName ORDER BY GroupName
FOR XML PATH('')), 1, 1, '') AS AllGrps
FROM @Role S1
No further data from the LDAP is readily available and the users are added to groups individually using a printed out cheat sheet matrix of which groups correspond to a role!
I need to know the Roles for an attestation/recertification exercise since the roles have owners/custodians who have to say whether the user needs the role (and therefore groups).
My first post with more info is
here.
Thanks -
In Photoshop Express, I want images to appear sorted by filename. In the "view as a table" it sorts fine. When I revert to the thumbnail view, the arrangement is random. The dropdown "show" list does not offer an option for showing by filename. If I select the"custom" option, it means I would need to sort 300 images by filename MANUALLY (!!!), a job that a computer does in milliseconds. Anyone with a solution? Thanks.
fwiw, with my images in the 'Folder Location' view the photos are in order by their Windows filename. That is the same order as the hardcopy album the photos came from. So I then created a PSE Album. I selected all my photos and moved them into that album. The order of the pictures was retained in the Album. That worked out great. I wanted my PSE images to be in the same order. I thought I would do it with tags. But creating an album seems to work just fine.
-
Unable to capture the adf table column sort icons using open script tool
Hi All,
I am new to OATS and I am trying to create script for testing ADF application using open script tool. I face issues in recording two events.
1. I am unable to record the event of clicking adf table column sort icons that exist on the column header. I tried to use the capture tool, but that couldn't help me.
2. The second issue is I am unable to capture the panel header text. The component can be identified but I was not able to identify the supporting attribute for the header text.Hi keerthi,
1. I have pasted the code for the first issue
web
.button(
122,
"/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1824fhkchs_6']/web:form[@id='pt1:_UISform1' or @name='pt1:_UISform1' or @index='0']/web:button[@id='pt1:MA:0:n1:1:pt1:qryId1::search' or @value='Search' or @index='3']")
.click();
adf
.table(
"/web:window[@index='0' or @title='Manage Network Targets - Oracle Communications Order and Service Management - Order and Service Management']/web:document[@index='0' or @name='1c9nk1ryzv_6']/web:ADFTable[@absoluteLocator='pt1:MA:n1:pt1:pnlcltn:resId1']")
.columnSort("Ascending", "Name" );
} -
How to sort out different issues on Satellite A505-S6973
Can anyone tell me, if the warranty period on my laptop has not passed, can i return my laptop to toshiba and have all my issues sorted out. Would there be a cost to do whatever repairs software related needs be done and how i am supposed to go about it because my laptop is beginning to have all sorts of little errors, i noticed that my harddrive has 156gb used although i have about 60 gigs in use.
A couple multimedia buttons aren't working but i touch them, my touchpad doesn't turn off with the hard button unless i turn it off using the FN key and my processor runs low but when i use a program i see it's reaching between 85 to 100% utilization.
I really like this laptop, but the issues i'm having i highly doubt it should operate this way.Hi mate
Software issues are not covered by warranty!
This means that you will have to pay for everything if the ASP technician would not find any problems!
This is why you should recover the notebook in order to check if its only a software related issue.
>A couple multimedia buttons aren't working but i touch them, my touchpad doesn't turn off with the hard button unless i turn it off using the FN key
Reinstall the VAP (value added package) and flash cards utility
>my processor runs low but when i use a program i see it's reaching between 85 to 100% utilization.
This is not a bug or hardware problem. You will notice this CPU behavior because the CPU supports an feature which helps to save the power and reduce the heat dissipation -
Issue With Page Break When Sorting is also applied on group
Hi
I am facing an issue with Page break only when I have sorting applied on the grouping that I have in the template.
The following is the sample XML
<ROWSET>
<ROW>
<GRE>org1</GRE>
<ORGANIZATION>Accounts</ORGANIZATION>
<FULL_NAME>test1,</FULL_NAME>
<ELEMENT_NAME>TEST BONUS</ELEMENT_NAME>
<CLASSIFICATION>Supplemental Earnings</CLASSIFICATION>
<RUN_VALUE>250</RUN_VALUE>
<MONTH_VALUE>500</MONTH_VALUE>
<QUARTER_VALUE>500</QUARTER_VALUE>
<YEAR_VALUE>500</YEAR_VALUE>
</ROW>
<ROW>
<GRE>org1</GRE>
<ORGANIZATION>Finance</ORGANIZATION>
<FULL_NAME>test2</FULL_NAME>
<ELEMENT_NAME>VOLUNTARY AD AND D</ELEMENT_NAME>
<CLASSIFICATION>Voluntary Deductions</CLASSIFICATION>
<RUN_VALUE>5.19</RUN_VALUE>
<MONTH_VALUE>10.38</MONTH_VALUE>
<QUARTER_VALUE>10.38</QUARTER_VALUE>
<YEAR_VALUE>10.38</YEAR_VALUE>
</ROW>
<ROW>
<GRE>org1</GRE>
<ORGANIZATION>Finance</ORGANIZATION>
<FULL_NAME>test3</FULL_NAME>
<ELEMENT_NAME>HMO MEDICAL</ELEMENT_NAME>
<CLASSIFICATION>Pre-Tax Deductions</CLASSIFICATION>
<RUN_VALUE>19.67</RUN_VALUE>
<MONTH_VALUE>39.34</MONTH_VALUE>
<QUARTER_VALUE>39.34</QUARTER_VALUE>
<YEAR_VALUE>39.34</YEAR_VALUE>
</ROW>
<ROW>
<GRE>org1</GRE>
<ORGANIZATION>Finance</ORGANIZATION>
<FULL_NAME>test4</FULL_NAME>
<ELEMENT_NAME>PENSION NR DC</ELEMENT_NAME>
<CLASSIFICATION>Pre-Tax Deductions</CLASSIFICATION>
<RUN_VALUE>0</RUN_VALUE>
<MONTH_VALUE>360</MONTH_VALUE>
<QUARTER_VALUE>360</QUARTER_VALUE>
<YEAR_VALUE>360</YEAR_VALUE>
</ROW>
</ROWSET>
In the template I group the data based on CLASSIFICATION and then sort on the same column CLASSIFICATION. I have a page-break applied for every group.
When I generate the PDF, I am not getting the page-breaks for every group. Instead some of them are displayed in the same page.
But when I remove the sorting that I had in the template on the column CLASSIFICATION, I am getting the output in the desired way but not in a sorted order.
kumarHi All,
I am using MS-WORD 2007 and BI Publisher desktop 10.1.3.3.3.
When I use split-by-page-break, splitting is performed for every line .. but not for group of lines.
Can anybody throw some light on this?
FYI...
I am using this code:
?if: position() mod 6= 0?
?split-by-page-break:?
?end if?
(Of course with in tags)
in G_LINES loop.
Can anybody help me out :-(
--Saritha -
ALV . How to remove the sort buttons on toolbar in ALV report?
Hi,experts
As you know, in default case , the alv report will display two sort buttons(ascending ,descending) on its toolbar , So How to remove the sort buttons on toolbar in ALV report?
Thanks for your help .Hi guixin,
1. Before calling REUSE_ALV_LIST_DISPLAY
2. Write this code :
data : excl type SLIS_T_EXTAB.
data : exclwa type SLIS_EXTAB.
exclwa = '&OUP'.
append exclwa to excl.
exclwa = '&ODN'.
append exclwa to excl.
3. Then while calling the FM,
pass this parameter also .
IT_EXCLUDING = excl
It will work fantastic.
regards,
amit m. -
Field should not display in the subtotal row in ALV report after sorting .
we have a requirement, after sorting and subtotaling, the output in ALV is -
vbeln amount1 amount2 amount3
123 11 12 13
123 12 13 14
123 23 25 27
133 11 12 13
133 12 13 14
133 23 25 27
Now the customer wants the ALV outpput in this fashion -
123 11 12 13
123 12 13 14
23 25 27 --->123 (vbeln) should not come in subtotaling row
133 11 12 13
133 12 13 14
23 25 27--->133(vbeln) should not come in subtotaling rowHi,
if it helps you could create a hierachy. In this way you can define the field catalog for the lines and for the subtotal columns. The only thing is that you would always show the subtotal rows.
You have references of hierachy alvs in
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c060fcb4-2c62-2b10-d2b2-f32407a5cc6f
ALV Hierarchy
alv hierarchy
In this case it also sorts
Sorting for ALV hierarchy
I hope it helps.
Edited by: Oscar Pecharroman on Aug 2, 2010 1:13 PM -
Sorting not working correctly for date field in alv report
Hi All,
My report displays many rows also containing date type fields of bldat,budat .
When I sort the report selecting field of type bldat budat the sorting is not correct for the year.
Ex:
Invoice doc dat
01-25-2011
01-21-2011
02-02-2011
10-25-2010
11-20-2010
If I use ascending then it is sorted as :
Invoice doc dat
01-21-2011
01-25-2011
02-02-2011
10-20-2010
10-25-2010
Why the sorting is not working correct for year.(2010 records should have been first).
The field wa_tab-bldat is of type char10.
It is populated as wa_tab-bldat = bsak-bldat.
Kindly suggest what can be done.The field wa_tab-bldat is of type char10
Then what it does is correct.
Refer to type datum...it will work
Maybe you are looking for
-
Firefox not recognizing flash player 10.1.82.76 update
Hi, I have a problem installing the latest flash player update on my firefox browser. I got the the installer page (http://get.adobe.com/flashplayer/) and I install everything and follow all of the instructions, and flash player installs successfully
-
Select list in a manually created tabular form
I created a select drop down item in a manually created tabular form. When I run the page, it also shows the null value '%'. How do I edit this? This is the line I am using in the SQL: htmldb_item.select_list_from_query(34,IN_PGRS_STAT_DSC,'select di
-
Solaris 10 Install - 10/09 version - screen resolution
Hi guys: I just installed an x86 version of Solaris 10 10/09 onto Lenovo T61. GUI install would not come up, so I used a command line mode. It turned out that Solaris used a greater video resolution than 1024 and my screen does not handle that. What
-
Problem in calling BW Web Reporting
Hi. I installed EP 60 SP4 sneak preview and I want to call bw web reporting in EP. So, I defined BW system in System Landscape and create iview using BW Web reporting template. (BW web reporting URL is "http://laphabw.lapha.net:8100/sap/bw/BEx?sap-la
-
can you please fix my flash player and flash reader and thank you i got windows 8