Script Output cuts my querry
Hello SQL Developers,
I have a script that has some bigger output per querry (exactly it generates an XML)
When I run this script (F5) it only outputs the first about 200 chars per querry, then it cuts and starts with the next querry
For example:
Xml Output
<?xml version="1.0" standalone="yes"?>
<Customers>
<Customer>
<CustId>100<
Xml Output
<?xml version="1.0" standalone="yes"?>
<Customers01234567890123456789>
<Custom
Starting every querry for its own (Ctrl+F5) shows in the result window the correct result of this single querry without cuting somethink of.
I've tested it with the computer of a classmate. There it works fine without any cut in the Script Output window. Maybe that's because he didn't update
SQL Developer for more then a year. Maybe it is a setting I didn't found yet. Please can somebody help me?
Edited by: WillardBL on 10.10.2012 13:48
Hi WillardBL,
Quite a few years ago there was a bug involving slow performance and/or Java OutOfMemoryException when displaying MySQL BLOBs, probably due to some issue with the MySQL JDBC driver. The bug was addressed back in SQL Developer 1.2.26.09 and is...
Bug 5904607 - MYSQL RUN SCRIPT PERFORMANCE FROM WORKSHEET NOT SATISFACTORY
At that time, a 4000 character display column size limit was added to circumvent the problem. It still remains and has not received much attention -- perhaps since VARCHAR2 is also limited to 4000, at least through the Oracle 11g releases.
In your specific case, you are not reaching the 4000 character limit. You can try the following in the worksheet:
show longwhich should show a default value of 80 if you never overrode it in your connection login script (Tools | Preferences | Database). So just
set long 4000and try running the script that outputs the XML again. Keep in mind that set long
Sets maximum width (in bytes) for displaying LONG, CLOB, NCLOB and XMLType values; and for copying LONG values.
Possibly Bug 5904607 needs revisiting, but I hope the approach described will be sufficient to get you past the current problem.
Regards,
Gary
SQL Developer Team
Similar Messages
-
Right-clicking should bring up a menu to "Copy" text in Script Output. The short cut key for copy does work as a workaround.
The tricky bit is knowing which story you want copied first. But you certainly don't want to involve system Events, or even copy and paste. This should get you started:
tell application "Adobe InDesign CS4"
set theSel to selection
set thePage to parent of item 1 of selection
set emptyFrame to text frame 1 of thePage whose contents = ""
duplicate parent story of item 1 of theSel to after insertion point 1 of emptyFrame
duplicate parent story of item 2 of theSel to after insertion point 1 of emptyFrame
end tell -
Trying to create a shell script to cut/paste files in finder. Help needed.
I'm trying to create an automator shell script to cut/paste. It'll function exactly like copy/paste. i.e. I'll just copy file/files with command+c like always, but then I'll create an automator which uses the "mv" terminal app to move the files which works exactly like cut paste.
I need some help since I don't know the syntax for creating shell scripts.
What I did so far is to do it in automator with Apple Script which goes like the following:
on run {input, parameters}
tell application "Finder"
set theWindow to window 1
set thePath to quoted form of (POSIX path of (target of theWindow as string))
end tell
tell application "Terminal"
do script with command "mv \"" & input & "\"" & thePath in window 1
end tell
return input
end run
This gets the copied file path from clipboard before, as input, and then recognizes the active finder window as thePath so then executes the mv command for the input file to the thePath window.
It doesn't work as expected since it connects both file/window paths into a single path instead of leaving a space between them so the mv command can't recognize two separate paths.
What's the correct syntax for that line
do script with command "mv \"" & input & "\"" & thePath in window 1
to leave a space between input and thePath under the mv command?
Also this requires the terminal app to be open in the background.
After I get this to work I want to do the exact same thing using shell script within automator, so I won't need Terminal to be open all the time.
And the next step will be to cut/paste multiple files/folders but that should be easy to do once I get the hang of it.Try using:
on run {input, parameters}
tell application "Finder"
set theWindow to window 1
set thePath to quoted form of (POSIX path of (target of theWindow as string))
end tell
do shell script "mv \"" & input & "\" " & thePath
return input
end run
(45977) -
Changes are not reflected in Script output
Hi All,
i am facing a problem in SAPscript.
I have made a Zscript by copying standard script F110_FR_CHEQUE. I have made the changes in the script as per requirement in development client and transported it to testing client to test (As i dont have any data in development client). But, surprisingly, when i run the program and check the output, the changes are not reflected in the script output.
First i thought that my script was not triggered thats whay i m not getting any change, but later i changed the dimension of one of the window, in which some hard coded text is written, the differece i found was that, window size is changed, but the text written in that window is still same (what was in standard script.) .
I am using standard texts for hard coding in script. Standard texts have been transported in testing client also.
please help me in this regard.Hi,
Could you plese Check NACE whether your script is confiugring or not.
If it is configured well then Check Standard Text is available or not in Test client by open it in SO10.
Check all the paragrah formats applied to Standard text are transferred to Test client which are in SE72.
IF it is available in SO10 then debug the print program for that windows any standard conditions are calling to print the text. -
Logic Pro X with OSX 10.9.2 Audio output cuts out 3-5 minutes into running software how can I fix this?
Well, first....
Are you using any 3rd party plugins in your project?
If not then my suggestion wont be the cause......
To see which plugins you have installed (Though it's only if they are being actually used in the project that would cause your issue..) you can see them via the Audio Unit Manager found under the Logic Pro X menu bar..... Logic Pro X..... Audio Unit Manager
Also, any reason you are still using 10.9.2 instead of updating to 10.9.5?
Do you get any message when the audio cuts out?
Are you only using internal audio hardware or are you using an external Audio Interface? if so, which one? -
Convert Script output data to Text(.txt) file & send mail with attachment.
Hi All,
Requirement: I shulb be able to conver th Script output data to Text(.text) file & send a maill with attachment with this text file. Formant of text file should be like output of Print priview.
Plese sugget with Function modules to cover as Text file.
I am able to converting the Script output data to PDF and sending mail with attachment. So I don't want PDF file now.
Thanks in advance.Hi, Thanks for responst.
We can convert the Scirpt output to PDF file by using OTF function module and the PDF file looks like Print Privew output.
Same like this I want Script out in NOTEPAD (.txt). Is that possible, Plz sugget with relavent Function Modules.
Thanks. -
4.0EA1 - Copy/Paste in Script Output window on Mac is not working
I'm running 4.0.0.12 on MacOS X 10.8.4, and I can't Copy from the "Script Output" window. What I regularly do is generate some SQL using an SQL query, so I want to copy the output and paste it back into the Worksheet so I can run it. For example:
select 'alter tablespace ' || TABLESPACE_NAME || ' begin backup;' from DBA_TABLESPACES;This is a known issue and will be addressed for the next EA release.
-
Problem in script output sending mail
hi ,
I have a problem sending a mail with script output as attachment . I have searched in the forum for the answers but none is solved my question.
I am sending the data to the otf and it is getting the otfdata. but it is not showing the data on the script when it is sent as an attachment to the email , but it is showing only script with null values filled.( means i am getting the mail with attachment but in that attachment there is no data filled in the script send).
the code is like this ..
here i am filling the otfdata and i am exporting the otfdata
CALL FUNCTION 'ZMM_ARRANG_ENTRY_ABR_NATRAB'
EXPORTING
i_nast = nast
i_fonam = tnapr-fonam
i_xscreen = pi_xscreen
i_arc_params = arc_params
i_toa_dara = toa_dara
IMPORTING
e_retcode = px_retcode
EXCEPTIONS
OTHERS = 1.
IF ( sy-subrc <> 0 ). "Fehler
MOVE sy-subrc TO px_retcode.
IF ( pi_xscreen = 'X' ). "Ausgabe auf Bildschirm
MESSAGE ID sy-msgid
TYPE sy-msgty
NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
ELSE.
*---Import OTFDATA from the memory
IMPORT it_otfdata FROM MEMORY ID 'OTF'.
ENDIF.
wa_maildata-obj_name = 'EMAIL'.
wa_maildata-obj_descr = 'Settlement Details'.
*-----mail contents
it_mailtext-line = 'Sub-sequent settlement Details'.
APPEND it_mailtext.
DESCRIBE TABLE it_mailtext LINES v_lines.
READ TABLE it_mailtext INDEX v_lines.
wa_maildata-doc_size = ( v_lines - 1 ) * 255 + STRLEN( it_mailtext ).
*Creation of the entry for the compressed document
CLEAR it_mailpack-transf_bin.
it_mailpack-head_start = 1.
it_mailpack-head_num = 0.
it_mailpack-body_start = 1.
it_mailpack-body_num = v_lines.
it_mailpack-doc_type = 'RAW'.
APPEND it_mailpack.
*-----Get OTF data
LOOP AT it_otfdata.
it_mailcont-line = it_otfdata.
APPEND it_mailcont.
ENDLOOP.
*---Move OTF data into binary table
LOOP AT it_mailcont.
MOVE-CORRESPONDING it_mailcont TO it_mailbin.
APPEND it_mailbin.
ENDLOOP.
*---Get no of lines in Binary data table
DESCRIBE TABLE it_mailbin LINES v_lines.
*---Fill name of the header of email
it_mailhead = 'Subsequent Settlement Details.OTF'.
APPEND it_mailhead.
*---Creation of the entry for the compressed attachment
it_mailpack-transf_bin = 'X'.
it_mailpack-head_start = 1.
it_mailpack-head_num = 1.
it_mailpack-body_start = 1.
it_mailpack-body_num = v_lines.
it_mailpack-doc_type = 'OTF'.
it_mailpack-obj_name = 'EMAIL'.
it_mailpack-obj_descr = 'Settlement Details'.
it_mailpack-doc_size = v_lines * 255.
APPEND it_mailpack.
*----Get email address from the address number of vendor
CALL FUNCTION 'ADDR_GET_REMOTE'
EXPORTING
addrnumber = l_adrnum
TABLES
adsmtp = it_adsmtp.
*----Get mail address
READ TABLE it_adsmtp WITH KEY remark = 'AP_SUB_SETT'.
IF sy-subrc = 0.
it_mailrec-receiver = it_adsmtp-smtp_addr.
it_mailrec-rec_type = 'U'.
it_mailrec-com_type = 'EXT'.
APPEND it_mailrec.
*---Send email with PDF attachment
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = wa_maildata
put_in_outbox = 'X'
COMMIT_WORK = 'X'
TABLES
packing_list = it_mailpack
object_header = it_mailhead
contents_bin = it_mailbin
contents_txt = it_mailtext
receivers = it_mailrec.
ELSE.
MESSAGE 'No email id Exist for the vendor' TYPE 'E'.
ENDIF.
please suggest me with your valuable answers .
Regards,
Venkat Appikonda.Hi venkat
Just check if this helps you.
The following part of the code does exactly that.
Selecting details from the spool request table.
SELECT * FROM tsp01 INTO TABLE tb_spool
WHERE rqowner = sy-uname.
IF sy-subrc EQ 0.
SORT tb_spool DESCENDING BY rqcretime.
CLEAR : tb_spool.
READ TABLE tb_spool INDEX 1.
convert spool into PDF format.
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF'
EXPORTING
src_spoolid = tb_spool-rqident
TABLES
PDF = tb_lines.
ENDIF.
After this, on execution we get the below mentioned message.
This indicates that a PDF of the SAP Script has been created which is in the format u201C132-long stringsu201D.
In order to send the mail across, the mailing format of the PDF supports u201C255-long stringsu201D. So, the present u201C132-long stringsu201D needs to be converted into u201C255-long stringsu201D. This along with the mail code is mentioned below.
DATA: lv_receiver(50) TYPE c.
REFRESH: tb_obj_txt,
tb_obj_bin,
tb_obj_head,
tb_paklist,
tb_receiver.
CLEAR: tb_obj_txt,
tb_obj_bin,
tb_paklist,
tb_obj_head,
tb_receiver.
CLEAR: tb_adrc.
IF NOT tb_adrc[] IS INITIAL.
Reading the address table with the key as address number.
READ TABLE tb_adrc WITH KEY addrnumber = tb_kna2-adrnr.
IF sy-subrc EQ 0.
Vendor Email ID.
SELECT SINGLE smtp_addr
FROM adr6
INTO wf_mailaddr
WHERE addrnumber = tb_adrc-addrnumber.
IF sy-subrc EQ 0.
Moving the mail address to the receiver itab
MOVE wf_mailaddr TO tb_receiver-receiver.
tb_receiver-rec_type = text-011.
APPEND tb_receiver.
ELSE.
CONCATENATE text-004 tb_kna2-kunnr text-005 INTO lv_receiver
SEPARATED BY space.
If pa_call is initial, the receiver ID is printed; else an INVALID E-mail ID message gets flashed.
IF pa_call IS INITIAL.
WRITE :/ lv_receiver.
ENDIF.
CLEAR: itab.
itab-kunnr = tb_kna2-kunnr.
itab-message = lv_receiver.
APPEND itab.
EXIT. u201CNo mailing for invalid Email id
ENDIF.
ENDIF.
ENDIF.
wf_name = sy-uname.
wf_year = tb_main-bldat(4).
wf_mon = tb_main-bldat+4(2).
*This FM gives the name of the months.
CALL FUNCTION 'MONTH_NAMES_GET'
EXPORTING
language = sy-langu
TABLES
month_names = tb_months.
IF sy-subrc EQ 0.
READ TABLE tb_months WITH KEY mnr = wf_mon.
IF sy-subrc EQ 0.
wf_name = tb_months-ktx.
ENDIF.
ENDIF.
CLEAR: tb_contp.
IF NOT tb_contp[] IS INITIAL.
*Reading the contp itab as per the customer entered on the selection screen.
READ TABLE tb_contp WITH KEY bukrs = pa_bukrs
kunnr = tb_kna2-kunnr.
IF sy-subrc EQ 0.
CONCATENATE text-006 text-008 tb_contp-contp text-008 tb_kna2-kunnr
text-008 wf_name text-008 wf_year INTO wf_sub.
ENDIF.
ELSE.
CONCATENATE text-006 text-008 tb_kna2-kunnr text-008 wf_name
text-008 wf_year INTO wf_sub.
ENDIF.
Subject and Description
CLEAR wa_docdata.
wa_docdata-obj_name = text-007.
wa_docdata-obj_descr = wf_sub.
wa_docdata-obj_langu = sy-langu.
Write main body
tb_obj_txt = text-009.
APPEND tb_obj_txt.
CLEAR tb_obj_txt.
CLEAR tb_paklist.
tb_paklist-head_start = 1.
tb_paklist-head_num = 3.
tb_paklist-body_start = 1.
tb_paklist-body_num = 60.
tb_paklist-doc_type = text-012.
APPEND tb_paklist.
CLEAR tb_paklist.
create PDF file
Transfer the 132-long strings to 255-long strings
LOOP AT tb_lines.
TRANSLATE tb_lines USING ' ~'.
CONCATENATE wf_buffer tb_lines INTO wf_buffer.
ENDLOOP.
TRANSLATE wf_buffer USING '~ '.
DO.
tb_obj_bin = wf_buffer.
APPEND tb_obj_bin.
SHIFT wf_buffer LEFT BY 255 PLACES.
IF wf_buffer IS INITIAL.
EXIT.
ENDIF.
ENDDO.
DESCRIBE TABLE tb_obj_bin LINES lv_lines.
READ TABLE tb_obj_bin INDEX lv_lines.
lv_size = ( lv_lines - 1 ) * 255 + STRLEN( tb_obj_bin ).
Create attachment notification
tb_paklist-transf_bin = co_x.
tb_paklist-head_start = 1.
tb_paklist-head_num = 0.
tb_paklist-body_start = 1.
tb_paklist-body_num = lv_lines.
tb_paklist-doc_type = text-013.
tb_paklist-obj_descr = text-010.
tb_paklist-obj_name = text-010.
tb_paklist-doc_size = lv_size.
APPEND tb_paklist.
*mail the PDF to the receiver.
CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
EXPORTING
document_data = wa_docdata
sender_address = wf_name
sender_address_type = text-014
TABLES
packing_list = tb_paklist
object_header = tb_obj_head
contents_bin = tb_obj_bin
contents_txt = tb_obj_txt
receivers = tb_receiver
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.
CONCATENATE text-003 tb_kna2-kunnr text-005 INTO lv_receiver
SEPARATED BY space.
CLEAR: itab.
itab-kunnr = tb_kna2-kunnr.
itab-message = lv_receiver.
APPEND itab.
IF pa_call IS INITIAL.
WRITE :/ lv_receiver.
ENDIF.
ELSE.
CONCATENATE text-002 tb_kna2-kunnr text-005 INTO lv_receiver
SEPARATED BY space.
CLEAR: itab.
itab-kunnr = tb_kna2-kunnr.
itab-message = lv_receiver.
APPEND itab.
IF pa_call IS INITIAL.
WRITE :/ lv_receiver.
ENDIF.
ENDIF.
Hope this helps.
Harsh -
How to print a standard text of 3 pages in the script output?
Hi all,
I want to print a standard text as an include in the script output.
But the standrad text is of 3 pages conataining continuous (some terms and condtitions) text.
But while executing driver program, I am getting a STOP messgae pop-up saying 'Output is continuous or contains too many pages (>4)'.
How to get the standard text of 3 pages in the output. The standard text is to be printed at the bottom of the output.
Thanks,
SachinHi ,
To display standard texts you have to create a include in your script below is the syntax for that:
INCLUDE name OBJECT name ID name PARAGRAPH name LANGUAGE name
Include command is used to include standard text in a form.the text
should be already defined by using transaction SO10.
Here name is the name of text
ID is used to classify text e.g. SDVD (SD related text) , ST (Standard text)
OBJECT is used to specify type of object it an be TEXT , DOKU
LANGUAGE is used to specify language like EN ,if ommited than logon
language is used
PARAGRAPH is used to specify the paragraph like C
e.g. /:INCLUDE mytext OBJECT TEXT ID ST LANGUAGE EN
Here the standard text created in SO10 with name mytext is
included in the form in language EN (English)
Please let me know if you have still any confusion.
Thanks
Narendra Vikram Vishwakarma -
Reg: Script Output in PDF form
Hai..
Can anybody tell me how we will get script output
(P.order output) in PDF format and we need to downlaod this PDF to our local drives. plz tell me the function modules to be used for this requirement and paste the code if any of you worked on this earlier..
RegardsCheck this link for sample program.
https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/49e15474-0e01-0010-9cba-e62df8244556
https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/downloadSAPScriptoutputtoPDF+file.&
Function Module: CONVERT_OTF
Regards,
Maha -
To convert Sap Script output to PDF format and send it via email.
Hi Friends,
Could any one please tell me, how to convert the Sap Script output to PDF format and send it via email. If any one have the code, kindly mail me to [email protected]
Thanks & Regards,
JohnPlese check this sample code from other thread.
REPORT zzz_jaytest .
Types Declaration
TYPES : BEGIN OF ty_pa0001,
pernr TYPE pa0001-pernr,
bukrs TYPE pa0001-bukrs,
werks TYPE pa0001-werks,
END OF ty_pa0001.
Internal Table Declaration
DATA : i_pa0001 TYPE STANDARD TABLE OF ty_pa0001, "For pa0001 Details
i_otf TYPE STANDARD TABLE OF itcoo, "For OTF data
i_content_txt TYPE soli_tab, "Content
i_content_bin TYPE solix_tab, "Content
i_objhead TYPE soli_tab,
Work Area Declaration
w_pa0001 TYPE ty_pa0001, "For pa0001 Details
w_res TYPE itcpp, "SAPscript output
"parameters
w_otf TYPE itcoo, "For OTF
w_pdf TYPE solisti1, "For PDF
w_transfer_bin TYPE sx_boolean, "Content
w_options TYPE itcpo, "SAPscript output
"interface
Variable Declaration
v_len_in TYPE so_obj_len,
v_size TYPE i.
Constants Declaration
CONSTANTS : c_x TYPE c VALUE 'X', "X
c_locl(4) TYPE c VALUE 'LOCL', "Local Printer
c_otf TYPE sx_format VALUE 'OTF', "OTF
c_pdf TYPE sx_format VALUE 'PDF', "PDF
c_printer TYPE sx_devtype VALUE 'PRINTER', "PRINTER
c_bin TYPE char10 VALUE 'BIN', "BIN
c_name TYPE string VALUE 'C:\ZZZ_JAYTEST.PDF',"Downloading
"File Name
c_form(11) TYPE c VALUE 'ZZZ_JAYTEST'. "Form Name
START-OF-SELECTION.
Selecting the records from pa0001
SELECT pernr bukrs werks FROM pa0001
INTO TABLE i_pa0001 UP TO 10 ROWS.
Setting the options
w_options-tdcopies = 1 ."Number of copies
w_options-tdnoprev = c_x."No print preview
w_options-tdgetotf = c_x."Return of OTF table
w_options-tddest = c_locl."Spool: Output device
Opening the form
CALL FUNCTION 'OPEN_FORM'
EXPORTING
form = c_form
device = c_printer
language = sy-langu
OPTIONS = w_options
IMPORTING
RESULT = w_res.
LOOP AT i_pa0001 INTO w_pa0001.
Writting into the form
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'MAIN'
window = 'MAIN'.
ENDLOOP.
Closing the form
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = w_res
TABLES
otfdata = i_otf
EXCEPTIONS
unopened = 1
bad_pageformat_for_print = 2
send_error = 3
spool_error = 4
codepage = 5
OTHERS = 6.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
Converting OTF data to single line
LOOP AT i_otf INTO w_otf.
CONCATENATE w_otf-tdprintcom w_otf-tdprintpar
INTO w_pdf.
APPEND w_pdf TO i_content_txt.
ENDLOOP.
Converting to PDF Format
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
format_src = c_otf
format_dst = c_pdf
devtype = c_printer
CHANGING
transfer_bin = w_transfer_bin
content_txt = i_content_txt
content_bin = i_content_bin
objhead = i_objhead
len = v_len_in
EXCEPTIONS
err_conv_failed = 1
OTHERS = 2.
v_size = v_len_in.
Downloading the PDF File
CALL FUNCTION 'GUI_DOWNLOAD'
EXPORTING
bin_filesize = v_size
filename = c_name
filetype = c_bin
TABLES
data_tab = i_content_bin.
The extension is put the it_mailpack-obj_name parameter of 'SO_NEW_DOCUMENT_ATT_SEND_API1'. -
PDF format of script output in irregular format
Hi All,
I am getting script output in OTF format in 'CLOSE_FORM'
of standard sales order script.
This,I am able to send in PDF format as mail attachment by using function module 'SO_NEW_DOCUMENT_ATT_SEND_API1'.
But the alignment and format of data in the attachment doesn't exactly match with original script output.
Can anyone help me in this regard? Thanks in advance
- jawaharHi,
disregard my earlier mail.
fill itcpo structure and try
<b> itcpo-tdgetotf = 'X'.
xdevice = 'PRINTER'. </b>
CALL FUNCTION 'OPEN_FORM'
EXPORTING
FORM = TNAPR-FONAM
LANGUAGE = NAST-SPRAS
<b> OPTIONS = ITCPO</b>
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMS = ARC_PARAMS
DEVICE = XDEVICE
DIALOG = ' '
IMPORTING
RESULT = ITCPP
EXCEPTIONS
OTHERS = 1.
CALL FUNCTION 'SX_OBJECT_CONVERT_OTF_PDF'
EXPORTING
FORMAT_SRC = 'OTF'
FORMAT_DST = 'PDF'
DEVTYPE = 'HPLJ5SI'
TABLES
CONTENT_IN = CONTENT_IN
CONTENT_OUT = CONTENT_OUT
EXCEPTIONS
ERR_CONV_FAILED = 1
OTHERS = 2.
OBJBIN[] = CONTENT_OUT[].
endif.
DOC_CHNG-OBJ_NAME = TEXT-003.
doc_chng-obj_descr = text-001.
CONCATENATE TEXT-002 VBDKR-VBELN "zinvoice14-vessel
INTO DOC_CHNG-OBJ_DESCR SEPARATED BY SPACE.
IF SY-SYSID NE 'S4P'.
CONCATENATE DOC_CHNG-OBJ_DESCR TEXT-004 INTO DOC_CHNG-OBJ_DESCR
SEPARATED BY SPACE.
ENDIF.
OBJTXT = 'This is an example of a Sapscript emailed out of SAP'.
APPEND OBJTXT.
DESCRIBE TABLE OBJTXT LINES TAB_LINES.
READ TABLE OBJTXT INDEX TAB_LINES.
DOC_CHNG-DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJTXT ).
Fill the fields of the packing_list for the main document:
It is a text document
CLEAR OBJPACK-TRANSF_BIN.
The document needs no header (head_num = 0)
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
but it has a body
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
of type RAW
OBJPACK-DOC_TYPE = 'RAW'.
APPEND OBJPACK.
Create the attachment (the list itself)
IF NAST-KSCHL NE 'ZSTT'.
DESCRIBE TABLE OBJBIN LINES TAB_LINES.
Fill the fields of the packing_list for the attachment:
It is binary document
OBJPACK-TRANSF_BIN = 'X'.
we need no header
OBJPACK-HEAD_START = 1.
OBJPACK-HEAD_NUM = 0.
but a body
OBJPACK-BODY_START = 1.
OBJPACK-BODY_NUM = TAB_LINES.
of type ALI
IF NAST-KSCHL NE 'ZSTT'.
OBJPACK-DOC_TYPE = 'PDF'.
OBJPACK-OBJ_NAME = 'Attachment'.
OBJPACK-OBJ_DESCR = 'PDF file'.
READ TABLE OBJBIN INDEX TAB_LINES.
DOC_SIZE = ( TAB_LINES - 1 ) * 255 + STRLEN( OBJBIN ).
OBJPACK-DOC_SIZE = DOC_SIZE.
APPEND OBJPACK.
ENDIF.
get E-mail address
loop at t_tvbdkr. "S4DK966284
w_name = t_tvbdkr-tdname. "S4DK966284
W_NAME = VBDKR-TDNAME. "S4DK966284
IF NAST-KSCHL EQ 'ZLEE'." or nast-kschl eq 'ZPRE'.
PERFORM READ_TEXT USING W_NAME 'Z555' 'VBBK'.
ENDIF.
IF SY-SUBRC EQ 0.
DELETE TDLINES WHERE TDFORMAT EQ '/*'
OR TDLINE EQ SPACE.
LOOP AT TDLINES.
RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
RECLIST-RECEIVER = RECIPIENT_INT.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
ENDLOOP.
if sy-subrc eq 0. "S4DK966284
exit. "S4DK966284
endif. "S4DK966284
ENDIF.
endloop.
LOOP AT T_TVBDPR.
CHECK T_TVBDPR-TDNAME+0(10) = VBDKR-TDNAME. "S4DK966284
W_NAME = T_TVBDPR-TDNAME.
IF NAST-KSCHL EQ 'ZLEE'.
PERFORM READ_TEXT USING W_NAME 'Z558' 'VBBP'.
ENDIF.
IF SY-SUBRC EQ 0.
DELETE TDLINES WHERE TDFORMAT EQ '/*'
OR TDLINE EQ SPACE.
LOOP AT TDLINES.
RECIPIENT_INT-ADDRESS = TDLINES-TDLINE.
RECLIST-RECEIVER = RECIPIENT_INT.
RECLIST-REC_TYPE = 'U'.
APPEND RECLIST.
ENDLOOP.
if sy-subrc eq 0. "S4DK966284
exit. "S4DK966284
endif. "S4DK966284
ENDIF.
ENDLOOP.
SEND THE DOCUMENT BY CALLING THE SAPOFFICE API1 MODULE
FOR SENDING DOCUMENTS WITH ATTACHMENTS
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
DOCUMENT_DATA = DOC_CHNG
PUT_IN_OUTBOX = 'X'
IMPORTING
SENT_TO_ALL = SENT_TO_ALL
TABLES
PACKING_LIST = OBJPACK
OBJECT_HEADER = OBJHEAD
CONTENTS_BIN = OBJBIN
CONTENTS_TXT = OBJTXT
RECEIVERS = RECLIST
EXCEPTIONS
TOO_MANY_RECEIVERS = 1
DOCUMENT_NOT_SENT = 2
OPERATION_NO_AUTHORIZATION = 4
OTHERS = 99.
Regards
amole -
EA1 - Script output loses focus
Hello out there,
when starting a query in script mode and then trying to copy a word into the clipboard via doubleclick and CTRL-C, not the word I clicked on is copied but something form the worksheet above.
When I just left click into the script output, the focus jumps back into the worksheet.
Marking some text with the mouse lets stay the focus in the script output though...
I'm using SQL Developer 4.0.0.12.27 with JDK 1.7.0_25 64bit on Windows 7 64bit. (With german localization for both SQLD and Windows, if that matters)
Regards,
dhalekIt's a bug! Thanks for reporting this.
-
Dispalying SAP script output in landscape format
Hello All,
Could anyone please tell me the step by step process to display a SAP Script output in landscape format?
Also is it possible to display a column name in 2 lines if it does not fit into 1 line.
Regards
Indrajit.Hi,
Here is the way to print the SAPSCRIPT in landscape ..
Goto SE71, then give you layout name then press change, then press the Header button(CAP ICON), then you will get the Header infomation, then select the Basic Settings pushbutton, then there we have an option to Print the Layout in Portrait format or Landscapr format, then select the LANDSCAPR format Radio button then activate it
Regards
Sudheer -
Report Script output in UTF-8 code with Non-Unicode Application
Essbase Nation,
Report Script output (.txt) file is being coded as UTF-8 when the application is set to Non-unicode. This coding creates a signature character in the first line of the text file, which in turn shows up when we import the file into Microsoft Access. Does anyone know how to change the coding of the output file or know who to remove the UTF-8 signature character.
Any adive is greatly appreciated.
Thank you.
Concerned AdminYou may be able to find a text editor that can do the conversion. Alternatively, I have converted from one encoding to the another programmatically using Java as well.
Tim Tow
Applied OLAP, Inc
Maybe you are looking for
-
How to allow users to upload a flat file to BW
Hi All, For a planning application I would like to permit our users to upload a flat file on their local desktop to the infopackage and execute the load. We would like to empower the users to prepare and upload their flat files into BW from their des
-
Oracle 10g Installation Error on Windows 2008 server
Hi Experts, I have tried to install Oracle 10g via "51036975 ORACLE 10.2.0.4 Failsafe Server 3.4.1.5 Windows 2008" as per note no. Note 1303262 - Oracle on Windows Server 2008. Server is 64 bit server. Oracle service is not getting started and showin
-
I've closed auto analyzer and Revel Agent is not turned on either. Can't figure out what to do next. Any help appreciated. Thanks SKB
-
I have a problem with accessing sites on the web that do not support safari. my work uses a web based program that requires internet explorer 6 or higher so mac use becomes impossible. I overheard a conversation at the apple store about fooling the w
-
Good day all! I've been trying to add the google map to a flash site. I've got it on there but it's in the wrong place it sits on the top of the page and I need it to be centered. Under the logo and nav bar. You can see it here> http://thedesignport.