Problem in GUI_DOWNLOAD in Binary format
Hi All,
We have upgraded from 4.6C to ECC6.0.
When I use GUI_DOWNLOAD function module in binary (BIN) mode with the filename without any extension, the data will be downloaded with the SPACE inbetween charecters.
EX: We have data 'bangalore is garden city' to be downloaded, the data after downloading will apear as 'b a n g a l o r e i s g a r d e n c i t y '.
Kindly provide input to solve the issue
Regards,
Prabhu.
HI
Take reference of below code.
TYPE-POOLS: ABAP.
* Binary download table
DATA: BEGIN OF line_bin,
data(1024) TYPE X,
END OF line_bin.
DATA: data_tab_bin LIKE STANDARD TABLE OF line_bin.
* Ascii download table
DATA: BEGIN OF line_asc,
text(1024) TYPE C,
END OF line_asc.
DATA: data_tab_asc LIKE STANDARD TABLE OF line_asc.
* DAT download table
DATA: BEGIN OF line_dat,
Packed TYPE P,
Text(10) TYPE C,
Number TYPE I,
Date TYPE D,
Time TYPE T,
Float TYPE F,
Hex(3) TYPE X,
String TYPE String,
END OF line_dat.
DATA: data_tab_dat LIKE STANDARD TABLE OF line_dat.
* Get filename
DATA: fullpath TYPE String,
filename TYPE String,
path TYPE String,
user_action TYPE I,
encoding TYPE ABAP_ENCODING.
CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_SAVE_DIALOG
EXPORTING
WINDOW_TITLE = 'Gui_Download Demo'
WITH_ENCODING = 'X'
INITIAL_DIRECTORY = 'C:\'
CHANGING
FILENAME = filename
PATH = path
FULLPATH = fullpath
USER_ACTION = user_action
FILE_ENCODING = encoding
EXCEPTIONS
CNTL_ERROR = 1
ERROR_NO_GUI = 2
NOT_SUPPORTED_BY_GUI = 3
others = 4.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
Regards,
Pravin
Edited by: pravin s. on Dec 15, 2009 1:55 PM
Similar Messages
-
PROBLEM REGARDING GUI_DOWNLOAD IN .TDF FORMAT
hi ,
i am append the data into one internal table (iresult) . and internal table contain data row by row . when data is downloaded into destop it is storing in .TDF FILE FORMAT IS NOT DOWNLOADING IN .TDF FORMAT FILE AS IN FORMAT OF INTERNAL TABLES LINES ARE COMING DOWN. plz help me its urgent .points must be rewarded**
BEGIN OF iresult OCCURS 5,
rec(450),
END OF iresult,
FILE = C:
IN.FILENAME.TDF
CALL FUNCTION 'WS_DOWNLOAD'
EXPORTING
filename = file
filetype = 'ASC'
mode = mode
TABLES
data_tab = iresult
EXCEPTIONS
file_open_error = 1
file_write_error = 2
invalid_filesize = 3
invalid_type = 4
no_batch = 5
unknown_error = 6
invalid_table_width = 7
gui_refuse_filetransfer = 8
customer_error = 9
OTHERS = 10.
Edited by: manoj kv on Feb 18, 2008 5:19 AMI do not understand what is TDF(please elaborate). Do u mean PDF format.
-
Replace the XML Tags which are in binary format in 4.6C Version
Hi Experts,
I have an issue. I am working on 4.6 c version of sap. I have a requirement to send ftp of an xml file. I created an internal table which has components of table type too ( For Line items ). After appending a record of sales order into the table I am using SDIXML_DATA_TO_DOM ( To attach the to the document ) and SDIXML_DOM_TO_XML ( To convert the document contents into XML ( Binary Format ).
CLASS cl_ixml DEFINITION LOAD.
g_ixml = cl_ixml=>create( ).
CHECK NOT g_ixml IS INITIAL.
m_document = g_ixml->create_document( ).
CHECK NOT m_document IS INITIAL.
CALL FUNCTION 'SDIXML_DATA_TO_DOM'
EXPORTING
NAME = 'xmldata' " data in character format
DATAOBJECT = xmldata[]
IMPORTING
DATA_AS_DOM = l_dom
CHANGING
DOCUMENT = m_document
EXCEPTIONS
ILLEGAL_NAME = 1
OTHERS = 2
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CHECK NOT l_dom IS INITIAL.
w_rc = m_document->append_child( new_child = l_dom ).
IF w_rc IS INITIAL.
WRITE 'OK'.
ELSE.
WRITE: 'ERR ='.
ENDIF.
CALL FUNCTION 'SDIXML_DOM_TO_XML'
EXPORTING
DOCUMENT = m_document
PRETTY_PRINT = ' '
IMPORTING
XML_AS_STRING = w_string
SIZE = w_size
TABLES
XML_AS_TABLE = it_xml " Final XML data ( with xml tags ( xml tags are the field names of internal table ) ) in bin
EXCEPTIONS
NO_DOCUMENT = 1
OTHERS = 2
IF SY-SUBRC = 0.
WRITE 'OK'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ELSE.
WRITE: 'ERR =',
sy-subrc.
ENDIF.
So, it_xml has the binary format of XML data.
Now the requirement is that I need to get rid of some XML tags in the final internal table XML data. Because by default, at the start of the the table row the <item> and </item> tags are inserted. This is automatically done in the Function module
SDIXML_DOM_TO_XML.
I want to find out the binary string of <item> and </item> and replace them by null binary string. I know how to replace the character strings but not for binary strings in 4.6 C.
It is little bit urget. I would appreciate the quicker answer.Hi,
check this program , I think this will help you
TYPE-POOLS: ixml.
TYPES: BEGIN OF xml_line,
data(256) TYPE x,
END OF xml_line.
data : itab like catsdb occurs 100 with header line.
data : file_location type STRING.
data : file_name like sy-datum.
data : file_create type STRING.
file_name = sy-datum .
file_location = 'C:\xml\'.
concatenate file_location file_name into file_create.
concatenate file_create '.XML' into file_create.
DATA: l_xml_table TYPE TABLE OF xml_line,
l_xml_size TYPE i,
l_rc TYPE i.
select * from catsdb into table itab.
append itab .
CALL FUNCTION 'SAP_CONVERT_TO_XML_FORMAT'
EXPORTING
I_FIELD_SEPERATOR =
I_LINE_HEADER =
I_FILENAME =
I_APPL_KEEP = ' '
I_XML_DOC_NAME =
IMPORTING
PE_BIN_FILESIZE = l_xml_size
TABLES
i_tab_sap_data = itab
CHANGING
I_TAB_CONVERTED_DATA = l_xml_table
EXCEPTIONS
CONVERSION_FAILED = 1
OTHERS = 24
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
CALL METHOD cl_gui_frontend_services=>gui_download
EXPORTING
bin_filesize = l_xml_size
filename = file_create
filetype = 'BIN'
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 24.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
write : 'INTERNAL TABLE DATA IS SUCCESSFULLY DOWNLOADED TO LOCATION', file_create .
Thanks. -
How to read 16-bit signed integer in binary format with 2 byte sync. preceding??
A flowmeter provides data as 16-bit signed integer in binary format with 2 byte sync. preceding
I got i small problem by understanding the synchronasation.
I read the data provided by the flowmeter, and then write it to a binaryfile.dat. i need to convert the data to decimal format. is it better to convert the data before or after writing it to the binary file. Coz i need to read the data out again for calculations and save it again in a new file.
I understand that the synchronization help one to see where to begin reading the usable data. is it right?
Need any suggestions
Thank you !
Zamzam
HFZ
Attachments:
DataOut.JPG 37 KBHI Rolf.k.
Thank you for the small program it was helpfull.
You got right about that proberly there will be conflict with some spurios data, I can already detect that when writing the data to a spreadsheet file.
I writes the data in such a way, that in each line there will be a date, a timestamp, a tab and a timestamp at the end. That means two columns.
When i set given samplerate up, that controls the rate of the data outflow from the device, (1,56 Hz - 200 Hz), the data file that i write to , looks unorderet.
i get more than one timestamp and severel datavalues in every line and so on down the spreadsheet file.
Now the question is: Could it be that the function that writes the data to the file, can't handle the speed of the dataflow in such a way that the time stamp cant follow with the data flowspeed. so i'm trying to set the timestamp to be with fractions of the seconds by adding the unit (<digit>) in the timestamp icon but its not working. Meaby when i take the fractions off a second within the timestamp i can get every timestamp with its right data value. Am i in deeb water or what do You mean!??
AAttached Pics part of program and a logfile over data written to file
regards
Zamzam
HFZ
Attachments:
DataFlowWR.JPG 159 KB
Datalogfile.JPG 386 KB -
Binary Format of an Image..
Hi All
I had a training in ABAP, but dont have practical experience in it as I have not worked in any of the projects in ABAP.
Now I have a requirement in ABAP and hope you people will solve my problem.
Iam picking an image from a third party server which comes in a binary format with 255 characters each line.
Now I want to put this information(Binary data) into the R/3 tables which has a character length of 132 characters each line. There can be any number of lines.
But I wonder how this is possible. Because if the characters are truncated or seperated or divided into 132 characters each line then the Image will be distorted.. So how can I achieve this requirement.
Thanks in Advance.......Hi,
a picture is not store like a flat file, a line doesn't correspond to a line of your picture. (this only appends in a BMP 24bits pictures).
So stop to think like a flat file, but more like a string.
maybe this little code could help you.
loop at it_file.
v_size = strlen( it_file ).
v_start = 0.
v_line_size = 132.
do.
move it_file+v_deb(v_line_size) to it_table.
v_start = v_start + v_line_size.
if v_start = v_size.
append it_table
exit.
else.
append it_table.
endif.
if v_start gt v_size.
v_file_size = v_size - v_start.
endif.
enddo.
endloop.
rgd
Frédéric -
Data Acquisition form single precision to binary format
Hi everybody,
I work in an Astrophysics group and I'm developing an acquisition system of signals generated by X-Ray detectors (Transition Edge Sensor).
I'm trying to save data acquired by NI-PXI 6132 (DAQ-mx software in LabVIEW 8.0) in binary format.
To do this, I use the 'Write To Measurement File' procedure.
I don't know how it is possible to change the precision from the DBL to SGL directly from DAQ-mx, but I solve this point by creating a 'For Loop' inside my VI, after the data is acquired.
The problem is that I try to save the SGL data with the previous procedure but the 'Convert To Dynamic Data' automatically occurs, and the data are saved in binary format but in doube precision. So, the previous conversion that I made from DBL to SGL does not work.
How can I solve this problem?
Thank you for your help!
Ciao,
Claudio!Hi Alessio,
thank you for your prompt reply!
In attach there is the VI you reqeusted me.
Ciao,
Claudio
Attachments:
Daq_2monitor_BINARY_ASCII_single_float.vi 498 KB -
Problems on saving a binary file
Hi,
I have a String object that I need to save on disk, in binary format, for a database implementation project. I am using the FileOutputStream class, like this:
FileOutputStream fos = new FileOutputStream("file.db");
byte[] arrayBytes = new byte[myStr.length()];
arrayBytes = myStr.getBytes();
fos.write(arrayBytes);
fos.close();
The problem is that it saves the string in text (ASCII) format. If I open the file in Notepad it displays all the characters of the string, in a readable format, as it were a .txt file.
I have some friends implementing the project in Delphi, using a class called "FileWriter". Their file is not readable in Notepad. If we try to open it in notepad, only some characters are readable, other are junk characters.
As my professor doesn't want the database file to be readable by an ASCII editor, what can I do to save my String in binary format, like "FileWriter" class in Delphi?
(he said I can't serialize the object to disk)
The strange thing is that the FileOutputStream class documentation says it writes raw bytes of data. If they are raw bytes, how can I read them in notepad?
It's confusing to me... Is there any solution for what I need?
Thanks for your time and help.
Leo Hyppolito.Like I said - search around. Something simple is:public class XOR {
public static void main (String[] args) {
String s = "Hello";
s = flip (s);
System.out.println (s);
s = flip (s);
System.out.println (s);
private static String flip (String s) {
String flippedString = "";
for (int i = 0; i < s.length (); i ++) {
flippedString += flip (s.charAt (i));
return flippedString;
private static char flip (char c) {
return (char) (c ^ 0x5678);
}Kind regards,
Levi -
Subtracting Errors Binary Format
Im currently making an application that takes two numbers and subtracts them
Everything is going fine the only problem is that if I take two numbers, lets call them A and B and their subtraction C a error occurs.
For Example:
A = 5.99
B = 5.98
C = 0.009999 is the current result
I believe the error comes from the subtraction in binary format but how can i fix this binary error?I believe at least one, and probably all, of those articles describe multiple approaches for dealing with this issue.
If you had read my previous comment or even part of any one of the articles, you would know that no, it is not possible to get float or double to exactly represent every possible real number.
Try this excercise. Imagine a base-2 decimal number system that's just like the base-10 system we're familiar with.
100.0 = 4
10.0 = 2
1. 0 = 1
0.1 = 1/2
0.01 = 1/4
0.001 = 1/8
etc.
Now, write a fractional number with that system that is exactly 1/10 in a finite number of bits. Notice how it is impossible, just as it is impossible to represent 1/3 exactly in a finite number of digits base-10.
Now, read the articles, and decide which approach is best suited to your needs.
Edited by: jverd on Oct 27, 2008 1:14 PM -
Read DMS document in binary format
Hi,
I have a requirement to read DMS document in binary format into internal table.
and i want to print the data in internal table through SAP spool.
Please let me know how to handle this requirement.
Thanks
SriniHi,
Check scms pakage, FG - SCMS_CONV for conversions..
Regards
Surjit -
Create a Document in DMS and attach a file coming in binary format
Hi to all,
I have to create a new document in DMS (trx: CV01N) with an attachment but this attachment is a pdf file in binary format. Can I use bapi "BAPI_DOCUMENT_CREATE2"? It support binary files in input or I have to convert files in someway? Or I have to use another BAPI?
I'm using an r/3 4.6c and I know that it is a big limit.
Please, I need help.
Thank you very much in advance,
EnricoThat assumes two things:
1. That Apple would have let Microsoft have access to its file format.
2. That Microsoft would want to spend the time and trouble to write filters for file formats that Apple can't be bothered doing for its own software.
Peter -
Problems emailing any other file format other than a .jpg
I am having problems emailing any other file format other than a .jpg in mac Mail in Leopard. Is anyone else having this problem?
I have tried PDF, .tif and .doc documents, and they are small files, less than 150 kb. I have checked to ownership on the images and it says that I can read and write to them. I have also checked with my ISP and my mailbox capacity is 10 MB and was recently emptied. I am able to log into my ISP's webmail portal and send these types of attachments through there successfully, which has made me convinced that it has to do with Leopard or Mac Mail because I did not have these problems in Tiger.
When I send a message like this, Mail says, "Sending" for a while, and then says "Cannot send message using server:(Name of my server) Sending the message content to the server failed. Select a different outgoing mail server."I've been sending .doc files with/without also .jpg as attachments without problems so it is possibly not a Leopard problem. I know this doesn't solve your problem though. Someone else may be able to solve the problem.
-
How to read a file containing bitmap message in binary format
Dear all,
Can anybody tell me how to read bitmap message which stored data in binary format? The messages are stores like this :
A file contain some messages along with these bitmaps in square zeroes.
I want to again convert it into ASCII.Double post: http://forum.java.sun.com/thread.jspa?threadID=587497
-
How to convert image to binary format
Hi all,
We have developed an Employee search mobile web application in .net which is hosted on an exposed IP server, we need to show the employee data along with the image of the employee on mobile.
When we run this application through our desktop we are able to see the image of the employee since we are doing this through <b>intranet</b> , but when we try to access the same from any mobile device we are able to see only the data but no image, since we are doing this through <b>internet(exposed server).</b>
Please suggest some way to get this image,
is there any<b> function module in ABAP</b> which can <b>convert image to binary format</b>
so that we <b>export binary data</b> to .net applicationHei evryone!
CAn anyone pls help me on how to solve this error:
java.security.AccessControlException: access denied (java.security.SecurityPermission insertProvider.SunJCE)
at java.security.AccessControlContext.checkPermission(Unknown Source)
at java.security.AccessController.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkPermission(Unknown Source)
at java.lang.SecurityManager.checkSecurityAccess(Unknown Source)
at sun.plugin.security.ActivatorSecurityManager.checkSecurityAccess(Unknown Source)
at java.security.Security.check(Unknown Source)
at java.security.Security.insertProviderAt(Unknown Source)
at java.security.Security.addProvider(Unknown Source)
at CryptoTest.processFile(SwingApplet.java:68)
at CryptoTest.<init>(SwingApplet.java:65)
at SwingApplet.init(SwingApplet.java:39)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Is it allright for a swing code to access local resources? like in my case i want my swing app to decrypt and encrypt an image file but when i tried to access the method for decrypting and encrypting i got this error message on my console. Do i have to make my code signed before i could write/read a file on my hard drive?
Any help / suggestions would be much appreciated.Thanks! -
LabVIEW binary format that can be opened with Python
I need to save data in a binary format which can be opened with Python. I have tried the "Write Waveforms to File (1D).vi" and can open them back up in LabView, but the binary format is not published anywhere, so I cannot open them in Python. They appear to be saving as DataLog type binary files.
Is there another binary format which I can use that I can open in Python?
The reason I need this is that with 16-channel DAQ at 20kHz I can only save about 30 seconds of data. For longer periods, the task of writing to a text file consumes all available memory and cpu.I found a solution. I found an open-source project called pyTDMS (google for it), and it can read tdms type files sometimes. It was some trial and error to get my data saved in a way that pyTDMS could open the file, but in the end it works great.
I have two digital output channels as well as 16 analog input channels, so here is how I had to save the data within LabView:
The 16 analog input channels were saved as a 1D array of waveforms. Then the digital output channels were made into another 1D array of waveforms. The trick was to use the write tdms subvi twice. Once for the analog input channels and again, on the same file, for the digital output channels. pyTDMS opens these files just fine, and I can use the metadata to sort out what channels the data goes with in Python. -
Data Acqusition and recording in Binary Format
Hi
Can anyone tell me how to perform buffered Data acquisition and write
it in Binary format.
I want to record data when it is streaming that is i would like to
record data on a real time basis.
I have started acquiring data and also graphed it, But it is not a
buffered acquisition, Can i record this data in the binary format??
SrikanthHi,
Labview has an example that does exactly what you are asking for:
Cont Acq to File (binary).vi
You'll find it in:
\examples\daq\anlogin\strmdisk.llb
Good luck,
Alberto
Maybe you are looking for
-
How can i organize a huge number of events?
I just began with mac and iphoto. I imported a lot of photos from windows (google picasa) in iphoto (>17000). Now I have a huge number of events, which i would like to sort by e.g. years and months. Within the years and months, the events should be p
-
Problems with FIOS and certain programs
when i try to use LIMEWIRE or a TORRENT program such as utorrent...the router will shut itself down n restart, ive tried portforwarding to no availe, it will happen on all my computers 1 lap top is running windows 7 and 1 desk top is running windows
-
When I install Windows 8 on my MacBook Pro(13-inch,Early2011),the Super DVD Drive doesn't appear in Windows 8 and installing Boot Camp 5 drivers doesn't solve my problem,what can I do?
-
hi
-
MAC OS X 10.5.5 ilife 08 auch mit aktuellen Update. Ich erhalte folgende Fehlermeldung: "Sie können diese Version des Programms "iMovie.app" nicht mit dieser Version von Mac OS X verwenden." Bei Microsoft habe ich mich ja schon an derart blöde Fehler