How to create a file object for a file on Remote Server? UNIX
Hi all,
I am working on two servers A and B. BOTH ARE UNIX MACHINES. My java class exist on server A and executes on same server. The file that I need to process resides on server B. (Lets call it test.txt in MYTEST directory. So path will be /MYTEST/test.txt on server B) I need to do few things before I can process it:
1) Check if file exist
2) If it does FTP it to Server A. (I already know how to.)
For both of these tasks, I need a File object for that file.
My problem is that I am unable to set it up.
\\B\MYTEST\test.txt will not work on UNIX. I already tried that. (It only works on Windows)
I tried:
/B/MYTEST/test.txt ---- Does not work
B:/MYTEST/test.txt ---- Does not work
:B/MYTEST/test.txt ---- Does not work
B:MYTEST/test.txt ---- Does not work
All of these instances say the same thing: "File does not exist."
Any ideas? Please help!!!
-Chirag
I by no means want to sound belittling... so don't take me that way..
You need to understand the basics of files, and networks. You can't check if a file exists on another machine if you don't have a network protocol to communicate with. The reason \\ works under windows is because you are using an invisible (to you) network protocol. You probably know it as windows sharing. If your file were not shared under it's own name, that method wouldn't work (I'm assuming your entire drive is shared without a password... a horrible security flaw...but one thing at a time)
You can use FTP protocol to check if a file exists. You can either send the raw text FTP commands through a socket connection in java, or you can use a freely available FTP java API to make it a bit more simple. You could also write a small java server on the other machine, and have it tell you what you need to know with a socket connection. In this way, you have created your very own network protocol.
Similar Messages
-
How to create new authorisation object for Transactions?
Hi,
How to create new authorisaton object and how to assign that object on a transaction code?
Case ->
The transaction code VL01N have the object called V_LIKP_VST under Class "LE_V" that have two auth. fields. one is 'Activity' and other one is "Shipping Point/Receiving Point".
Here I want to add "Storage location" also. I have created one object called "Z_LIKP_VST" under same calass "LE_V". and added "Activity", "Shipping Poing/Receiving Poing" and "Storage Location". After that I added that object ("Z_LIKP_VST") for particular transaction through "SU24". I maintained the "Display check indicator" for VL01N.
I created one new role and assigend the particular transacation for a user. but still SAP taking V_LIKP_VST insted of Z_LIKP_VST.
How can I change my Z_LIKP_VST on profile.
Please help
Thanks in Advance
LalHi Kariyath,
I suppose its not about interest but a MUST.. sorry but.. unless u include the Logic in the program how can SAP pick these custom Z objects ?
after u create them and assign to a Tcode in SU24 there is no logic to check these objects. Frankly i see no other chance.... unless SAP comes to us with a great easy way to input these Custom objects
Keep looking and please Update me if u have any Inputs....on this front..
All the Best
Br,
Sri
Award points for helpful answers -
How to create a new object for a particular class?
Hi,
Can anybody please tell the steps for creating a new object for a particular class.
Thanks,
SreejaDeclare the object as TYPE REF TO the class and use the CREATE OBJECT statement to create an object.
DATA <obj_name> TYPE REF TO <class_name>.
CREATE OBJECT <obj_name>.
Please mark points if the solution was useful.
Regards,
Manoj -
How to create a download link for video file?
Hello guys,
I know this is not a question directly related to OS X, but I just can't find a solution. So I was hoping that some of you might know the answer, or could recommend further reading.
I have .mov video files (video footage) on the server. I would like to make these files accessible for download, via link.
So I am wondering .... how can I create a link, which would allow people to download .mov video files from the server?
Thanks for any advice or tip.The question is, where is the server?
Is it on its own static IP? If it is not, it likely is on a DHCP configuration.
For those with DHCP, I recommend http://www.dyndns.com as a workaround, otherwise the links given will have to change as often as every hour!
Is it on a router, or does it have a firewall turned on in its sharing preferneces? Routers and firewalls block direct access from the outside. You need to setup the web sharing access on your router or firewall before someone can access it via the web.
Is the .mov file saved via Quicktime? You would also need to provide link on your page to http://www.apple.com/quicktime so that it may be downloaded by those who don't have it. If it is another format, you'll need a link to whatever format it is.
HTML for putting the video right on the page is usually controled by the EMBED function. That's covered here:
http://www.htmlcodetutorial.com/embeddedobjects/_EMBED.html
Otherwise a simple hyperlink to the file will do, once you have an open web sharing port on a static IP or dyndns controled domain. -
How to create custom BOL object for dynamic query in CRM 7.0
Hi,
Could anyone please explain me with steps that how to create the custom BOL object for dynamic query in CRM 7.0, I did it in previous version but its throwing exception when i try to create the object of my dynamic query class. I just defined the entry of my in crmv_obj_btil to create the dynamic query BOL object. do i need to do any other thing also to make it work?
Regards,
Kamesh Bathla
Edited by: Kamesh Bathla on Jul 6, 2009 5:12 PMHi Justin,
First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
Thanks in Advance,
mallikj2. -
How to create a passsword protection for EXCEL file
Hi,
I have created EXCEL, CSV and DBF file generation through Oracle PL/SQL. Now my client expecting to create a password protection. Can anyone tell me how to create a passsword protected file?
Cheers,
SanHow to protect an EXCEL file is not an Oracle issue and I don't think you can do this through PL/SQL. It's part of MS Office maintenance itself and it depends on the version:
http://benosullivan.co.uk/windows/how-to-password-protect-excel-2010-workbooks/
Werner -
How to create a billing request for service order that has serv contract?
Dear Experts,
Can you please help me?
The scenario is, my client has service contracts with their customer but they want to charge customers not periorically but as and when they provide service (ad-hoc).
So how to bill the customer in this case?
In my testing if I have a service contract (order type = SC) then when I create service order, system automatically picks up standard order type SM01. (which is service order with contract.)
And when I perform time confirmation and material consumption (goods issue), actual costs gets booked to the service order. However, using the service order number as referece, if I try to create a billing request in DP90, system create a blank billing request with no line items.
So, could you please advice, how can I create a billing request for a service order, if I have a contract?
Appreciate your help.
Best regards,
Abdul RafeyHi Praveen,
Thank you very much for your reply. I appreciate your time and efforts.
Ok, these are the steps how I have executed the process.
- I have created a service contract for an equipment. In the service contract, I have maintained the service material in the line item, maintained price and assigned equipment in the technical objects.
- I created service notification, which automatically picked up contract.
- When I create service order, from notification screen, system automatically picked up correct order type SM01 (Service order with contract).
- Then I planned operations and spare parts in the service order.
- Checked settlement rule in the service order is SDI.
- released and saved service order.
- Using IW42, in SAP ECC6, you can perform both time confirmation and material consumption using the same screen and also TECO service order. System issues message to say, goods issue have been posted.
- when you check the document flow of service order, you can see operations posted, and also goods issue posted.
- check cost tab to see actual costs. (if I want to settle costs from service order to service contract, I can do so w/o a problem in KO88)
- Use DP90, enter service order number and create billing request. System takes to billing request screen but it is blank. No line items.
- So, since there is a contract, in this case, am I meant to be creating the billing request from Service contract? instead of from Service order?
I hope I have clarified myself better this time.
Best regards,
Abdul Rafey -
How to create a single login for multiple apps on tomcat server?
Hello,
I am running the most recent versions of apache and tomcat on several dells with XP pro.
When I login to an app I have created, a session variable is set, but when I browse to one of the other apps on the same computer, it does not recognize that the session variable has been set and I have to login again.
Can somebody please suggest how, or where I can find docs, to configure tomcat to pass the session variables to other apps?
Thank you very much.
Or, can anybody suggest the most effective strategy for creating single-logon functionality for multiple apps with tomcat and apache running on one computer? and with tomcat and apache running on multiple computers? (i.e., each computer has tomcat and apache integrated).
The database is Oracle 10g running on each computer.
Thank you again.A good place to start is http://www.javaworld.com/javaworld/javatips/jw-javatip34.html
Also, do a search in this forum on HttpURLConnection. That class allows you to use POST method to send form data to a web server.
"Hidden" variables are only hidden in HTML. The HTTP that gets POSTed to the web server doesn't distinguish between hidden and not hidden. That is, the content you would write to the HttpURLConnection.getOutputStream() would be something like:
hidden=1&submit=ok(Of course, the variable names would depend on what the web server was expecting from the form.)
Also, be sure to set the Content-Type request parameter to "application/x-www-form-urlencoded" -
How to Create a Cost object for a Rental object in RE-FX
Dear Friends,
We have created one Building and it has been assigned with an Asset Master.When depreciation is posted it is debiting to the Cost Center attached to the asset master.
Here the requirement is to allocate the Cost from the Cost Center to the Rental objects Created under the Building based on the Floor area of the rental Contracts/Rental objects.
Can you please suggest how to resolve the issue & how to distribute the Cost from Cost Center to Rental objects.
Thanks and Regards
Gyanendra
+919963062333hi.........
When you to create rental unit all the relevant details as rent, floor area etc are mentioned in master itself in different tabs check whether it is being maintained or not. Further on right hand side on the top there is one button for co settlement rule click on it and maintain settlement rule give sender as rental unit & receiver as cost centres you want. Thereafter execute the settlement. Apportionment will be done as required.
Hope this will solve your problem.
Regards
Manish Jain
Pls assign points if your problem get solved. -
How to create new bol object for BT in sap crm
HI
I need to create new bol for BT with relationship with out using AET ,Could you please explain step by step.
Thanks and best regards
BrahmaiahHi Kariyath,
I suppose its not about interest but a MUST.. sorry but.. unless u include the Logic in the program how can SAP pick these custom Z objects ?
after u create them and assign to a Tcode in SU24 there is no logic to check these objects. Frankly i see no other chance.... unless SAP comes to us with a great easy way to input these Custom objects
Keep looking and please Update me if u have any Inputs....on this front..
All the Best
Br,
Sri
Award points for helpful answers -
How to create a proxy object for MOSS integration via WebDynpro For ABAP
Hello all,
I have a question about the creation of an ABAP proxy class in SE80.
When i follow this link:
[https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/6066fbe8-edc4-2910-9584-a9601649747d&overridelayout=true]
i see on page 7 that there is: a tab under create called Enterprise Service/ Web Service with under this tab a tab called proxy object.
When i do this in my SE80 i only see Enterprise Service and not proxy object.
Screenshot
[http://picasaweb.google.be/panneels.robin/SAPScreens#5377623235095894546]
Is there a extra configuration or add-on needed to do this action? Or is there a work-arround for this?
Because we need this for abap web dynpro for communication with MOSS.
Thanks in advance for all your help.
With kind regards,
Robin PanneelsHi James,
If you like to use SAP web dispatcher as a solution for load balancing portal application, you no need to create system object under systems..
You have to install web dispatcher as separate instance where you need to configure portal apps into it..
Configure web dispatcher like to hit the admin port, use http://<webdisp-server>:<adminport>/sap/admin
For normal portal access, use http://<friendly URL>/irj/portal
The good news is that the webdispatcher knows that the portal supports SSL
Another advantage of this config, is the webdisp, will just replace the apache redirect server. Users will access mycompany.com, without any port number, since we are redirecting 80 to the backend j2ee. Also, https should work like in the normal world.
Profile will be like below...
SAPSYSTEMNAME = WEB
SAPSYSTEM = 00
INSTANCE_NAME = W00
DIR_CT_RUN = $(DIR_EXE_ROOT)/run
DIR_EXECUTABLE = $(DIR_CT_RUN)
Accesssability of Message Server
Message Server Parameters ##########
NOTE: The "ms/http_port" must match the profile on the Central Instance
rdisp/mshost = <FQDN of portal CI Host>
ms/http_port = <Ms port of portal>
SAP Web Dispatcher Ports
#icm/server_port_0 = PROT=HTTP,PORT=81$$
icm/server_port_0 = PROT=HTTP,PORT=80, TIMEOUT=3600, EXTBIND=1 (some OS will not allow to bind ports <1024)
Admin port details
icm/server_port_1 = PROT=HTTP,PORT=3200
#, EXTBIND=1
icm/HTTP/admin_0 =
PREFIX=/sap/admin,DOCROOT=./admin,PORT=3200,AUTHFILE=/usr/sap/WEB/SYS/global/security/data/icmauth.txt
SSL
icm/HTTP/redirect_0 = PREFIX=/ , TO=http://<friendly URL name>/irj/portal
WebAS Message Server Parameters
rdisp/TRACE = 1
icm/trace_secured_data = 1
Regards
Suresh -
How to create a BufferedImage object using a .png file on harddisk
For some application of JFreeChart I want to create a BufferedImage object from png file on harddisk.
Can anybody tell me how to achieve this?
Thanks in advance.See [this thread|http://forum.java.sun.com/thread.jspa?threadID=5144115].
-
ADF Faces: RichTable - How to create a RichTable object
Hi. How to create a RichTable object to put in a JSF page ? I need to make a method that receive a list of name of columns and a list of list of data. This code that I have writing don't work. What's my error?
public RichTable getADFTable(
List<String> lstCols, List< List<String> > lstLstData
RichColumn adfCol = null;
List<RichColumn> lstRichCols = new ArrayList<RichColumn>();
int cont = 0;
for( String col : lstCols ){
adfCol = new RichColumn();
adfCol.setDisplayIndex(cont++);
adfCol.setHeaderText( col );
adfCol.setMinimumWidth( "60" );
lstRichCols.add( adfCol );
int contCols = 0;
RichOutputText text = null;
RichTable AdfTab = new RichTable();
for( List<String> lstData : lstLstData){
for( String data : lstData ){
text = new RichOutputText();
text.setValue(data);
lstRichCols.get( contCols ).getChildren().add( text );
contCols++;
contCols = 0;
AdfTab.setRows(this.lstEntit.size());
cont = 0;
for( RichColumn col : lstRichCols ){
AdfTab.getChildren().add( col );
return AdfTab;
}I was searching for an example and i found it but whit errors, finally i fixed and it works.
You just have to generate the data from your webservices and "put" into this structure.
The java file (Bean)
package view;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.myfaces.trinidad.model.CollectionModel;
import org.apache.myfaces.trinidad.model.SortableModel;
public class DynamicTable {
private SortableModel model;
private List<String> columnNames;
public DynamicTable() {
columnNames = new ArrayList<String>();
columnNames.add("Col-1");
columnNames.add("Col-2");
generateColumnModel();
public void generateColumnModel() {
this.model = new SortableModel(createRows(columnNames));
private List<Map> createRows(List<String> columnNames) {
int i = 0;
List<Map> mapListforRows = new ArrayList<Map>();
for (String name : columnNames) {
Map newRow = new HashMap();
mapListforRows.add(newRow);
for (String col : columnNames) {
newRow.put(col, "data");
return mapListforRows;
// Get table model
public CollectionModel getCollectionModel() {
return model;
public void setColumnNames(List<String> columnNames) {
this.columnNames = columnNames;
public List<String> getColumnNames() {
return columnNames;
}The jspx file (page)
<af:table varStatus="rowStat" summary="table"
value="#{pageFlowScope.DynamicTable.collectionModel}"
rows="#{pageFlowScope.DynamicTable.collectionModel.rowCount}"
rowSelection="none" contentDelivery="immediate"
var="row" rendered="true" id="t1">
<af:forEach items="#{pageFlowScope.DynamicTable.columnNames}"
var="name">
<af:column sortable="true" sortProperty="#{name}"
rowHeader="unstyled" headerText="#{name}"
inlineStyle="width:100px;" id="c1">
<af:activeOutputText value="#{row[name]}" id="aot1"/>
</af:column>
</af:forEach>
</af:table> -
How to create OEMS JMS In-Memory and File-Based Persistence?
Anyone knows how to create OEMS JMS In-Memory and File-Based Persistence? Any help it is appreciated. I m working with Oracle BAM 11g TP4 and I want to test the capability of connecting directly to a JMS queue, and reading Oracle´s "complex" documentation I couldnt find the right way to make this happen.
tksHi Mario
This is explained in the soa developer's guide. Chapter 43 "Enterprise message source"should help you. You will find how to connect OEMS or JMS in-memory/file based to your BAM data objects with or without xpath transformation.
You can find sample of advanced XML formating in the 10g tech note: "Oracle BAM 10.1.3 configuration for BPEL 10.1.2 using JMS sensors" (useful even if you don't plan to use BPEL).
Anyway, if you plan to use BPEL, forget JMS and use the BAM adapter (chapter 42), it's quicker & easier.
Dominique -
How to create OEMS JMS In-Memory and File-Based Persistence ? Anyone?
Anyone knows how to create OEMS JMS In-Memory and File-Based Persistence? Any help it is appreciated. I m working with Oracle BAM 11g TP4 and I want to test the capability of connecting directly to a JMS queue, and reading Oracle´s "complex" documentation I couldnt find the right way to make this happen.
tksHi Mario
This is explained in the soa developer's guide. Chapter 43 "Enterprise message source"should help you. You will find how to connect OEMS or JMS in-memory/file based to your BAM data objects with or without xpath transformation.
You can find sample of advanced XML formating in the 10g tech note: "Oracle BAM 10.1.3 configuration for BPEL 10.1.2 using JMS sensors" (useful even if you don't plan to use BPEL).
Anyway, if you plan to use BPEL, forget JMS and use the BAM adapter (chapter 42), it's quicker & easier.
Dominique
Maybe you are looking for
-
i can no longer log into my ichat linked to my gmail. right after opening up ichat, receive the following message: lost connection with jabber. the server has unexpectedly disconnected. how to troubleshoot? thanks.
-
User defined function in PI 7.1 compilation error "Recompile with -Xlint"
Hi All, I have a user defined function in PI 7.1 .,which is throwing the following error. Do i need to add any import statements like "import java.lang.String" in the beginning. It is unable to recognize the String methods used in the user defined fu
-
Has anyone reported that the calendar crashes on entering March and have we got an answer why?
Every time I try to access March in 2013 calendar it crashes.
-
i purchased several itunes movies and when i play my dell xps laptop connected to my sony hd flatscreen. the movie stops all the time and can be restarted but is anoying, is the chapter not playing continously. i am using a hdmi cable
-
When I was in China recently I tried to update an app. I failed but now the whole App Store is in Chinese, which I do not speak or read. How do I get it back to English?