How to check whether the Application Server file has already been opened?
Hi Experts,
I have a query related to Application Server file. I am using multithreading concept to process the data and write it in to a single file.
For example, I have 4 workprocesses. Each workprocess will process the data and whenever it has a record available it will access the file and write it directly.
Problem is the statements that are written in the workprocess is same and I want to check the status whether the file has been opened or not ?
Thanks in advance!!!
Thanks,
Babu Kilari
Depends on the structure, and whether the data needs to be sorted in some way in the final file.
In any case, I don't think there will be a significant performance difference between using OPEN DATASET again and getting funny with Unix commands.
If you don't need to sort the final file, you can use strings to read, concatenate and write the data even without line-based DO ENDDO loops, this works pretty fast.
I hope we are not talking about GBytes of data
Thomas
Similar Messages
-
How to check whether the Application Server directory exits or not
Hi,
I have a selection screen in which I give the Application server file name(UNIX file) as input. Here, I would like to check whether the Server directory exists or not.
Let us say, the path I gave in the selection screen is /usr/sap/tmp/testfile.txt . Here, the file name is testfile.txt and the server directory is /usr/sap/tmp . I would like to check whether this directory /usr/sap/tmp exists in the server or not. I am not bothered about the file name as I am going to write data into the file. I am mainly concerned about whether the directory exists in the server or not. and one more thing... this is the Application Server path not the Local path.
Can anyone help me on the same how to check whether the server directory exists or not.
Thanks in advance.
Best Regards,
Pradeep.Also you can use the FM EPS_GET_DIRECTORY_LISTING for this purpose.
Store the directory name
l_dpath = p_file+0(l_no).
Validate the directory of the application server
CALL FUNCTION 'EPS_GET_DIRECTORY_LISTING'
EXPORTING
dir_name = l_dpath
TABLES
dir_list = l_i_dlist
EXCEPTIONS
invalid_eps_subdir = 1
sapgparam_failed = 2
build_directory_failed = 3
no_authorization = 4
read_directory_failed = 5
too_many_read_errors = 6
empty_directory_list = 7
OTHERS = 8.
If any problem occurs with the directory then display proper
error message
IF sy-subrc <> 0.
Display error message
MESSAGE e018 WITH 'Problem with directory entered'(008).
ENDIF. " sy-subrc <> 0
Regards,
Joy. -
How to check Whether the File is in Progress or used by some other resource
Hi All,
I am retrieving a file from the FTP server using Apache commons FTP.
I need to check whether the file is fully retrieved or in progress.
for now i can able to use the file which is partially retrieved. it is not throwing any file sharing exception or i am unable to find whether it is in progress.
How to check whether the file is in progress ? or The file is accessed by some other resource ?
Pls Help me.
Thanks,
J.KathirHi Vamsi,
Explicitly such kind of requirement has not been catered and i dont think you would face a problem because any application that is writing to a file will open the file in the read only mode to any other simultaneous applications so i think your concerns although valid are already taken care off .
In the remote case you still face a problem then as a work around. Tell the FTP administrator to set the property to maximum connections that can be made to ftp as one. I wonder if you have heard of the concept of FTP handle , basically the above workaround is based on that concept itself. This way only one application will be able to write.
The file adapter will wait for its turn and then write the files.
Regards
joel
Edited by: joel trinidade on Jun 26, 2009 11:06 AM -
How to give the application server file path in the module pool programming
Hi,
Could somebody help me how to provide the application server file path in module pool programming once the logo is uploaded to sap system.
For eg I have imported a logo name owens into sap system by using transaction se78; now I need to call the path in the below url,
if container2 is initial.
CREATE OBJECT CONTAINER2
EXPORTING
CONTAINER_NAME = 'PICTURE_CONTAINER2'.
CREATE OBJECT PICTURE2
EXPORTING
PARENT = CONTAINER2.
CALL METHOD PICTURE2->SET_DISPLAY_MODE
EXPORTING
DISPLAY_MODE = CL_GUI_PICTURE=>display_mode_fit_center
EXCEPTIONS
ERROR = 1.
CALL METHOD PICTURE2->LOAD_PICTURE_FROM_URL
EXPORTING
URL = " ? "
EXCEPTIONS
ERROR = 1
Others = 2.
endif.
Thanks in advance
Deepuhi Deepu,
Use FM '/SAPDMC/LSM_F4_FRONTEND_FILE' for fetching the data from the application server path/presentation server path
Regards,
Santosh -
Error while accessing the application server file
Hello,
When I try to load the data from CSV file to PSA , I am getting following error message
"Error while accessing the application server file"
"Errors in source system"
I gave the right file path
I am not sure about this error message.
Thanks,Hi ram,
if you have more than one application server running in your BI system (see at transaction SM51) be aware that your infopackage will be executed on the right one. Each application server has its own file system and your job need to run on the server your file is stored on.
Also check if the os user of the SAP system itself (<sid>adm on Unix) has rights to read that file.
Bye
Frank -
R12.1.1 staging complete! How to check whether the stage is Good
Hi Gurusl,
I have completed staging R12.1.1 for Hp unix B.11.31. I want to know how to check whether the stage is good for installation or whether it is corrupted. Is there any metalink note or script from where we can check it. Ur help will be highly appreciated. Thanks in advance
regards,Hi,
Please refer to (Note: 802195.1 - MD5 Checksums for R12.1.1 Rapid Install Media).
Regards,
Hussein -
How to find out the application server info
Hi, I am wondering how to find out the application server info in Java code, just like how to find out the db platform being used. Thanks
Hi,
I am not aware of any spec defined way of finding out such info. There may be vendor specific APIs or mechanisms.
But you can use environment entries in your deployment descriptors to specify the information and make use of the entries inside your j2ee component. That will make your code platform neutral.
Sahoo -
How to stop uploading of Yosemite as it has already been done ? There is a bar in Launchpad showing that it has been stopped once. Coming back on Appstore, I cannot delete : written "pending". Sorry for eventual poor explanation as I write from France. Thank you
Thank you for your reply.
I have looked at this, however, if the line is say a dotted line, I can not edit this in the layer panel by going to the stroke style, it just comes up blank.
So how would I go about editing this dotted stroke path once it is placed in Photoshop?
For example if I wanted to change the gap between the dots? -
I can't transfer a rented movie from my iMac to my iPad. It get the following error message- the rental could not be transferred to the iPad because it has already been transferred to another computer or device. I have not transferred it to anywhere device.
Is the computer connected to the the internet?
-
Trying to play purchased TV series to my Apple TV, I am requested to authorise the computer. This has already been done and I have tried the suggestions regarding authorisation. I can play the programs on my computer, but not the Apple TV.
Any ideas?in remote app click on the
lower left corner on the text
top of the context menu click devices
choose the appletv rather then your shared lib in the list
if you are trying to view a movie that is located on your ipad on your tv using the appletv then
you should use airplay mirror not the remote app -
Oracle AS Web Cache - How to check whether the request goes throught it ?
Hi,
My application runs on Oracle 10g App Server,
The OracleAS Web Cache is also running
the command opmnctl status shows...
WebCache - Alive
WebCacheAdmin - Alive
Is there any way to check whether the request form the client goes through the Web Cache ?
B'coz when i checked OracleAS Web Cache Administrator UI
The information like Total Requests Served, Cahce Hit , Cache Misses etc are 0 and it does'nt changes...
I have the directive keepAlive as[b] off in httpd.conf, will this have an impact over Web Cache ???
Plz suggest me a way to check whether the request goes through Web Cache or directly to Oracle HTTP Server ??
Deepak.CKeepalive has no impact on webcache, but it does have a huge impact on performance. So far I found no proper reason to put it off in any production system.
Anyway, logging from webcache and/or apache (ias) should show how requests are going from the client to the AS. -
How to check whether a Oracle server is installed or not ?
Hi,
How cani check whether a Machine has oracle server installed or not ?
I have a machine where i have the client tools installed but not server. In that case how can i check whether this machine has oracle server is installed or not?
Thanks in Advance..user11000236 wrote:
Hi,
How cani check whether a Machine has oracle server installed or not ?
I have a machine where i have the client tools installed but not server. In that case how can i check whether this machine has oracle server is installed or not?
Thanks in Advance..http://tinyurl.com/ngunhv
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
Empty the Application server file
Dear Friends,
Good Morning.I have a requirement to empty the Given application server file.How can we achieve through Programmitically.Pls. help on this..HI
GOOD
go through these links
http://help.sap.com/saphelp_nw2004s/helpdata/en/fc/eb3c7f358411d1829f0000e829fbfe/content.htm
thanks
mrutyun -
Save string data type text in the application server file opened in binary
Hi All,
My requirement is to save the string "abcd 23432423 asdada" to the text file in the application server.
I have written like this. but its not getting saved properly in the text file. Please help.
constants X_LINESIZE type I value 128.
types X_LINETYPE type X length X_LINESIZE.
data: WA_TAB_X type X_LINETYPE.
data: str1(64) type C.
data: WA_TAB_X_HDR1 type xstring.
str1 = 'abcd 23432423 asdada'.
CONVERT TEXT STR1 INTO SORTABLE CODE WA_TAB_X_HDR1.
concatenate F_FILENAME1 SY-SYSID F_FILENAME2 '/' TAB_REGUT-TSNAM '.TXT' into F_FILENAME1.
open dataset F_FILENAME1 for output in binary mode .
if SY-SUBRC = 0.
transfer WA_TAB_X_HDR to F_FILENAME1.
loop at TAB_X into WA_TAB_X.
transfer WA_TAB_X to F_FILENAME1.
endloop.
endif.
close dataset F_FILENAME1.
Edited by: madhuri sonawane on Jun 2, 2009 4:05 PMHI,
constants X_LINESIZE type I value 128.
types X_LINETYPE type X length X_LINESIZE.
data: WA_TAB_X type X_LINETYPE.
data: str1(64) type C.
data: WA_TAB_X_HDR1 type xstring.
data : file (1000) type c.
str1 = 'abcd 23432423 asdada'.
CONVERT TEXT STR1 INTO SORTABLE CODE WA_TAB_X_HDR1.
concatenate F_FILENAME1 SY-SYSID F_FILENAME2 '/' TAB_REGUT-TSNAM '.TXT' into F_FILENAME1.
open dataset file for output in binary mode .
if SY-SUBRC = 0.
transfer WA_TAB_X_HDR to file.
loop at TAB_X into WA_TAB_X.
transfer WA_TAB_X to file
endloop.
endif.
close dataset file.
regards,
Munibabu.k -
How to check whether the browser supports cookie using servlet
Hi
I have a servlet that uses session.I want to check whether the browser supports cookie.
Please help me how can i detect this using servlet.
could you please include a sample code
thanks
sabuYou can check whether any cookies were sent in the request to your servlet:
Cookie cookies[] = request.getCookies();
if cookies is not null (cookies != null) then the browser sending you the request suppoerts cookies.
If it is null then you would need to do a little extra work. Basically add a cookie to the response going back to the browser. Then send a redirect back to this same servlet. You then would have to add code to check to see whether the cookie was sent back.
// Servlet named myServlet
String test = request.getParameter("TEST");
Cookie cookies[] = request.getCookies();
if (test == null || !test.equals("TRUE")
if (cookies == null)
response.addCookie("testCookies","testCookies");
response.sendRedirect("myServlet?TEST=TRUE");
else
// cookies were sent in the initial request, so
// browser supports cookies
else
// This is the redirect. Check the for the presence of
// our testCookie
Hope this helps.
Maybe you are looking for
-
Online college, open document, how to find URL associated with document
I am currently enrolled in an online college. For APA formatting, we are supposed to find the URL associated with an online document. For example: on the college website I click on a link that takes me to the open/save box. I open the file, at th
-
Load balancing in Oracle RAC 11g (11.1.0.6.0)
Hi! One of our customers use load balancing, now all users get connected against node 2. --The configuration of load balancing will be correct I think, have worked before --How do I verify the load on each node ? --What can be wrong? --Need help, wha
-
How to put configurable material in finished stock???
Hi How to put configurable material in finished stock?? wt is transaction code??or is there any different process for that?????????//
-
Hi all, I am a mechatronics student, and am new to labview. Needed some help with a few things to get started. I am using labview student edition 2009 and a NI 9213 temperature module with NI USB 9162. I wanted to design a VI that would in essence do
-
NY Tri-State Area Users: Does Q104.3 work
I am thinking of buying a radio remote for my iPod 5G or nano, but I only listen to one station: Q104.3 and I was playing with one of the horrendous Zunes at gamestop in my local mall and it didn't seem like it could connect to Q104.3 I was wondering