How to retrive dynamic directory structure from data base and show it
i want to display a directory structur on jsp my problem is that i want to read it from a database how i can read
a tree structure i found a function to read directry structur but if i use this function i am not able to find who the parent is ? this is the function i found cna any one help me ?
public void iterate(File someDirectory) {
Vector allFiles = new Vector();
File[] dirContents = someDirectory.listFiles();
for (File f : dirContents) {
allFiles.add(f);
for (int i = 0; i < allFiles.size(); i++) {
File file = (File) allFiles.get(i);
if (file.isDirectory()) {
dirContents = file.listFiles();
for (File f : dirContents) {
allFiles.add(f);
// Process 'file' or do whatever
}
Thanks for reply i am not actualy deling with files i am creating a web application in which i am having organize functionality
user creat folders and put there document in that like out look user can creat folder inside folder
i am storing tham in a database table my problem is how to retrive them so i can show them as a tree structur
i am using this code to show on jsp
{color:#808000}<table>
<tr>
<td >
<ul class="flipMenu">
<li><span class="menu">Folder</span>
<ul>
<c:forEach var="folderList1" items="${folderList}" >
{color}
{color:#808000}<li ><a class="submenu25" id='<c:out value="${folderList1.id}"/>' href="folderAgreement.htm?folderid=<c:out value="${folderList1.id}"/>" onmouseup="a('<c:out value="${folderList1.id}"/>');" ><span ><c:out value="${folderList1.name}" /> T</span></a>
<ul>
<li> <a href="# onclick="window.open('createSubFolder.htm?folderid=<c:out value="${folderList1.id"/>&agreetitle=<c:out value="${agreements.title}"/>', 'invite_wnd', 'height=700, width=800, status=no, menubar=no, toolbar=nu, location=400'); return false;">Add Folder
</li>
<li> <a href="folderDetail.htm?folderid=<c:out value=${folderList1.id"/>&flag=folder"><span class="submenu2">Detail</span>
</li>
<li> <a id="<c:out value="${folderList1.id}"/>" href="folderDelete.htm?folderid=<c:out value="${folderList1.id}"/>&flag=folder" onclick="conformDelete('<c:out value="${folderList1.id}"/>')" ><span class="submenu2">Delete Folder</span></a>
</li>
</ul>
</li>
</c:forEach>
{color}
{color:#808000}</ul>
</li>
</ul>
</td>
</tr>
</table>{color}
Similar Messages
-
How to create a new Structure of Data screen and screen sequence
Hi,
Can you give any link or explain all the steps required to create a new structure of data screen and how to assign it to our comapnay code or plant etc. also when i check the screen ref. which is assign to material type in OUR system i ROH but i have not found this ref. in OMT3B where i can see the screen ref. ROH as this the the standard.
regards,
zafarHi
Download the pdf's from the below link
http://www.pdf-search-engine.com/sap-mm-configuration-pdf.html
It will help
Thanks,
Raman -
How to populate last 10 records from data base table
Hi,
My requirement is to populate last 10 transfer order items confirmed from LTAP. as the table is too large there is no point to fetch all the records and filter them...
Please let me know better way (in terms of performace) to get last 10 records from LTAP.
Thanks in advance.
NagHi brother,
the following code is working......(sample code)
data itmara type mara occurs 0 with header line.
select matnr from mara into corresponding fields of table itmara up to 20 rows.
sort itmara descending by matnr.
loop at itmara .
write:/ itmara-matnr.
if sy-tabix = 10.
exit.
endif.
endloop.
plz reward with maximum points
Edited by: sreejith gn on May 13, 2008 12:52 PM -
Can you please how to retrive the new netprice from the new validity period
Hi,
When you display a contract using ME33K and you click on a item and view its conditions(shift+F6), there might be 2 validity periods for a given item.
and each period will have different netprice in it.
One will be old date before the PO was created and the other new one which has validity till 31.12.999..We want to fetch the netprice for the new validity date but currently the program is fetching this data from the table EKPO which is having the netprice of the old date only..
Can you please how to retrive the new netprice from the new validity periodThank you so much.
But I need more help specific to my problem.
Let me describe the same.
Suppose the PO creation date is 04.07.2007
The conditions for an item in a contract for the PO are as follows;
1. Validity from 04.07.2007 validity to 04.07.2007 Netprice = 100.00
2. Validity from 05.07.2007 validity to 31.12.9999 Netprice = 200.00
We need to always fetch the netprice from the validity period which always matches with the PO creatio date. here the value 100.00 should be the correct netpr as the PO creation date matches with the first validity period.
But the program is fetching the netprice 200.000 which belongs to the second validity period. That is beacuse the select statement which fetches the data for contracts collects on the basis of EKKO-kdate and ekko-kdtab.the fields kdate and kdtab retrieves the validity period of the contract which is from 04.07.2007 to 31.072007. This data is then used to retrieve the netpr data from EKPO and it fetched 200.00 as it retrives the netprice of current data in contract validity and h not with respect to PO creation date.
This data is then used to fetch the get the netpr data from EKPO.
<u>what we need is the netprice for that validity period of item(Conditions) that matches with the PO creation date</u>..
Below is the code where I'm selecting the data from ekko and ekpo for the contracts data..Can you please add the code snippet to the below attachesd subroutine to get the required data from KONV and KONP so that we can retrieve the correct Netprice.
FORM select_contracts USING p_s_cebeln LIKE s_cebeln[]
p_c_k_bstyp TYPE ebstyp
p_p_bukrs TYPE bukrs
p_p_ekorg TYPE ekorg
p_p_ekgrp TYPE bkgrp
*Begin of Mod-004
fp_p_cernam type ty_r_ernam
p_p_cernam TYPE ernam
*End of Mod-004
p_s_werks LIKE s_werks[]
p_s_matnr LIKE s_matnr[]
p_s_lifnr LIKE s_lifnr[]
p_s_val_dt LIKE s_val_dt[].
*mod-002
data : l_amount type BAPICURR_D, " Net price
l_waers TYPE waers, " Currency Key
l_eff_amount type BAPICURR_D. " Effective value
data: l_v_netpr type bprei.
*mod-002
SELECT ebeln
bukrs
bstyp
aedat
ernam
lifnr
zterm
ekorg
ekgrp
waers
wkurs
<b>kdatb
kdate</b>
inco1
INTO TABLE i_ekko
FROM ekko
WHERE ebeln IN p_s_cebeln
AND bstyp EQ p_c_k_bstyp
AND bukrs EQ p_p_bukrs
AND ekorg EQ p_p_ekorg
AND ekgrp EQ p_p_ekgrp
*Begin of Mod-004
AND ernam EQ p_p_cernam
AND ernam IN fp_p_cernam
*End of Mod-004
AND lifnr IN p_s_lifnr
AND ( kdatb IN p_s_val_dt OR kdate IN p_s_val_dt ).
IF sy-subrc EQ 0.
Populates internal table i_ekpo using EKPO table.
SELECT ebeln
ebelp
loekz
txz01
matnr
werks
ktmng
menge
meins
bprme
netpr
peinh
webaz
mwskz
uebto
untto
erekz
pstyp
knttp
repos
webre
konnr
ktpnr
ean11
effwr
xersy
aedat
prdat
INTO TABLE i_ekpo
FROM ekpo
FOR ALL ENTRIES IN i_ekko
WHERE ebeln = i_ekko-ebeln
and aedat = i_ekko-aedat
AND werks IN p_s_werks
AND matnr IN p_s_matnr.
LOOP AT i_ekpo INTO rec_ekpo.
MOVE rec_ekpo-ebeln TO rec_contr-ebeln.
MOVE rec_ekpo-ebelp TO rec_contr-ebelp.
MOVE rec_ekpo-loekz TO rec_contr-loekz.
MOVE rec_ekpo-txz01 TO rec_contr-txz01.
MOVE rec_ekpo-matnr TO rec_contr-matnr.
MOVE rec_ekpo-werks TO rec_contr-werks.
MOVE rec_ekpo-ktmng TO rec_contr-ktmng.
MOVE rec_ekpo-menge TO rec_contr-menge.
MOVE rec_ekpo-meins TO rec_contr-meins.
MOVE rec_ekpo-bprme TO rec_contr-bprme.
MOVE rec_ekpo-netpr TO rec_contr-netpr.
move l_v_netpr TO rec_contr-netpr.
mod-002
read table i_ekko into rec_ekko with key
ebeln = rec_ekpo-ebeln.
l_waers = rec_ekko-waers.
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-netpr
IMPORTING
AMOUNT_EXTERNAL = l_amount.
rec_contr-netpr = l_amount.
mod-002
MOVE rec_ekpo-peinh TO rec_contr-peinh.
MOVE rec_ekpo-webaz TO rec_contr-webaz.
MOVE rec_ekpo-mwskz TO rec_contr-mwskz.
MOVE rec_ekpo-uebto TO rec_contr-uebto.
MOVE rec_ekpo-untto TO rec_contr-untto.
MOVE rec_ekpo-erekz TO rec_contr-erekz.
MOVE rec_ekpo-pstyp TO rec_contr-pstyp.
MOVE rec_ekpo-knttp TO rec_contr-knttp.
MOVE rec_ekpo-repos TO rec_contr-repos.
MOVE rec_ekpo-webre TO rec_contr-webre.
MOVE rec_ekpo-konnr TO rec_contr-konnr.
MOVE rec_ekpo-ktpnr TO rec_contr-ktpnr.
MOVE rec_ekpo-ean11 TO rec_contr-ean11.
MOVE rec_ekpo-effwr TO rec_contr-effwr.
mod-002
CALL FUNCTION 'BAPI_CURRENCY_CONV_TO_EXTERNAL'
EXPORTING
currency = l_waers
amount_internal = rec_contr-effwr
IMPORTING
AMOUNT_EXTERNAL = l_eff_amount.
rec_contr-effwr = l_eff_amount.
*mod-002
MOVE rec_ekpo-xersy TO rec_contr-xersy.
APPEND rec_contr TO i_contr.
CLEAR: rec_ekpo,rec_contr.
mod-002
CLEAR : rec_ekko,l_amount, l_eff_amount,l_waers.
mod-002
ENDLOOP.
Modifying i_contr using i_ekko.
SORT i_ekko BY ebeln.
LOOP AT i_contr INTO rec_contr.
READ TABLE i_ekko INTO rec_ekko WITH KEY
ebeln = rec_contr-ebeln
BINARY SEARCH.
MOVE rec_ekko-bukrs TO rec_contr-bukrs.
MOVE rec_ekko-bstyp TO rec_contr-bstyp.
MOVE rec_ekko-aedat TO rec_contr-aedat.
MOVE rec_ekko-ernam TO rec_contr-ernam.
MOVE rec_ekko-lifnr TO rec_contr-lifnr.
MOVE rec_ekko-zterm TO rec_contr-zterm.
MOVE rec_ekko-ekorg TO rec_contr-ekorg.
MOVE rec_ekko-ekgrp TO rec_contr-ekgrp.
MOVE rec_ekko-waers TO rec_contr-waers.
MOVE rec_ekko-wkurs TO rec_contr-wkurs.
MOVE rec_ekko-kdatb TO rec_contr-kdatb.
MOVE rec_ekko-kdate TO rec_contr-kdate.
MOVE rec_ekko-inco1 TO rec_contr-inco1.
MODIFY i_contr FROM rec_contr.
ENDLOOP.
ENDIF.
REFRESH: i_ekko,
i_ekpo.
CLEAR : rec_ekko,
rec_ekpo,
rec_contr.
ENDFORM. "select_contracts
Thanks. -
How to get a time part from Date datatype
Hi,
I would like to know how to extract the timestamp alone from DATE datatype? If my input is '27-SEP-2011 23:59:00' I need the output as 23:59:00. I am surprised to see that there are no in-built functions for this or may be I am wrong. Basically I need to remove the date part from DATE data type and get the time.Please assist.
-Thanks
Edited by: user9546145 on Sep 27, 2011 2:24 PM
Edited by: user9546145 on Sep 27, 2011 2:25 PMHi,
user9546145 wrote:
Hi,
I would like to know how to extract the timestamp alone from DATE datatype? Be careful! In Oracle, TIMESTAMP means a datatype, similar to but distinct from DATE. You'll avoid confusion if you don't use the word "timestamp" to mean anything else.
There is a built-in function, TO_CHAR:
TO_CHAR (dt_col, 'HH24:MI:SS')Depending on how you plan to use the time, TRUNC is another handy built-in function:
dt_col - TRUNC (dt_col)is a NUMBER (not less than 0, but less than 1) which is suitable for many tasks, such as finding the average time.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all tables, and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using. -
When to refresh Servlet data from Data Base
Hello all,
I have a servlet that retrive few hundreds thousands records from data base table.
The data in data base table being updated once or twice in every week.
Since same servlet instance serve all users, that access the servlet many times a day.
I would like to avoid retriving the data from data base on each servlet access.
and make the users use same data already retrieved and kept in servlet members.
First, what is the best way to avoid data retrive from data base on each servlet access?
and how could I have some kind of trigger that will refresh servlet data from data base every few days?
Thanks in advance for every idea.
AmiJava_A wrote:
Thanks Saish for your reply.
I'm not using DAO in my application but retrive the data from BI data base using a web service. response time querying the BI data base is not quick enuogh.
Since, I wouldn't want to query the BI server on each servlet access.
Because the data I retrived at the begining using the web service contains all required data for all servlet requests, I thought to store the data (~200K rows) once in the servlet which will be using for all requests.
Why not store the results locally in your own database after you fetch them?
This still leave me with the questions: in which event should I query the BI data, and also when or in which event should I update the data again from BI server?
Query at startup, an user demand, when data becomes stale. It depends on your requirements.
>
Thanks
Ami- Saish -
Creating a Single Report from Oracle Data Base and BI Answers
Hi,
I wanted to create a single report by using a BI Report where in we have project and Activity columns,now I want to add column with Program to see the results.Program data is in Oracle Database.
Can some one help me how to create the report.
ii.How to edit a pivot table in BI word designer.What I am doing present is creating every time a new report.
Thx In Adv.
From SravanHi Pivot table was a general question.Is is nothing to do with the qus 1.
See I have a report which have a programme and Activity.So I need to get the data of Prject from Data base how to do this in BIP.....I am not using any pivot table here. -
How do I sync my contacts from my phone and Mac?
How do I sync my contacts from my iPhone and my Mac?
Mike G. wrote:
As far as I can tell this has been disabled in Mavericks (and possibly slightly earlier). Apple now wants you to get an iCloud account and upload all of your contacts to their server.
The way this works is: 1. create an icloud accout 2. set up your mac to sync its contacts with that icloud account 3. set up your iphone to sync its contacts with that same icloud account. (Be careful when synching the first time that you don't overwrite the device's contacts with the initially blank set of clontacts in icloud). The result is that you have synched the contacts between your iphone and your mac (and Apple gets a copy as well).
-Mike
Now I understand. In step #2 above "set up your mac to sync its contacts with that icloud account" means "select all the 'on my mac' contacts and drag them onto the iCloud account so that they become iCloud contacts". There is no "setting" to sync "on my mac" contacts to iCloud.
As I tried to note on another thread about this where I was, unfortunately, openly mocked for having difficulty with it, this doesn't always go as smoothly as one would like and it can, at times, appear that you can't drag a contact from "on my mac" to iCloud.
I have several hundred google contacts and several hundred "on my mac" contacts, as well as the iCloud acount. (A consequence of being a very long time Apple user and a very reluctant iCloud adopter. Until a serious phone failure yesterday I'd always just had the contacts sync via iTunes and then grandfathered from phone to phone once that feature was removed by building the new phone from the old phone's back up.)
The Contacts app is in constant network communication with the google servers and the iCloud servers. When you're working with this many contacts at one time, network lag in those communications (is my best guess) can cause the application itself to cease to function in a quick and obvious way, often creating the appearance that you can't drag a particular contact (or group of contacts) from one place to another. You try to drag and nothing happens. You don't get an error or a warning, you don't get the situation where you can drag it but you can't get it to select a group (because the contact is already in there) you get nothing at all.
If this happens often enough it can lead one to believe that contacts must be moved individually and manually, but that is not the case. You just have to let your network connection catch up, and try again.
Also note that if you drag a group of contacts and some of them are already in iCloud you'll get a warning about potential duplicates. You'll get a set of choices about which one to keep, or both, or update. You can't actually see the contents of the two duplicates while you make this choice. If you get this warning, I would highly recommend choosing "cancel", confirming that your local copy is correct, complete and up to date, and then do the select and drag again and then pick the "update" option -- either nothing will happen because iCloud was also correct, complete and up to date, or you'll update iCloud, but nothing bad can happen that way.
I'm so glad they took away the direct syncing with the Contacts app via iTunes. This new method is so much easier to use -
How do we decide the number of data base servers and application servers ?
Dear Gurus,
How do we decide the number of data base servers and application servers in BW ?
How does this number help in data load balance and reporting needs ?
Any hard n fast rule in the number of servers ?
Regards
MohanHi Mohan,
Check the number of application server in the T-code SM66.... and also u can check the it in Sm50 on appplication server basiss./.
From Sm37 u can see the application server Push button.. if u click on that also.. u can see the number of application servers in the system..
Get into the individual application server and check how many Dialogue and background WP's are free,,
If u see that the considerable number of WP are free(Waiting for task).. then u can shedule the loads..
If most of the WP are busy then u need to wait to trigger ur loads to maintain the load balancing..
If one Application server is too busy then u can check the other Application Servers in the systems..
And u can shedule the loads on a specific application sever level as well using the PC..
Thanks
I hope this is clear to u..
Assign points if this helps -
How do a scan a file from my scanner and make it a PDF. . . . I do not see this choice in the Adobe program?
In the past I would simply place a copy of the document on my scanner, then selected create PDF from scanner. However, there is now no create PDF from scanner alternative, option or choice. The only option available is selected file to convert to PDF. what am I to do?That would have been a function of your scanning software. Adobe Reader is only used to view the pdf that your scanning software created.
-
How can I extract certain pages from my document and save as another file?
How can I extract certain pages from my document and save as another file?
You would need Adobe Acrobat to do that, not Adobe Reader.
-
How can i Delete all foto from my iphone and after some time get them one more time on it but not as a new album, i want them in the camera roll ?
How can I delete EVERY THING off my Mac and have it like new?
Boot from the software install DVD and do an "erase and install" when prompted. -
Hi, I have changed from an old laptop to a macbook air. how can i keep my music from my iPhone and sync it my macbook? Only purchased music seems to be available to sync, even though the rest of the music was uploaded from CD's on my last laptop.
As I can't upload CD's onto the Macbook Air, how do I keep the existing music on my iphone syn onto my new macbook without deleting all the cds on the iphone??
Many thanks!Hi RaulRod,
Are you pressing the Sync button to transfer music after connecting your iPhone or do you have the option checked to 'Automatically Sync when the iPhone is connected?'
Have you tried manually dragging and dropping music from your library into your phone? -
How can I remove the battery from my Iphone and Ipads?
How can I remove the battery from my iphone and ipad?
The iPhone and iPad do not have user serviceable batteries. Battery replacement is handled by Apple. Make an appointment at the Genius Bar if battery replacement is required.
-
I have an ipod previously linked someone else's account. We used to share the library and they used to update my iPod for me. Now I have my own ID and laptop with iTunes. How to I extract my music from the iPod and add it to the library ? At present, I cannot do it because I am not authorised on the account the music was orginally purchased on - but I have my iPod still.
Is there anyway for me to extract the music files from my iPod and download them into my new iTunes library and using my own Apple ID?
Help! I paid for most of this stuff but they left with their computer and now I can't even update my iPod!
ThanksUnless you want to learn more than most of us want to know about being a good geek, you'll need a third-party software utility to do that. CopyTrans worked well for me when I moved songs from an old iPod to a new computer for a friend.
So 1.) set up your (PC?) computer with iTunes, 2.) get something like CopyTrans which imports the stuff from your iPod to iTunes on your computer, 3.) make sure all the files from your iPod got copied, and then 4.) set iTunes to be the Mother Ship, which will then write all your old and future stuff to your iPod.
Make sure you've 5.) tested a backup strategy for your iTunes library going forward, because Apple would prefer you'd buy everything again from them. iTunes no longer has a good, native backup utility.
Maybe you are looking for
-
Can we change file name in the excel report bursting in infoview
Hi, I have created a publication with email destination and excel format in infoview. By default there are some place holders which can be used to give report name during bursting process but I want to customize report name like I want to append stat
-
Hi all, We just moved some java JSP's/code to a new Apache2(2.0.55)/Tomcat5.5.12 running Java 1_05_05 server. Java -version: java version "1.5.0_05" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_05-b05) Java HotSpot(TM) Server VM (bui
-
ATI Radeon 5470 Corrupted Display Driver
Hi, I've updated to windows 8.1 and I'm trying to install the old ATI Mobility Radeon HD 5470 Display Drivers, but when I go to AMD website it tells me to download a new version, and after I install that version I get like 10 fps at Counter Strike: G
-
Any good APEX training class in NJ?
Hi, I'm a newbie to APEX. I'm at the point that I think I could use some serious APEX training. what's your thought on APEX training? Did you folks just pick it up by yourself? How? BTW, the thousands of pages of User Manual/Advanced Tutorial do NOT
-
Disk Images won't open after update to 10.4.10
After updating to 10.4.10 disk images (dmg-files) won't open any more. I get the error message "The following disk images failed to mount:.. Reason: Device not configured". This happens every time on every disk image. These same images mounted just f