Bookmarks with txt file
Dear all
I do a mobile app that reads text from txt file, please help me in how can i put bookmarks when reading the text file.
any suggestions wil be appreciated
Many thanks for all
primrose
Nobody's answering because your question is not at all clear.
Do you want to insert permanent bookmarks in the txt file that your MIDlet will recognize and list for the user to select?
or
Do you want your MIDlet to allow the user to save bookmarks to be able to get back to the same point later?
and
Does your MIDlet use one specific txt file or does the user choose the file to open (i.e. if you are saving bookmarks, are they to be file-specific)?
Explain your need in adequate detail, someone will respond.
And check out rms, you may find the answer for yourself.
All the best, Darryl
Similar Messages
-
Shell Script to send email with .txt file as attachment
Dear Al,
Could any one help me with code, for sending email with .txt file as attachment using shell script.
Thank You!978334 wrote:
Dear Al,
Could any one help me with code, for sending email with .txt file as attachment using shell script.
Thank You!http://bit.ly/XHfSCz
https://forums.oracle.com/forums/search.jspa?threadID=&q=sendmail&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
Help with .txt files importing / showing
I am working cs4. / as 3.0
I need some help understanding placing text with .txt files.
I have a txt & css file in my site folder.
Do I need to add a line to my script to locate the files in
my site folder?
Any help would be appreciated. thanks
Here is what I have so far.
var fileTxt:String;
var myTextLoader:URLLoader = new URLLoader();
var cssLoader:URLLoader = new URLLoader();
myTextLoader.addEventListener(Event.COMPLETE, onloaded);
myTextLoader.load(new URLRequest("textInfo.txt"));
function onLoaded(e:Event):void {
fileTxt=myTextLoader.data;
callCss();
function callCss():void {
var cssRequest:URLRequest=new URLRequest("stylesSite.css");
cssLoader.addEventListener(Event.COMPLETE, onCss);
cssLoader.load(cssRequest);
function onCss(e:Event):void {
var css:StyleSheet = new StyleSheet();
css.parseCSS(cssLoader.data);
infoText.styleSheet=css;
infoText.wordWrap=true;
infoText.htmlText=fileTxt;
infoScroll.update();Thanks for the information. Am I missing something or you forgot to actually post a question?
What are the problems you have? What have you tried and how did not it work?
Mike -
Email attachment with .txt file (first line blank in the file)
Hi all ,
Iam trying attach .txt file to email , the file that iam accessing from server . But first line blank (extra) even though i dont have blank line in original file .Can any help me out to resolve this issue?
<u>Example</u> original file
12345 aa pq
<u>Email attachment file</u>
-> This line
12345 aa pq
This is my code:
REPORT ZTEST_FILE .
DATA:BEGIN OF t_upload occurs 0,
matnr LIKE zwplcsmev-matnr,
zwgehrrg LIKE zwplcsmev-zwgehrrg,
zwgehrct LIKE zwplcsmev-zwgehrct,
zwgbev LIKE zwplcsmev-zwgbev,
zwpldt LIKE zwplcsmev-zwpldt,
zwacdt LIKE zwplcsmev-zwacdt,
END OF t_upload.
*DATA: maildata type sodocchgi1.
*DATA: mailtxt type table of solisti1 with header line.
*DATA: mailrec type table of somlrec90 with header line.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA:REC(80) TYPE C.
DATA g_mask(20) TYPE c VALUE ',., ..'.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA:P_ERROR(3).
DATA:P_REFO(3).
DATA: gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1.
selection-screen begin of block b1 with frame title text-001.
parameters:p_file type localfile.
parameter:p_email type ad_smtpadr.
selection-screen end of block b1.
--At Selection-Screen- -
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CALL FUNCTION 'TB_LIMIT_WS_FILENAME_GET'
EXPORTING
def_filename = p_file
mask = g_mask
mode = 'S'
title = 'INPUT FILE'
IMPORTING
filename = p_file
EXCEPTIONS
selection_cancel = 1
selection_error = 2
OTHERS = 3.
IF sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
START-OF-SELECTION.
PERFORM process_file.
if p_error = 'X' AND P_REFO <> 'X'.
PERFORM populate_message_body.
ENDIF.
IF P_REFO = 'X' AND P_ERROR <> 'X'.
it_message = 'Please find Attached file'.
APPEND it_message.
PERFORM send_attachment tables it_message
it_attach
using p_email
'Crest to Plc Data'
'TXT'
p_file
changing gd_error
gd_reciever.
ENDIF.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
END-OF-SELECTION.
*& Form process_file
text
FORM process_file.
*CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
DATA :l_path TYPE string.
l_path = p_file.
CONSTANTS: con_tab type c value cl_abap_char_utilities=>HORIZONTAL_TAB
con_cret type c value cl_abap_char_utilities=>newline.
OPEN DATASET P_FILE FOR INPUT IN TEXT MODE encoding default.
if sy-subrc = 0.
do.
read dataset p_file into IT_ATTACH.
IF SY-SUBRC NE 0 .
EXIT.
ELSE.
T_UPLOAD = IT_ATTACH.
CONCATENATE con_cret it_attach INTO it_attach .
append it_attach.
clear it_attach.
P_REFO = 'X'.
APPEND T_UPLOAD .
clear t_upload.
ENDIF.
ENDDO.
else.
p_error = 'X'.
ENDIF.
ENDFORM. "process_file
*& Form populate_message_body
text
FORM populate_message_body.
w_doc_data-obj_name = 'TEST'.
w_doc_data-obj_descr = 'Crest to Plc Data'.
w_doc_data-obj_langu = sy-langu.
it_message = 'File Not Found'.
APPEND it_message.
t_receivers-receiver = p_email.
t_receivers-rec_type = 'U'.
append t_receivers.
call function 'SO_NEW_DOCUMENT_SEND_API1'
exporting
document_data = w_doc_data
document_type = 'RAW'
put_in_outbox = 'X'
tables
object_header = it_message
object_content = it_message
receivers = t_receivers
exceptions
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
others = 8.
if sy-subrc = 0.
commit work.
SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
else.
MESSAGE s027(vv) WITH 'E-mail not sent'.
endif.
ENDFORM. "populate_message_body
*& Form send_attachment
text
FORM send_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
w_doc_data-doc_size = 1.
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
clear t_attachment.
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
if sy-subrc = 0.
commit work.
SUBMIT rsconn01 USING SELECTION-SET 'SAP&CONNECTINT' AND RETURN.
else.
MESSAGE s027(vv) WITH 'E-mail not sent'.
endif.
Populate error return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM. "send_attachmentJust copy the code below and execute . I just checked and found the exact values on attachment with no blank lines. This is more simple than the one u have written , just include ur data upload logic . For ITAB values to be attached i have written a simple logic to retrive from EKPO. Just copy this code and execute. u will understand then.
I understand that ur initial requirement was to attach the file directly and not to upload and attach. If u still want to go for the old requirement then check out the code(2nd program of the two that i have sent) that i have sent u on ur previous post.
REPORT ZEMAIL_ATTACH .
TABLES: ekko.
PARAMETERS: p_email TYPE somlreci1-receiver
DEFAULT '[email protected]'.
TYPES: BEGIN OF t_ekpo,
ebeln TYPE ekpo-ebeln,
ebelp TYPE ekpo-ebelp,
aedat TYPE ekpo-aedat,
matnr TYPE ekpo-matnr,
END OF t_ekpo.
DATA: it_ekpo TYPE STANDARD TABLE OF t_ekpo INITIAL SIZE 0,
wa_ekpo TYPE t_ekpo.
TYPES: BEGIN OF t_charekpo,
ebeln(10) TYPE c,
ebelp(5) TYPE c,
aedat(8) TYPE c,
matnr(18) TYPE c,
END OF t_charekpo.
DATA: wa_charekpo TYPE t_charekpo.
DATA: it_message TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: it_attach TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
DATA: t_packing_list LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE,
t_contents LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_receivers LIKE somlreci1 OCCURS 0 WITH HEADER LINE,
t_attachment LIKE solisti1 OCCURS 0 WITH HEADER LINE,
t_object_header LIKE solisti1 OCCURS 0 WITH HEADER LINE,
w_cnt TYPE i,
w_sent_all(1) TYPE c,
w_doc_data LIKE sodocchgi1,
gd_error TYPE sy-subrc,
gd_reciever TYPE sy-subrc.
*START_OF_SELECTION
START-OF-SELECTION.
Retrieve sample data from table ekpo
PERFORM data_retrieval.
Populate table with detaisl to be entered into .xls file
PERFORM build_TXT_data_table.
*END-OF-SELECTION
END-OF-SELECTION.
Populate message body text
perform populate_email_message_body.
Send file by email as .TXT speadsheet
PERFORM send_file_as_email_attachment
tables it_message
it_attach
using p_email
'Example .TXT documnet attachment'
'TXT'
'filename'
changing gd_error
gd_reciever.
Instructs mail send program for SAPCONNECT to send email(rsconn01)
PERFORM initiate_mail_execute_program.
*& Form DATA_RETRIEVAL
Retrieve data form EKPO table and populate itab it_ekko
FORM data_retrieval.
SELECT ebeln ebelp aedat matnr
UP TO 10 ROWS
FROM ekpo
INTO TABLE it_ekpo.
ENDFORM. " DATA_RETRIEVAL
*& Form BUILD_TXT_DATA_TABLE
Build data table for .txt document
FORM build_txt_data_table.
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE x VALUE '09'. "OK for non Unicode
*If you have Unicode check active in program attributes thnen 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,
con_cret type c value cl_abap_char_utilities=>CR_LF.
CONCATENATE 'EBELN' 'EBELP' 'AEDAT' 'MATNR'
INTO it_attach SEPARATED BY SPACE . "con_tab.
CONCATENATE con_cret it_attach INTO it_attach." Use this if req.
APPEND it_attach.
LOOP AT it_ekpo INTO wa_charekpo.
CONCATENATE wa_charekpo-ebeln wa_charekpo-ebelp
wa_charekpo-aedat wa_charekpo-matnr
INTO it_attach SEPARATED BY SPACE ."con_tab.
CONCATENATE con_cret it_attach INTO it_attach." Use this if req.
APPEND it_attach.
ENDLOOP.
ENDFORM. " BUILD_txt_DATA_TABLE
*& Form SEND_FILE_AS_EMAIL_ATTACHMENT
Send email
FORM send_file_as_email_attachment tables pit_message
pit_attach
using p_email
p_mtitle
p_format
p_filename
p_attdescription
p_sender_address
p_sender_addres_type
changing p_error
p_reciever.
DATA: ld_error TYPE sy-subrc,
ld_reciever TYPE sy-subrc,
ld_mtitle LIKE sodocchgi1-obj_descr,
ld_email LIKE somlreci1-receiver,
ld_format TYPE so_obj_tp ,
ld_attdescription TYPE so_obj_nam ,
ld_attfilename TYPE so_obj_des ,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ,
ld_receiver LIKE sy-subrc.
ld_email = p_email.
ld_mtitle = p_mtitle.
ld_format = p_format.
ld_attdescription = p_attdescription.
ld_attfilename = p_filename.
ld_sender_address = p_sender_address.
ld_sender_address_type = p_sender_addres_type.
Fill the document data.
w_doc_data-doc_size = 1.
Populate the subject/generic message attributes
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle .
w_doc_data-sensitivty = 'F'.
Fill the document data and get size of attachment
CLEAR w_doc_data.
READ TABLE it_attach INDEX w_cnt.
w_doc_data-doc_size =
( w_cnt - 1 ) * 255 + STRLEN( it_attach ).
w_doc_data-obj_langu = sy-langu.
w_doc_data-obj_name = 'SAPRPT'.
w_doc_data-obj_descr = ld_mtitle.
w_doc_data-sensitivty = 'F'.
CLEAR t_attachment.
REFRESH t_attachment.
t_attachment[] = pit_attach[].
Describe the body of the message
CLEAR t_packing_list.
REFRESH t_packing_list.
t_packing_list-transf_bin = space.
t_packing_list-head_start = 1.
t_packing_list-head_num = 0.
t_packing_list-body_start = 1.
DESCRIBE TABLE it_message LINES t_packing_list-body_num.
t_packing_list-doc_type = 'RAW'.
APPEND t_packing_list.
Create attachment notification
t_packing_list-transf_bin = 'X'.
t_packing_list-head_start = 1.
t_packing_list-head_num = 1.
t_packing_list-body_start = 1.
DESCRIBE TABLE t_attachment LINES t_packing_list-body_num.
t_packing_list-doc_type = ld_format.
t_packing_list-obj_descr = ld_attdescription.
t_packing_list-obj_name = ld_attfilename.
t_packing_list-doc_size = t_packing_list-body_num * 255.
APPEND t_packing_list.
Add the recipients email address
CLEAR t_receivers.
REFRESH t_receivers.
t_receivers-receiver = ld_email.
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = w_doc_data
put_in_outbox = 'X'
sender_address = ld_sender_address
sender_address_type = ld_sender_address_type
commit_work = 'X'
IMPORTING
sent_to_all = w_sent_all
TABLES
packing_list = t_packing_list
contents_bin = t_attachment
contents_txt = it_message
receivers = t_receivers
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8.
Populate zerror return code
ld_error = sy-subrc.
Populate zreceiver return code
LOOP AT t_receivers.
ld_receiver = t_receivers-retrn_code.
ENDLOOP.
ENDFORM.
*& Form INITIATE_MAIL_EXECUTE_PROGRAM
Instructs mail send program for SAPCONNECT to send email.
FORM initiate_mail_execute_program.
WAIT UP TO 2 SECONDS.
SUBMIT rsconn01 WITH mode = 'INT'
WITH output = 'X'
AND RETURN.
ENDFORM. " INITIATE_MAIL_EXECUTE_PROGRAM
*& Form POPULATE_EMAIL_MESSAGE_BODY
Populate message body text
form populate_email_message_body.
REFRESH it_message.
it_message = 'Please find attached a list test ekpo records'.
APPEND it_message.
endform. " POPULATE_EMAIL_MESSAGE_BODY
execute this code and i hope that will help u.
regards,
Barath. -
How to send mail from linux with .txt file as attachment ..
I want to send email from linux box and in the body of the email i want to have the content of dblog.txt file.
I want dglob.txt file content to be part of the mail body.
Thanks in advance!!Apr 29 15:19:35 lctwprddb01 sendmail[1616]: m3TJJZ4k001616: to=[email protected], ctladdr=oracle (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30109, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (m3TJJZhB001617 Message accepted for delivery)
Apr 29 16:04:52 lctwprddb01 sendmail[1422]: m3TIP6LJ031388: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=01:39:46, xdelay=00:48:01, mailer=esmtp, pri=120423, relay=cluster2a.us.messagelabs.com. [216.82.249.211], dsn=4.0.0, stat=Deferred: Connection timed out with cluster2a.us.messagelabs.com.
Apr 29 16:07:36 lctwprddb01 sendmail[1619]: m3TJJZhB001617: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=00:48:01, xdelay=00:48:01, mailer=esmtp, pri=120425, relay=cluster2a.us.messagelabs.com. [216.82.248.44], dsn=4.0.0, stat=Deferred: Connection timed out with cluster2a.us.messagelabs.com.
Apr 29 16:07:52 lctwprddb01 sendmail[1627]: m3TILs2r031176: to=<[email protected]>, ctladdr=<[email protected]> (500/500), delay=01:45:58, xdelay=00:48:01, mailer=esmtp, pri=120429, relay=cluster2a.us.messagelabs.com. [216.82.248.45], dsn=4.0.0, stat=Deferred: Connection timed out with cluster2a.us.messagelabs.com. -
Send email with txt file as attachment
Hi ,
can any one help me in download as txt file using the function module SO_OBJECT_SEND along with email .
a sample code using this function module would be helpfull.
Thanks,
vinay .Hi vinay,
Not only TXT file, u can send any
other file like word,excel,pdf,exe, etc.
1. There is some trick involved
in the binary files.
2. I have made a program (and it works fantastic)
ONLY 6 LINES FOR EMAILING
BELIEVE ME
ITS A FANTASTIC PROGRAM.
IT WILL WORK LIKE OUTLOOK EXPRESS !
3. The user is provided with
a) file name
b) email address to send mail
and it sends ANY FILE (.xls,.pdf .xyz..)
Instantaneously !
4. Make two things first :
1. Include with the name : ZAMI_INCLFOR_MAIL
2. Report with the name : ZAM_TEMP147 (any name will do)
3. Activate both and execute (2)
4. After providing filename, email adress
5. Code for Include :
10.08.2005 Amit M - Created
Include For Mail (First Req F16)
Modification Log
Data
DATA: docdata LIKE sodocchgi1,
objpack LIKE sopcklsti1 OCCURS 1 WITH HEADER LINE,
objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE,
objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objbin LIKE solisti1 OCCURS 10 WITH HEADER LINE,
objhex LIKE solix OCCURS 10 WITH HEADER LINE,
reclist LIKE somlreci1 OCCURS 1 WITH HEADER LINE.
DATA: tab_lines TYPE i,
doc_size TYPE i,
att_type LIKE soodk-objtp.
DATA: listobject LIKE abaplist OCCURS 1 WITH HEADER LINE.
FORM
FORM ml_customize USING objname objdesc.
Clear Variables
CLEAR docdata.
REFRESH objpack.
CLEAR objpack.
REFRESH objhead.
REFRESH objtxt.
CLEAR objtxt.
REFRESH objbin.
CLEAR objbin.
REFRESH objhex.
CLEAR objhex.
REFRESH reclist.
CLEAR reclist.
REFRESH listobject.
CLEAR listobject.
CLEAR tab_lines.
CLEAR doc_size.
CLEAR att_type.
Set Variables
docdata-obj_name = objname.
docdata-obj_descr = objdesc.
ENDFORM. "ml_customize
FORM
FORM ml_addrecp USING preceiver prec_type.
CLEAR reclist.
reclist-receiver = preceiver.
reclist-rec_type = prec_type.
APPEND reclist.
ENDFORM. "ml_customize
FORM
FORM ml_addtxt USING ptxt.
CLEAR objtxt.
objtxt = ptxt.
APPEND objtxt.
ENDFORM. "ml_customize
FORM
FORM ml_prepare USING bypassmemory whatatt_type whatname.
IF bypassmemory = ''.
Fetch List From Memory
CALL FUNCTION 'LIST_FROM_MEMORY'
TABLES
listobject = listobject
EXCEPTIONS
OTHERS = 1.
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'LIST_FROM_MEMORY'.
ENDIF.
CALL FUNCTION 'TABLE_COMPRESS'
IMPORTING
COMPRESSED_SIZE =
TABLES
in = listobject
out = objbin
EXCEPTIONS
OTHERS = 1
IF sy-subrc <> 0.
MESSAGE ID '61' TYPE 'E' NUMBER '731'
WITH 'TABLE_COMPRESS'.
ENDIF.
ENDIF.
Header Data
Already Done Thru FM
Main Text
Already Done Thru FM
Packing Info For Text Data
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
docdata-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'TXT'.
APPEND objpack.
Packing Info Attachment
att_type = whatatt_type..
DESCRIBE TABLE objbin LINES tab_lines.
READ TABLE objbin INDEX tab_lines.
objpack-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objbin ).
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = att_type.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = whatname.
APPEND objpack.
Receiver List
Already done thru fm
ENDFORM. "ml_prepare
FORM
FORM ml_dosend.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = docdata
put_in_outbox = 'X'
commit_work = 'X' "used from rel. 6.10
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
CONTENTS_HEX = objhex
OBJECT_PARA =
object_parb =
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
document_type_not_exist = 3
operation_no_authorization = 4
parameter_error = 5
x_error = 6
enqueue_error = 7
OTHERS = 8
IF sy-subrc <> 0.
MESSAGE ID 'SO' TYPE 'S' NUMBER '023'
WITH docdata-obj_name.
ENDIF.
ENDFORM. "ml_customize
FORM
FORM ml_spooltopdf USING whatspoolid.
DATA : pdf LIKE tline OCCURS 0 WITH HEADER LINE.
Call Function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = whatspoolid
TABLES
pdf = pdf
EXCEPTIONS
err_no_otf_spooljob = 1
OTHERS = 12.
Convert
PERFORM doconv TABLES pdf objbin.
ENDFORM. "ml_spooltopdf
FORM
FORM doconv TABLES
mypdf STRUCTURE tline
outbin STRUCTURE solisti1.
Data
DATA : pos TYPE i.
DATA : len TYPE i.
Loop And Put Data
LOOP AT mypdf.
pos = 255 - len.
IF pos > 134. "length of pdf_table
pos = 134.
ENDIF.
outbin+len = mypdf(pos).
len = len + pos.
IF len = 255. "length of out (contents_bin)
APPEND outbin.
CLEAR: outbin, len.
IF pos < 134.
outbin = mypdf+pos.
len = 134 - pos.
ENDIF.
ENDIF.
ENDLOOP.
IF len > 0.
APPEND outbin.
ENDIF.
ENDFORM. "doconv
CODE FOR PROGRAM
5.
REPORT zam_temp147 .
INCLUDE zami_inclfor_mail.
DATA
DATA : itab LIKE tline OCCURS 0 WITH HEADER LINE.
DATA : file_name TYPE string.
data : path like PCFILE-PATH.
data : extension(5) type c.
data : name(100) type c.
SELECTION SCREEN
PARAMETERS : receiver TYPE somlreci1-receiver lower case.
PARAMETERS : p_file LIKE rlgrap-filename
OBLIGATORY.
AT SELECTION SCREEN
AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_file.
CLEAR p_file.
CALL FUNCTION 'F4_FILENAME'
IMPORTING
file_name = p_file.
START-OF-SELECTION
START-OF-SELECTION.
PERFORM ml_customize USING 'Tst' 'Testing'.
PERFORM ml_addrecp USING receiver 'U'.
PERFORM upl.
PERFORM doconv TABLES itab objbin.
PERFORM ml_prepare USING 'X' extension name.
PERFORM ml_dosend.
SUBMIT rsconn01
WITH mode EQ 'INT'
AND RETURN.
FORM
FORM upl.
file_name = p_file.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = file_name
filetype = 'BIN'
TABLES
data_tab = itab
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.
path = file_name.
CALL FUNCTION 'PC_SPLIT_COMPLETE_FILENAME'
EXPORTING
complete_filename = path
CHECK_DOS_FORMAT =
IMPORTING
DRIVE =
EXTENSION = extension
NAME = name
NAME_WITH_EXT =
PATH =
EXCEPTIONS
INVALID_DRIVE = 1
INVALID_EXTENSION = 2
INVALID_NAME = 3
INVALID_PATH = 4
OTHERS = 5
ENDFORM. "upl
regards,
amit m. -
Netinstall with txt file to name the computers.
Hi,
I am new to ther OSX Server, I managed to clone a macbook with netinstall. Since I am going to clone 34 macbooks for my students with same image I need to name them and bind them to OD.
To name the computer I hav created a txt file with tab delimited columns which look like this:
00:0D:93:49:FD:E1 ->tab Computer_Name ->tab Host_Name
00:0D:93:49:FD:E2 ->tab Computer_Name ->tab Host_Name
Can some one please verify that the txt file will work with the netinstall to specify computer names?*Klanflo wrote:*
*Can some one please verify that the txt file will work with the netinstall to specify computer names?*
This is the correct textual format. What Apple forgets to tell you is the file needs +UNIX line endings+, not Macintosh line endings. I use TextWrangler to save the file in UNIX format. Works like a charm. -
Problem in send mail with .txt file attached
According to the diferent checks, I found the next problems:
1.- Between each caracters there is an space, example:(E Q U I P M E N T) and could be (EQUIPMENT), the last one is the correct form.
2.- For example, two registers in my internal table appear in one line of my .txt file, but i want that each register of my internal table appear in differents lines of my .txt file.
3.- The length of each register of my internal table (objbin) is 255 characters, but i really want that the length of each register of my internal table be 1023 characters.
Thank youThis is my perform:
FORM z_envia_correo .
DATA: docu_data LIKE SODOCCHGI1,
tablines TYPE i,
destinatarios like somlreci1 occurs 1 with header line.
DATA: BEGIN OF packlist OCCURS 0.
INCLUDE STRUCTURE SOPCKLSTI1.
DATA: END OF packlist.
DATA: BEGIN OF objbin OCCURS 0.
INCLUDE STRUCTURE SOLISTI1.
DATA: END OF objbin.
DATA: BEGIN OF object_header OCCURS 0.
INCLUDE STRUCTURE SOLISTI1.
DATA: END OF object_header.
DATA: BEGIN OF contents OCCURS 0.
INCLUDE STRUCTURE SOLISTI1.
DATA: END OF contents.
*-->ihv270907
DATA: l_string TYPE string,
l_fecha(10) TYPE c,
l_dia(2) TYPE c,
l_mes(2) TYPE c,
l_ano(4) TYPE c,
l_hora(8) TYPE c,
l_h(2) TYPE c,
l_min(2) TYPE c,
l_seg(2) TYPE c.
*<--ihv270907
Variable del destinatario para enviar el mail
DATA: l_usrnam TYPE string.
*Caracter salto de linea
FIELD-SYMBOLS <hex_container> TYPE c.
CONSTANTS: zz_tab TYPE x VALUE '0D' LENGTH 4. "valor del salto de linea en hexadecimal
ASSIGN zz_tab TO <hex_container> CASTING.
cargo el texto de cabecera del mail
CLEAR docu_data.
docu_data-obj_name = 'ZFLOTA'.
CONCATENATE 'ZFLOTA' sy-datum INTO docu_data-obj_descr SEPARATED BY space.
docu_data-proc_type = 'T'.
docu_data-proc_name = 'ZFLOTA'.
cargo el texto del cuerpo del mail
CLEAR contents.
*-->ihv270907
l_string = TEXT-I04.
REPLACE '&' IN l_string WITH sy-uname.
l_ano = sy-datum+0(4).
l_mes = sy-datum+4(2).
l_dia = sy-datum+6(2).
CONCATENATE l_dia l_mes l_ano INTO l_fecha SEPARATED BY '/'.
REPLACE '&' IN l_string WITH l_fecha.
l_h = sy-uzeit+0(2).
l_min = sy-uzeit+2(2).
l_seg = sy-uzeit+4(2).
CONCATENATE l_h l_min l_seg INTO l_hora SEPARATED BY ':'.
REPLACE '&' IN l_string WITH l_hora.
contents = l_string.
*<--ihv270907
APPEND contents.
DESCRIBE TABLE contents LINES tablines.
READ TABLE contents INDEX tablines.
docu_data-doc_size = ( tablines - 1 ) * 255 + STRLEN( contents ).
cargo el contenido del attachmet
LOOP AT g_gt_outtab_mail.
g_gt_outtab_mail-line+254(1) = <hex_container>.
MOVE g_gt_outtab_mail-line TO objbin-line.
APPEND objbin.
ENDLOOP.
genero el nombre del archivo a ser attachado
CLEAR object_header.
object_header-line = 'ZFLOTA.txt'.
APPEND object_header.
armo las caracteristicas del mail
CLEAR packlist.
packlist-head_start = 1.
packlist-head_num = 0.
packlist-body_start = 1.
packlist-body_num = tablines.
packlist-transf_bin = space.
packlist-doc_type = 'RAW'.
APPEND packlist.
armo las caracteristicas del attachment
DESCRIBE TABLE objbin LINES tablines.
packlist-transf_bin = 'X'.
packlist-head_start = 1.
packlist-head_num = 0.
packlist-body_start = 1.
packlist-body_num = tablines.
packlist-doc_type = 'TXT'.
packlist-obj_name = 'ZFLOTA.txt'.
packlist-obj_descr = 'ZFLOTA.txt'.
packlist-doc_size = tablines * 250.
APPEND packlist.
Destinatarios
l_usrnam = sy-uname.
MOVE: l_usrnam TO destinatarios-receiver.
destinatarios-rec_type = 'B'. "U externo; B -> SAP
destinatarios-sap_body = 'X'.
APPEND DESTINATARIOS.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = docu_data
PUT_IN_OUTBOX = 'X'
COMMIT_WORK = 'X'
TABLES
PACKING_LIST = packlist
OBJECT_HEADER = object_header
CONTENTS_BIN = objbin
CONTENTS_TXT = contents
RECEIVERS = destinatarios
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
DOCUMENT_TYPE_NOT_EXIST = 3
OPERATION_NO_AUTHORIZATION = 4
PARAMETER_ERROR = 5
X_ERROR = 6
ENQUEUE_ERROR = 7
OTHERS = 8
IF SY-SUBRC <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
ENDIF.
ENDFORM. " z_envia_correo
Thank you. -
GUI_DOWNLOAD with txt file?
I can succesfully upload a csv, comma delimited, file, and manipulate it with GUI_DOWNLOAD. This way....
DATA: BEGIN OF gt_coa_data_holder OCCURS 0,
rec(200) TYPE c,
END OF gt_coa_data_holder.
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
filename = lv_filename
TABLES
data_tab = gt_coa_data_holder
LOOP AT gt_coa_data_holder into <gs_coa_data_holder>.
SPLIT <gs_coa_data_holder> AT ',' INT into wa-fields
But I discovered the file has commas in it so I need to do this with a text, space delimited file. When I use the new txt, space delimited file the space appears as a # in gt_coa_data_holder but as a /h/ in the work area. Thus I can not split up the records lines field by field properly. Even when I say
SPLIT <gs_coa_data_holder> AT '#' INT into wa-fields
or
SPLIT <gs_coa_data_holder> AT '/h/' INT into wa-fields
I tried using different parameters like "has field seperator" whos default is space.
Any suggestions?
Thank-You.Hello Tom,
I've encountered a similar problem. Not being aware of the exits or abap classes as of which to use, what I've done is that...
Downloaded the file on the presentation server into an elementary table of type c. Then used the SPLIT AT ','command and store them into the required table fields, here 'gt_coa_data_holder' .
It worked this way!!
Indu. -
How to skip all files other than .txt file in Mail Sender Attachemnt ?
Hi Friends ,
I am reading an Mail attachement and sending to R3 using PaloadSwapBean and MessageTransformBean .
I used to get attachement as .txt file , name like Ex10185.txt in one mail . In another mail Ex10186.txt like that.
If only thoses file comes then no problem .
<b> IF some times along with .txt file some .html files are coming by that time my Mail Adapter incorretly reading the .html file.</b>
<b> Please tell me how to skip those kind of attachements and read only .txt file</b>
Expecting your answers asap.
Best Regards.,
V.RangarajanHi Michal,
Thanks for your reply , Sorry! I am aware of how to write adapter module. Can you please tell me how to write adapter module ?
Is there any links available or Blogs ?
I am expecting your reply asap .
Best Regards.,
V.Rangarajan -
I use a lot of TXT files as INCLUDE files in various pages.
When I used Dreamweaver 4 I had no problem editing a TXT file just
like any HTML file and using DesignView. When I get going with
Dreamweaver MX2004 I figured out how to do it. But I had to
reinstall DW MX2004 and cannot get it to look at a TXT file in
anything but CodeView - or call NotePad to edit it.
I have already removed .txt from "OPEN IN CODE VIEW". I have
tried going to MMDocumentTypes.xml and setting the Text type to
HTML - which is what I thought I had used before. That didn't work.
I've tried various combination of editing the Extensions.txt file,
too - with and without the MMDocumentTypes.xml file.
I know there is a way to do it - but cannot find the
way!!I finally figured out how to work with TXT files in Design
View...
1. Go into MMDocumentTypes.xml and set the Text type to HTML
2. in PREFERENCES Remove the .TXT type from OPEN IN CODEVIEW
3. in PREFERENCES add the EXTENSION .txt and add Dreamweaver
as the EDITOR
The HTML in a TXT file shows up and is editable just as in an
HTML document -
*.txt Files in *.Jar
Hi!
In my project I have both Images and txt files that needs to follow the jar. I have no problem getting the images to work using this example: http://www.devx.com/tips/Tip/5697
URL myurl = this.getClass().getResource("png/1.png");
Toolkit tk = this.getToolkit();
Image img = tk.getImage(myurl);I have not been able to find out how to get this to work with txt files. In my project the txt is opened using a string like this:
File file = new File("src/myProject/txt/"+ "File.txt");This works fine when using netbeans, but the file is not opened when running the program from the jar
I noticed that Toolkit does not have a getFile( URL url ), is there a similar way to do this? How do I create File objects in a jar?
Thanks in advance!
Edited by: ja9unath on Dec 2, 2009 7:16 AM
Edited by: ja9unath on Dec 2, 2009 7:16 AM>
Why do you need to? You can read an InputStream or use it to create an InputStreamReader.
I don't know if it will work, but you can try to convert the URL to a URI and File has a constructor that takes an URI.I have found no method to convert URL 2 URI. Is there such a thing?
I need to use a File-object since I am using this method in my project:
public String txt2String(File file) {
String output;
StringBuffer contents = new StringBuffer();
BufferedReader reader = null;
try {
reader = new BufferedReader(new FileReader(file));
String text = null;
// repeat until all lines is read
while ((text = reader.readLine()) != null) {
contents.append(text).append(System.getProperty(
"line.separator"));
} catch (FileNotFoundException e) {
e.printStackTrace();
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
if (reader != null) {
reader.close();
} catch (IOException e) {
e.printStackTrace();
output = contents.toString();
return output;
}so... How to create a File-object from the *.jar? or is there a way to make this method use InputStream instead of File?
Thanks -
Problems getting elements to work in a txt file within Flash.
Hello! I'm working on my band's new website and have been
searching many hours for answers to some problems I'm having with
txt files referenced as HTML in Flash.
Our site is
http://moumusic.com.
One of the problems is having an image as a link. For
instance, I have a photo and try to link a website to it:
quote:
<a href="
http://cdbaby.com/cd/motuniverse"
target="_blank"><img src="images/cdbaby.gif" width="100"
height="100"></a>
It works when loaded as an HTML file, but not when viewed in
the Flash site. The text file for this is at
http://moumusic.com/moualbum.txt.
The page comes up when you click the "MoU's First CD" link on
moumusic.com.
Next, I can't link to external media files. For instance, I
tried inserting the code:
quote:
<a href="
http://fusco-moore.com/videos/SongforCliff-2.wmv">Song
for Cliff Video Part 2</a>
. You can click the text (while viewing it as
part of the Flash site), but nothing happens. You can even copy the
shortcut, but you can't use the link properly.
Last, I want to put a PayPal Buy It Now button on one of the
pages. The link is pretty long:
quote:
<a
href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=producer%40wcjm%2ecom&it em_name=%22Masters%20of%20the%20Universe%22%20CD%20by%20MoU&amount=10%2e00&no_shipping=2&n o_note=1¤cy_code=USD&lc=US&bn=PP%2dBuyNowBF&charset=UTF%2d8">Buy
Now!</a>
. I heard that there's a 128 character limit for
links in Flash. Is there any way around this?
What about forms? PayPal has the option of doing a form for a
shopping cart. Flash won't even begin to recognize it when I just
drop the form code in there.
Well, thanks for the help in advance- hopefully this stuff
can be accomplished!
JimI assume you are using the Flash TextField object set to
render html.
First to understand is that the extent of html recognized is
limited and by
player version. That means you cannot use any HTML tag you
wish.
See
http://livedocs.macromedia.com/flash/8/main/00001459.html
for the
supported list in Flash Player 8
You might check "About making hypertext links out of embedded
media " as
well:
http://livedocs.macromedia.com/flash/8/main/00001477.html
Malformed html in a TextField can render any tag in the field
non
functional. Be sure the html in the TextField is validated.
I would assume the anchor tag in Flash text field would
follow the same
rules an anchor tag in HTML as to length of the query string.
Finally consider using Flash with a button and getURL for the
PayPal link.
http://livedocs.macromedia.com/flash/8/main/00001730.html
Lon Hosford
www.lonhosford.com
Flash, Actionscript and Flash Media Server examples:
http://flashexamples.hosfordusa.com
May many happy bits flow your way!
"wcjmproducer" <[email protected]> wrote in
message
news:[email protected]...
> Hello! I'm working on my band's new website and have
been searching many
> hours
> for answers to some problems I'm having with txt files
referenced as HTML
> in
> Flash.
>
> Our site is
http://moumusic.com.
>
> One of the problems is having an image as a link. For
instance, I have a
> photo and try to link a website to it:
>
>
quote:
<a href="
http://cdbaby.com/cd/motuniverse"
target="_blank"><img
> src="images/cdbaby.gif" width="100"
height="100"></a>
>
> It works when loaded as an HTML file, but not when
viewed in the Flash
> site.
> The text file for this is at
http://moumusic.com/moualbum.txt.
The page
> comes
> up when you click the "MoU's First CD" link on
moumusic.com.
>
> Next, I can't link to external media files. For
instance, I tried
> inserting
> the code:
quote:
<a
> href="
http://fusco-moore.com/videos/SongforCliff-2.wmv">Song
> for Cliff Video Part 2</a>
. You can click the text (while viewing it
> as
> part of the Flash site), but nothing happens. You can
even copy the
> shortcut,
> but you can't use the link properly.
>
> Last, I want to put a PayPal Buy It Now button on one of
the pages. The
> link
> is pretty long:
quote:
<a
>
href="https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=producer%40wcjm
>
%2ecom&item_name=%22Masters%20of%20the%20Universe%22%20CD%20by%20MoU&amount=10%2
>
e00&no_shipping=2&no_note=1¤cy_code=USD&lc=US&bn=PP%2dBuyNowBF&charset=UTF
> %2d8">Buy Now!</a>
. I heard that there's a 128 character limit for
> links
> in Flash. Is there any way around this?
>
> What about forms? PayPal has the option of doing a form
for a shopping
> cart.
> Flash won't even begin to recognize it when I just drop
the form code in
> there.
>
> Well, thanks for the help in advance- hopefully this
stuff can be
> accomplished!
>
> Jim
> -
Mimic BufferedReader with XML File
I have a class (extends BufferedReader) that reads "records" 1 by 1 -
import java.io.*;
import java.util.*;
public class FileRecordReader extends BufferedReader {
public FileRecordReader(Reader reader) throws FileNotFoundException {
super(reader);
public String[] readRecord() throws IOException {
Vector fields = new Vector();
char[] buffer = new char[1];
int bytesRead;
StringBuffer newField = new StringBuffer();
bytesRead = read(buffer);
while (bytesRead != -1) {
// ignore linefeed and carridge returns
if (buffer[0] == '\n' || buffer[0] == '\r') {
bytesRead = read(buffer);
continue;
if (buffer[0] == '|') {
fields.addElement(newField.toString());
newField = new StringBuffer();
bytesRead = read(buffer);
continue;
if (buffer[0] == '~') {
break;
newField.append(buffer[0]);
bytesRead = read(buffer);
if (fields.size() == 0) return null;
String[] returnFields = new String[fields.size()];
fields.copyInto(returnFields);
return returnFields;
}As you can see the fields are seperated by the '|' character and the '~' character signals the end of a record.
I now have to extend this class to handle xml files as well. In the readRecord method I check a property which tells me what file type I'm dealing with (txt file or xml) and then I call either readDelimitedRecord or readXMLRecord.
readDelimitedRecord does exactly what readRecord currently does, and readXMLRecord should do the equivalent for an xml file. I know how to read a record from the xml file, but how do I keep track of what records I've read so far?Your solution for delimited files doesn't scale to XML files. Besides, XML files don't have "records". I would recommend that for XML files you do something completely different. Feed them to a SAX parser and get the stream of startDocument(), startElement(), characters(), endElement(), and endDocument() events. Otherwise you would find yourself writing a whole XML parser, which is more complicated than it looks.
-
How to get a txt file output of Bookmarks or Annotations
I just tried to get a txt file report for the bookmarks. but its not working.
var root = this.bookmarkRoot;
var Report = new Report();
PrintBookmark(Report, root, 0);
Report.save("/c/temp/newreport.txt");
function PrintBookmark(Report, Bm, nLevel)
Report.writeText(Bm.name);
if (Bm.children != null)
for (var i = 0; i < Bm.children.length; i++)
PrintBookmark(Report, Bm.children[i], nLevel + 1);
This is the result i got in console.
NotAllowedError: Security settings prevent access to this property or method.
Report.save:5:Batch undefined:Exec
Whats wrong i did?First of all, a Report is a PDF that you can generate with JavaScript, not a text file. It might be better to create a text data object (doc.createDataObject), which you can then export (doc.exportDataObject).
Edit: corrected mistake
Maybe you are looking for
-
Is anyone else noticing issues with apps not refreshing on iOS 7? Since upgrading, apps like Whatsapp and Kik no longer notify me of any new messages until I open the app I'm also noticing this with the Message app on the iPhone sometimes I have no n
-
It is just me? When talking about battery life, people are comparing it with the PowerBook. I don't think you can do that considering the difference between the MBP and the PB. For starter, my 12" PB can go for about 3-4 hours of "limited" use (note
-
How to provide F4 for inputfield in ABAP Webdynpro ALV
Hi Friends, I am displaying records in Editable ALV Gridd in webdynpro. I need to provide search help(F4) for few fields which are editable. Please help me, how I can achieve this functionality in ALV . Regards, Xavier.p
-
A few days ago my HH3 lost connection and all machines stopped conecting to the internet. When I went it to HH settings the connection time had reset and also the sync time. my stats now show that my line is syncing at 9213 which is dramatically high
-
Broken Formulae, Stumped me!
Hello I know this may seem like a simple question but i cannot fathom it out. i have the formula in the cell D9: =IF( K5= "$H$3","Strawberry", IF( K5 = "$H$4","Banana", IF( K5= "$H$5","Apple", "Kiwi"))) and this in K5 =CELL("address",OFFSET(Informati