Text File generate in Server Side
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,FILE);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,'C:\JUNAID.TXT');
i can run character mode report in client side
but c:\junaid.txt file generate it server side
do you have any idea for file generate to client side?
but sir problem is that 150 complex report
generate in report builder
it is not possible to convert this report to webutil.
problem is that
i have used developer 2.1 & used character mode report for dotmatrix printer
i want to switch 10g ids all compilation method complete but problem is that
character mode report not print in client side.
i want to use character mode report for dotmatrix printer support for speedy printing purpose do u have any idea .
plz as soon as possible reply
Similar Messages
-
Sending EMail "Text-File" from Application Server!
Hi Experts,
how can I sending a Text-File from Application Server via Email?
Is there existing a Function Modul?
With Kind regards
Ersin
Moderator message: sending emails = FAQ, please search before posting.
Edited by: Thomas Zloch on Nov 25, 2010 4:23 PMSTF (Search the forum)! This type of question has been asked...and answered....many times.
-
How to download a text file from the server
hi everyone,
can anyone tell me how to download and read a text file from the server and saved in into resource folder.
with regards
pallaviits really easy
To read from server, use something like:
HttpConnection connector = null;
InputStream inp_stream = null;
OutputStream out_stream = null;
void CloseConnection()
if(inp_stream!=null)inp_stream.close();
inp_stream=null;
if(out_stream!=null)out_stream.close();
out_stream=null;
connector.close();
connector = null;
public void getResponse(String URL,String params)
try
if(connector==null)connector = (HttpConnection)Connector.open(URL);//URL of your text file / php script
connector.setRequestMethod(HttpConnection.POST);
connector.setRequestProperty("User-Agent","Profile/MIDP-2.0 Configuration/CLDC-1.1");
connector.setRequestProperty("content-type", "application/x-www-form-urlencoded");
//connector.setRequestProperty("charset","windows-1251");
//*** If you need to send ("arg1=value&arg2=value") arguments to script use this:
out_stream = connector.openOutputStream();
byte postmsg[] = params.getBytes();
out_stream.write(postmsg);
int rc = connector.getResponseCode();//in any case here connection will be opened & closed
if (rc != HttpConnection.HTTP_OK)
CloseConnection();
throw new IOException("HTTP response code: " + rc);
inp_stream = connector.openInputStream();
int pack_len = inp_stream.available();
byte answ[]=new byte[pack_len];
inp_stream.read(answ);
CloseConnection();
ProcAnswer(answ);//process received data
catch(Exception ex)
System.err.println("ERROR IN getResponse(): "+ex);
} And you can read from resource file like
public void loadFile(String filename)
DataInputStream dis = new DataInputStream(getClass().getResourceAsStream("/"+filename));
String str="";
try
while (true)
ch = dis.read();//read character
if(ch=='\r')continue;//if file made in windows
if(ch=='\n' || ch==-1)//end of line or end of file
if(str.length()==0)continue;//if empty line
//do some thing with "str"
if(ch==-1)break;//it was last line
str="";//next line
continue;
str+=(char)ch;
dis.close();
catch (Exception e)
System.err.println("ERROR in loadFile() " + e);
}Welcome! =)
Edited by: MorskoyZmey on Aug 14, 2008 3:40 AM -
How to Save a text file in the server?
hello
i just want to save an text file in the server.
My idea is to load an xml text file maybe make some changes
and then save it back to the server, so i can avoid all the
database/php work because i know nothing about it.
thank youhello
i just want to save an text file in the server.
My idea is to load an xml text file maybe make some changes
and then save it back to the server, so i can avoid all the
database/php work because i know nothing about it.
thank you -
Error in Downloading the Text file on Application Server
Hi All,
I am working on ECC6.0. I have written a program in whcih I am downloading the text file on
application server in UTF-8 format. However when I am opening this file in Excel I am getting
garbage value for some characters(as Excel does not support UTF-8 format). So now I
want to download the data on application server in text file in non unicode format(Like ANSI or
other non unicode format) which is supported by excel. When I am writing the code as
OPEN DATASET DN_FILE FOR OUTPUT IN LEGACY TEXT MODE it is giving me dump saying
CHARACTER CONVERSION FROM CODE PAGE '4102' to CODEPAGE '1100' NOT POSSIBLE.
Same in case if I add the code OPEN DATASET DN_FILE FOR OUTPUT IN LEGACY TEXT
MODE CODE PAGE '8000' is also giving dump.
So please let me know how can I download the file in non unicode format ?
Any help would be greatly appricated.
Thanks & Regards
Jitendra Gujarathi.OPEN DATASET l_filename FOR INPUT IN TEXT MODE ENCODING NON-UNICODE IGNORING CONVERSION ERRORS.
CHECK sy-subrc EQ 0.
DO.
CLEAR wa_file_content.
READ DATASET l_filename INTO wa_file_content.
IF sy-subrc EQ 0.
APPEND wa_file_content TO it_file_content.
ELSE.
EXIT.
ENDIF.
ENDDO.
CLOSE DATASET l_filename.
t_filedata[] = it_file_content[].
can you use like this. -
Problem with saving data in text file in Application server
Hello Experts,
I am trying to save a text file in application server.When I text file have less that 60000 (i.e 59999) records, it saves the file successfully, but if records in text file (saved in application server) is more than 60000 (i.e 60002), it creates a new file at the 60000th record with the continued records.
Can anyone please advise, why it is creating a new file if records are more that 60000. I tested it with 59000 records in my internal table and it is working fine. I have not given any restriction in my program to create a new file if records are more than 60000.
The logic I implemented is the following:
*Open file
open dataset g_accnt_file for output in text mode encoding utf-8.
if sy-subrc = 0.
clear g_header_record.
*Building header record for Accounting Validation file
concatenate gc_hdr_desc
gc_filetype
gc_sequence
gc_idntf_refresh
gc_cmpny_idntf
gc_accnt_id
sy-datum
sy-uzeit
gc_linde_group
sy-sysid
gc_not_used into g_header_record separated by
gc_deliminator.
transfer g_header_record to g_accnt_file.
*Move Cost center data to file to create a detail record for Accounting
*Validation file
loop at gt_csks into gs_csks.
*Remove leading Zeros
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = gs_csks-kostl
importing
output = gs_csks-kostl.
* Overlay gs_csks-kostl with space.
* SHIFT gs_csks-kostl RIGHT DELETING TRAILING gc_space.
*Prepare Cost Centre String
perform prepare_costcentre_string.
*Prepare detail record with Company Code & Cost Centre
perform prepare_detail_record.
clear:g_detail_record,gs_csks,g_coa.
endloop.
*Move Order data to file to create a detail record for Accounting
*Validation file
loop at gt_aufk into gs_aufk.
*Remove leading Zeros
call function 'CONVERSION_EXIT_ALPHA_OUTPUT'
exporting
input = gs_aufk-aufnr
importing
output = gs_aufk-aufnr.
* SHIFT gs_aufk-aufnr RIGHT DELETING TRAILING gc_space.
*Prepare Order String
perform prepare_order_string.
*Prepare detail record with Company Code & Order
perform prepare_detail_record.
clear:g_detail_record,gs_aufk,g_coa.
endloop.
*Move WBS data to file to create a detail record for Accounting
*Validation file
loop at gt_prps into gs_prps.
call function 'CONVERSION_EXIT_ABPSP_OUTPUT'
exporting
input = gs_prps-pspnr
importing
output = g_wbs_element.
* SHIFT g_wbs_element RIGHT DELETING TRAILING gc_space.
*Prepare WBS Element String
perform prepare_wbs_string.
*Prepare detail record with Company Code & WBS Element
perform prepare_detail_record.
clear:g_detail_record,gs_prps,g_coa.
endloop.
*Building trailer record for Accounting Validation file which will
*contain the total number of detail records in file
concatenate gc_trail_desc
g_total_count
into g_trailer_record
separated by gc_deliminator.
transfer g_trailer_record to g_accnt_file.
*Close file
close dataset g_accnt_file.
if sy-subrc = 0.
message s036(/lig/fi).
endif.
endif.
endform. " SELECT_DATA
Edited by: Matt on Sep 30, 2010 11:02 AM - added tagsHi Pankaj,
Can u check the concatenate statement with one more data. Check the no of lines for a single file.
concatenate gc_hdr_desc
gc_filetype
gc_sequence
gc_idntf_refresh
gc_cmpny_idntf
gc_accnt_id
sy-datum
sy-uzeit
gc_linde_group
sy-sysid
sy-subrc
gc_not_used into g_header_record separated by
gc_deliminator.
Regards,
Amitava -
Download text file from application server to client server.
Hi all,
I am facing a format issue while downloading text file from application server to the client machine.
The issue is that, say I have 6 to 10 lines in my text file in application server. but when i store it on the hard drive,
it shoes all the data in a single line. Where as i need to download data in same format as in application server.
Awaiting for your responses.
Regards,
JoseHi,
If we want to upload file data from the application server to the internal table, there is no function module or class static method which we can use, we must wirte the code by ourselves.
1. For the file data which has no seperator between field columns.
PARAMETERS p_file TYPE dxfile-filename.
START-OF-SELECTION.
OPEN DATASET p_file IN TEXT MODE ENCODING DEFAULT FOR INPUT.
DO.
READ DATASET p_file INTO gds_data.
IF sy-subrc <> 0.
EXIT.
ENDIF.
APPEND gds_data TO gdt_data.
ENDDO.
CLOSE DATASET p_file.2. For the file data which has tab separator between field columns.
DATA: gds_field_split type gts_data.
FIELD-SYMBOLS: <fs_field> TYPE gts_data.
PARAMETERS p_file TYPE dxfile-filename.
START-OF-SELECTION.
OPEN DATASET prf_file IN TEXT MODE ENCODING DEFAULT FOR INPUT.
DO.
READ DATASET p_file INTO gds_field.
SPLIT gds_field AT cl_abap_char_utilities=>horizontal_tab
INTO TABLE gdt_field_split.
LOOP AT gdt_field_split into gds_field_split.
gdf_index = gdf_index + 1.
ASSIGN COMPONENT gdf_index OF STRUCTURE
gds_data to <fs_field>.
IF sy-subrc = 0.
<fs_field> = gds_field_split.
ENDIF.
ENDLOOP.
APPEND gds_data TO gdt_data.
ENDDO.
CLOSE DATASET p_file.
Thanks & regards,
ShreeMohan -
Placing the text file in application server
Hi all,
I am uploading the text file into application server.
the line length is 1028 characters.But in application server i am not able to see whole line.it is showing only some data and reamaining data is not coming.
Please let em know how can we increase the line length in application server.
Regards,
ShobanSE38 is the ABAP Editor transaction.
Use function module GUI_UPLOAD to create an upload the data.
*Use function module GUI_UPLOAD to create an upload the data.
Example Code >>>
REPORT zuploadtab .
PARAMETERS: p_infile LIKE rlgrap-filename
OBLIGATORY DEFAULT '/usr/sap/'..
*DATA: ld_file LIKE rlgrap-filename.
DATA: gd_file type string.
*Internal tabe to store upload data
TYPES: BEGIN OF t_record,
name1 LIKE pa0002-vorna,
name2 LIKE pa0002-name2,
age TYPE i,
END OF t_record.
DATA: it_record TYPE STANDARD TABLE OF t_record INITIAL SIZE 0,
wa_record TYPE t_record.
*Internal table to upload data into
DATA: BEGIN OF it_datatab OCCURS 0,
row(500) TYPE c,
END OF it_datatab.
*Text version of data table
TYPES: BEGIN OF t_uploadtxt,
name1(10) TYPE c,
name2(15) TYPE c,
age(5) TYPE c,
END OF t_uploadtxt.
DATA: wa_uploadtxt TYPE t_uploadtxt.
*String value to data in initially.
DATA: wa_string(255) TYPE c.
CONSTANTS: con_tab TYPE x VALUE '09'.
*If you have Unicode check active in program attributes then you will
*need to declare constants as follows:
*class cl_abap_char_utilities definition load.
*constants:
con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB.
*AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_INFILE.
AT SELECTION-SCREEN ON VALUE-REQUEST FOR P_infile.
CALL FUNCTION 'WS_FILENAME_GET'
EXPORTING
def_filename = p_infile
mask = ',*.txt.'
mode = 'O'
title = 'Upload File'(078)
IMPORTING
filename = p_infile
EXCEPTIONS
inv_winsys = 1
no_batch = 2
selection_cancel = 3
selection_error = 4
OTHERS = 5.
*START-OF-SELECTION
START-OF-SELECTION.
gd_file = p_infile.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gd_file
has_field_separator = 'X' "file is TAB delimited
TABLES
data_tab = it_record
EXCEPTIONS
file_open_error = 1
file_read_error = 2
no_batch = 3
gui_refuse_filetransfer = 4
invalid_type = 5
no_authority = 6
unknown_error = 7
bad_data_format = 8
header_not_allowed = 9
separator_not_allowed = 10
header_too_long = 11
unknown_dp_error = 12
access_denied = 13
dp_out_of_memory = 14
disk_full = 15
dp_timeout = 16
OTHERS = 17.
IF sy-subrc NE 0.
write: 'Error ', sy-subrc, 'returned from GUI_UPLOAD FM'.
skip.
endif.
Alternative method, where by you split fields at each TAB after you
have returned the data. No point unless you dont have access to
GUI_UPLOAD but just included for information
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = gd_file
filetype = 'ASC'
TABLES
data_tab = it_datatab "ITBL_IN_RECORD[]
EXCEPTIONS
file_open_error = 1
OTHERS = 2.
IF sy-subrc NE 0.
ELSE.
LOOP AT it_datatab.
CLEAR: wa_string, wa_uploadtxt.
wa_string = it_datatab.
SPLIT wa_string AT con_tab INTO wa_uploadtxt-name1
wa_uploadtxt-name2
wa_uploadtxt-age.
MOVE-CORRESPONDING wa_uploadtxt TO wa_record.
APPEND wa_record TO it_record.
ENDLOOP.
ENDIF.
*END-OF-SELECTION
END-OF-SELECTION.
*!! Text data is now contained within the internal table IT_RECORD
Display report data for illustration purposes
LOOP AT it_record INTO wa_record.
WRITE:/ sy-vline,
(10) wa_record-name1, sy-vline,
(10) wa_record-name2, sy-vline,
(10) wa_record-age, sy-vline.
ENDLOOP.
Edited by: Nikhil Jathar on Jan 9, 2008 7:38 AM -
Editing text file on application server
Hello,
I have created a utility in which I can move files from one folder to another. Now we also need a option by which I can edit text file on the server folders. Is there a function module by which I can edit text from application server ?
Regards,
Rajesh.With OPEN DATASET and READ you can load them into an internal table. Next put them on screen in lets say the text editor (enjoy SAP Controls). This is one way of doing this, other way would be:
Upload data with OPEN DATASET into internal table, download file to local drive (cl_gui_frontendservices=>gui_download), open it with notepad (for example) edit it and save. Next upload file into your program (cl_gui_frontendservices=>gui_upload) and download it to server again (OPEN DATASET and TRANSFER).
If available you can also use transaction CG3Z and CG3Y. -
I dw file.dwt (exact like this ext) files may insert server side code supposed all pages depended are in the same code eg cfml?
I'm sorry, but your English is pretty difficult for me to figure. I'm assuming your asking how to have a Dreameraver template support ColdFusion. It hat is what you are asking, the template file extension should be: YourTemplateName.dwt.cfm - this tells Dreamweaver is a ColdFusion template.
I hope I understood you and that this helps.
Lawrence Cramer - *Adobe Community Professional*
http://www.Cartweaver.com
Shopping Cart for Adobe Dreamweaver
available in PHP, ColdFusion, and ASP
Stay updated - http://blog.cartweaver.com -
Text file generator gets out of sync!
Has anyone any experience of this behaviour in the text file generator in Motion......
Basically the first entry in the list is only displayed for half the time of the other entries!
This means that any repeat keyframes that I apply (even if I apply from the second entry in) get out of sync with the text display.
There must be a workaround for this or maybe I am missing something and this is desired behaviour.
Can anyone help?When you mentioned keyframes, I thought we were on the same page as to where to go next. In the off chance I was mistaken, I'll go over the steps from the beginning.
When you use the File generator, Motion automatically evenly divides the time of the length of the generator by the number of lines of text and plays them accordingly. When you look in the Text Generator Inspector, the Speed is set for Constant... Motion figures out how many lines of text and inserts *fixed* keyframes. What you really want to do is set the Speed to Custom:
Immediately afterwards, you want to Reset the Custom Speed keyframes (Motion defaults from 0% - 100% over the length of the generator.) Clearing the default keyframes will keep you from having problems later.
Once you have the keyrames for the Custom Speed parameter cleared, you can move the playhead to the start of where you want the first line of text to appear and set an In Point for the generator. You will also want to mark the first keyframe so click on the yellow diamond to set it at 0%.
Next, play the project and at the point you want the *next* line to appear, move the Custom Speed slider enough until the next line *just appears* (the keyframe will automatically be set.) If you need more precision, you can widen the inspector column by clicking on the dividing line and dragging it right.
Continue doing the same until your finished setting the Custom Speed keyframes.
Then, right click on Custom Speed and Show In Keyframe Editor
Below shows the keyframes are linear. They need to be Constant. So, click on any keyframe in the Editor and Command-A to select all. Then right-click on any keyframe, and from the popup menu, select Interpolation > Constant.
This is what you're going for -- Custom Speed values that are flat until they change -- Each line will appear at precisely the point of the keyframe.
HTH -
How to check authorizations of a text file in windows server while accesing
hi,
I have to access a text file from windows server like windows NT/2003 in to SAP server through report program.
While accessing the file i have to check the authorization of that file access users of windows.And i have to read it into SAP report program.
Regards,
Shankar.hi,
Thanks for Immediate reply.
i have to check this at level of windows login details i.e user name and file acces permissions to login user. through abap coding i have to check it weather the windows login user having authorizations to access that file are not. If he is having authorization to access then that text file has to read in to ABAP report program and it has to be used in program. other wise it has to be raise an error message
if provide some example with code...it will be very help full to clear my problem.
Thanks & Regards,
Shankar.
Edited by: Shankar Reddy Chamala on Aug 26, 2008 8:55 AM -
Convert file format into UTF-8 while generating text file on FTP server
Hi Expert,
I have the requirement to generate text file store it in FTP server and file format should be in UTF-8.
ABAP Development is completed but text file format generate in ANSI which not acceptable by client.For generating text file and store it on FTP server by using standard function module FTP_R3_TO_SERVER ,but in this function module there is no any parameter option like CODEPAGE for file format conversion. Is there any method or any function module to convert file format to UTF-8 and directly transfer or store it on FTP server.
<<removed_by_moderator>>
Thanks ,
Edited by: Vijay Babu Dudla on Jan 28, 2009 12:48 AMI have come across the same issue. Try calling the FTP_COMMAND function module to make it go into ASCII mode before your FTP the file, like this:
data: result type table of text with header line.
call function 'FTP_COMMAND'
exporting
handle = hdl
command = 'ascii'
tables
data = result
exceptions
tcpip_error = 1
command_error = 2
data_error = 3.
call function 'FTP_R3_TO_SERVER'
exporting
handle = hdl
fname = docid
character_mode = 'X'
tables
text = gt_your_table . -
Retrieve text file from ftp server every 15 mins
Hi guys,
We are able to connect to an FTP server with 5 text files. Every 15 minutes, we need to retrieve each of the 5 files. Please assist me with the coding logic to retrieve the file into the SAP Directory. Any suggestions would be greatly appreciated.
Regards,
SidSid
Try searching on SCN, there are plenty of materials you can find without even asking a question in the forum.
How to use SCN search
For example, if you search with keywords "FTP ABAP", immediately the first two Wiki entries would give you the details you are looking for.
Rgds
Eng Swee -
Downloading a text file from application server
Hi Freinds,
I am genarating a text file in our application server (Folder /usr/sap/dbi/) I need to download this text file in my destop pc or some other windows server.
What do I have to do? What is the procedure, Pls help.
If someone have sample code, pls send.
We are running SAP ECC5.0 on an iSeries (AS/400) Database DB2/400.
Regards
ThanuraHi,
try this:
REPORT ZGRO_TEST.
DATA: DATEI_A(30) TYPE C VALUE '/tmp/matnr.txt'.
DATA: DATEI_PC TYPE STRING VALUE 'C:\MATNR.TXT'.
DATA: ITAB TYPE TABLE OF MARA WITH HEADER LINE.
START-OF-SELECTION.
PERFORM DATEI_EINLESEN.
PERFORM DATEI_DOWNLOAD.
FORM DATEI_EINLESEN.
OPEN DATASET DATEI_A FOR INPUT IN TEXT MODE.
IF SY-SUBRC NE 0. STOP. ENDIF.
DO.
READ DATASET DATEI_A INTO ITAB.
IF SY-SUBRC <> 0. EXIT. ENDIF.
APPEND ITAB.
ENDDO.
CLOSE DATASET DATEI_A.
IF SY-SUBRC NE 0. STOP. ENDIF.
ENDFORM. "DATEI_EINLESEN
FORM DATEI_DOWNLOAD.
Datei downloaden
CALL METHOD CL_GUI_FRONTEND_SERVICES=>GUI_DOWNLOAD
EXPORTING
FILENAME = DATEI_PC
FILETYPE = 'ASC'
CHANGING
DATA_TAB = ITAB[]
EXCEPTIONS
FILE_WRITE_ERROR = 1
NO_BATCH = 2
GUI_REFUSE_FILETRANSFER = 3
INVALID_TYPE = 4
NO_AUTHORITY = 5
UNKNOWN_ERROR = 6
HEADER_NOT_ALLOWED = 7
SEPARATOR_NOT_ALLOWED = 8
FILESIZE_NOT_ALLOWED = 9
HEADER_TOO_LONG = 10
DP_ERROR_CREATE = 11
DP_ERROR_SEND = 12
DP_ERROR_WRITE = 13
UNKNOWN_DP_ERROR = 14
ACCESS_DENIED = 15
DP_OUT_OF_MEMORY = 16
DISK_FULL = 17
DP_TIMEOUT = 18
FILE_NOT_FOUND = 19
DATAPROVIDER_EXCEPTION = 20
CONTROL_FLUSH_ERROR = 21
NOT_SUPPORTED_BY_GUI = 22
ERROR_NO_GUI = 23
OTHERS = 24.
IF SY-SUBRC NE 0. STOP. ENDIF.
ENDFORM. "DATEI_DOWNLOAD
Regards, Dieter
Maybe you are looking for
-
WLS 9.2 with TIBCO ems integration doesnt seem to be working
Hi, I followed the steps provided by Tibco doc on how to integrate with WLS 8 and they worked fine with my app, the messages were getting in to the Tibco queues, but I didnt find any steps on how to integrate TIBCO with WLS 9.2. Still I man
-
Every email I have ever sent just showed up in my sent box. I can't delete them. What's up?
-
Web Dynpro Java Internationalization and backend ABAP function modules
Friends, I have a requirement where I want my Web Dynpro Java application to support BRAZIL and CHINESE. I have been through the sample programs and tutorials and I understand how to support my application in these 2 languages. The challenge I am fac
-
After upgrade to Win 8, the key's has changed
After upgrade to Win 8, the key's has changed, for example, when i am trying type @ but the key has changed as ". so please help me to rectify the problem.
-
Is there any othere slim iPhone 5 cases like the list http://etopmost.com/6-slim-iphone-5-cases-and-covers. I am looking for slim iPhone case and should not spoil the look .http://etopmost.com/6-slim-iphone-5-cases-and-covers Kim