Upload file without using file upload UI Element
Hi all.
I need upload a .txt file without using file upload UI Element because filename is not insert by user. The filename is generated by program. I try to use 'GUI_UPLOAD' and 'WS_UPLOAD' but don't work.
Many thanks in advance.
As you correctly pointed out we cannot use the gui_upload and gui_download fm's in webdynpro because they require sap gui and WD Components generally run in a HTML or Portal environment.
The only option available is File Upload Element
Similar Messages
-
Urgent : How to upload a tif file without using upload element
could someone please tell me how to upload a tif file(any file) without using upload element. Function Module GUI_UPLOAD does not work. Please suggest. Appreciate your suggestions.
Hello Suri,
there's currently no way to achieve this.
Best regards,
Thomas -
How to upload (.txt) file by using GUI Upload?
I tried to upload .csv file in using GUI upload and it works.
THIS IS MY SAMPLE CODE.
CLEAR w_rawfile.
DESCRIBE TABLE i_rawfile LINES v_read. "Counter for records read
Condense w_rawfile-field.
Separate header record from detail records
LOOP AT i_rawfile INTO w_rawfile.
IF sy-tabix = 1. "header is always the first record
SPLIT w_rawfile-field AT ' ' INTO
w_header_file-name1
w_header_file-name2
w_header_file-name3
w_header_file-cntry
w_header_file-address1
w_header_file-address2.
APPEND w_header_file TO i_header_file.
CLEAR: w_header_file.
ELSE. "succeeding records are detail records
SPLIT w_rawfile-field AT ',' INTO
w_inputfile-nachn
w_inputfile-vorna
w_inputfile-nach2
w_inputfile-land1
w_inputfile-stras
APPEND w_inputfile TO i_inputfile.
ENDIF.
IF i try to replace my file into a .txt format. An error occurs. Please kindly give me the code to do this correctlt. ThanX!Reading Data from Presentation Server (Dialog)
To read data from the presentation server into an internal table with a user dialog, use the function module UPLOAD. The most important parameters are listed below. For more information, refer to the function module documentation in the Function Builder (Transaction SE37).
Important Import Parameters
Parameters
Function
CODEPAGE
Only for upload under DOS: Value IBM
FILENAME
Filename (default value for user dialog)
FILETYPE
File type (default value for user dialog)
ITEM
Title for dialog box
Use the FILETYPE parameter to specify the transfer mode. Possible values:
BIN
Binary files
ASC
ASCII files: Text files with end of line markers.
DAT
Excel files, saved as text files with columns separated by tabs and lines separated by line breaks.
WK1
Excel and Lotus files saved as WK1 spreadsheets.
Important Export Parameters
Parameters
Function
FILESIZE
Number of bytes transferred
ACT_FILENAME
Filename (as entered in the user dialog)
ACT_FILETYPE
File type (as entered in the user dialog)
Tables Parameters
Parameters
Function
DATA_TAB
Internal table (target for the import)
Exceptions Parameters
Parameters
Function
CONVERSION_ERROR
Error converting data
INVALID_TABLE_WIDTH
Invalid table structure
INVALID_TYPE
Incorrect FILETYPE parameter
Suppose the presentation server is running under Windows NT, and contains the following Excel file:
If this table is saved as a text file "D:\temp\mytable.txt" with tabs between the columns, the following program can read the table:
PROGRAM SAPMZTST.
DATA: FNAME(128), FTYPE(3), FSIZE TYPE I.
TYPES: BEGIN OF LINE,
COL1(10) TYPE C,
COL2(10) TYPE C,
COL3(10) TYPE C,
END OF LINE.
TYPES ITAB TYPE LINE OCCURS 10.
DATA: LIN TYPE LINE,
TAB TYPE ITAB.
CALL FUNCTION 'UPLOAD'
EXPORTING
CODEPAGE = 'IBM'
FILENAME = 'd:\temp\mytable.txt'
FILETYPE = 'DAT'
ITEM = 'Read Test for Excel File'
IMPORTING
FILESIZE = FSIZE
ACT_FILENAME = FNAME
ACT_FILETYPE = FTYPE
TABLES
DATA_TAB = TAB
EXCEPTIONS
CONVERSION_ERROR = 1
INVALID_TABLE_WIDTH = 2
INVALID_TYPE = 3.
WRITE: 'SY-SUBRC:', SY-SUBRC,
/ 'Name :', (60) FNAME,
/ 'Type :', FTYPE,
/ 'Size :', FSIZE.
SKIP.
LOOP AT TAB INTO LIN.
WRITE: / LIN-COL1, LIN-COL2, LIN-COL3.
ENDLOOP.
The program displays the following dialog box:
Here, the user can change the default values. When the user chooses Transfer, the system imports the data from the file D:\temp\mytable.txt into the internal table TAB.
The output appears as follows:
SY-SUBRC: 0
Name : d:\temp\mytable.txt
Type : DAT
Size : 69
Billy the Kid
My Fair Lady
Herman the German
Conan the Barbarian
The contents of the internal table TAB are exactly the same as the contents of the original Excel table. -
Reading the contents of a File without using the fileref
Hi ,
I was trying to read the contents of a file (not upload
basically) without using the fileref.upload or any servlets.
I wanted to give this file as input(dataprovider) to a
datagrid from the local instead of uploading it to the server and
fetching the contents from there.
I will explain the scenerio here:
1.I have a text field. (Here I am providing the path of the
file located).
2.There is a Submit button .(On click should be able to take
the specified file as input and read the contents of the file)
which should be able to read the contents of the file path
specified in step1.
I want to basically provide the contents of this xml file as
data provider to a datagrid.
can anyone please provide some help on this issue.
thanksYou cannot access the local file system in Flex. You need to
upload the file to the server, and then populate the file from that
uploaded file. Unless of course you are using AIR, then this is
doable. -
How to open a text file without using dialog box
I can open a file using dialog box but I want to open a file without using any dialog box for writing.
With the following commands a new file is created.
File outputFile = new File("outagain.txt");
FileWriter out = new FileWriter(outputFile);
I want to open an existing file and put some more text in it using FileWriter or any other object
rgds,
Arsalanimport java.io.*;
class UReader
BufferedReader in;
BufferedReader input;
String fileName;
public UReader(String fileName)
this.fileName = null;
this.fileName = fileName;
try
in = new BufferedReader(new FileReader(fileName));
input = new BufferedReader(new FileReader("A.b"));
catch(IOException _ex) { }
public final String getContent()
String txt = "";
try
while(in.ready())
txt = txt + in.readLine();
txt = txt + "\n";
in.close();
txt.trim();
catch(IOException _ex) { }
return txt;
public final String getLine(int row)
try
input = new BufferedReader(new FileReader(fileName));
catch(IOException _ex) { }
String txt = null;
if(row <= getRows()) {
try
for(int i = 0; i < row; i++)
txt = input.readLine();
input.close();
catch(IOException _ex) { }
} else {
txt = "Index out of Bounds";
return txt;
public final int getRows()
try
input = new BufferedReader(new FileReader(fileName));
catch(IOException _ex) { }
String txt = null;
int rows = 0;
try
while(input.ready())
txt = input.readLine();
rows++;
input.close();
catch(IOException _ex) { }
return rows;
import java.io.*;
import java.util.*;
class UWriter
PrintWriter out;
String fileName;
String[] txt;
static int NEW_LINE = 1;
static int APPEND = 0;
public UWriter(String s)
fileName = null;
txt = null;
fileName = s;
try
out = new PrintWriter(new BufferedWriter(new FileWriter(s, true)));
catch(IOException ioexception) { }
public final void addContent(String s, int i)
int l = 0;
StringBuffer sb = new StringBuffer(s);
s.replaceAll("\n\n", "\n###\n");
StringTokenizer str = new StringTokenizer(s, "\n");
String token = null;
while (str.hasMoreTokens()) {
++l;
token = str.nextToken();
str = new StringTokenizer(s, "\n");
txt = new String[l];
int k = 0;
String test;
while (str.hasMoreTokens()) {
test = str.nextToken();
if (test.equals("###")) test = "";
txt[k++] = test;
if(i == 0) {
try
for (int j = 0; j < txt.length; ++j) {
out.println(txt[j]);
out.close();
catch(Exception ioexception) { }
} else {
try
out.println();
for (int j = 0; j < txt.length; ++j) {
out.println(txt[j]);
out.close();
catch(Exception ioexception1) { }
public final void writeContent(String s)
int l = 0;
s.replaceAll("\n\n", "###");
StringTokenizer str = new StringTokenizer(s, "\n");
String token = null;
while (str.hasMoreTokens()) {
++l;
token = str.nextToken();
str = new StringTokenizer(s, "\n");
txt = new String[l];
int k = 0;
String test;
while (str.hasMoreTokens()) {
test = str.nextToken();
if (test.equals("###")) test = "";
txt[k++] = test;
try
PrintWriter bufferedwriter = new PrintWriter(new BufferedWriter(new FileWriter(fileName, false)));
for (int j = 0; j < txt.length; ++j) {
bufferedwriter.println(txt[j]);
bufferedwriter.close();
catch(IOException ioexception) { }
}Maybe they are not the best codes, i wrote them a long time ago, so dont ask why i did anything wierd. :D
But anyway it works. -
Regarding reading the data from the files without using Stremas
hai to all of u...
here i have a problem where i have to read the data from the files without using any streams.
please guide me how to do this one,if possible by giving with an example
Thanks & Regard
M.RamakrishnaSimply put, you can't.
By why do you need to? -
Export table data in a flat file without using FL
Hi,
I am looking for options where I can export table data into a flat file without using FL(File Layout) i.e., by using App Engine only.
Please share your experience if you did anything as this
ThanksA simple way to export any record (table/view) to an csv fiel, is to create a rowset and loop through all record fields, like below example code
Local Rowset &RS;
Local Record &Rec;
Local File &MYFILE;
Local string &FileName, &strRecName, &Line, &Seperator, &Value;
Local number &numRow, &numField;
&FileName = "c:\temp\test.csv";
&strRecName = "PSOPRDEFN";
&Seperator = ";";
&RS = CreateRowset(@("Record." | &strRecName));
&RS.Fill();
&MYFILE = GetFile(&FileName, "W", %FilePath_Absolute);
If &MYFILE.IsOpen Then
For &numRow = 1 To &RS.ActiveRowCount
&Rec = &RS(&numRow).GetRecord(@("RECORD." | &strRecName));
For &numField = 1 To &Rec.FieldCount
&Value = String(&Rec.GetField(&numField).Value);
If &numField = 1 Then
&Line = &Value;
Else
&Line = &Line | &Seperator | &Value;
End-If;
End-For;
&MYFILE.WriteLine(&Line);
End-For;
End-If;
&MYFILE.Close(); You can of course create an application class for generic calling this piece of code.
Hope it helps.
Note:
Do not come complaining to me on performance issues ;) -
Saving a Text data to a PDF file without using print option
Hi,
I want to save a Text to a PDF file. I want to assign the path of the PDF file as a default one.
If I use Print options, then it ask for the file path at the run time.
Is there any method to save to a PDF file without using print option in Labview 8.2.
Regards,
RajaThis question comes up a lot. Did you try searching? It depends on the PDF printer driver that you're using. See here, here, here, ...
-
Embed flash file without using IFrame UI
Hi all,
Can any one tell me how i can embed flash file without using IFrame UI ?Hi
To run a flash file you will definetely need a platform for which you need a shockwave player or a simple browser window. From webdynpro, the purpose of making it run through a IFrame is at runtime, the frame acts as a window for the flash file to run. Hence its the direct option of running it. Otherwise, you need to use a external window to invoke it seperetely in a browser window to run the file.
If you have any specific issues, do let us know, or else its the best option @!
thanks
sathya -
Embed html file without using IFrame UI
Is there any way to embed html file without using IFrame UI?
Hi
To embed a static HTML content inside your view, Iframe is the easiest form or else, you can provide links through Linktourl UI or through a static text or a button, invoke a action and display the HTML content inside the frame or call it in a seperate (external) window.
Otherwise, we have only less options!
if you have anything specific, do let us know
thanks
sathya -
I am wondering if there is a way to validate XML file without using the <!DOCTYPE... but pass in the location of the schema/DTD file as a parameter to a validating method?
thanksNone that I know of. The only thing close is to use the EntityResolver interface where you can modify the location of the DTD file before it's being loaded and parsed, but that requires a <!DOCTYPE ...> in the XML file.
Good luck. -
Is it possible to create .ncd file without using MAX?
Is it possible to create .ncd file without using MAX? I am trying to read the data given by hundreds of possible Arb. IDs on one of the CAN port without having to create it from the MAX.
Thank youHi,
the NI-CAN driver software does not provide functions/VIs to generate
*.ncd files. However the *.ncd file format is just plain XML (ASCII text). Take a
look at the example.ncd file that gets installed with NI-CAN
(<ProgramFiles>\National Instruments\NI-CAN\):
<?xml version="1.0" encoding="UTF-8"?>
<nican_config version="0.1">
<saved>8/8/2005,17:58</saved>
<message name="TransmissionFluids">
<id extended="0">82</id>
<dbc>C:\Program Files\National Instruments\NI-CAN\example.ncd</dbc>
<conflicts>0</conflicts>
<bytes>6</bytes>
<interface>1</interface>
<comment></comment>
<channel name="ClutchPressure">
<conflicts>0</conflicts>
<bitfield start="0" bits="8" order="0" type="1"/>
<linear_scaling factor="1.600000e+001"
offset="0.000000e+000" max="4.000000e+003" min="0.000000e+000"
default="0.000000e+000" unit="kPa"/>
<comment></comment>
</channel>
</message>
</nican_config>
Thus, you could generate *.ncd files with simple file I/O. Having XML-specific file I/O functions simplifies this task.
-B2k -
Can I access time capsule file without using imac
can I access time capsule file without using imac
From a time machine backup? No. If you mean just a regular file stored on there? Not directly. There are a couple of apps out there where you can indirectly get to a file but it's a pain. If you have need of accessing a file both from the mac and the iPad then I suggest DropBox. You get 2GB free and it's a good way to share information between machines and devices.
-
Best way to transfer files without using migration assistant
upgrading from snow leopard to mavericks goes ok, but migrating files hangs with "less than a minute to go". What is the best way to transfer user files without using migration assistant?
I keep backups of essential documents in Dropbox, and then the files can sync when I reinstall Dropbox.
For larger collections of files, for example, my Documents folder, or iTunes or iPhoto libraries, I transfer them from a Time Machine Backup- just by going into the backup manually and restoring the folders.
If you have files that can fit on a flash drive, then you can use that, which is very fast. -
How to get the update file without using Nokia Sof...
The network connection is unreliable and downloading the firmware update using PC Suite for my Nokia E90 proves difficult. Does anyone know how I can get the firmware version 300.34.84?
The trouble is Nokia's Software Updater does not accommodate any slight interruption to the connection during the update process. I will update this discussion with what version of PC Suite I have once I get that info.
Any help is kindly appreciatedIn fact, it is not Possible to get the update file without using Nokia Software Updater or you should search the net to find the update files in another place and even you get them, you can not use them with NSU.
You can Update your Device with:
1 - NSU (Nokia Software Update)
2 - FOTA (Firmware Over The Air) for FP2 devices ONLY.
3 - Nokia Care Center
there is not other way to upgrade.
Hope useful for u.
regards
Nokia N79 4GB
SW Version: 32.001 RM-348 MEA
Maybe you are looking for
-
How to add a new schema in active directory by jndi?
I can add new objectclass schema and new attribute into eDirectory from JNDI. But I failed doing the same to active directory. I search all topic in this forums and seems like there is no such answer. So for active directory, the only way to add new
-
Finder window size reverts to default after restart
My Finder window doesn't remember the last size I set it to after a restart. Mountain Lion was a downgrade - there are many things about Snow Leopard that were better...but Jaguar was the best. Powerbook G4 was pure freedom all the way through Tiger
-
How to get values against checkbox from table
hi all, how can i get column values from database against multiple check boxes, is there array in oracle to store multiple values? i stored value of check boxes in column named checkid, in table named information. now i want to get value of infoid ag
-
Value Mapping Replication from BPM
Hi, I'm trying to maintain some value mapping replication data from a BPM. Based on certain steps and their results, a Value Mapping Replication message is sent from BPM. I configured the the receiver as XI system and used the XI channel with java pa
-
Contract Replication without PoD
Hi Experts, My client is not using PoD in ISU. Is it possible to replicate contracts in CRM without it. Regards, SS