Writing to file that is in application system
Hi all,
The following code creates such a display in file:
open dataset filename for output in text mode
ENCODING
non-UNICODE IGNORING
CONVERSION ERRORS.
loop at line.
CONDENSE line.
transfer line to filename.
endloop.
close dataset filename.
open dataset filename for input in text mode ENCODING
non-UNICODE IGNORING
CONVERSION ERRORS.
refresh attch.
do.
clear attch.
read dataset filename into attch.
if sy-subrc <> 0.
append attch.
exit.
endif.
append attch.
enddo.
close dataset filename.
delete dataset filename.
1 T H 0 9 0 4 2 0 0 8 0 7 2 2
2 F H 0 9 0 4 2 0 0 8 0 7 2 1 0 0 4 3 4 1 0 0 0 0 0 0 0 1 6 9 6 5
3 D E 0 9 0 4 2 0 0 8 0 7 2 1 0 0 4 3 4 1 0 6 3 9 9 8 5 3 9
However they all should start at the same point as in 1TH0904....
But it is like this in file that has been sent via email.
What could be the reason?
Thanks.
deniz.
Hi,
sap version 6.0.
And
view is like that:
1 T H 0 9 0 4 2 0 0 8 0 7 2 2
2 F H 0 9 0 4 2 0 0 8 0 7 2 1 0 0 4 3 4 1 0 0 0 0 0 0 0 1 6 9 6 5
3 D E 0 9 0 4 2 0 0 8 0 7 2 1 0 0 4 3 4 1 0 6 3 9 9 8 5 3 9
But I want it like:
1 T H 0 9 0 4 2 0 0 8 0 7 2 2
2 F H 0 9 0 4 2 0 0 8 0 7 2 1 0 0 4 3 4 1 0 0 0 0 0 0 0 1 6 9 6 5
3 D E 0 9 0 4 2 0 0 8 0 7 2 1 0 0 4 3 4 1 0 6 3 9 9 8 5 3 9
Thanks.
deniz.
Similar Messages
-
Hi All,
I have a requirement to send the two file from the third party system(GXS) to SAP ECC via SAP PI(version - 7.4). We are using AS2 adapter at the sender side to pick the file and using File Adapter to place the file in ECC.
Its a pass through scenarion(No ESR part is used).
Requirement:
We are going to get 2 files ->Example: one from Axis and another one from ICICI -> each bank file will have a file name ->
We have to post the file at the target system with the same name as source file name, the source file name could come dynamically(with diff time stamp).
Please let me know, Is it possible to achieve the above requirement(we have to retain the file name in target that coming from source system) with Sender AS2 adapter, If yes then please suggest the best approach.
Regards,
Pradeep BawliaHi Guys,
The above requirement is solved now.
Solution - I used java mapping for extracting the same source file name and assignning the same to the target system.
Code:
public class ExtractFileName_ASMA extends AbstractTransformation{
public void transform(TransformationInput in, TransformationOutput out) throws StreamTransformationException
DynamicConfiguration conf=in.getDynamicConfiguration();
DynamicConfigurationKey key_AS2FileNmae = DynamicConfigurationKey.create("http://sap.com/xi/XI/AS2/AS2", "AS2Filename");
DynamicConfigurationKey key_FileNmae = DynamicConfigurationKey.create("http:/"+"/sap.com/xi/XI/System/File", "FileName");
String As2FileName=conf.get(key_AS2FileNmae);
conf.put(key_FileNmae, As2FileName);
try{
byte b[]=new byte[in.getInputPayload().getInputStream().available()];
in.getInputPayload().getInputStream().read(b);
out.getOutputPayload().getOutputStream().write(b);
catch(Exception e)
2. Another solution we can use the graphical mapping and need to use the dynamic config UDF at mapping level to acheive this requirement but here is one drawback - we need to do content conversion is this case.
In case of Java mapping, no need to play with source file.
WITHOUT USING ESR, WE CAN NOT ACHEIVE THIS REQUIREMENT.
Regards,
Pradeep Bawlia -
How to open the server log file that displays messages of System.out.print
Hi,
I am working on a j2ee project. How can we access the default log file? I have put many System.out.println(..) method in different classes in order to get the program flow and to track the origin of the error.
I opened the a log file named "defaultTrace.0.trc" in usr\sap\J2E\JC00\j2ee\cluster\server0\log installation directory. Although it shows the ecxeptions, It is not showing the messages that i have written to console with the help of System.out.println(..) method.
Can anybody tell me the location of the log file where i can find my messages sent through System.out.println(..) function?
Regards,
Sudheesh...System.out.println goes to console, which is not a file... This whole thing is much easier if you use standard logging:
http://help.sap.com/saphelp_nw04/helpdata/en/d2/5c830ca67fd842b2e87b0c341c64cd/frameset.htm -
How to set a root directory for file management in web application
Is it possible to set a default root directory for file management for a web application ?
We would upload some files and store them in the web server.
When we write the uploaded files without any path, the files are written in the config directory into the jdeveloper embedded oc4j directory.
When we write the uploaded with a relative path ("/somedir/filename"), the files are written in C:/somedir/filename.
We would like that all file management with relative path into the web application refer automatically to a given root directory (for example defined in web.xml).
Is it possible ?I'm using the standard upload in adf faces.
The problem is not during upload. This is managed in a temporay directory defined in web.xml. The problem is for writing the file that was uploaded (upload give us an inputStream we have to write somewhere, eventually after unzipping).
Here is an example of our current code.
if (mimeType.equals("application/x-zip-compressed") |
mimeType.equals("application/zip")) {
File destZipFile =
new File(rootDirectory + "/" + parametersDirectory +
"/" + uploadedFile.getFilename());
BufferedInputStream isZipFile =
new BufferedInputStream(uploadedFile.getInputStream());
FileOutputStream fosZipFile =
new FileOutputStream(destZipFile);
BufferedOutputStream bosZipFile =
new BufferedOutputStream(fosZipFile, BUFFER);
// read and write until last byte is encountered
while ((currentByte = isZipFile.read(data, 0, BUFFER)) !=
-1) {
bosZipFile.write(data, 0, currentByte);
} -
No 'Application system' available to create container
HI,
I' m a developer that installed Designer 6i on my home PC.
My PC is a Pentium 4 with Win2000 professional.
The database is Oracle 8.1.7.0.0.
I have also installed Forms 6i and Reports 6i.
The database, Forms and Reports work OK.
Now here is the problem:
I installed Designer 6i, that was succesfull, also creating the repository went well.
First I created 2 tablespaces:
tbs_INDEXES
tbs_TABLES
Then I created a rollback tablespace:
tbs_ROLLB
After that I created a rollback segment and put it online.
I added a datafile to increase the SYSTEM tablespace.
Then I created a temporary tablespace and also created a user with all necessary priveleges.
So, I logged into the Repository Administration utility and clicked on INSTALL (Support for Repository (Core)Objects - checked) then START. I changed the tablespaces (INDEX, TABLES) as created above and installation began.
After 45 min. installation was succesfull and after checking everyting I tried to create a container. I started the repository Object Navigator and saw a node GLOBAL SHARED WORKAREA and beneath that a node WASTEBASKET.
When I tried to create a child-node I did not get a pop-up screen with options. A node was added and I had to give it a name. Standing on that new node, and creating again a child node I got a pop-up with the options FOLDERS and FILES. Still no 'Application system' option.
Can someone please help me?
Thanks.
P.S.: don't direct me to websites with a possible solutions. I have been surfing the net for 2 days now and did not find anything.Jan,
When you install the repository you have the choice to install the core model or the core model plus the Designer structured model. I believe you have only installed the core model.
Reinstall from the RAU and when asked check the Designer model check box.
regards,
David -
hi,
as part of my requirement , i have to perform read and write operations of few files [ using the file upload control in my custom visual web part] and on submit button click.
but while writing these files - with the help of fileupload control - and when i use myfileupload.saveas(mylocation);
- i am saving these files into my D:\ drive of my server , where i am executing my code -, am getting access denied error.
it throws system.unauthorizedexception.
i have given full control on that folder where i was trying to store my attached files. and also after following asp.net forums,
i have added iusr group added and performed all those steps such that, the file is saved in my D:\ drive.
but unfortunately that didnt happen.
also
a) i am trying the code with runwithelevatedprivileges(delegate() ) code
b) shared the drive within the d :drive where i want o save the files.
c) given the full privieleges for the app pool identity- in my case , its
network service.
the other strange thing is that, the same code works perfectly in other machine, where the same sp, vs 2012 etc were installed .
would like to know, any other changes/ steps i need to make it on this server, where i am getting the error.
help is appreciated!vishnuS1984 wrote:
Hi Friends,
I have gone through scores of examples and i am failing to understand the right thing to be done to copy a file from one directory to another. Here is my class...So let's see... C:\GetMe1 is a directory on your machine, right? And this is what you are doing with that directory:
public static void copyFiles(File src, File dest) throws IOException
// dest is a 'File' object but represents the C:\GetMe1 directory, right?
fout = new FileOutputStream (dest);If it's a directory, where in your code are you appending the source file name to the path, before trying to open an output stream on it? You're not.
BTW, this is awful:
catch (IOException e)
IOException wrapper = new IOException("copyFiles: Unable to copy file: " +
src.getAbsolutePath() + "to" + dest.getAbsolutePath()+".");
wrapper.initCause(e);
wrapper.setStackTrace(e.getStackTrace());
throw wrapper;
}1) You're hiding the original IOException and replacing it with your own? For what good purpose?
2) Even if you had a good reason to do that, this would be simpler and better:
throw new IOException("your custom message goes here", e);
rather than explicitly invokign initCause and setStackTrace. Yuck! -
I can not install the newest version of iTunes because of a file that can not be found. This is what I am seeing:(The feature you are trying to use is on a network resource that is unavailable. C:\Documents and Settings\Aubrie\Local Settings\Application Data\Apple\Apple Software Update\)
(1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page).
http://majorgeeks.com/download.php?det=4459
Here's a screenshot showing the particular links on the page that you should be clicking:
After clicking one of the circled links, you should be taken to another page, and after a few seconds you should see a download dialog appear for the msicuu2.exe file. Here's a screenshot of what it looks like for me in Firefox:
Choose to Save the file. If the dialog box does not appear for you, click the link on the page that says "CLICK HERE IF IT DOES NOT". Here's a screenshot of the page with the relevant link circled:
When the dialog appears, choose to save the file.
(2) Go to the Downloads area for your Web browser. Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
(3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
(4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
(5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time? -
I just got an ipod classic 7th generation a couple days ago and I'm having a heck of a time with it. My latest problem is that with media on iTunes, I cannot eject the ipod because it says that it cannot be ejected because it contains files that are being used by another application. What application is this, and what do I do about it?
Hi newipoduser,
Here are some possible solutions:
Do you use musicmatch jukebox on your computer? If you do, you have to go into task manager on windows and end process mim.exe. It interferes with disconnecting ext devices
Empty your "trash/recycle bin."
If that doesn't work, try quitting all your programs, especially music-type programs, basically things that look for mp3's etc.
if that doesn't work, "log off" then "log on" and that should refresh/purge your OS system.
Finally, you can restart your computer.
Hope one of these helps!
Cheers,
GB -
I was trying to download iTunes on my computer, and while doing so, I got this message: Error writing to file: C:/Program Files (x86)/Common Files/Apple/Apple Application Support/Apple Versions.dll. Verify that you have access to that directory. I have downloaded iTunes numerous times and I have never had this problem. If anyone knows what's going on, I would really appreciate the help.
Well, there's definitely a mac and a Windows version. And you're at the right page. I think the problem is that someone forgot (or decided not to) to update the text at teh bottom of the page to have Mac and Windows.
Just push the button, you'll get the Mac update no problem.
Regards,
Bentley Wolfe
Senior Support Engineer, Flash/Flash Player/Digital Editions
Adobe -
I recieve the following error message when trying to install Quicktime for Windows "Error writing to file C:/Program Files/QuickTime/QTSystems/QuickTimeCheck.ocx. Verify that you have access to that directory." I just trying to get the latest version of iTunes. Thanks
"Error writing to file C:/Program Files/QuickTime/QTSystems/QuickTimeCheck.ocx. Verify that you have access to that directory."
That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
XP instructions in the following document: How to perform disk error checking in Windows XP
Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards? -
When downloading the new 10.7 update for itunes, an error message saying that there is an error writing to file, verify that you have access to this file comes up... what is this??
That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
XP instructions in the following document: How to perform disk error checking in Windows XP
Vista instructions in the following document: Check your hard disk for errors
Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards? -
Itunes will not install. I get the error message "Error writing to file: C:\Program Files\Common Files\Apple\Mobile Device Support\com.apple.IE.client_main.dll Verify that you have access to that directory."
That one's consistent with disk/file damage. The first thing I'd try with that is running a disk check (chkdsk) over your C drive.
XP instructions in the following document: How to perform disk error checking in Windows XP
Vista instructions in the following document: Check your hard disk for errors
Windows 7 instructions in the following document: How to use CHKDSK (Check Disk)
Select both Automatically fix file system errors and Scan for and attempt recovery of bad sectors, or use chkdsk /r (depending on which way you decide to go about doing this). You'll almost certainly have to schedule the chkdsk to run on startup. The scan should take quite a while ... if it quits after a few minutes or seconds, something's interfering with the scan.
Does the chkdsk find/repair any damage? If so, can you get an install to go through properly afterwards? -
I am having iPOD classic 80GB . I Have the 10.5Latest Version of iTunes installed. When I go for Sync.It tells me to restore to factory settings as it is unable to read the contents. On restoring it tells : unable to restore as this has files that are in use by another application. I have no idea what to do now. Pl advise. Thanks
Try disabling any and all A/V or security software you are running on your system and see if that helps.
B-rock -
My desktop files and folders no longer appear on the screen. I think this is a result of an iPhoto updating. It appears (from getting info) that now Desktop is being treated like a normal file for which an application to open it must be supplied. Can anything be done? Incila
You are not going to be able to run your old system from the backup on this old computer as the hardware is incompatible.
You need to get a new computer or a refurbished one. -
I keep getting this error when trying to update iTunes: "Error writing to file: C:\config.msi\3a3043.rbf. Verify that you have access to that directory." iTunes will not work. Any time I try to apply settings iTunes locks up. Anyone know how to fix this?
I had this exact same problem just now, trying to upgrade to 10.7.
I even got that error msg when trying to UNINSTALL iTunes!
After hours of frustration trying everyone's different suggestions, I downloaded Revo Uninstaller http://www.cnet.com.au/apps/revo-uninstaller-10610875/ which solved the problem.
Use it to help uninstall iTunes and related software components in the following order and then restart your computer:
1. iTunes
2. QuickTime
3. Apple Software Update
4. Apple Mobile Device Support
5. Bonjour
6. Apple Application Support (iTunes 9 or later)
Then you can install iTunes from scratch.
Good luck
Maybe you are looking for
-
I have 2 apple ID's I have the cloud on one but my work app on the other. Can I have 2 ID's or can I move my work app to the other ID?
-
Installation of Adobe Premiere Elements 10
I got a pop up warning during intallation of Adobe Premiere Elements 10 that says This installation package is not supported by this processor type contact your product vendor
-
BIDS Schema issues between Visual Studio on 2008 & 2008R2
Hi all, We have a 3 servers in our farm, two of which Run SQL Server 2008R2 and one which runs SQL Server 2008. All three servers have the same edition of Visual Studio on (VS2008). Our development server (the 2008 server) has Report Builder 3 on it
-
System-wide kb shortcut for mail functions
I'd like to be able to program a system-wide, universal kb shortcut to: -- start a new, blank mail message -- check for new mail (in other words, poll my mail server) without bringing mail to the front ideas? I've been using Butler now for a while an
-
Hi, We are trying to migrate UIX pages in our application to JSP pages. We will be keeping out service layer same but, just wanted to replace UIX page with JSP. Can someone guide me to useful information for this migration ? like ...is there any plug