Merging data on a File created by Open Dataset
Hi everyone
I have 11 proxies writing on a FIle created by an Open Dataset (all of the proxies write on the same File).
My customer sent massive messages to those proxies, when the proxies were running and writing on the file they merged the data.
Can someone give me some light on how to prevent that merge without locking the file, cause if I lock the file the process is going to take too much time.
Thanks in advanced
Emmanuel
why dont u have filename_proxyname
each proxie will have diff names so they will not merge?
Similar Messages
-
Does we need to Create a file Before using Open dataSet
Hi Guys,
Can any body tell me whether we have to create a File before using Open dataset for writing files in Application Server.
Can anybody write a program for EKPO table to store it in application Server using OpendatasSet ?Is there any specific care we have to take for Executing pgm in Background?
I wrote the pgm for Foreground using GUI- Download.
PGM.
select * into table it_ekpo from ekpo .
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
filename ='c:\EKPO.xls'
filetype = 'ASC'
WRITE_FIELD_SEPARATOR = 'X'
TABLES
data_tab = it_ekpo
*fieldnames = l_heading
EXCEPTIONS
file_write_error = 1
no_batch = 2
gui_refuse_filetransfer = 3 .
Plzzzzzzzzz Make the changes for existing Pgm.any help is awarded with points.Its Urgent.
Thanks,
Gopi.Hi Guys,
Thanks for ur immediate response.I am sending the code just confirm me whether is correct r not?
DATA : wa_EKPO_file TYPE file_table-filename.
select * into table it_ekpo from ekpo .
OPEN DATASET wa_EKPO_file FOR OUTPUT "Write to appl. server
IN TEXT MODE
ENCODING DEFAULT. "Open dataset Return code
IF sy-subrc = 0.
LOOP at IT_EKPO into WA_EKPO.
TRANSFER wa_ekpo to wa_ekpo_file.
ENDLOOP.
ENDIF.
I want write the data into SPREAD Sheet .Can u guys tell me how to write into Spread Sheet using Open data Set.
Thanks,
Gopi. -
Dump file created during opening the CFL
Hi,
I am facing a problem in SAP8.8. When i am opening a CFL of Business Partner then .dmp file is created. The file location is
C:\Documents and Settings\BODHISATYA\Local Settings\Application Data\SAP\SAP Business One
Can anybody help me why this problem occur?Hello
Sometimes, when a user settings (customized settings of a form) is contains a field, which is deleted from SAP B1, the application dumps. This happens only in one company database.
Could you try it from the sap b1 application
- another user in the same company db (i think it must dump also)
- a different company database
Come back with the results.
it s a test or a productive database?
Regards
János -
How to get creation date of a file created in application server?
Dear experts ,
I have some txt files in a particular path in application server .Suppose path is - \\PMICHSAPLA30\INTERFACE\\BCD\CO\OTC\SALES_RPT\test.txt.
I want to fetch the creation date of this txt file - test.txt . I tried with fm - ADS2KIPUPL_GET_FILE_ATTRIBUTES , but this will give proper out put.
I need to get file creation date. If today I am creating file - abc.txt, so according to this file I should get today's date as creation date.
Please suggest me.BEGIN OF ty_file,
line(400) TYPE c, "File names
END OF ty_file,
This is the structure declaration.
l_v_unixcom would be ls -l \\PMICHSAPLA30\INTERFACE\\BCD\CO\OTC\SALES_RPT\test.txt
now call
CALL 'SYSTEM' ID 'COMMAND' FIELD l_v_unixcom
ID 'TAB' FIELD i_file[].
and see contents of i_file[] it should have the details, post results so we can help further -
PDF file created but opens with 148% zoom
I created a pdf document in illustrator cs3 but it opens with 148% zoom in reader 8.
How can I change this in to 100% or even 75 % zoom when it opens.
I want to use it but when someone opens it res. is lousyIf you don't have Acrobat, you cannot change the way the file opens. There does not appear to be a way to do this when you save as a pdf.
-
Missing data in SWF files created with Batch Utility SP1
Hi All and happy new year !
I have a problem using Xcelsius 2008 batch Utility SP1. On the new SWF file, some of my data are missing. I used a grid component to identify the problem and there are no data where it should have some.
Is there a table size or data range limit?
Or another solution for my problem?
Regards,
E. OLIMEProbably, this Note will be useful: 1394826 - Xcelsius Batch Utility: Data can not be changed when the original data cell is blank
-
Open zip file with the OPEN DATASET statement.
How?
The zip file is a text file compressed.
Thanks for answers.in application server no ZIP files exist...as such flat files exist which can be read using DATASET concept.
-
Download file using open dataset
Hi all,
I download a .CSV file to sap server using open dataset. I have a column which stores a number with length upto 30 char. I get the output in this format '2.34234E+25' for '23423423423423400000000000' in that particular column.
Please send your suggestions to solve this issue.
Rajesh.Do you want to use the csv file in Excel or in another application.
If you display the CSV file created by open dataset using Notepad, you will probably see the 30 digit number. This is fine for many applications, but not Excel!
Excel cannot store a 30 digit number internally. Try entering a 30 digit number into an Excel cell and see what happens - it is converted to scientific format with only 14 decimal places.
If you need to see the number in Excel, you need to have it displayed as Text and not a number. There are a few options:
1. Put a character at the start of the field
2. Don't use CSV, but use OLE to start Excel and put the data in the cell with text format (complicated I know).
3. Save as a file with a .txt extension, open in Excel, and in the Text import wizard (step 3) specify that the column data format is Text
Michael -
Create an Excel File Using OPEN DATASET Command
Hey, everyone.
How can I create an Excel file by using OPEN DATASET command ??
The file is created but the columns are no seperated like thay should.
I need to seperate the internal table's fields with a comma - How can I do it ?
Here's my code:
OPEN DATASET filename1 FOR OUTPUT IN TEXT MODE.
IF SY-SUBRC = 0.
LOOP AT gt_vend_info into gwa_vend_info.
TRANSFER gwa_vend_info TO filename1.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
Thanks in advance.Hi Beki,
REPORT ZTESTAA.
TYPE-POOLS:TRUXS.
DATA: BEGIN OF ITAB OCCURS 0,
VBELN LIKE VBAP-VBELN,
POSNR LIKE VBAP-POSNR,
END OF ITAB.
DATA:
ITAB1 TYPE TRUXS_T_TEXT_DATA.
SELECT VBELN
POSNR
UP TO 10 ROWS
FROM VBAP
INTO TABLE ITAB.
CALL FUNCTION 'SAP_CONVERT_TO_CSV_FORMAT'
EXPORTING
I_FIELD_SEPERATOR = ';'
TABLES
I_TAB_SAP_DATA = ITAB
CHANGING
I_TAB_CONVERTED_DATA = ITAB1
EXCEPTIONS
CONVERSION_FAILED = 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.
OPEN DATASET filename1 FOR OUTPUT IN TEXT MODE.
IF SY-SUBRC = 0.
LOOP AT gt_vend_info into gwa_vend_info.
TRANSFER gwa_vend_info TO filename1.
IF SY-SUBRC <> 0.
EXIT.
ENDIF.
ENDLOOP.
ENDIF.
the above code give CSV format file, all fields will be separated by ';'
Regards
vijay -
Hi,
I have read this weblog
/people/patrick.baer/blog/2005/02/24/abap-serialization--part-i-quick-n-easy and tried to serialize ABAP data into XML format.
In fact, I have copied the exact code from this weblog, but somehow this file is not visible in my pc.
DATA example_data TYPE spfli.
select single * from spfli into example_data.
DATA xml_utils TYPE REF TO if_ixml.
xml_utils = cl_ixml=>create( ).
DATA xml_stream_factory TYPE REF TO if_ixml_stream_factory.
xml_stream_factory = xml_utils->create_stream_factory( ).
DATA xml_output_stream TYPE REF TO if_ixml_ostream.
xml_output_stream = xml_stream_factory->create_ostream_uri( system_id =
'file://c:test.xml' ).
try.
CALL TRANSFORMATION id
SOURCE data_node = example_data
RESULT XML xml_output_stream.
catch cx_sy_conversion_base64 CX_SY_CONV_ILLEGAL_DATE_TIME.
write 'there is an exception'.
endtry.
This part of the code, I have also changed to :
xml_stream_factory->create_ostream_uri( system_id =
'file://test.xml' ).
and still the file is not visible.
I presume three reasons:
a) Looking in the wrong place
b) Some configuration, I am not doing properly
c) Something else has to be done, to write a file to system
Any help on this regard, is highly appreciated.
Next issue being, how robust is the approach of serializing ABAP data into XML format, so that a third party system can pick up this data and do a comparison ?
Some parameters that I am looking for in this regards are:
a) Error Validation (can XML data be incorrectly written into a file/while transmitting this data some errors can creep in. If so, how do I rectify it. As far as I know, this data can only be written to Presentation Server or using FTP ,transported to required destination. Is there any other approach ? )
b) Security
Would be great if you could drop some hints for the above procedure.
Regards,
Subramanian V.I think you are perhaps overestimating the capabilities of the osteam object. If you want to write the XML to a file the easiest thing to do is render it an ostream_itable (internal ABAP table). Then you can download it your PC with the GUI_DOWNLOAD function:
parameter: ifile type file_table-filename obligatory
default 'c:issue.xml'.
****Temp File name for function module call.
data: ifilename type string.
move ifile to ifilename.
create object issue
exporting
id = id
create_mode = abap_false.
data: g_ixml type ref to if_ixml,
g_stream_factory type ref to if_ixml_stream_factory,
xslt_err type ref to cx_xslt_exception,
g_encoding type ref to if_ixml_encoding,
ostream type ref to if_ixml_ostream.
constants: line_length type i value 4096.
types: line_t(line_length) type x,
table_t type standard table of line_t.
data: restab type table_t.
constants:
* encoding for download of XML files
encoding type string value 'utf-8'.
data: ressize type i.
try.
g_ixml = cl_ixml=>create( ).
g_stream_factory = g_ixml->create_stream_factory( ).
g_encoding = g_ixml->create_encoding( character_set = encoding
byte_order = 0 ).
refresh restab.
ostream =
g_stream_factory->create_ostream_itable( table = restab ).
ostream->set_encoding( encoding = g_encoding ).
call transformation id_indent
source asap_issue = issue
result xml restab
options
data_refs = 'embedded'.
ressize = ostream->get_num_written_raw( ).
catch cx_xslt_exception into xslt_err.
data: s type string.
s = xslt_err->get_text( ).
endtry.
call function 'GUI_DOWNLOAD'
exporting
bin_filesize = ressize
filename = ifilename
filetype = 'BIN'
tables
data_tab = restab
exceptions
others = 1.
call method cl_gui_frontend_services=>execute
exporting
document = ifilename
* APPLICATION =
* PARAMETER =
* DEFAULT_DIRECTORY =
* MAXIMIZED =
* MINIMIZED =
* SYNCHRONOUS =
exceptions
cntl_error = 1
error_no_gui = 2
bad_parameter = 3
file_not_found = 4
path_not_found = 5
file_extension_unknown = 6
error_execute_failed = 7
others = 8.
As far as a different system, once you have the data serialized into a string or internal table you have lots of possibilites. If the other system is an SAP system you could send the data via RFC. You could always write the XML string to the server file system (via open dataset, transfer to dataset). You can then FTP the file (using built in SAP FTP functionality) just about anywhere.
What are you looking for as far as robust and secure. The XML serializer is built in the ABAP Kernel and quite robust. As far as secure- the data isn't secure at all. The data is written into a simple string (if written into the file system or your pc - it is a text or binary file that can easily be read by just about anything). Serializing to XML in and of itself isn't going to provide any security. -
I am using the PDF online converter and had no problems with it only a few days ago, but now I get an e-mail sent to me with an error message that says the following:
"While processing your job 491DC3BA-6868-08A14D (C:\Users\Public\Advertising documents (pub and pdf's)\Langley advance Ads 2008\ad for surry paper november 2008 color.pub), the converter encountered the following error situation:
Document processing discontinued : Publisher application failed to open the document and exited
Please try to resubmit your job if indicated in the above message.
We apologize for the inconvenience.
The Create Adobe PDF Online Team"
I use this service quite alot and don't have any other way of converting a file to PDF. I have tried in thepast to download an extension that would allow me to do it without the online converter, but it is'nt supported in Vista.
Help!
Mina Lee ThomasHi Mina Lee Thomas
The Online PDF Converter is a busy line, which often has a long waiting que. Error can happen in a busy line.
I suggest you use following Freeware PDF Converters.
1] Cute PDF Writer 2.6 that comes along with ghostscript Converter.
This is fast, requring no adjustments and converts many pages text
files, PPT flles easily without any errors. It is user friendly.
2] PDF Tools.
This has multifunctions.Encrypt, Decrypt, Merge, Split, Reaarange
PDF files, Create PDF, Stamp utilities. This is also very useful
freeware.
Please download these two Freeware from website. you do not have to depend on external sources.
Regards and best wishes
Dinkar
Freelance Service Provider
[email protected] -
HUGE amount of data in flat file every day to external system
Hello,
i have to develop several programs to export all tables data in a flat file for external system ( EG. WEB).
I have some worries like if is possible by SAP export all KNA1 data that contains a lot of data in a flat file using the extraction:
SELECT * FROM KNA1 ITO TABLE TB_KNA1.
I need some advices about these kind of huge extractions.
I also have to extract from some tables, only the data changes, new record, and deleted records; to do this I thought of developing a program that every day extract all data from MARA and save the extraction in a custom table like MARA; the next day when the programs runs compare all data of the new extraction with the old extraction in the ZMARA table to understand the datachanges, new records or deleted record.. It's a righ approach? Can have problems with performance? Do you now other methods?
Thanks a lot!
Byeyou should not have a problem with this simple approach, transferring each row to the output file rather than reading all data into an internal table first:
open dataset <file> ...
select * from kna1 into wa_kna1
transfer wa_kna1 to <file>
endselect
close dataset <file>
Thomas -
PDF Files with bookmarks open in iPad iBooks without the bookmarks.
PDF Files created with Adobe Acrobat or other PDF file creating software open in iPad iBooks with the Bookmarks. How do you access those.
since iBooks doesn't have an "Open In" button or feature, how do I access PDF's in iBooks with Adobe Reader?
-
Open dataset fails...says "error opening input file"
Hi,
I am trying to open a file in my BDC program and get the following error "error opening input file". Its a text file with continuous data. No delimiters and hence character count will be used to parse the data.
I am using the following statement to open it..
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
but sy-subrc is set to 8 !!
what could be the problem ??
thanksThis is pretty confusing !!I would explain to you my exact issue !!
I have a program in which there is no GUI_UPLOAD call but just a direct open dataset statement !!
This program runs fine for my collegue who has the file in a server (not the application server). She gives the full path name as
servername\foldername\filename.
I tried doing the same but as I did not have access to that server, it failed. So I received that file from her and stored it in my local system. So on program execution, i gave the path as c:\filename and I got the error message "Error opening the file"
Find below some code extracts..
PARAMETERS : p_sname TYPE d0100_mapn ,
p_file(136) TYPE c ,
FORM open_file .
*open file in textmode
OPEN DATASET p_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
IF sy-subrc = 0.
DO.
Read the file data and tranfer to workarea to internal table
READ DATASET p_file INTO x_legacy_rec.
Please help in debugging this issue !!
thanks -
Reading Data from Unix file and write into an Internal table
Dear all,
I am having an requirement of reading data from unix file and write the same into an internal table..how to do that ...experts please help me in this regard.Hi,
do like this
PARAMETERS: p_unix LIKE rlgrap-filename OBLIGATORY.
DATA: v_buffer(2047) TYPE c.
DATA: BEGIN OF i_buffer OCCURS 0,
line(2047) TYPE c,
END OF i_buffer.
* Open the unix file..
OPEN DATASET p_unix FOR INPUT IN TEXT MODE.
<b>IF sy-subrc NE 0.
*** Error Message "Unable to open file.
ELSE.</b>
DO.
CLEAR: v_buffer.
READ DATASET p_unix INTO v_buffer.
IF sy-subrc NE 0.
EXIT.
ENDIF.
MOVE v_buffer TO i_buffer.
APPEND i_buffer.
ENDDO.
ENDIF.
CLOSE DATASET p_unix.
<b>Reward points if it helps,</b>
Satish
Maybe you are looking for
-
I am having real problems with wifi on my ipad it was fine but for the last week or so wont connect! my laptop and iphone are connecting fine, I have tried everything! back up and restore from back up and still no joy so I am thinking of restoring th
-
Wait event "virtual circuit wait" in wait class "Network" was consuming sig
Hello, We are facing this problem when there are 2 queries try to run at the same time. The first query takes longer to finish so 2nd has to wait for 1st to be finished and then only 2nd starts. It seems the jam is at netowork instead of server. I wa
-
PO print (print immediately)
Hi, what happens if i do not check the print immediately checkbox in PO messages? how can i later print this PO??
-
Access Connections icon in taskbar
Can someone tell me how to retrieve my wireless icon signal bar in the taskbar. I think I turned off access connections being shown in the taskbar and cannot find how to turn it back on....help!
-
Retrieving Database Name in PL/SQL
I want to declare a variable whose value needs to be set to the database name. I don't want to pass it in as a parameter as it's an anonymous block in a unix script. Is there anyway other than assigning the variable "select * from global_name" within