Defaulting the student status when adding a child.
Hello All,
How can we default the Student indicator in infotype 21 when we are trying to add a child under age 19 to always on.
When I enter date of birth and hit enter it should default the Student indicator field to with a check mark when the child is under age 19.
Please advice. Its urgent!
Thanks,
Chakri.
Hi,
You have to write an User Exit for this. Check this User Exit enhancement PBAS0001. Hope this will solve your problem.
Thanks,
Sarika.
Similar Messages
-
What's is the retail price for itouch 5 if the student discount is added?
Such as 300$ for 32g, how much would it cost if the student discount was added.
Find out yourself: click on the Education link on the Apple Store page:
http://store.apple.com/us-k12/browse/home/shop_iphone -
Should Parent objects be updated when adding a child?
Hi,
I have 2 objects in a one to many relationship, a parent with a collection
of child objects.
My parent object is being updated when I add child objects to it -
although nothing on the parent object has changed (except maybe the
JDOLOCKX column).
Is this meant to happen - as part of the optimistic locking? Does it try
and lock the owner of the collection when a new member is added?
Thanks in advance,
ChrisWe are planning a metadata extension to permit writing to a collection
without changing optimistic lock values for the owning class.
I don't have a good feel for the time frame of the feature yet.
-Patrick
On 5/21/02 1:06 PM, in article acduqj$e4j$[email protected], "Chris
Kimpton" <[email protected]> wrote:
Hi,
This is occuring across JVMs for me - so I have put a crude re-try
facility in place - it has a few goes at doing the work and then gives up
if that is not sufficient. Not nice, but it seems to work.
Chris
David A. King wrote:
I too have seen this behavior, which becomes frustrating when adding many
children concurrently--I receive ConcurrentModificationExceptions on the
parent, even though the parent itself did not change (except of course the
collection of children) with optimisitic locking. I have had to serialize
transactions manually to avoid the exceptions.
Thanks,
David A. King
Chris Kimpton wrote:
Hi,
I have 2 objects in a one to many relationship, a parent with a collection
of child objects.
My parent object is being updated when I add child objects to it -
although nothing on the parent object has changed (except maybe the
JDOLOCKX column).
Is this meant to happen - as part of the optimistic locking? Does it try
and lock the owner of the collection when a new member is added?
Thanks in advance,
Chris -
Trigger an event in the parent view, when popping a child view (Mobile)
So from one view I'm pushing another view with some data:
<s:Button label="Edit System" click="navigator.pushView(EditSystem, systems.selectedItem)"/>
The problem I have is that in this other view I'm updating a view things in my sqlite database, so when I pop the 'EditSystem' view and return to the original, I want to run a function to requery the the sql so I can update a view things in the original view. But from what I can fugure Eventlisteners dont work across views? How do I trigger an event in the original view when I return from a child view via pop?You should find this post useful: http://flexponential.com/2010/12/05/saving-scroll-position-between-views-in-a-mobile-flex- application/
It demonstrates one way of saving and restoring data when pushing and popping a view. -
Modify the email contents when adding a colleague in SharePoint My site
Hi I want to modify the mail that is sent to the person I add as a colleague in mysite.
I want to modify the mail content.
Regards
VinodHi,
According to your post, my understanding is that you wanted to modify the email content for adding colleagues alert.
After some search and research, I have found that It is not
supported way of modifying text/format of email that goes out when a colleague is added.
The text/format is hard coded in a private method (Microsoft.Office.Server.UserProfiles.ColleagueManager class) in an assembly that ships with SharePoint.
For the normal list, we can modify the content by edit the XML file of
alerttemplates.xml. We can find it in the below path.
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\XML
http://sharepoint.stackexchange.com/questions/26172/can-the-added-as-colleague-email-text-format-be-changed
Thanks,
Jason
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
[email protected]
Jason Guo
TechNet Community Support -
BADI for CJ20N to get the WBS status when changed
Hi all,
Here's the requirement:
I have to capture the previous status and currently changed status of the WBS element in CJ20N T-CODE and save this in the ZTABLE.
Every time the STATUS of WBS element changes..the ZTABLE has to get updated.
Will you please help me out to do this.
I have tried with BADI - WORKBREAKDOWN_UPDATE, could find that the status part is updated after the call to WORKBREAKDOWN_UPDATE.
Thanks and Regards,
Krishna Chaitanya G
Edited by: Krishna Chaitanya G on Apr 27, 2009 6:30 PMUse BADI WORKBREAKDOWN_UPDATE method AT_SAVE. The WBS elements are in internal table IT_WBS_ELEMENT which has structure PRPS. Use OBJNR to find status with function module
CALL FUNCTION 'STATUS_READ'
EXPORTING
CLIENT = SY-MANDT
objnr = gs_wbs_element-objnr
ONLY_ACTIVE = ' '
TABLES
STATUS = et_status
EXCEPTIONS
OBJECT_NOT_FOUND = 1
OTHERS = 2
The statuses are buffered in a separate memory area so be careful if you call any function modules that affect statuses e.g one to create Sales Orders as this initializes the buffered statuses and they are not changed when you save the WBS element. To get round this problem put the current status in a separate memory area carry out the processing that initializes the statuses and then recall the status from memory.
CALL FUNCTION 'STATUS_BUFFER_EXPORT_TO_MEMORY'
EXPORTING
i_memory_id = 'ZPSS_STATUS'.
LOOP AT gt_pss_01 ASSIGNING <ls_pss_01>.
AT NEW sold_to_party.
CLEAR: ls_order_header,
lt_order_items,
ls_order_partners,
lt_order_partners.
"Header
ls_order_header-doc_type = c_rsbill_order_type.
CALL METHOD <ls_pss_01>-o_pss01->get_sales_area
IMPORTING
e_sales_org = ls_order_header-sales_org
e_division = ls_order_header-division
e_distr_chan = ls_order_header-distr_chan
EXCEPTIONS
not_found = 1.
IF sy-subrc NE 0.
CONTINUE.
ENDIF.
"Partner
IF <ls_pss_01>-sold_to_party IS INITIAL.
CONTINUE.
ENDIF.
ls_order_partners-partn_role = 'AG'.
ls_order_partners-partn_numb = <ls_pss_01>-sold_to_party.
APPEND ls_order_partners TO lt_order_partners.
ENDAT.
"Items
CLEAR ls_order_items.
ls_order_items-itm_number = <ls_pss_01>-posnr.
ls_order_items-material = c_rsbill_material.
ls_order_items-wbs_elem = <ls_pss_01>-posid.
APPEND ls_order_items TO lt_order_items.
AT END OF sold_to_party.
CALL FUNCTION 'BAPI_SALESORDER_CREATEFROMDAT2'
EXPORTING
order_header_in = ls_order_header
behave_when_error = space "'P' "Save when error occurs
testrun = space
IMPORTING
salesdocument = <ls_pss_01>-sales_order
TABLES
return = <ls_pss_01>-bapireturn
order_items_in = lt_order_items
order_partners = lt_order_partners.
ENDAT.
ENDLOOP.
*--Re-fill status from memory
CALL FUNCTION 'STATUS_BUFFER_IMPORT_FROM_MEMO'
EXPORTING
i_memory_id = 'ZPSS_STATUS'.
Hope this is of some use -
I am running MOSS 2007 SP1. I browse to site settings > People and groups and a group which has more than 60 members. I select all > Click Actions > Email Users. Nothing happens. I select less users, new outlook window comes up as it should. I am running outlook 2007. I first thought that the limit was 50 users, but different user selections let me select 51 users as well. I then concentrated on the character limit and I noticed that there were about 1580 characters in the To field when I selected 50/51 users.
Is there a known limit in sharepoint/outlook client for this function on how many characters can be entered in the To field?Hello Amar,
This is a by-design behavior, not from SharePoint side, but Internet Explorer. The limitation by the 2083 characters in IE for the Max URL length is described in the following KB article:
(KB208427) Maximum URL length is 2,083 characters in Internet Explorer
http://support.microsoft.com/default.aspx?scid=kb;EN-US;208427
As a workaround, you may need to divide the list up and not send all the email at the same time. Hope it helps!
Best Regards,
Lionel -
Change the transaction status when creating a follow up activity
Hello All
We need to change the activity status if a follow up document is created from. E.g. If an activity is created type 001 then a follow-up activity type 003 as a follow up document from 001 the system automatically changes the activity status from open to in process. I need detailed steps regarding how to reach this
Regards
JacopoSee if you can "exploit" CRM_COPY_BADI and function modules CRM_STATUS_CHANGE_EXTERN to change the User status or CRM_STATUS_CHANGE_INTERN for System status.
-
Save status when adding cARC link under Object Links Tab
Hi Experts,
I want to know how to save status for cARC or SAP spec links added as Object links under the object Links tab.
Even though I maintain the status it is not saved except for WBS elements.
Best Regards,
Arti.Do you mean that you have multiple object link types?
I am having the same problem.
For object link type A, I can set and save the status (severity) correctly, but for object link types B and C, it does not work. The status can be set, and it is shown on the UI, but it is not saved correctly, so that the status is gone when I reload the project.
Maybe somebody can help here? -
Why can't I access the playlist button when adding songs to a playlist?
Under iOS 6, when editing a playlist (adding music to it), I had access to the playlist button in order to add all the music from one playlist to another. Under iOS 7, one can only access the song, artist, album, and composer buttons from the Edit/+ screen. So if I want to add 5 songs that I know are together on another playlist, I have to find them again in an alphabetical list? Yikes, a severe downgrade in functionality under ios7. Will this ability return or am I just missing something obvious that should let me do it?
In an effort to go minimalist they went brain-dead. I have a library of over 7,000 songs. I create my playlists through playlists when I am on the go. And I rarely ever create a new playlist at the computer because I rarely even use my computer, much less synch my iphone/itunes manually with it.
And not only did they eliminate the add from playlist feature, you cannot edit an existing playlist while “on the go” - only those created after i0s 7. Also, you can no longer create a playlist by selecting the genre. But wait - you can select the “Composer". Really?! I don't listen to my music by Composer. Whose idea was that. Now am I supposed to reorganize my music library and categorize songs by Composer?
As the other poster said, the "on the go" list is now virtually unusable. Now I have to go to the computer (which I rarely do). They really took the on-the-go/music app back to ipod-2008. Really a huge leap backwards. -
Until a recent update in Firefox, I could always save a new bookmark to the folder of my choice by using the drop down list in the gray box that comes up when I chose to bookmark a site. Now only a few of my folders - probably most recents - show up and I can't seem to access the whole list. I now have to go to "recently bookmarked" and drag the bookmark from there to the folder of choice. Any way to restore the ability to make it a one stop save to my folders like I used to? Thanks.
No, I see the three areas at the bottom of the Bookmark area that you refer to, but that also highlights an issue. When I want to save a story to my Reading List and click on Share then "Add to Reading List" then go back to look at what is stored in the Reading List, my recently-saved item is not there.
I looked thru the History tab and the Reading List tab and have been in the Bookmark tab. But even when I Save a Bookmark, that newly-saved Bookmark does not show up in the Bookmark area.
But then again, the next day (and actually just in the last half-hour) all of the functionality came back. When I look at the Bookmarks, suddenly, again, all of the Bookmarks that are on my Safari browser on my iMac are now there, and I can now Save a Bookmark.
It keeps coming in and out and that is what is driving me a little nuts.
Thanks. -
I added my first folder of MP3s and it created a playlist, but didn't show up in the library. When adding a second folder, it didn't show up anywhere. I can do a search for them in the search window, and it finds/plays them, but I want to be able to browse them in my library. These are not MP3s downloaded from iTunes, but are personal files located on my hard drive. Can anyone help?
I have a Dell that's running Windows XP. I have found that itunes is very temperamental. this works most of the time... except on my son's computer that's running Windows Vista.
Go to your library in iTunes. Then go up to file and try one of the options (import, add folder to library, or add file to library).
Adding a folder is the least work. You can add all the files from a folder with one click... if it works. Remember that itunes is temperamental.
If that doesn't work, try adding a file. The problem with that is that you have to go through the whole process for each and every file (song, movie, etc).
Sometimes the only thing that works is to import.
I haven't gotten iTunes to work on my son's computer (Windows Vista).
I can't get support from apple in any way at all! They are good about creating electronics that appeal to us But they are lousy at support. If anyone figures out how to access support (where you can actually contact Apple) please let me know ([email protected]). I've been trying for 6 months. -
JTable sorting - problem when adding elements (complete code inside)
I�m writing this email with reference to a recent posting here but this time with the code example. (I apologize for the duplicated posting � this time it will be with the code)
Problem: when adding more elements to the JTable (sorted) the exception: ArrayIndexOutOfBoundsException is thrown.
Example: If the elements in the table are 10 and then the user requests for 8 � the table will produce the correct result. However, if the user will ask for 11 items (>10) the exception will be thrown.
The program: The program below (compiles and running). A JTable is constructed with 3 items, when you click the button - the return result should be 4 items - this will generate the error, WHY?
I would highly appreciate your thoughts why this is happening and most importantly � how to fix it.
Thanks a lot
3 files:
(1) TableSorterDemo
(2) Traveler
(3)TableSorter
//TableSorterDemo:
package sorter;
import javax.swing.DefaultListModel;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.table.AbstractTableModel;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
* TableSorterDemo is like TableDemo, except that it
* inserts a custom model -- a sorter -- between the table
* and its data model. It also has column tool tips.
public class TableSorterDemo implements ActionListener
private JPanel superPanel;
private JButton clickMe = new JButton("click me to get diff data");
private boolean DEBUG = false;
private DefaultListModel defaultListModel;
private JTable table;
public TableSorterDemo()
superPanel = new JPanel(new BorderLayout());
defaultListModel = new DefaultListModel();
init1();
TableSorter sorter = new TableSorter(new MyTableModel(defaultListModel)); //ADDED THIS
table = new JTable(sorter); //NEW
sorter.setTableHeader(table.getTableHeader()); //ADDED THIS
table.setPreferredScrollableViewportSize(new Dimension(500, 70));
//Set up tool tips for column headers.
table.getTableHeader().setToolTipText(
"Click to specify sorting; Control-Click to specify secondary sorting");
//Create the scroll pane and add the table to it.
JScrollPane scrollPane = new JScrollPane(table);
//Add the scroll pane to this panel.
superPanel.add("Center", scrollPane);
superPanel.add("South",clickMe);
clickMe.addActionListener(this);
public JPanel getPanel()
return superPanel;
public void init1()
//in real life this will be done from the db
Traveler a = new Traveler();
Traveler b = new Traveler();
Traveler c = new Traveler();
a.setFirstName("Elvis");
a.setLastName("Presley");
a.setSprot("Ping Pong");
a.setNumYears(3);
a.setVegetarian(true);
b.setFirstName("Elton");
b.setLastName("John");
b.setSprot("Soccer");
b.setNumYears(2);
b.setVegetarian(true);
c.setFirstName("shaquille");
c.setLastName("oneil");
c.setSprot("Golf");
c.setNumYears(22);
c.setVegetarian(true);
defaultListModel.addElement(a);
defaultListModel.addElement(b);
defaultListModel.addElement(c);
public void init2()
//in real life this will be done from the db
Traveler d = new Traveler();
Traveler e = new Traveler();
Traveler f = new Traveler();
Traveler g = new Traveler();
d.setFirstName("John");
d.setLastName("Smith");
d.setSprot("Tennis");
d.setNumYears(32);
d.setVegetarian(true);
e.setFirstName("Ron");
e.setLastName("Cohen");
e.setSprot("Baseball");
e.setNumYears(12);
e.setVegetarian(true);
f.setFirstName("Donald");
f.setLastName("Mac Novice");
f.setSprot("Vallyball");
f.setNumYears(1);
f.setVegetarian(true);
g.setFirstName("Eithan");
g.setLastName("Superstar");
g.setSprot("Vallyball");
g.setNumYears(21);
g.setVegetarian(true);
defaultListModel.addElement(d);
defaultListModel.addElement(e);
defaultListModel.addElement(f);
defaultListModel.addElement(g);
class MyTableModel extends AbstractTableModel
private DefaultListModel myModel;
public MyTableModel(DefaultListModel m)
myModel=m;
private String[] columnNames = {"First Name",
"Last Name",
"Sport",
"# of Years",
"Vegetarian"};
public int getColumnCount()
return columnNames.length;
public int getRowCount()
return myModel.size();
public String getColumnName(int column)
return getNames()[column];
public String[] getNames()
String[] names = {"First Name", "Last Name", "Sport", "# of Years", "Vegetarian"};
return names;
public Object getValueAt(int row, int col)
return distributeObjectsInTable(row, col, (Traveler) myModel.elementAt(row));
public Object distributeObjectsInTable(int row, int col, Traveler tr)
switch(col)
case 0:
return tr.getFirstName();
case 1:
return tr.getLastName();
case 2:
return tr.getSprot();
case 3:
return new Integer(tr.getNumYears());
case 4:
return new Boolean (tr.isVegetarian());
default:
return "Error";
public Class getColumnClass(int c)
return getValueAt(0, c).getClass();
private static void createAndShowGUI()
//Make sure we have nice window decorations.
JFrame.setDefaultLookAndFeelDecorated(true);
//Create and set up the window.
JFrame frame = new JFrame("TableSorterDemo");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//Create and set up the content pane.
TableSorterDemo newContentPane = new TableSorterDemo();
newContentPane.getPanel().setOpaque(true); //content panes must be opaque
frame.setContentPane(newContentPane.getPanel());
//Display the window.
frame.pack();
frame.setVisible(true);
public static void main(String[] args)
//Schedule a job for the event-dispatching thread:
//creating and showing this application's GUI.
javax.swing.SwingUtilities.invokeLater(new Runnable()
public void run()
createAndShowGUI();
public void actionPerformed(ActionEvent ae)
if (ae.getSource()==clickMe)
defaultListModel.removeAllElements();
init2(); //if the size of the model was less than 2 items - the result will be ok.
//in other words, if you commens the last 2 rows of this method (addElement(f) & g)
// the result will be fine.
table.updateUI();
}//(2) Traveler
package sorter;
public class Traveler
private String firstName;
private String lastName;
private String sprot;
private int numYears;
private boolean vegetarian;
public String getFirstName()
return firstName;
public String getLastName()
return lastName;
public int getNumYears()
return numYears;
public String getSprot()
return sprot;
public boolean isVegetarian()
return vegetarian;
public void setFirstName(String firstName)
this.firstName = firstName;
public void setLastName(String lastName)
this.lastName = lastName;
public void setNumYears(int numYears)
this.numYears = numYears;
public void setSprot(String sprot)
this.sprot = sprot;
public void setVegetarian(boolean vegetarian)
this.vegetarian = vegetarian;
}//(3)TableSorter
package sorter;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import java.util.List;
import javax.swing.*;
import javax.swing.event.TableModelEvent;
import javax.swing.event.TableModelListener;
import javax.swing.table.*;
public class TableSorter extends AbstractTableModel {
protected TableModel tableModel;
public static final int DESCENDING = -1;
public static final int NOT_SORTED = 0;
public static final int ASCENDING = 1;
private static Directive EMPTY_DIRECTIVE = new Directive(-1, NOT_SORTED);
public static final Comparator COMPARABLE_COMAPRATOR = new Comparator() {
public int compare(Object o1, Object o2) {
return ((Comparable) o1).compareTo(o2);
public static final Comparator LEXICAL_COMPARATOR = new Comparator() {
public int compare(Object o1, Object o2) {
return o1.toString().compareTo(o2.toString());
private Row[] viewToModel;
private int[] modelToView;
private JTableHeader tableHeader;
private MouseListener mouseListener;
private TableModelListener tableModelListener;
private Map columnComparators = new HashMap();
private List sortingColumns = new ArrayList();
public TableSorter() {
this.mouseListener = new MouseHandler();
this.tableModelListener = new TableModelHandler();
public TableSorter(TableModel tableModel) {
this();
setTableModel(tableModel);
public TableSorter(TableModel tableModel, JTableHeader tableHeader) {
this();
setTableHeader(tableHeader);
setTableModel(tableModel);
private void clearSortingState() {
viewToModel = null;
modelToView = null;
public TableModel getTableModel() {
return tableModel;
public void setTableModel(TableModel tableModel) {
if (this.tableModel != null) {
this.tableModel.removeTableModelListener(tableModelListener);
this.tableModel = tableModel;
if (this.tableModel != null) {
this.tableModel.addTableModelListener(tableModelListener);
clearSortingState();
fireTableStructureChanged();
public JTableHeader getTableHeader() {
return tableHeader;
public void setTableHeader(JTableHeader tableHeader) {
if (this.tableHeader != null) {
this.tableHeader.removeMouseListener(mouseListener);
TableCellRenderer defaultRenderer = this.tableHeader.getDefaultRenderer();
if (defaultRenderer instanceof SortableHeaderRenderer) {
this.tableHeader.setDefaultRenderer(((SortableHeaderRenderer) defaultRenderer).tableCellRenderer);
this.tableHeader = tableHeader;
if (this.tableHeader != null) {
this.tableHeader.addMouseListener(mouseListener);
this.tableHeader.setDefaultRenderer(
new SortableHeaderRenderer(this.tableHeader.getDefaultRenderer()));
public boolean isSorting() {
return sortingColumns.size() != 0;
private Directive getDirective(int column) {
for (int i = 0; i < sortingColumns.size(); i++) {
Directive directive = (Directive)sortingColumns.get(i);
if (directive.column == column) {
return directive;
return EMPTY_DIRECTIVE;
public int getSortingStatus(int column) {
return getDirective(column).direction;
private void sortingStatusChanged() {
clearSortingState();
fireTableDataChanged();
if (tableHeader != null) {
tableHeader.repaint();
public void setSortingStatus(int column, int status) {
Directive directive = getDirective(column);
if (directive != EMPTY_DIRECTIVE) {
sortingColumns.remove(directive);
if (status != NOT_SORTED) {
sortingColumns.add(new Directive(column, status));
sortingStatusChanged();
protected Icon getHeaderRendererIcon(int column, int size) {
Directive directive = getDirective(column);
if (directive == EMPTY_DIRECTIVE) {
return null;
return new Arrow(directive.direction == DESCENDING, size, sortingColumns.indexOf(directive));
private void cancelSorting() {
sortingColumns.clear();
sortingStatusChanged();
public void setColumnComparator(Class type, Comparator comparator) {
if (comparator == null) {
columnComparators.remove(type);
} else {
columnComparators.put(type, comparator);
protected Comparator getComparator(int column) {
Class columnType = tableModel.getColumnClass(column);
Comparator comparator = (Comparator) columnComparators.get(columnType);
if (comparator != null) {
return comparator;
if (Comparable.class.isAssignableFrom(columnType)) {
return COMPARABLE_COMAPRATOR;
return LEXICAL_COMPARATOR;
private Row[] getViewToModel() {
if (viewToModel == null) {
int tableModelRowCount = tableModel.getRowCount();
viewToModel = new Row[tableModelRowCount];
for (int row = 0; row < tableModelRowCount; row++) {
viewToModel[row] = new Row(row);
if (isSorting()) {
Arrays.sort(viewToModel);
return viewToModel;
public int modelIndex(int viewIndex)
return getViewToModel()[viewIndex].modelIndex;
private int[] getModelToView()
if (modelToView == null) {
int n = getViewToModel().length;
modelToView = new int[n];
for (int i = 0; i < n; i++) {
modelToView[modelIndex(i)] = i;
return modelToView;
// TableModel interface methods
public int getRowCount() {
return (tableModel == null) ? 0 : tableModel.getRowCount();
public int getColumnCount() {
return (tableModel == null) ? 0 : tableModel.getColumnCount();
public String getColumnName(int column) {
return tableModel.getColumnName(column);
public Class getColumnClass(int column) {
return tableModel.getColumnClass(column);
public boolean isCellEditable(int row, int column) {
return tableModel.isCellEditable(modelIndex(row), column);
public Object getValueAt(int row, int column) {
return tableModel.getValueAt(modelIndex(row), column);
public void setValueAt(Object aValue, int row, int column) {
tableModel.setValueAt(aValue, modelIndex(row), column);
// Helper classes
private class Row implements Comparable {
private int modelIndex;
public Row(int index) {
this.modelIndex = index;
public int compareTo(Object o) {
int row1 = modelIndex;
int row2 = ((Row) o).modelIndex;
for (Iterator it = sortingColumns.iterator(); it.hasNext();) {
Directive directive = (Directive) it.next();
int column = directive.column;
Object o1 = tableModel.getValueAt(row1, column);
Object o2 = tableModel.getValueAt(row2, column);
int comparison = 0;
// Define null less than everything, except null.
if (o1 == null && o2 == null) {
comparison = 0;
} else if (o1 == null) {
comparison = -1;
} else if (o2 == null) {
comparison = 1;
} else {
comparison = getComparator(column).compare(o1, o2);
if (comparison != 0) {
return directive.direction == DESCENDING ? -comparison : comparison;
return 0;
private class TableModelHandler implements TableModelListener {
public void tableChanged(TableModelEvent e) {
// If we're not sorting by anything, just pass the event along.
if (!isSorting()) {
clearSortingState();
fireTableChanged(e);
return;
// If the table structure has changed, cancel the sorting; the
// sorting columns may have been either moved or deleted from
// the model.
if (e.getFirstRow() == TableModelEvent.HEADER_ROW) {
cancelSorting();
fireTableChanged(e);
return;
// We can map a cell event through to the view without widening
// when the following conditions apply:
// a) all the changes are on one row (e.getFirstRow() == e.getLastRow()) and,
// b) all the changes are in one column (column != TableModelEvent.ALL_COLUMNS) and,
// c) we are not sorting on that column (getSortingStatus(column) == NOT_SORTED) and,
// d) a reverse lookup will not trigger a sort (modelToView != null)
// Note: INSERT and DELETE events fail this test as they have column == ALL_COLUMNS.
// The last check, for (modelToView != null) is to see if modelToView
// is already allocated. If we don't do this check; sorting can become
// a performance bottleneck for applications where cells
// change rapidly in different parts of the table. If cells
// change alternately in the sorting column and then outside of
// it this class can end up re-sorting on alternate cell updates -
// which can be a performance problem for large tables. The last
// clause avoids this problem.
int column = e.getColumn();
if (e.getFirstRow() == e.getLastRow()
&& column != TableModelEvent.ALL_COLUMNS
&& getSortingStatus(column) == NOT_SORTED
&& modelToView != null) {
int viewIndex = getModelToView()[e.getFirstRow()];
fireTableChanged(new TableModelEvent(TableSorter.this,
viewIndex, viewIndex,
column, e.getType()));
return;
// Something has happened to the data that may have invalidated the row order.
clearSortingState();
fireTableDataChanged();
return;
private class MouseHandler extends MouseAdapter {
public void mouseClicked(MouseEvent e) {
JTableHeader h = (JTableHeader) e.getSource();
TableColumnModel columnModel = h.getColumnModel();
int viewColumn = columnModel.getColumnIndexAtX(e.getX());
int column = columnModel.getColumn(viewColumn).getModelIndex();
if (column != -1) {
int status = getSortingStatus(column);
if (!e.isControlDown()) {
cancelSorting();
// Cycle the sorting states through {NOT_SORTED, ASCENDING, DESCENDING} or
// {NOT_SORTED, DESCENDING, ASCENDING} depending on whether shift is pressed.
status = status + (e.isShiftDown() ? -1 : 1);
status = (status + 4) % 3 - 1; // signed mod, returning {-1, 0, 1}
setSortingStatus(column, status);
private static class Arrow implements Icon {
private boolean descending;
private int size;
private int priority;
public Arrow(boolean descending, int size, int priority) {
this.descending = descending;
this.size = size;
this.priority = priority;
public void paintIcon(Component c, Graphics g, int x, int y) {
Color color = c == null ? Color.GRAY : c.getBackground();
// In a compound sort, make each succesive triangle 20%
// smaller than the previous one.
int dx = (int)(size/2*Math.pow(0.8, priority));
int dy = descending ? dx : -dx;
// Align icon (roughly) with font baseline.
y = y + 5*size/6 + (descending ? -dy : 0);
int shift = descending ? 1 : -1;
g.translate(x, y);
// Right diagonal.
g.setColor(color.darker());
g.drawLine(dx / 2, dy, 0, 0);
g.drawLine(dx / 2, dy + shift, 0, shift);
// Left diagonal.
g.setColor(color.brighter());
g.drawLine(dx / 2, dy, dx, 0);
g.drawLine(dx / 2, dy + shift, dx, shift);
// Horizontal line.
if (descending) {
g.setColor(color.darker().darker());
} else {
g.setColor(color.brighter().brighter());
g.drawLine(dx, 0, 0, 0);
g.setColor(color);
g.translate(-x, -y);
public int getIconWidth() {
return size;
public int getIconHeight() {
return size;
private class SortableHeaderRenderer implements TableCellRenderer {
private TableCellRenderer tableCellRenderer;
public SortableHeaderRenderer(TableCellRenderer tableCellRenderer) {
this.tableCellRenderer = tableCellRenderer;
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column) {
Component c = tableCellRenderer.getTableCellRendererComponent(table,
value, isSelected, hasFocus, row, column);
if (c instanceof JLabel) {
JLabel l = (JLabel) c;
l.setHorizontalTextPosition(JLabel.LEFT);
int modelColumn = table.convertColumnIndexToModel(column);
l.setIcon(getHeaderRendererIcon(modelColumn, l.getFont().getSize()));
return c;
private static class Directive {
private int column;
private int direction;
public Directive(int column, int direction) {
this.column = column;
this.direction = direction;
}The table listens to the TableModel for changes. Changing the table by adding/removing
rows or columns has no affect on its table model. If you make changes to the table model
the table will be notified by its TableModelListener and change its view. So tell
MyTableModel about the change of data:
public class TableSorterDemo implements ActionListener
MyTableModel tableModel;
public TableSorterDemo()
defaultListModel = new DefaultListModel();
init1();
tableModel = new MyTableModel(defaultListModel);
TableSorter sorter = new TableSorter(tableModel);
public void actionPerformed(ActionEvent ae)
if (ae.getSource()==clickMe)
defaultListModel.removeAllElements();
init2();
tableModel.fireTableStructureChanged();
} -
Error when adding Essbase server...
Hi,
I installed Hyperion System 9.3.1 in my development machine and encounter the following error when adding a Essbase server in AAS for the first time.
Error: 1042017: Network error: The client or server timed out waiting to receive data using TCP/IP. Check network connections. Increase the NetRetryCount and/or NetDelay values in the ESSBASE.CFG file. Update this file on both client and server. Restart the client and try again.
I used the default user "admin" and password "password". I used my servername:10080 as the server name. I hope I am right.
Why is this happening? I tried changing netdelay settings but still get the same. Is this something else? Does this have anything to do with my TCP/IP settings? I am installing this on a virtual PC.
I couldn't find an answer in previous posts.
regards
hThe things that come to mind:
The server name you use should be the name of the virtual PC, not the machine it's running on. Also, depending on the settings for the Virtual PC environment, you may have to change the network options to allow it to be visible to the network, be in the right domain, etc...
The above may or may not get you any closer, the error message itself is just saying it can't receive a response from the server, which means the server never got the request or can't send a response back.
Good Luck, -
How to change the user status from CJ01 transaction
Hello All,
I am doing a BDC in CJ01 transaction where there is a field called "User Status" .
This field is not editable. However the requirement is to populate this field with some value based on some other entries.
Is there any Function module / BAPI to update user status from CJ01.
Thanks in advance.
Regards
IndrajitHi Anbu
Thanks for your kindness.
I had got the proper badi definition ( RECN_CONTRACT ) before. I have try to implement the badi in my implementation YCL_IM_RECN_CONTRACT and below is my example codes. It can update the user status when the SAVE button is pressed. My example codes are below:
METHOD if_ex_recn_contract~check_all.
DATA:
cl_recn_contract TYPE REF TO cl_recn_contract.
DATA: r_status_mngr TYPE REF TO if_reca_status_mngr.
DATA: lv_status_profile TYPE j_stsma.
DATA: lt_status TYPE re_t_status,
ls_status TYPE LINE OF re_t_status.
DATA: r_message TYPE REF TO if_reca_message_list.
cl_recn_contract ?= io_object.
CHECK if_before_store = 'X'.
CALL METHOD cl_recn_contract->if_reca_has_status~mo_status_mngr->get_current_status
IMPORTING
ed_status_scheme = lv_status_profile
et_status = lt_status.
lv_status_profile = 'ZBCIA01'.
CALL METHOD cl_recn_contract->if_reca_has_status~mo_status_mngr->set_status_profile
EXPORTING
id_status_profile = lv_status_profile.
READ TABLE lt_status INTO ls_status INDEX 2.
ls_status-stat = 'E0001'.
ls_status-inact = ''.
MODIFY lt_status FROM ls_status INDEX 2.
CALL METHOD cf_reca_message_list=>create
RECEIVING
ro_instance = r_message.
CALL METHOD cl_recn_contract->if_reca_has_status~mo_status_mngr->set_status
EXPORTING
it_status = lt_status
if_only_user_status = 'X'
io_msglist = r_message.
REFRESH lt_status.
ENDMETHOD.
Maybe you are looking for
-
Hello All, we have created shared folder on multiple client machine in domain environment on different 2 OS like-XP,Vista, etc. from some day's When we facing problem when we are access from host name that shared folder is accessible but same time sa
-
Exporting iCal events in a specific date range
Is this possible? I want to export events from one calendar, but only in a certain date range, to give to another user to import into their iCal calendar...
-
How can I save "faces" when exporting a library?
Trying to use more libraries but when I export most of the discription moved but none of the faces did. Is there a way to move faces so I do not have to go throught the whole process again?
-
Can't change file association (Powerpoint 2011 to Powerpoint 2008)
Hello On my iMac I've recently installed MS Office 2011. The old version of Office 2008 is still installed as well. I've got some problems with the new version of Powerpoint (2011). Therefore I'd like to use the old version of Powerpoint (2008) for a
-
Dynamic Proxy class in JDK1.18
I want to create a Dynamic Proxy class in JDK1.1.8 can any one help me out