Need add some T.codes in APB_LAUNCHPAD
Hello Experts,
I have one strandard portal application is there. In this application they created Tranction links. If i click on one link it will open SAP report Program. (i.e, for this link they configured T.code).
Here my Problem is i want some more T.code in this Portal Application. Here they are using WEBDYNPRO Component name is APB_LAUNCHPAD.
Can you tell me how can i add some more T.code fo this application. Is there any Table is there?
Regards,
Sri
Check this:
link: [ABAP Launch Pad|http://help.sap.com/saphelp_ppm50/helpdata/en/45/de6583f81c5591e10000000a1553f7/content.htm]
Similar Messages
-
Need to add Standard transaction code to User Menu.
Hi All,
I need to add Standard transaction code to User Menu. How this can be accomplished?
ThanksYour Security and/or Basis team probably have control of the user menu settings. On the other hand, if this is for YOUR user menu, you could choose to simply adjust your favorites.
-
When I add some code like the below to a webpage
sometimes when I add some code like the below to a
webpage[dwmr mx 2004 or cs4], the page destroyed/currupted like the
css missing[is inside a template], well I think page stills
displays ok online but in "design view" default fonts appear etc
destructions, well how I recover page just prior entered the code ?
<input name="st" type="hidden" value="<?=
isset($_GET['sort'])?$_GET['sort']:(isset($_GET['price'])?'price':(isset($_GET['popular'] )?'popular':(isset($_GET['wd4'])?'wd4':(isset($_GET['salon'])?'salon':(isset($_GET['manual '])?2:1)))));
?>" />
<script type="text/javascript">
function highlightTableCells()
document.getElementById('cars').style.backgroundColor='#00CC66';
switch(document.getElementById('st').value)
case "price":
document.getElementById('price').style.backgroundColor='#00CC66';
break;
case "2": //manual
document.getElementById('manual').style.backgroundColor='#00CC66';
document.getElementById('manual2').style.backgroundColor='#00CC66';
break;
case "1":
document.getElementById('auto').style.backgroundColor='#00CC66';
document.getElementById('auto2').style.backgroundColor='#00CC66';
break;
case "salon":
document.getElementById('salon').style.backgroundColor='#00CC66';
document.getElementById('salon2').style.backgroundColor='#00CC66';
break;
case "wd4":
document.getElementById('wd4').style.backgroundColor='#00CC66';
document.getElementById('wd42').style.backgroundColor='#00CC66';
break;
case "0":
document.getElementById('all').style.backgroundColor='#00CC66';
break;
case "popular":
document.getElementById('popular').style.backgroundColor='#00CC66';
document.getElementById('popular2').style.backgroundColor='#00CC66';
break;
case "4wd":
document.getElementById('wd4').style.backgroundColor='#00CC66';
document.getElementById('wd42').style.backgroundColor='#00CC66';
break;
case "mpvs":
document.getElementById('mpvs').style.backgroundColor='#00CC66';
break;
case "cabrios":
document.getElementById('open').style.backgroundColor='#00CC66';
break;
case "a":
document.getElementById('a').style.backgroundColor='#00CC66';
break;
case "b1":
document.getElementById('b1').style.backgroundColor='#00CC66';
break;
case "b2":
document.getElementById('b2').style.backgroundColor='#00CC66';
break;
case "c":
document.getElementById('c').style.backgroundColor='#00CC66';
break;
case "d":
document.getElementById('d').style.backgroundColor='#00CC66';
break;
case "d1":
document.getElementById('d1').style.backgroundColor='#00CC66';
break;
case "e1":
document.getElementById('e1').style.backgroundColor='#00CC66';
break;
case "e2":
document.getElementById('e2').style.backgroundColor='#00CC66';
break;
case "f":
document.getElementById('f').style.backgroundColor='#00CC66';
break;
case "g":
document.getElementById('g').style.backgroundColor='#00CC66';
break;
case "h1":
document.getElementById('h1').style.backgroundColor='#00CC66';
break;
case "h2":
document.getElementById('h2').style.backgroundColor='#00CC66';
break;
case "i":
document.getElementById('i').style.backgroundColor='#00CC66';
break;
case "j":
document.getElementById('j').style.backgroundColor='#00CC66';
break;
case "k1":
document.getElementById('k1').style.backgroundColor='#00CC66';
break;
case "k2":
document.getElementById('k2').style.backgroundColor='#00CC66';
break;
case "n":
document.getElementById('n').style.backgroundColor='#00CC66';
break;
case "p1":
document.getElementById('p1').style.backgroundColor='#00CC66';
break;
case "p2":
document.getElementById('p2').style.backgroundColor='#00CC66';
break;
case "s":
document.getElementById('s').style.backgroundColor='#00CC66';
break;
case "u":
document.getElementById('u').style.backgroundColor='#00CC66';
break;
</script>Take a look at a previous thread on this topic: http://forums.adobe.com/message/5099353
-
Hi,
someone can send me some sample code showing the use of lock functions before updating any tables..i need the full code ..
pls help me
points will be rewarded
raviRavi,
I have one simple example and it will show what is lock objects exactly.
See the program :
*& Report ZTEST_LOCK1
REPORT ZTEST_LOCK1.
data i_plaf like plaf occurs 0 with header line.
start-of-selection.
select * from plaf into table i_plaf
where plnum = '0000005432'.
loop at i_plaf.
CALL FUNCTION 'ENQUEUE_EMPLAFE'
EXPORTING
MODE_PLAF = 'E'
MANDT = SY-MANDT
PLNUM = i_plaf-plnum
X_PLNUM = ' '
_SCOPE = '3'
_WAIT = ' '
_COLLECT = ' '
EXCEPTIONS
FOREIGN_LOCK = 1
SYSTEM_FAILURE = 2
OTHERS = 3
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
break sy-uname.
CALL FUNCTION 'LOESCHEN_PLANAUFTRAG'
EXPORTING
ECM61M =
ECM61W =
EPLAF = I_plaf
MONTX =
MDVL_FLAG = XFLAG
RM_CONF = ' '
APO_PROC = ' '
EMT61D =
ECM61B =
USE_COLLECTIVE_UPDATE = ' '
LAST_ORDER = ' '
TABLES
MDSBX =
MDPMZ =
EXCEPTIONS
UNDEFINED_INTERFACE = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL FUNCTION 'DEQUEUE_EMPLAFE'
EXPORTING
MODE_PLAF = 'E'
MANDT = SY-MANDT
PLNUM =
X_PLNUM = ' '
_SCOPE = '3'
_SYNCHRON = ' '
_COLLECT = ' '
endloop.
Ravi, Goto se11 ,use PLAF Table -> get one number from PLNUM field.
keep the Plnum field in where clause in select query.
now run the program ,already i setup break point after lock of planned order.
once you are in debugging,then use MD12 Transaction ( Change Planned order),enter planned order number(what ever you use number in the program,use same number in MD12 Transaction)-> and see the results.
you get message planned order number locked.
basically the program does it deletes the planned order ,before deleteing i am just locking planned order number.
do not use this program anywhere except dev system.
Thanks
Seshu -
Requirement to add some select options in Code inspector inspection SCII
Hello Experts,
I want to add some more fields to the parameter Naming convention of the Check variant (such as Internal table ,work area) in transaction SCII.
Please let me know how it can be done.
Thanks and Regards,
Rahul SinhaHello,
I think you can customize the trxn (create your own variants) using SCI. I am not sure if SCII can help you on this.
To maintain your own set of naming conventions :
SCI --> Create Check Variant --> Programming Conventions --> Naming Conventions.
Please go through the blog. It is very well documented on how to proceed with creating your own variants & using them in your code.
In SCII you have a "Temporary Definition" radio button. Here you have the tree like: Programming Conventions --> Extended Naming convention for Program
Here you can maintain the naming convention for you internal table & structures
BR,
Suhas
Edited by: Suhas Saha on Mar 8, 2010 11:08 AM -
I am working on version 7.I need to add some level 0 members to existing le
I am working on version 7.I need to add some level 0 members to existing level o members.I also have to do some changes in rules!!!!How should I modify to load/add these members??
Hi,
You can add Level 0 members by manually edit the outline and add the level 0 member.
Another option is you can create for example, a parent child relationship of the member in
a text file and load using rule file. In both way, you need to use EAS.
You can refer to Essbase DBA Guide, Building Dimensions and Loading Data. Even though
it is in version 11, it is still valid for version 7.1.
http://download.oracle.com/docs/cd/E12825_01/epm.111/esb_dbag/frameset.htm?pt03.htm
Edited by: NN on Mar 6, 2011 7:21 PM -
Help need to change black & white pic to add some color?
I have Adobe Photoshop Elements 8 and Im tryin to find where I can take a black and white pic I took today few of and want to add some color to few areas on it like flowers ect..
Ive been tryiin to find out where it says in the book but I cant find it.
Also, how does one place a watermark of somekind on my pics like a small one down in a corner?
Thanks, appreciate it!There are several ways to do this. Here are a few.
One way, is to create a blank layer over your image. Change this blank layer's blend mode to either color blend mode or soft light blend mode. Use the paint brush to apply color(s).
You might also consider using a Hue/Saturation adjustment layer over your image. If you have a color in mind, make that your foreground color in the tool box before you create a hue/saturation adjustment layer. After you create the layer, change it's blend mode to either color or soft light. Fill the mask with black to hide the effect. Grab the paintbrush tool and select white as your foreground color. Paint where you want color applied to your photo. (If you over paint switch to black and paint over mistakes.) You can apply a little bit of Gaussian blur on the mask to make the edges transition from black and white to color smoother.)
Another possibility is to duplicate your image then use color variations to color the duplicate. Once happy with the coloration, use eraser to remove color you don't desire or better yet use a clipping mask with an adjustment layer as the base so you can mask the image and use black/white paint to define areas that will be colored.
Clipping mask reading material:
http://www.photokaboom.com/photography/learn/Photoshop_Elements/layers/layer_groups_clippi ng_masks/1_layer_groups_clipping_masks.htm
http://help.adobe.com/en_US/PhotoshopElements/8.0/Win/Using/WSae2ea3b149d0c3591ae939f10386 0b3d59-7f86_WIN.html -
I get nothing but error messages, -
"Your IMAP server wants to alert you to the following: 113 that mail is not available" or the same with: 364?
Now there are hundreds stacked up on my desktop.
I cannot find the answer anywhere. You need to give answers to how to fix these errors because when I "search" "error code" or the number there is NOTHING. NOTHING! Yet you give us these stupid error codes
then you do not give us ANYTHING on how to fix these. These error codes make me so mad it makes me hate outlook, and hate the developers and hate microsoft. How in the world can you give us ERROR codes without the explanation of what
to do or how to fix it. You need to add each error code number in your "search" then explain what it is and how to fix it. I am not a tech. I am a lawyer. I have googled the entire string of error code and nothing is clear.
So, for the last several years, I get these error codes. Also, there is another error code that won't go away--it is the password error code that asks if I want to store the password. Yes, so I say YES. but it pops back. I am sick of this. This is the reason
I hate Microsoft and I love google. #1 they respond to error, #2 them try to fix them you do not. I paid the full price to buy the OUtlook 2010, almost $500 just to get outlook, and all I got was error codes. I could not even open it because all I would get
was that error codes and NO ONE knew how to fix them. WHAT IS YOUR PROBLEM that you cannot fix the stupid error codes that you imbed? PLEASE HELPHi,
I understand how frustrated you are when facing such an issue, maybe I can provide some suggestions on the problem.
Based on the description, you should be using an IMAP account setup in Outlook. As for the error message, usually it's caused by a corrupted message on the Server. I suggest you logon the Webmail site, check if sending/receiving emails works well.
If you find any unusual emails that cannot be read or sent, try deleting them to try again.
I also suggest you create a new profile to setup the IMAP account:
http://support.microsoft.com/kb/829918/en-us
Contact your Email Service Provider to get the correct and latest account settings, since you have been using Outlook for years, some settings may have been changed while you haven't been informed.
For the steps to setup an account in Outlook 2010, please refer to:
http://office.microsoft.com/en-001/outlook-help/add-or-remove-an-email-account-HA010354414.aspx
I hope this helps.
Regards,
Melon Chen
TechNet Community Support -
How do I add an area code to a phone number after clicking number in text message?
Some people send 7 digit phone number in emails and text messages, and I need to add the area code to the front of the number, or else AT&T will choke. I have not found a simple way to do this.
Current method: copy number to notes, add area code, then paste full number into dialerAny carrier in the U.S. will choke unless the number is in your area code.
I'm not aware of a way to do this. Selecting the number dials the number. -
I add some node to a tree but it is not shown in web page.
Hi
thank you for reading my post.
I read some tutorial in the web and i add some tree node to a tree dynamically.
but none of them is shown :(.
I should say that i write the code that create a tree in session scope bean because my tree is placed in a fragment and fragment has no preRender method.
here is code that initiate a tree, and i think it is correct.
public void initiateTree() {
getTree1().setClientSide(true);
System.out.println("Setter called");
Context ctx=null;
DataSource ds=null ;
Connection con=null ;
Statement st = null ;
List rootMenuItems = new ArrayList();
ResultSet rs = null;
try {
ctx = new InitialContext();
ds= (DataSource) ctx.lookup("java:comp/env/jdbc/dataSource");
con= ds.getConnection();
st= con.createStatement();
} catch (Exception ex) {
ex.printStackTrace();
try {
java.sql.PreparedStatement childsPSt = con.prepareStatement("select * from categories where parentcategory = ?");
rs= st.executeQuery("select * from categories where parentcategory= 0 and language = " +"'"+getLang()+"'");
//roots
while(rs.next()){
int parentID = rs.getInt("categoryID");
System.out.println("A root has been added "+parentID );
TreeNode aRootNode = new TreeNode();
aRootNode.setText(rs.getString("categoryname"));
//childs
childsPSt.setInt(1,parentID);
ResultSet cRs = childsPSt.executeQuery();
while(cRs.next()){
System.out.println("Achild has been added "+ cRs.getString("categoryname")+ " " + parentID);
TreeNode childNode = new TreeNode();
childNode.setText(cRs.getString("categoryname"));
aRootNode.getChildren().add(childNode);
getTree1().getChildren().add(aRootNode);
} catch (SQLException ex) {
ex.printStackTrace();
I call this method in session bean constructor.
here is code that bind the tree in page fragment to session bean tree1
<ui:tree binding="#{SessionBean1.tree1}" id="tree1" style="height: 167px"/>here is console output that prove the initiate method do some works.
Setter called
A root has been added 1
Achild has been added cat name 2 1
Achild has been added cat name 3 1
A root has been added 5i think u need to add hyperlink component to the node thus cause node must carry hyperlink or anything u like to add like staticText or checkBox ....
add this code after creation the aRootNode and childNode
it may works :)
Hyperlink h = new Hyperlink();
h.setText(cRs.getString("categoryname"));
childNode .getFacets().put( childNode .CONTENT_FACET_KEY, h ); -
Attach User define tables and view table need add to database into my add-o
Hi there,
I want to deploy an addon, there are User define tables and view table need add to database.
I need some advice on some issues..
1. Can I attach User define tables and view table need add to database into my addon.
2. I wonder which chance is properly to add them, if add these user define objects in time of install and I can't get the enough information that connect to SQL server
Thanks for any help.Hi Weerachai,
Here's an example of how to create a user-defined table in code. My suggestion would be to check if it exists when your add-on starts up and then if not, create the tables, fields and objects.
'User Table
Private Sub CreateTable(ByVal sTable As String, ByVal sDescription As String, ByVal oObjectType As SAPbobsCOM.BoUTBTableType)
Dim oUserTablesMD As SAPbobsCOM.UserTablesMD
Dim iResult As Long
Dim sMsg As String
oUserTablesMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserTables)
If Not oUserTablesMD.GetByKey(sTable) Then
oUserTablesMD.TableName = sTable
oUserTablesMD.TableDescription = sDescription
oUserTablesMD.TableType = oObjectType
iResult = oUserTablesMD.Add()
If iResult <> 0 Then
oCompany.GetLastError(iResult, sMsg)
MessageBox.Show("Error Creating Table: " & sTable & " Error: " & sMsg)
End If
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserTablesMD)
End Sub
'User Field
Private Sub CreateField(ByVal sTable As String, ByVal sName As String, ByVal sDescription As String, _
ByVal iSize As Integer, ByVal aFieldType As SAPbobsCOM.BoFieldTypes, _
ByVal aSubType As SAPbobsCOM.BoFldSubTypes, ByVal sLink As String, _
ByVal bMandatory As SAPbobsCOM.BoYesNoEnum)
Dim oUserFieldsMD As SAPbobsCOM.UserFieldsMD
Dim oTable As SAPbobsCOM.UserTable
Dim iResult As Long
Dim sMsg As String
Dim i As Integer
Dim x As Integer
Dim bFound As Boolean = False
Dim oField As SAPbobsCOM.Field
oTable = oCompany.UserTables.Item(sTable)
For i = 0 To oTable.UserFields.Fields.Count - 1
oField = oTable.UserFields.Fields.Item(i)
'MessageBox.Show(oField.Name)
If oField.Name = "U_" & sName Then
bFound = True
End If
Next
System.Runtime.InteropServices.Marshal.ReleaseComObject(oTable)
If Not bFound Then
oUserFieldsMD = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oUserFields)
oUserFieldsMD.TableName = "@" & sTable
oUserFieldsMD.Name = sName
oUserFieldsMD.Description = sDescription
oUserFieldsMD.Type = aFieldType
If aFieldType = SAPbobsCOM.BoFieldTypes.db_Alpha Or aFieldType = SAPbobsCOM.BoFieldTypes.db_Numeric Then
oUserFieldsMD.EditSize = iSize
Else
oUserFieldsMD.SubType = aSubType
oUserFieldsMD.Mandatory = bMandatory
End If
oUserFieldsMD.LinkedTable = sLink
iResult = oUserFieldsMD.Add()
If iResult <> 0 Then
oCompany.GetLastError(iResult, sMsg)
MessageBox.Show("Error Creating Field: " & sTable & "." & sName & " Error: " & sMsg)
End If
System.Runtime.InteropServices.Marshal.ReleaseComObject(oUserFieldsMD)
End If
End Sub
If you want to create a View I think you would have to use the RecordSet object. This will ensure that you don't have to log in to the database again
Hope it helps,
Adele -
How to add an 'Embed Code' button?
I publish a webcomic in Flash that is a simple slideshow:
http://minigiggles.com
I would like to add an 'embed code' button that copies the embed code to the users clipboard so they can easily embed my cartoon on their site. How do I build that button?
Thanks,
Tom@Allan: Actually, the inability to add prefixes to phone numbers is quite annoying. Disallowing prefixes for those of us who need it is not "user friendly and convenient", even if we are not in the majority. Prefixes are needed when dialing international calls from different cards, temporarily disabling caller ID, etc, etc. Adding the prefix to each contact is very inconvenient option, as there is no way to do it automatically.
Third party apps can provide the feature, one is suggested above. However, for some reason Apple has decided that third party apps cannot add the signs # and * to numbers. In my case, I have an iPhone through my employer. I need to add a prefix containing those signs when making private calls. Now, I guess I could manually enter the prefix in each non-company contact in my address book. You tell me if that is user friendly, or something a computer could do for me. -
Inherited some strange code - connect by level
Hello, I've recently read about how "connect by level" can be used to display parent-child relationships but I have inherited this code that appears to use that phrase in a different way.
This is the SQL
select trunc(dt) createdate, 230 eventcode, 1 isholiday
from (
select (trunc(to_date('10/7/2010','mm/dd/yyyy')) + level) dt from dual
connect by level<= 120
where to_char(dt,'dy') in ('sat','sun')
and dt between to_date('10/7/2010','mm/dd/yyyy') and to_date('10/14/2010','mm/dd/yyyy')
This code is supposed to be identifying weekend days between a start and end time with an event code (230) and it seems to work unless I use a weekend date (10/9/2010 or 10/10/2010) as the start time. I also dont understand where the value 120 came from.
Any help would be greatly appreciated.Hi,
user13066820 wrote:
Hello, I've recently read about how "connect by level" can be used to display parent-child relationships but I have inherited this code that appears to use that phrase in a different way.You've described the situation exactly!
CONNECT BY is often used to display recursive parent-child relatioships.
When "LEVEL <= x" is the only CONNECT BY condition, then it's not really doing that; it's just using the recursive power of CONNECT BY to do something else, such as generate the numbers from 1 to 120, or, in this case, generate the 120 dates after a given date. The result set of such a sub-qeury is typically used as a table later in the query, and it's called a Counter Table , because LEVEL is used to count from 1 to x.
This is the SQL
select trunc(dt) createdate, 230 eventcode, 1 isholiday
from (
select (trunc(to_date('10/7/2010','mm/dd/yyyy')) + level) dt from dual
connect by level<= 120
where to_char(dt,'dy') in ('sat','sun')
and dt between to_date('10/7/2010','mm/dd/yyyy') and to_date('10/14/2010','mm/dd/yyyy')
This code is supposed to be identifying weekend days between a start and end time with an event code (230) and it seems to work unless I use a weekend date (10/9/2010 or 10/10/2010) as the start time. LEVEL starts at 1, and increases, so, by adding LEVEL to the given date, the dates generated will all be after the given date.
Usually people want to generate dates on or after a given date, so they subtract 1 from LEVEL.
I also dont understand where the value 120 came from. That makes two of us.
My guess is that someone thought the query would be used for periods of a week or two, as specified in the BETWEEN condition. The programmer may have thought "I probably won't need to generate more than 14 days, but maybe somebody will want a whole month, so I'll make it count up to 31. Aw, heck, I'll make it 120, then they can do a whole quarter, or more."
Any help would be greatly appreciated.Here's how I would write that query:
WITH all_dates AS
SELECT first_date + LEVEL - 1 AS dt
FROM (
SELECT TO_DATE ( '10/07/2010'
, 'MM/DD/YYYY'
) AS first_date
, TO_DATE ( '10/14/2010'
, 'MM/DD/YYYY'
) AS last_date
FROM dual
CONNECT BY LEVEL <= 1 + last_date - first_date
SELECT dt
, 230 AS eventcode
, 1 AS isweekend
FROM all_dates
WHERE TO_CHAR ( dt
, 'Dy'
, 'NLS_DATE_LANGUAGE=ENGLISH'
) IN ('Sat', 'Sun')
;The first_date parameter only has to be hard-coded once, and that date is included in the results.
Notice the CONNECT BY clause is now gererating only the rows it might need, not some arbitrary number of rows, most of which will probably be eliminated by a WHERE clause later on. The use of first_date and last_date makes the code self-documenting, but there's no reason you can't add claifying comments as well.
Edited by: Frank Kulash on Mar 11, 2011 3:17 PM -
I have this file but I need to improve the code on some method. The methods are addNode, deleteNode, saveNode, findLader and are they anyway for me to iliminate the findsmallest method?
here is the code
import java.io.*;
import java.util.LinkedList;
import java.util.Stack;
import javax.swing.*;
public class Graph {
private LinkedList graph;
private BufferedReader inputFile;
public Graph() {
graph = new LinkedList();
// read the words from the given file
// create a GraphNode
// Add the node to the graph
public void createGraph(String fileName) throws IOException {
inputFile = new BufferedReader(
new InputStreamReader(new FileInputStream("word.txt")));
// Convert the linkedlist to an array 'a'
// sort the array 'a'
// create a string from all elements in 'a'
// return the string
public String printGraph() {
String output = new String();
// will contain String objects
// ... do some work with the list, adding, removing String objects
String[] a = new String[graph.size()];
graph.toArray(a);
// now stringArray contains all the element from linkedList
quickSort(a, 0, a.size() - 1);
for(int i=0;i<a.length;++i)
output = output + new String(a.toString())+"\n";
return output;
private static void quickSort(Comparable[] theArray,
int first, int last) {
// Sorts the items in an array into ascending order.
// Precondition: theArray[first..last] is an array.
// Postcondition: theArray[first..last] is sorted.
// Calls: partition.
int pivotIndex;
if (first < last) {
// create the partition: S1, Pivot, S2
pivotIndex = partition(theArray, first, last);
// sort regions S1 and S2
quickSort(theArray, first, pivotIndex-1);
quickSort(theArray, pivotIndex+1, last);
} // end if
} // end quickSort
private static int partition(Comparable[] theArray,
int first, int last) {
// Partitions an array for quicksort.
// Precondition: theArray[first..last] is an array;
// first <= last.
// Postcondition: Returns the index of the pivot element of
// theArray[first..last]. Upon completion of the method,
// this will be the index value lastS1 such that
// S1 = theArray[first..lastS1-1] < pivot
// theArray[lastS1] == pivot
// S2 = theArray[lastS1+1..last] >= pivot
// Calls: choosePivot.
// tempItem is used to swap elements in the array
Comparable tempItem;
// place pivot in theArray[first]
//choosePivot(theArray, first, last);
Comparable pivot = theArray[first]; // reference pivot
// initially, everything but pivot is in unknown
int lastS1 = first; // index of last item in S1
// move one item at a time until unknown region is empty
for (int firstUnknown = first + 1; firstUnknown <= last;
++firstUnknown) {
// Invariant: theArray[first+1..lastS1] < pivot
// theArray[lastS1+1..firstUnknown-1] >= pivot
// move item from unknown to proper region
if (theArray[firstUnknown].compareTo(pivot) < 0) {
// item from unknown belongs in S1
++lastS1;
tempItem = theArray[firstUnknown];
theArray[firstUnknown] = theArray[lastS1];
theArray[lastS1] = tempItem;
} // end if
// else item from unknown belongs in S2
} // end for
// place pivot in proper position and mark its location
tempItem = theArray[first];
theArray[first] = theArray[lastS1];
theArray[lastS1] = tempItem;
return lastS1;
} // end partition
// Given a new word, add it to the graph
public void addNode(String word) {
GraphNode node = new GraphNode(word);
if(graph.contains(node)){
JOptionPane.showMessageDialog(null,"Duplicate Word, operation terminated");
for(int i=0; i<graph.size(); ++i) {
if(isAnEdge((String)(((GraphNode)graph.get(i)).getVertex()),(String)(node.getVertex()))) {
EdgeNode e1 = new EdgeNode((String)node.getVertex(),1);
EdgeNode e2 = new EdgeNode((String)((GraphNode)graph.get(i)).getVertex(),1);
node.addEdge(e2);
((GraphNode)graph.get(i)).addEdge(e1);
graph.add(node);
public boolean deleteNode(String word) {
GraphNode node = new GraphNode(word);
EdgeNode n = new EdgeNode(word,1);
if(!graph.contains(node)) {
return false;
else {
for(int i=0; i<graph.size();++i) {
((GraphNode)graph.get(i)).getEdgeList().remove(n);
graph.remove(node);
return true;
public void save(String fileName) {
try {
PrintWriter output = new PrintWriter(new FileWriter("word.txt"));
for(int i=0; i< graph.size();++i) {
output.println(((GraphNode)graph.get(i)).getVertex());
output.close();
catch (IOException e) {
// given two word, find the ladder (using dijkstra's algorithm
// create a string for the ladder and return it
public String findLadder(String start,String end) {
String ladder = new String();
GraphNode sv = new GraphNode(start);
GraphNode ev = new GraphNode(end);
if(!graph.contains(sv)) {
JOptionPane.showMessageDialog(null,start + " not in graph");
return null;
if(!graph.contains(ev)) {
JOptionPane.showMessageDialog(null,end + " not in graph");
return null;
LinkedList distance = new LinkedList(((GraphNode)graph.get(graph.indexOf(sv))).getEdgeList());
LinkedList visited = new LinkedList();
visited.add(start);
LinkedList path = new LinkedList();
path.add(new PathNode(start,"****"));
for(int i=0; i<distance.size();++i) {
PathNode p = new PathNode((String)((EdgeNode)distance.get(i)).getKey(),start);
path.add(p);
while(!visited.contains(end)) {
EdgeNode min = findSmallest(distance,visited);
String v = (String)min.getVertex();
if(v.equals("****"))
return null;
visited.add(v);
// for(int i=0;i<graph.size();++i) {
// String u = (String)(((GraphNode)(graph.get(i))).getVertex());
GraphNode temp1 = new GraphNode(v);
int index = graph.indexOf(temp1);
LinkedList l = new LinkedList(((GraphNode)graph.get(index)).getEdgeList());
for(int i=0;i<l.size();++i)
String u = (String)(((EdgeNode)(l.get(i))).getVertex());
if(!visited.contains(u)) {
int du=999, dv=999, avu=999;
dv = min.getCost();
EdgeNode edge = new EdgeNode(u,1);
if(distance.contains(edge)) {
du = ((EdgeNode)(distance.get(distance.indexOf(edge)))).getCost();
GraphNode temp = new GraphNode(v);
GraphNode node = ((GraphNode)(graph.get(graph.indexOf(temp))));
LinkedList edges = node.getEdgeList();
if(edges.contains(edge)) {
avu = ((EdgeNode)(edges.get(edges.indexOf(new EdgeNode(u,1))))).getCost();
if( du > dv+avu) {
if(du == 999) {
distance.add(new EdgeNode(u,dv+avu));
path.add(new PathNode(u,v));
else {
((EdgeNode)(distance.get(distance.indexOf(u)))).setCost(dv+avu);
((PathNode)(path.get(path.indexOf(u)))).setEnd(v);
if(!path.contains(new PathNode(end,"")))
return null;
LinkedList pathList = new LinkedList();
for(int i=0;i<path.size();++i) {
PathNode n = (PathNode)path.get(path.indexOf(new PathNode(end,"****")));
if(n.getEnd().compareTo("****") != 0) {
pathList.addFirst(end);
n = (PathNode)path.get(path.indexOf(new PathNode(n.getEnd(),"****")));
end = n.getStart();
pathList.addFirst(start);
for(int i=0;i<pathList.size()-1;++i) {
ladder = ladder + ((String)(pathList.get(i))) + " --> ";
ladder = ladder + ((String)(pathList.get(pathList.size()-1)));
return ladder;
private EdgeNode findSmallest(LinkedList distance, LinkedList visited) {
EdgeNode min = new EdgeNode("****",999);
for(int i=0;i<distance.size();++i) {
String node = (String)(((EdgeNode)distance.get(i)).getVertex());
if(!visited.contains(node)) {
if(((EdgeNode)distance.get(i)).getCost()<min.getCost()) {
min = (EdgeNode)distance.get(i);
return min;
// class that represents nodes inserted into path set
private class PathNode {
protected String sv;
protected String ev;
public PathNode(String s,String e) {
sv = s;
ev = e;
public String getEnd() {
return ev;
public String getStart() {
return sv;
public void setEnd(String n) {
ev = n;
public boolean equals(Object o) {
return this.sv.equals(((PathNode)o).sv);
public String toString() {
return "("+sv+":"+ev+")";
thank youlet me fix my misstake which was point out by some one in here and thank you ofr do so because I'm new at this.
I have this file but I need to improve the code on some method. The methods are addNode, deleteNode, saveNode, findLader and are they anyway for me to iliminate the findsmallest method?
here is the code
import java.io.*;
import java.util.LinkedList;
import java.util.Stack;
import javax.swing.*;
public class Graph {
private LinkedList graph;
private BufferedReader inputFile;
public Graph() {
graph = new LinkedList();
// read the words from the given file
// create a GraphNode
// Add the node to the graph
public void createGraph(String fileName) throws IOException {
inputFile = new BufferedReader(
new InputStreamReader(new FileInputStream("word.txt")));
// Convert the linkedlist to an array 'a'
// sort the array 'a'
// create a string from all elements in 'a'
// return the string
public String printGraph() {
String output = new String();
// will contain String objects
// ... do some work with the list, adding, removing String objects
String[] a = new String[graph.size()];
graph.toArray(a);
// now stringArray contains all the element from linkedList
quickSort(a, 0, a.size() - 1);
for(int i=0;i<a.length;++i)
output = output + new String(a.toString())+"\n";
return output;
private static void quickSort(Comparable[] theArray,
int first, int last) {
// Sorts the items in an array into ascending order.
// Precondition: theArray[first..last] is an array.
// Postcondition: theArray[first..last] is sorted.
// Calls: partition.
int pivotIndex;
if (first < last) {
// create the partition: S1, Pivot, S2
pivotIndex = partition(theArray, first, last);
// sort regions S1 and S2
quickSort(theArray, first, pivotIndex-1);
quickSort(theArray, pivotIndex+1, last);
} // end if
} // end quickSort
private static int partition(Comparable[] theArray,
int first, int last) {
// Partitions an array for quicksort.
// Precondition: theArray[first..last] is an array;
// first <= last.
// Postcondition: Returns the index of the pivot element of
// theArray[first..last]. Upon completion of the method,
// this will be the index value lastS1 such that
// S1 = theArray[first..lastS1-1] < pivot
// theArray[lastS1] == pivot
// S2 = theArray[lastS1+1..last] >= pivot
// Calls: choosePivot.
// tempItem is used to swap elements in the array
Comparable tempItem;
// place pivot in theArray[first]
//choosePivot(theArray, first, last);
Comparable pivot = theArray[first]; // reference pivot
// initially, everything but pivot is in unknown
int lastS1 = first; // index of last item in S1
// move one item at a time until unknown region is empty
for (int firstUnknown = first + 1; firstUnknown <= last;
++firstUnknown) {
// Invariant: theArray[first+1..lastS1] < pivot
// theArray[lastS1+1..firstUnknown-1] >= pivot
// move item from unknown to proper region
if (theArray[firstUnknown].compareTo(pivot) < 0) {
// item from unknown belongs in S1
++lastS1;
tempItem = theArray[firstUnknown];
theArray[firstUnknown] = theArray[lastS1];
theArray[lastS1] = tempItem;
} // end if
// else item from unknown belongs in S2
} // end for
// place pivot in proper position and mark its location
tempItem = theArray[first];
theArray[first] = theArray[lastS1];
theArray[lastS1] = tempItem;
return lastS1;
} // end partition
// Given a new word, add it to the graph
public void addNode(String word) {
GraphNode node = new GraphNode(word);
if(graph.contains(node)){
JOptionPane.showMessageDialog(null,"Duplicate Word, operation terminated");
for(int i=0; i<graph.size(); ++i) {
if(isAnEdge((String)(((GraphNode)graph.get(i)).getVertex()),(String)(node.getVertex()))) {
EdgeNode e1 = new EdgeNode((String)node.getVertex(),1);
EdgeNode e2 = new EdgeNode((String)((GraphNode)graph.get(i)).getVertex(),1);
node.addEdge(e2);
((GraphNode)graph.get(i)).addEdge(e1);
graph.add(node);
public boolean deleteNode(String word) {
GraphNode node = new GraphNode(word);
EdgeNode n = new EdgeNode(word,1);
if(!graph.contains(node)) {
return false;
else {
for(int i=0; i<graph.size();++i) {
((GraphNode)graph.get(i)).getEdgeList().remove(n);
graph.remove(node);
return true;
public void save(String fileName) {
try {
PrintWriter output = new PrintWriter(new FileWriter("word.txt"));
for(int i=0; i< graph.size();++i) {
output.println(((GraphNode)graph.get(i)).getVertex());
output.close();
catch (IOException e) {
// given two word, find the ladder (using dijkstra's algorithm
// create a string for the ladder and return it
public String findLadder(String start,String end) {
String ladder = new String();
GraphNode sv = new GraphNode(start);
GraphNode ev = new GraphNode(end);
if(!graph.contains(sv)) {
JOptionPane.showMessageDialog(null,start + " not in graph");
return null;
if(!graph.contains(ev)) {
JOptionPane.showMessageDialog(null,end + " not in graph");
return null;
LinkedList distance = new LinkedList(((GraphNode)graph.get(graph.indexOf(sv))).getEdgeList());
LinkedList visited = new LinkedList();
visited.add(start);
LinkedList path = new LinkedList();
path.add(new PathNode(start,"****"));
for(int i=0; i<distance.size();++i) {
PathNode p = new PathNode((String)((EdgeNode)distance.get(i)).getKey(),start);
path.add(p);
while(!visited.contains(end)) {
EdgeNode min = findSmallest(distance,visited);
String v = (String)min.getVertex();
if(v.equals("****"))
return null;
visited.add(v);
// for(int i=0;i<graph.size();++i) {
// String u = (String)(((GraphNode)(graph.get(i))).getVertex());
GraphNode temp1 = new GraphNode(v);
int index = graph.indexOf(temp1);
LinkedList l = new LinkedList(((GraphNode)graph.get(index)).getEdgeList());
for(int i=0;i<l.size();++i)
String u = (String)(((EdgeNode)(l.get(i))).getVertex());
if(!visited.contains(u)) {
int du=999, dv=999, avu=999;
dv = min.getCost();
EdgeNode edge = new EdgeNode(u,1);
if(distance.contains(edge)) {
du = ((EdgeNode)(distance.get(distance.indexOf(edge)))).getCost();
GraphNode temp = new GraphNode(v);
GraphNode node = ((GraphNode)(graph.get(graph.indexOf(temp))));
LinkedList edges = node.getEdgeList();
if(edges.contains(edge)) {
avu = ((EdgeNode)(edges.get(edges.indexOf(new EdgeNode(u,1))))).getCost();
if( du > dv+avu) {
if(du == 999) {
distance.add(new EdgeNode(u,dv+avu));
path.add(new PathNode(u,v));
else {
((EdgeNode)(distance.get(distance.indexOf(u)))).setCost(dv+avu);
((PathNode)(path.get(path.indexOf(u)))).setEnd(v);
if(!path.contains(new PathNode(end,"")))
return null;
LinkedList pathList = new LinkedList();
for(int i=0;i<path.size();++i) {
PathNode n = (PathNode)path.get(path.indexOf(new PathNode(end,"****")));
if(n.getEnd().compareTo("****") != 0) {
pathList.addFirst(end);
n = (PathNode)path.get(path.indexOf(new PathNode(n.getEnd(),"****")));
end = n.getStart();
pathList.addFirst(start);
for(int i=0;i<pathList.size()-1;++i) {
ladder = ladder + ((String)(pathList.get(i))) + " --> ";
ladder = ladder + ((String)(pathList.get(pathList.size()-1)));
return ladder;
private EdgeNode findSmallest(LinkedList distance, LinkedList visited) {
EdgeNode min = new EdgeNode("****",999);
for(int i=0;i<distance.size();++i) {
String node = (String)(((EdgeNode)distance.get(i)).getVertex());
if(!visited.contains(node)) {
if(((EdgeNode)distance.get(i)).getCost()<min.getCost()) {
min = (EdgeNode)distance.get(i);
return min;
// class that represents nodes inserted into path set
private class PathNode {
protected String sv;
protected String ev;
public PathNode(String s,String e) {
sv = s;
ev = e;
public String getEnd() {
return ev;
public String getStart() {
return sv;
public void setEnd(String n) {
ev = n;
public boolean equals(Object o) {
return this.sv.equals(((PathNode)o).sv);
public String toString() {
return "("+sv+":"+ev+")";
}thank you -
DRQ : add the "Project Code" column in the "Recurring Postings" function
Hello,
This is a DRQ about the Recurring Postings function.
It concerns the "Recurring Postings" functionality (Menu "Financials --> Recurring Postings").
Version : 2007A SP00 PL38
Description of requirements :
In the current version of SBO ( 2007A SP00 PL38 ) when we create some recurring postings, our customers need to specify the "project code" information for each line (in addition to the "Distribution Rules").
Business needs:
Some of our SAP B1 customers use the Project codes for "Cost Accounting" follow up. They need to specify the "Project Code" for each line in the Journal entries created in SBO. In the Recurring Postings, it is not possile to specify that kind of information in the current version of SBO!
Current Workaround:
As it is not possible to specify the "Project Code" for each line added in the Recurring Postings recorded as templates, our customers have to re-open each Journal entries created thanks to Recurring Postings execution and to manually add the "Project Code" for each line where it is missing.
Proposed solution:
The solution is simple : simply add the "Project Code" column in the Recurring Postings templates will allow the journal entries created to automatically get this information and will avoid the users to modify manually each journal entries generated with the "Recurring Postings" function.
Kind Regards.
GrégoryThe "project" field should also be available in the "Account Balance" grid. Every journal entry has a project code so it makes no sense that you can not view, filter, or sort by this field.
Maybe you are looking for
-
Hp 4000n, WIN 7 HOME NETWORK PRINTER GOES OFFLINE ON REBOOT
I have 2 WIN7 desktops and 2 printers. One HP L4000n is attached locally to one computer and shared by the other computer on the home network. It is attached to a standard parallel printer port (via) a IEEE1284 controller card. The other printer i
-
I've just received a replacement Dell Windows 8.1 tablet. I had the original for two weeks and it was connected to my "home" wifi network. My replacement tablet, once I'd set it up using my "Outlook" account, some how, automatically connected to my "
-
How to display report server name in oracle reports 9i.
I need to do some validation based on report server name.Pl. suggest.
-
KSUB - Cost Center Plan Assessment
Hi All, I am doing a Plan Assessment for Cost Center in Trans KSUB and i need a Sender & Receiver Line items by Plant... I tried to use Filter but Plant is not present. I will be glad if anyone can help me out.. Thanks & Regards Ajoy
-
IDOC and RFC/PROXY Scenarios
Is there a way to practice IDOC or RFC Scenarios if you only have access to the XI System? So you have XI abap and Java but no R/3 System... Can someone tell me how I can practice IDOC and RFC scenarios please