Folder structure in WebDynpro Java
Hi Friends,
An application in STRUTS has a specified folder structure such that all jsp files should be placed in JSP folder,similarly in the case of WEB-INF folder there is a particular format or structure for the same which we follow.
Similarly in WebDynpro Java,what is the folder structure we follow?
Whatever we build and compile these meta data is placed at some folder structure,so what is the folder structure we follow.
Can i get a proper information on this please.
Thanks and regards,
Chandrashekar.
Hi Chandrashekar,
When you care WD apllication it has default structure, which is
WD_Application
WDDynpro
Models
Web Dynpro Component Interface
Web Dynpro Components
Dictionaries
Local Dictionary
Data Types
SRC
Configuration
Mimes
Pacakges
PS: this structure created by default.
Thanks
Anup
Similar Messages
-
How to move files from one folder to another folder in webdynpro java for sap portal
Dear Experts,
I wan to move files from one folder to another folder in SAP portal 7.3 programmatically in webdynpro java.
My requirement is in my portal 1000 transport packages is their. Now i want to move 1 to 200 TP's into Archive folder.
Can you please help me how to do in through portal or wd java ...
Regards
ChakriHello,
Do you know what the difference between copying a file this way :
** Fast & simple file copy. */
public static void copy(File source, File dest) throws IOException {
FileChannel in = null, out = null;
try {
in = new FileInputStream(source).getChannel();
out = new FileOutputStream(dest).getChannel();
long size = in.size();
MappedByteBuffer buf = in.map(FileChannel.MapMode.READ_ONLY, 0, size);
out.write(buf);
} finally {
if (in != null) in.close();
if (out != null) out.close();
================SECOND WAY============
AND THIS WAY:
// Move file (src) to File/directory dest.
public static synchronized void move(File src, File dest) throws FileNotFoundException, IOException {
copy(src, dest);
src.delete();
// Copy file (src) to File/directory dest.
public static synchronized void copy(File src, File dest) throws IOException {
InputStream in = new FileInputStream(src);
OutputStream out = new FileOutputStream(dest);
// Transfer bytes from in to out
byte[] buf = new byte[1024];
int len;
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
in.close();
out.close();
And which is better? I read up on what each kind of does but still a bit unclear as to when it is good to use which.
Thanks in advance,
JavaGirl -
How to export a Webdynpro java DC, for reuse in another system
Hi Everybody,
I am having a Webdynpro Java DC, i want to give that DC to another person to import into his system and work. i am doing a export of that DC and creating a zip file. But when we are trying to import it in another system, it is giving errors. When trying to build, its not showing DC options at all, DC-> buid or deploy options are not visible, when right clicked over the DC.
Am i doing it in a wrong way. Can anybody help me.
thanks & regards,
RaviHi Ravi,
Are you working with local DC?
Then you can take ur dc in the following way..
Find where the dcs are stored in ur system..
<Some File Path> .dtc\LocalDevelopment\DCs\<your dc package>\
There will be a folder with your project name.
Copy that folder and Paste in the other system under the same folder structure.
ie., the copied folder need to be pasted here
<Some path> .dtc\LocalDevelopment\DCs\<your dc package>\
Once you copied,Open your NWDS and go to DC perspective.In the Local DCs.
Go to Local Development -- > My Component
Right Click on 'My Component' and click on 'Refresh'.
Your new project will appear under the 'My Component' hierarchy.
Right Click on your project and Choose 'Create Project'.
Now Proper dc will be available for you to work on.
If you are facing any problems, let me know.
Best Wishes
Idhaya R -
Create PCD folder using web dynpro Java
Hi All ,
I would like to create pcd folder structure using web dynpro java
i.e. My folder at top level and under this there will be iviews , roles , worksets etc.
Is it possible using WDJ ?
I have checked the below link , but for folders I did not get anything.
http://help.sap.com/saphelp_nw04/helpdata/en/44/6aaf92f5a23672e10000000a114a6b/frameset.htm
Can you please help me ?
Thanks,
SandipHi,
Please refer to the following document
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/508baf88-9335-2d10-efa6-c6ad61e5fc4b?quicklink=index&overridelayout=true
The same can be implemented in webdynpro also.
Regards,
Raju Bonagiri
Edited by: Raju Bonagiri on Sep 3, 2010 8:36 AM -
Dynamic table in Webdynpro Java
Hi Colleagues,
I need to develop a table dynamically in webdynpro(Java), the table should not contain scrollbar, header, lines and border...Actual requirement is to group 12 elements in the from of a table
could anyone please help me here?
Thanks & Regards
SwethaHi Armin,
In a window i have to develop a part of window which looks like this
Image URL Description
Image URL Description
Image URL Description
Image URL Description
I have tried doing this using Flow layout for each line
But when i follwed that the last column "description" is not alligned in a straight line(for all rows)
structure is not even as shown above
(varying depending upon the length of the URL)
Here i have attached the piece of code i used
IWDTransparentContainer MainContainer1 = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class);
IWDFlowLayout flowlayout1 = (IWDFlowLayout)MainContainer1.createLayout(IWDFlowLayout.class);
////For adding Image
IWDImage image = (IWDImage)view.createElement(IWDImage.class);
image.createLayoutData(IWDFlowData.class);
image.setSource("~sapicons/s_b_alet.gif");
/////for Adding URL
IWDLinkToAction link1 = (IWDLinkToAction)view.createElement(IWDLinkToAction.class);
IWDTextAccessor link1text = wdComponentAPI.getTextAccessor();
link1.setText("Collaboration Window");
IWDAction Action1 = (IWDAction)view.getAction("Openlink");
link1.setOnAction(Action1);
IWDFlowData linkdata1 = link1.createLayoutData(IWDFlowData.class);
WDLayoutCellDesign rightpad = WDLayoutCellDesign.R_PAD;
WDLayoutCellSeparator seperator = WDLayoutCellSeparator.LARGE;
linkdata1.setCellDesign(rightpad);
linkdata1.setVGutter(seperator);
///for adding description
IWDTextView text1 = (IWDTextView)view.createElement(IWDTextView.class);
text1.setText("Testing");
IWDFlowData textdata1 = text1.createLayoutData(IWDFlowData.class);
textdata1.setCellDesign(rightpad);
textdata1.setVGutter(seperator);
MainContainer1.addChild(image);
MainContainer1.addChild(link1);
MainContainer1.addChild(text1);
IWDGridData maincont1 = MainContainer1.createLayoutData(IWDGridData.class);
maincont1.setPaddingLeft("10px");
maincont1.setPaddingTop("20px");
I found that this static way of adding rows is not the right way( Keeping in mind the future enhancements)
So thought of trying it through table
i have used IWDtable ...but the look does'nt meets the requirement at all(it has header....border..scrollbar..rows and colums are seperated by lines---> which are not needed)
Could you please let me know is there a approach to do this?
Thanks & Regards
Swetha
Edited by: Swetha Nellore on Feb 18, 2009 12:32 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:33 PM
Edited by: Swetha Nellore on Feb 18, 2009 12:34 PM -
Display filesystem in Webdynpro Java Tree UI
Hi,
I want to display a filesystem structure and its files in a Webdynpro Java Tree UI. I am using Netweaver CE 7.11. The root node of this tree should be the local filesystem on C:\ or a network share for example, which the users can browse and select a file. Therefore I want to display a filebrowser in my Webdynpro Java.
My problem is how to access the filesystem and bind it to my tree UI.
Are there any examples or tutorials reagarding to this?
Any help would be appreciated
Thanks in advance.
Regards, BerndI'd say if you want to browser the user's file-system, you'd need to call a WebStart application, or even an Applet.
In case you wanna use the local file-system you can start with somethig like:
File[] listRoots = File.listRoots(); -
Why we call adaptive RFC in webdynpro java..
Hi,
I want to know why we call adaptive RFC connection in webdynpro java whenever we import new rfc in our java web dynpro project. why name ADAPTIVE RFC is used
if we make any structure changes in the model which we imported in web dynpro project , like adding a new field, or changing the length/datatype of the existing field, then we always have to reimport the model in our webdynpro project so why adaptive name used. wats especial in the word ADAPTIVE RFCHi Rahul,
please read the guide:
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10465350-b4f5-2910-61ba-a58282b3b6df?quicklink=index&overridelayout=true
Best Regards,
Ervin -
Binding and displaying data to table in webdynpro java
hi all,
i want to know how to bind the output values to table in webdynpro java.
i know how to bind values in context to table,but if we want to display the values from database(back end ) and display in table present in the view.
eg: i have table in view and want to get values from backend(SQL server) and display it in that table.
plz help me to know ..
thanks
sirishaHi Saisirisha,
Try this.
1> Take a Value Node(Employee) cardinality 0..n.
Employee Structure
Employee
|------Surname(Attribute)
|------FirstName(Attribute)
|------Category(Attribute)
2> Bind this value node(Employee) in the View datasource of table.
3> Try the code inside wdDoInit method.
try {
// Load the JDBC-ODBC bridge
Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
// specify the ODBC data source's URL
String url = "jdbc:odbc:SSPer";
// connect
Connection con = DriverManager.getConnection(url,"North","Ken");
// create and execute a SELECT
Statement stmt = con.createStatement();
ResultSet rs = stmt.executeQuery
("SELECT Surname,FirstName,Category FROM Per");
while (rs.next()) {
// get current row values
String Surname = rs.getString(1);
String FirstName = rs.getString(2);
int Category = rs.getInt(3);
//create table row and add the value in the table
IPrivate<Put View Name>.IEmployeeElement empElm = wdContext.createEmployeeElement();
empElm.setSurname(Surname);
empElm.setFirstName(FirstName);
empElm.setCategory(Category);
wdContext.nodeEmployee().addElement(empElm);
// close statement and connection
stmt.close();
con.close();
} catch (java.lang.Exception ex) {
wdComponentAPI.getMessageManager().reportException("Exception : "ex.getMessage()+,true);
http://www.developer.com/java/data/article.php/3417381
Regards,
Mithu -
Access ABAP table in Webdynpro Java application
Hi All
Is it possible to access ABAP table in Webdynpro Java application
Please provide your input
Thanks
Karthi D.Hi you will connect to the remote SAP system, the
backend, using an Adaptive RFC MOdel. To access database tables, you can make use of existing functions in terms of RFC function modules. For each function module you need, the system generates a corresponding Java proxy class. All the generated proxy classes and interface are bundled together in the RFC model and treated as part
of your Web Dynpro project
In WebDynpro java you RFC by using Model :
Adaptive RFC Model
1. automatically adapts to changes in function module signature
2 provides support for data types and extensibility
3.support for different structure definitions in different backend
systems (release dependent structures, custom adaptation)
Basic principles and guidelines
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/11c3b051-0401-0010-fe9a-9eabd9c216de
See this blog
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/wdjava/faq%2b-%2bmodels%2b-%2badaptive%2brfc
http://help.sap.com/saphelp_nw04s/helpdata/en/6a/11f1f29526944e8580c5e59333d96d/frameset.htm
Thanks,
Tulasi -
Integrating flex with webdynpro java
hi,
iam new bie in webdynpro java.please tell is there possibility of integrating flex in webdynpro java,if so what are the prerequisites for it.Hi
This is possible through Adobe Flash Islands under Mimes folder in your Webdynpro project. You create flex objects in FlexBuilder and generate the .swf files. Then the swf files need to be placed under the Mimes folder of Webdynpro Project from which they can be accessed.
Follow the link below for details :
http://wiki.sdn.sap.com/wiki/display/WDJava/WebDynproJava(CE7.1EHP1)andAdobeFlexIntegration-ColumnChart
http://help.sap.com/saphelp_nw72/helpdata/en/48/825afcf53d3ff6e10000000a42189c/content.htm
Regards,
Sayan Ghosh -
Problen in unzip a file in folder structure
hi,
how can i unzip a file and folder with folder structure. when i unzip a file it create problem. please help to solve this problem.
here is my code
import java.io.*;
import java.util.zip.*;
public class MakeUnzip {
final static int BUFFER = 2048;
public static void main (String argv[]) {
try {
BufferedOutputStream dest = null;
FileInputStream fis = new FileInputStream("D:/serverdata/dates.zip");
// String root = "D:/clientdata/";
ZipInputStream zis = new
ZipInputStream(new BufferedInputStream(fis));
ZipEntry entry;
ZipFile zipfile = new ZipFile("D:/serverdata/dates.zip");
while((entry = zis.getNextEntry()) != null) {
int count;
byte data[] = new byte[BUFFER];
if(entry.isDirectory()){
File dir = new File(entry.getName());
if(!dir.exists()){ dir.mkdir(); }
FileOutputStream fos =null;
fos = new FileOutputStream(entry.getName());
dest = new BufferedOutputStream(fos, BUFFER);
while ((count = zis.read(data, 0, BUFFER))
!= -1) {
dest.write(data, 0, count);
dest.flush();
dest.close();
zis.close();
} catch(Exception e) {
e.printStackTrace();
Please give me solution.
Thanks in advancetry this one and change it as u like:
import java.util.zip.ZipFile;
import java.util.zip.ZipEntry;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.util.Enumeration;
import java.io.File;
public class UnzipFile {
private static void doUnzipFiles(String zipFileName) {
try {
ZipFile zf = new ZipFile(zipFileName);
System.out.println("Archive: " + zipFileName);
// Enumerate each entry
for (Enumeration entries = zf.entries(); entries.hasMoreElements();) {
// Get the entry and its name
ZipEntry zipEntry = (ZipEntry)entries.nextElement();
if (zipEntry.isDirectory())
boolean success = (new File(zipEntry.getName())).mkdir();
else
String zipEntryName = zipEntry.getName();
System.out.println(" inflating: " + zipEntryName);
OutputStream out = new FileOutputStream(zipEntryName);
InputStream in = zf.getInputStream(zipEntry);
byte[] buf = new byte[1024];
int len;
while((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
// Close streams
out.close();
in.close();
} catch (IOException e) {
e.printStackTrace();
System.exit(1);
public static void main(String[] args) {
if (args.length != 1) {
System.err.println("Usage: java UnzipFile zipfilename");
} else {
doUnzipFiles(args[0]);
} -
Building a war file with a folder structure
How do a build a war file with a folder structure? I have code that creates JarEntrys and writes jar files and resource files etc. to the war. When I look at the war that gets created using winzip the path names for all the entries are correct and everything appears correct. When I try to deploy this to Tomcat nothing deploys. It appears my war is in a folder structure. How can a build this folder structure in the war? When I look at a good war using BeyondCompare I see folders and files in the folders just like I would see looking at a directory on my system. When I use BeyondCompare to view one of my "bad" war files that I have created everything is in the root. There are no folders and no folder structure. I am using the java.util.jar API to create the war but I don't see any methods or any API that will let me build up any sort of folder structure. It seems like I am missing something basic here.
command is same for creating jar/war/ear.
u simply need to execute jar /? for detail. -
BI Java SDK: Bex query in Webdynpro java
Hi,
I want to know is it possible to view a Bex query output
in a webdynpro java application. There is a Bex query defined i just want to get the report of this query or atleast the output of this query. Also how will be the output structure? i am not familier to BI plz help. I did go though BI SDK documentation but did not help
VinayHi Vinay,
The BEx query output in webdynpro is with help connectors. the connector SAP query which you were speaking about is one of the four options. I hope this is the link what u were refering to link:[http://help.sap.com/saphelp_nw04/helpdata/en/6e/011e681cf74ab4b3acf73f77653405/frameset.htm]
SAP Query is a component of SAP's Web Application Server that allows you to create custom reports without any ABAP programming knowledge. The BI SAP Query Connector uses SAP Query to allow applications created with the BI Java SDK to access data from these SAP operational applications.SAP Query offers users a broad range of ways to define reports and create different types of reports such as basic lists, statistics, and ranked lists.
It would be a better option if with JDBC connector because that worked for me in extarcting data from a different source system.BI JDBC Connector is aslo used to make these data sources available in BW, via BW's UD Connect.
For the WD code i need to check.
Please tell me if its helpful.
Regards,
Shaila. -
Has anybody created Iview from "Webdynpro Java" component in CE7.1 ?
Hi All,
Has anyone created Iview from Webdynpro Java component in CE7.1.
Because the wizard that appears for creation of Iview has only "Webdynpro ABAP"
component.There is no option to create iview from "Webdynpro Java" component.
Althought in portal content--->Template folder i can see there is also
another template for "SAP Webdynpro iview" which i think is for the Java scenario.
But issue is, its not coming in the wizard.Can anyone tell me how to make it appear in the wizard ? It will be of great help to me.
Thanks and Regards
AshisHi Ashis,
your deployed webdynpros are published under "web dynpro applications". just copy the webdynpro from there and paste it into the portal content section.
http://help.sap.com/saphelp_nwce10/helpdata/en/ce/e0d6f54ae641fc9566501cffaa8c6c/frameset.htm
Hope that helps you.
Best wishes, Jens -
How to Save a file uploaded in WebDynpro Java to Windows server
Hi Guys,
I need to save a file uploaded in WebDynpro Java to a location on one of my companys many internal Window servers but I cannot get it to work. I do not get any errors with the following code, but NOTHING happens... And when I check the folder it is still emply... Please advise. I am particularly not sure about specifying the Path syntax. Also, I do have permission to write to this server. Is it even possible to save to a Windows server from WebDynpro??
//uploaded document already in context...
byte[] file = element.getFileResource();
// get the size of the uploaded file
element.setFileSize(this.getFileSize(file));
wdContext.currentContextElement().setFSize(this.getFSize(file));
// get the extension of the uploaded file
element.setFileExtension(binaryType.getMimeType().getFileExtension());
String fName = wdContext.currentContextElement().getFName();
String fExt = wdContext.currentContextElement().getFileExtension();
String foName1 = "
server01.w9\Files\P
HRP_Attachments\" + fName + ".pdf";
File f1 = new File(foName1);
DataOutputStream dos1;
dos1 = new DataOutputStream(new FileOutputStream(f1));
dos1.write(file);
dos1.flush();
dos1.close();
Edited by: christiaanp on Sep 30, 2011 8:07 AMHi Christiaan,
When specifying the path, make sure you escape the slashes
So, when you would normally use something like
\\server\path\file.txt
in your code you must use it in the form:
String fileName = "\\\\server\\path\\file.txt";
Hope this helps!
Robin van het Hof
Maybe you are looking for
-
Because of a lack of enough memory on my old Mac Book, I put all my music on an external hard drive. Now that I have a new Mac Book Pro with lots of memory, I want to move the music onto this new computer but I haven't been able to yet. I tried the
-
How do I find duplicate words in a Numbers spreadsheet?
Hello, I've created my first document on Numbers and am trying to figure out how to find duplicate words. Ideally, a list of words that repeat in the document and how many times. Is this possible? Thank you in advance for the advice
-
HT1390 Error with downloading movie rental
What happens when I download a rental movie from iTunes but it errors on the download. I have all the system requirements and the most updated version of iTunes. Now I paid for a rental and I can't even watch it.
-
OGG-00868 SQL Server 2008 has problem with ODBC in the EXTRACT process
Hello Everyone I want to replicate tables between MS SQLServer 2008 and Oracle 10g I have Windows XP / MS SQLServer 2008 and Oracle Database 10g R 10.2.0.1.0 running on Red Hat Linux I followed the steps from the white paper (http://www.oracle.com/t
-
Hi Friends, In our development system Swaps no is very high and it shows RED mark in st02 Table definition =25.213 Field definition = 357.579 Initial records = 62.209 program = 81.856 CUA = 12.158 Screen = 879 please c