Long lines corupt script output
When SQL run as Script (F5) produces too long lines any Script Output gets blank. Text is there in tab Script Output and I can copy and past it but I can't see it.
What setting could affect this?
--This SQL is working fine
select rpad('Test1',4000), rpad(' ',996) from dual;
--and this sql output is white on white:
select rpad('Test2',4000), rpad(' ',997) from dual;
Adam Dziurda
PS. Affected version Oracle SQL Developer Version 4.0.0.12.27 (aka 4.0 EA1)
Yes, I see that. I've logged bug 17218146 for it.
Thanks
Barry
Similar Messages
-
Inserting blank lines in script output of a single variable
Dear All,
I have a requirement where i am printing amounnt in words. It is stored in a variable ITAB-RBETR.
I want to insert a blank line when the amount field exceeds the line limit and start printing in second line.
Normally we use '/' command to insert line in between 2 variables in script output. but here it is
a single variable(ITAB-RBETR).
Currrently the output is like this -
Eighty nine crore eighty four lakh twenty
three thousand seven hundred fifty only
My requirement is -
Eighty nine crore eighty four lakh twenty
(Blank line)
three thousand seven hundred fifty onlyHi,
May be you can use the offset value for displaying the text in the variable ITAB-REBTR.
Let's say the total allowed length is 50 chars, then use ITAB-REBTR0(50) in the first line and blank line and then ITAB-REBTR51 in the third line.
I hope this is what you required.
Regards,
Santhosh. -
Inserting new line in script output based on character count
Dear All,
I want to print amount in words on cheque. Condition is if on the first line the character
count reaches 40 the rest words should be printed in next line. Also amount in word
should be printed on the same line.
I have the internal table values itab-amtwords(amount in words and ) itab-rbetr(amount in number)
I want to print them something like this -
Sixty seven crore eighty five lakh twelve thousand
fourty five 678512045.00
the amount in word should come in second line only. The amount in word if reaches certain point
the rest word should print in second line.
How to write the logic in script editor
Regards,
Sandeepthe amount in number should print in the second line.
2163126312.00
regards
sandeep
Edited by: Sandeep Sahoo on Apr 17, 2009 4:34 PM
Edited by: Sandeep Sahoo on Apr 17, 2009 4:38 PM -
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 do I set a PDF Export Preset to force a minimum line weight on output?
How do I set a PDF Export Preset to force a minimum line weight on output? I'm currently using one that came from a printer that works great - but I can't seem to find the option when creating one myself. I have some placed Illustrator line art that is built with .25 line thickness and when I have it placed at 20% scale the lines are too thin to see in the PDF output.
There is absolutely no way to force minimum line widths within InDesign itself, certainly not as part of the PDF export process!! And even one writes a script to go through every object within an InDesign document and both validate and fix line widths less than some particular threshold, such a script would be useless against placed artwork, the contents of which are not available for manual or programmatic inspection within InDesign.
Note that one should be exceptionally careful in “fixing” hairlines, especially if you are placing vector artwork at very low magnification. It may actually be OK to let certain lines drop out. After a fixup on some content, you could end up with a messy mass of lines.
- Dov -
Hi all,
I want to display long text in report output how is it possible.
how can i get the long text for fb60 or fb70.
Edited by: D Tarun Kumar on Aug 23, 2008 11:26 AMHow can i get these
ID =
LANGUAGE =
NAME =
OBJECT =
ARCHIVE_HANDLE = 0
LOCAL_CAT = ' '
IMPORTING
HEADER =
TABLES
LINES =
Thanks -
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 -
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 -
Sending SAP Script output as a PDF attachment through mail
Dear Guru,
I am using SAP 4.0B version, DATABASE Oracle 8i, OS is sun solaris 7.5.
I want to send SAP script output as a
PDF attachement through mail.Please suggest a solution.
Regards,
RajeshHi Rajesh,
In your print program, while calling OPEN_FORM, pass options-TDGETOTF = 'X'. This is used for returning print output in OTF format.
Then in CLOSE_FORM, get the table OTFDATA returned from the function module. for example
DATA: OTF_DATA LIKE ITCOO OCCURS 0 WITH HEADER LINE.
CALL FUNCTION 'CLOSE_FORM'
IMPORTING
RESULT = RESULT
TABLES
OTFDATA = OTF_DATA.
now you can convert this OTF data to PDF using function module CONVERT_OTF
Then send this data as attachment to a mail using function module SO_NEW_DOCUMENT_ATT_SEND_API1
Regards,
Komal. -
SQL Developer Script Output too limited for student - how to increase?
I'm just a student trying to migrate from notepad and SQL Plus to using the SQL Developer for the comprehensive course project. Unfortunately, the script output is way too limited... it only reports a fourth of my last assignment's results - not enough to use in the project. How specifically can this be increased. I have version 1.1.0.21 running on Windows XP on a laptop with 512k memory.
Thanks much for any/all assist. I don't want to go back to notepad!!Thank you for the advice, but I had tried that. My script is 305 lines counting blank lines and the SQL developer displays only about 35 lines of results corresponding to 58 lines of input. When I run the same script in SQL Plus in a console window using the @filename command, I get the entire output.
My input and output follow:
Input:
spool project-test-out.txt
prompt 'name'
prompt 'Assignment X, parts 2b - 2h and 3a - 3b '
create table Customer (
CustID Integer,
Name Char(10),
State Char(2),
primary key (CustID) );
create view CustID_List (ID_Cust) as (select custID from Customer);
create table Inventory (
PartID Integer,
Item Char(10),
Cost Float,
OnHand Integer,
primary key (PartID) );
create table Invoice (
InvNum Integer,
InvDate DATE,
CustID Integer,
primary key (InvNum),
foreign key (CustID) references Customer);
create table Invoice_Item (
InvNum Integer,
PartID Integer,
Quantity Integer,
foreign key (InvNum) references Invoice,
foreign key (PartID) references Inventory);
insert into customer values ( 101, 'Kerry', 'MA' );
insert into customer values ( 102, 'Edwards', 'NC' );
insert into customer values ( 103, 'Cheney', 'TX' );
insert into customer values ( 104, 'Bush', 'TX' );
insert into Inventory values ( 1, 'Boots ', 149.95, 6 );
insert into Inventory values ( 2, 'Spurs ', 12.95, 24 );
insert into Inventory values ( 3, 'Buckle ', 19.95, 4 );
insert into Inventory values ( 4, 'Hat ', 60.00, 12 );
insert into Inventory values ( 5, 'Holster', 75.00, 8 );
insert into Inventory values ( 6, 'Saddle ', 350.00, 2 );
prompt 'Part grad 3b - unsatisfying solution, limitations of Oracle 10g Express'
prompt 'After many trials, found oracle discussion on web stating that'
prompt 'Oracle 9 does not allow subqueries in the trigger WHEN clause.'
prompt 'What a pain. Thus the solution here has become rather inelegant.'
prompt 'The trigger and following select statement are byproducts of various'
prompt 'simplification attempts, none of which worked.'
select ID_Cust from custID_List;
create trigger Invoice_CustID_CK before insert on Invoice
REFERENCING NEW AS newCustID
FOR EACH ROW
BEGIN
if (:newCustID.CustID = 205 )
-- {{want line below but it generates error of: subquery not allowed in }}
-- {{this context }}
-- if (:newCustID.CustID NOT IN
-- (Select ID_Cust from CustID_List))
then :newCustID.CustID := NULL;
end if;
END;
run;
show errors trigger Invoice_CustID_CK;
insert into invoice values ( 201, '01-Aug-2006', 101 );
insert into invoice values ( 202, '02-Sep-2006', 101 );
insert into invoice values ( 203, '05-Oct-2006', 103 );
insert into invoice values ( 204, '07-Oct-2006', 102 );
insert into invoice values ( 205, '09-Oct-2006', 205 );
insert into Invoice_Item values ( 201, 1, 1 );
insert into Invoice_Item values ( 201, 2, 1 );
insert into Invoice_Item values ( 202, 5, 2 );
insert into Invoice_Item values ( 203, 1, 2 );
insert into Invoice_Item values ( 203, 2, 2 );
insert into Invoice_Item values ( 203, 3, 2 );
insert into Invoice_Item values ( 203, 4, 2 );
insert into Invoice_Item values ( 204, 4, 2 );
insert into Invoice_Item values ( 204, 1, 1 );
select * from invoice;
select * from customer;
select * from invoice_item;
select * from inventory;
prompt 'Preparation for part 2b - create view showing onhand and starting inventory'
alter table inventory add (start_inventory integer);
update inventory
set start_inventory = onhand;
create view inv_changes as
select partid, sum(quantity) as sales_by_id
from invoice_item
group by partid;
create table inventory_invoiced as
select inventory.partid, item, cost, onhand, start_inventory, COALESCE (sales_by_id, 0) as sales_by_id_NZ
from inventory left outer join inv_changes
on inventory.partid = inv_changes.partid;
select * from inventory_invoiced;
update inventory_invoiced
Set
onhand = onhand - sales_by_id_NZ;
select * from inventory_invoiced;
prompt 'Part 2b - What item has the least on hand inventory after processing the invoices?'
select item
from inventory_invoiced
where onhand = (select min(onhand) from inventory_invoiced);
prompt 'Part 2c - How much does customer 101 owe?'
create view cust101_orders as
select distinct partID, quantity
from invoice_item, invoice
where invoice_item.invnum IN
(select I.invnum from invoice I where I.custid = 101);
select * from cust101_orders;
select sum(quantity * cost) as cust101_bill
from cust101_orders, inventory
where cust101_orders.partID = inventory.partID;
prompt 'Part 2d - Which customer has the biggest bill?'
prompt ' desirable solution is to do part 2c as a general case '
prompt ' using a stored function such that the custID is passed '
prompt ' to the function. Unfortunately, neither function below '
prompt ' compiles. First case trips on creating the view. Second'
prompt ' case being arewrite without a view - ifit even works - '
prompt ' trips on the complicated select'
create or replace function ind_customer_bill
(ind_customer_ID in integer)
return Float
IS ind_total_bill Float;
begin
create view cust_orders as
select distinct partID, quantity
from invoice_item.invnum IN
(select I.invnum from invoice I where I.custid = ind_customer_ID);
select sum(quantity * cost) into ind_total_bill
from cust_orders, inventory
where cust_orders.partid = inventory.partid;
drop view cust_orders;
return (ind_total_bill);
end;
show errors function ind_customer_bill;
create or replace function ind_customer_bill
(ind_customer_ID in integer)
return Float
IS ind_total_bill Float;
begin
select sum(quantity * cost) into ind_total_bill
from inventory, (select distinct partID as interim_partID, quantity
from invoice_item.invnum IN
(select I.invnum from invoice I where I.custid = ind_customer_ID))
where interim_partID = inventory.partid;
return (ind_total_bill);
end;
show errors function ind_customer_bill;
Prompt 'part 2d continued using shameful brute force technique'
select * from cust101_orders;
create view cust101_due as
select sum(quantity * cost) as cust101_bill
from cust101_orders, inventory
where cust101_orders.partID = inventory.partID;
create view cust102_orders as
select distinct partID, quantity
from invoice_item, invoice
where invoice_item.invnum IN
(select I.invnum from invoice I where I.custid = 102);
select * from cust102_orders;
create view cust102_due as
select sum(quantity * cost) as cust102_bill
from cust102_orders, inventory
where cust102_orders.partID = inventory.partID;
create view cust103_orders as
select distinct partID, quantity
from invoice_item, invoice
where invoice_item.invnum IN
(select I.invnum from invoice I where I.custid = 103);
select * from cust103_orders;
create view cust103_due as
select sum(quantity * cost) as cust103_bill
from cust103_orders, inventory
where cust103_orders.partID = inventory.partID;
create view cust104_orders as
select distinct partID, quantity
from invoice_item, invoice
where invoice_item.invnum IN
(select I.invnum from invoice I where I.custid = 104);
select * from cust104_orders;
create view cust104_due as
select sum(quantity * cost) as cust104_bill
from cust104_orders, inventory
where cust104_orders.partID = inventory.partID;
prompt 'and the answer to part 2d - biggest bill is'
select *
from cust101_due, cust102_due, cust103_due, cust104_due;
prompt 'Part 2e - What items were the most popular (most sold)'
select item
from inventory_invoiced
where sales_by_id_NZ >= ANY (
select max(sales_by_id_NZ) from inventory_invoiced);
prompt 'Part 2f - What was the value of the original inventory'
select sum (start_inventory * cost) as total_start_inventory
from inventory_invoiced;
prompt 'Part 2g - What was the value of the ending inventory'
select sum (onhand * cost) as total_ending_inventory
from inventory_invoiced;
prompt 'Part 2h - What customers did not place an order'
-- after some testing of the inner nest parts wherein the left outer join
-- results in a CustID_List entry 104 having a null entry in
-- invoice's CustID list.
select Name
from customer
where custID IN (select ID_Cust
from (select ID_Cust, CustID
from CustID_List left outer join invoice on
ID_Cust = CustID)
where CUSTID IS NULL);
prompt 'Part 3a - What items were not purchased by anyone'
select item as unpurchased
from inventory_invoiced
where sales_by_id_nz = 0;
prompt 'Part 3b - table modifications for invoices to have valid CustID'
prompt ' -- see 3b section at top of file, notes and trigger '
drop view cust101_due;
drop view cust102_due;
drop view cust103_due;
drop view cust104_due;
drop function ind_customer_bill;
drop view cust101_orders;
drop view cust102_orders;
drop view cust103_orders;
drop view cust104_orders;
drop table inventory_invoiced;
drop view inv_changes;
drop view custID_List;
drop table invoice_item;
drop table invoice;
drop table inventory;
drop table customer;
Output:
'name'
'Assignment X, parts 2b - 2h and 3a - 3b '
create table succeeded.
create view succeeded.
create table succeeded.
create table succeeded.
create table succeeded.
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
1 rows inserted
'Part grad 3b - unsatisfying solution, limitations of Oracle 10g Express'
'After many trials, found oracle discussion on web stating that'
'Oracle 9 does not allow subqueries in the trigger WHEN clause.'
'What a pain. Thus the solution here has become rather inelegant.'
'The trigger and following select statement are byproducts of various'
'simplification attempts, none of which worked.'
ID_CUST
101
102
103
104
4 rows selected
trigger Invoice_CustID_CK Compiled. -
Reg : Sending Script output to email
Hi,
I need to send script output to email.I have written the code for this functionality.
Functional guy has created output type ,but that output type is red in clor and when I click process log " it says Parameter DEVICE= is invalid "
Is there anything to be done from abap point for this error.
Actually I used these 2 fun.modules
DATA: LVF_DEVICE LIKE ITCPP-TDDEVICE.
DATA: LVS_ITCPO TYPE ITCPO,
LVF_DIALOG(1) TYPE C VALUE ' ',
LVS_RECIPIENT LIKE SWOTOBJID,
LVS_SENDER LIKE SWOTOBJID,
LVS_SNAST TYPE SNAST,
LVF_PROGRAM LIKE SY-REPID,
LVS_COMM_TYPE TYPE AD_COMM,
LVS_COMM_VALUES TYPE SZADR_COMM_VALUES.
DATA:
W_DEPT LIKE KNVK-ABTNR, "Department
W_PRSNR LIKE KNVK-PRSNR. "Person number
reset return code
RETCODE = 0.
IF NOT NAST-TCODE IS INITIAL AND NAST-NACHA EQ '5'.
SELECT SINGLE * FROM USR21 WHERE BNAME = SY-UNAME.
CALL FUNCTION 'ADDR_GET_NEXT_COMM_TYPE'
EXPORTING
strategy = nast-tcode
address_number = Kna1-adrnr
IMPORTING
comm_type = lvs_comm_type
comm_values = lvs_comm_values
TABLES
STRATEGY_TABLE =
EXCEPTIONS
address_not_exist = 1
person_not_exist = 2
no_comm_type_found = 3
internal_error = 4
parameter_error = 5
OTHERS = 6.
convert communication data
Always INT
LVS_COMM_TYPE = 'INT'.
clear LVS_COMM_VALUES-ADSMTP-SMTP_ADDR.
Get Contact persons number from KNVK
SELECT SINGLE * FROM KNVK WHERE KUNNR EQ NAST-PARNR
AND ABTNR EQ W_DEPT.
Get it from ADR6 table always
Select single * from adr6 where addrnumber = kna1-adrnr
AND PERSNUMBER = KNVK-PRSNR.
IF SY-SUBRC EQ 0 AND adr6-Smtp_addr NE ' '.
LVS_COMM_VALUES-ADSMTP-SMTP_ADDR = adr6-Smtp_addr.
ENDIF.
ENDIF.
MOVE-CORRESPONDING nast TO LVS_SNAST .
MOVE sy-repid TO LVF_PROGRAM.
CALL FUNCTION 'CONVERT_COMM_TYPE_DATA'
EXPORTING
pi_comm_type = lvs_comm_type
pi_comm_values = lvs_comm_values
pi_country = kna1-land1
pi_repid = LVF_PROGRAM
pi_snast = LVS_SNAST
IMPORTING
pe_itcpo = lvs_itcpo
pe_device = lvf_device
pe_mail_recipient = lvs_recipient
pe_mail_sender = lvs_sender
EXCEPTIONS
comm_type_not_supported = 1
recipient_creation_failed = 2
sender_creation_failed = 3
OTHERS = 4.
fill structure itcpo
ITCPO = LVS_ITCPO.
CALL FUNCTION 'OPEN_FORM'
EXPORTING
APPLICATION = 'TX'
ARCHIVE_INDEX = TOA_DARA
ARCHIVE_PARAMS = ARC_PARAMS
DEVICE = LVF_DEVICE
DIALOG = ' '
FORM = TNAPR-FONAM
LANGUAGE = NAST-SPRAS
OPTIONS = LVS_ITCPO
MAIL_SENDER = LVS_SENDER
MAIL_RECIPIENT = LVS_RECIPIENT
MAIL_APPL_OBJECT = ' '
RAW_DATA_INTERFACE = '*'
IMPORTING
LANGUAGE =
NEW_ARCHIVE_PARAMS =
RESULT =
EXCEPTIONS
CANCELED = 1
DEVICE = 2
FORM = 3
OPTIONS = 4
UNCLOSED = 5
MAIL_OPTIONS = 6
ARCHIVE_ERROR = 7
OTHERS = 8.
IF SY-SUBRC NE 0.
CASE SY-SUBRC.
WHEN 7.
RETCODE = SY-SUBRC.
SYST-MSGID = 'VN'.
SYST-MSGNO = '096'.
SYST-MSGTY = 'E'.
SYST-MSGV1 = NAST-KSCHL.
SYST-MSGV2 = NAST-KAPPL.
PERFORM PROTOCOL_UPDATE.
WHEN OTHERS.
RETCODE = SY-SUBRC.
PERFORM PROTOCOL_UPDATE.
ENDCASE.
ENDIF.
and one more query is :
I want to know weather
"Are there any settings need to be done by BASIS people."
If Anyone has any idea plz reply.Hi
Use the below peace of code,I was used to send sales order confirmation script output as email.
Change History
Programmer Date Change Request Description
FKHURRAM 9/16/02 DU1K920151 Upgrade changes.
Use ADRC for Address Data
Print of an order confirmation by SAPscript
REPORT rvador01 LINE-COUNT 100 MESSAGE-ID vn.
TABLES: komk, "Communicationarea for conditions
komp, "Communicationarea for conditions
komvd, "Communicationarea for conditions
vbco3, "Communicationarea for view
vbdka, "Headerview
vbdpa, "Itemview
vbdpau, "Subitemnumbers
conf_out, "Configuration data
sadr, "Addresses
tvag, "Reason for rejection
vedka, "Servicecontract head data
vedpa, "Servicecontract position data
vedkn, "Servicecontract head notice data
vedpn, "Servicecontract pos. notice data
vbpa, "Sales Document: Partner
kna1, "General Data in Customer Master
riserls, "Serialnumbers
komser, "Serialnumbers for print
tvbur, "Sales office
tvko, "Sales organisation
adrs, "Communicationarea for Address
fpltdr. "billing schedules
INCLUDE yzrvadtabl.
*INCLUDE RVADTABL.
INCLUDE yzrvdirekt.
*INCLUDE RVDIREKT.
INCLUDE yzvedadata.
*INCLUDE VEDADATA.
DATA: retcode LIKE sy-subrc. "Returncode
DATA: repeat(1) TYPE c.
DATA: xscreen(1) TYPE c. "Output on printer or screen
DATA: BEGIN OF steu, "Controldata for output
vdkex(1) TYPE c,
vdpex(1) TYPE c,
kbkex(1) TYPE c,
kbpex(1) TYPE c,
END OF steu.
DATA: BEGIN OF tvbdpa OCCURS 0. "Internal table for items
INCLUDE STRUCTURE vbdpa.
DATA: END OF tvbdpa.
DATA: BEGIN OF tkomv OCCURS 50.
INCLUDE STRUCTURE komv.
DATA: END OF tkomv.
DATA: BEGIN OF tkomvd OCCURS 50.
INCLUDE STRUCTURE komvd.
DATA: END OF tkomvd.
DATA: BEGIN OF tvbdpau OCCURS 5.
INCLUDE STRUCTURE vbdpau.
DATA: END OF tvbdpau.
DATA: BEGIN OF tkomcon OCCURS 50.
INCLUDE STRUCTURE conf_out.
DATA: END OF tkomcon.
DATA: BEGIN OF tkomservh OCCURS 1.
INCLUDE STRUCTURE vedka.
DATA: END OF tkomservh.
DATA: BEGIN OF tkomservp OCCURS 5.
INCLUDE STRUCTURE vedpa.
DATA: END OF tkomservp.
DATA: BEGIN OF tkomservhn OCCURS 5.
INCLUDE STRUCTURE vedkn.
DATA: END OF tkomservhn.
DATA: BEGIN OF tkomservpn OCCURS 5.
INCLUDE STRUCTURE vedpn.
DATA: END OF tkomservpn.
DATA: BEGIN OF tkomser OCCURS 5.
INCLUDE STRUCTURE riserls.
DATA: END OF tkomser.
DATA: BEGIN OF tkomser_print OCCURS 5.
INCLUDE STRUCTURE komser.
DATA: END OF tkomser_print.
DATA: BEGIN OF tfpltdr OCCURS 5.
INCLUDE STRUCTURE fpltdr.
DATA: END OF tfpltdr.
DATA: pr_kappl(01) TYPE c VALUE 'V'. "Application for pricing
DATA: BEGIN OF char_val OCCURS 0,
atnam LIKE cabn-atnam,
atwrt LIKE ausp-atwrt,
END OF char_val.
FORM entry USING return_code us_screen.
CLEAR retcode.
xscreen = us_screen.
PERFORM processing.
IF retcode NE 0.
return_code = 1.
ELSE.
return_code = 0.
ENDIF.
ENDFORM. "ENTRY
FORM PROCESSING *
FORM processing.
PERFORM get_data.
CHECK retcode = 0.
PERFORM form_open USING xscreen vbdka-land1.
CHECK retcode = 0.
PERFORM logo_selection.
PERFORM form_title_print.
CHECK retcode = 0.
PERFORM write_header_info.
PERFORM validity_print.
CHECK retcode = 0.
PERFORM header_data_print.
CHECK retcode = 0.
PERFORM header_serv_print.
CHECK retcode = 0.
PERFORM header_notice_print.
CHECK retcode = 0.
PERFORM header_inter_print.
CHECK retcode = 0.
PERFORM header_text_print.
CHECK retcode = 0.
PERFORM item_print.
CHECK retcode = 0.
PERFORM end_print.
CHECK retcode = 0.
PERFORM form_close.
CHECK retcode = 0.
*********************changes on 12/04/2007****************
TABLES: tsp01.
TYPES: BEGIN OF t_spool,
rqident TYPE tsp01-rqident,
END OF t_spool.
DATA: i_spool TYPE STANDARD TABLE OF t_spool,
wa_spool TYPE t_spool.
SELECT rqident FROM tsp01
INTO TABLE i_spool
WHERE rqowner = sy-uname.
SORT i_spool DESCENDING BY rqident.
LOOP AT i_spool INTO wa_spool.
ENDLOOP.
data: l_rqident type tsp01-rqident.
SELECT SINGLE rqident FROM tsp01 INTO l_rqident
WHERE rqowner = sy-uname.
DATA: l_spoolno LIKE tsp01-rqident VALUE '0000024884'.
TYPES: l_ty_tab_pdf TYPE tline OCCURS 0.
DATA: l_pdf TYPE l_ty_tab_pdf,
l_spool TYPE tsp01-rqident.
Type for binary attachment table.
TYPES: l_ty_tab_objbin TYPE solisti1 OCCURS 0.
DATA: l_objbin TYPE l_ty_tab_objbin.
l_spool = l_spoolno.
l_spool = l_rqident.
l_spool = wa_spool-rqident.
**/ Call the standard function
CALL FUNCTION 'CONVERT_OTFSPOOLJOB_2_PDF' "#EC ARGCHECKED
EXPORTING
src_spoolid = l_spool
no_dialog = ' '
DST_DEVICE =
PDF_DESTINATION =
IMPORTING
pdf_bytecount = numbytes
pdf_spoolid = pdfspoolid
LIST_PAGECOUNT =
btc_jobname = jobname
btc_jobcount = jobcount
TABLES
pdf = l_pdf
EXCEPTIONS
err_no_abap_spooljob = 1
err_no_spooljob = 2
err_no_permission = 3
err_conv_not_possible = 4
err_bad_destdevice = 5
user_cancelled = 6
err_spoolerror = 7
err_temseerror = 8
err_btcjob_open_failed = 9
err_btcjob_submit_failed = 10
err_btcjob_close_failed = 11
OTHERS = 12.
IF sy-subrc <> 0.
WRITE: / 'error', sy-subrc.
ENDIF.
**/ Convert the PDF format to the table type required for the
*attachment.
CALL FUNCTION 'QCE1_CONVERT'
TABLES
t_source_tab = l_pdf
t_target_tab = l_objbin
EXCEPTIONS
convert_not_possible = 1
OTHERS = 2.
IF sy-subrc <> 0.
WRITE: / 'error', sy-subrc.
ENDIF.
TABLES : soli.
TABLES : zpsdsalrep.
DATA: v_email TYPE soli-line.
DATA: v_email1 TYPE soli-line.
DATA: l_adrnr LIKE kna1-adrnr.
DATA: l_objky TYPE nast-objky.
DATA: l_zzterrmg TYPE zpsdsalrep-zzterrmg.
DATA: l_zsupervisor TYPE zpsdsalrep-zsupervisor.
DATA: l_kunnr TYPE kna1-kunnr.
DATA: l_kunnr1 TYPE vbak-kunnr.
SELECT SINGLE kunnr FROM vbak INTO l_kunnr1
WHERE vbeln = nast-objky.
SELECT SINGLE adrnr FROM kna1 INTO l_adrnr
WHERE kunnr = l_kunnr1.
CHECK sy-subrc IS INITIAL.
SELECT SINGLE smtp_addr FROM adr6 INTO v_email
WHERE addrnumber = l_adrnr.
SELECT SINGLE zzterrmg FROM zpsdsalrep INTO l_zzterrmg
WHERE zzsalesrep = l_kunnr1.
SELECT SINGLE zsupervisor FROM zpsdsalrep INTO l_zsupervisor
WHERE zzterrmg = l_zzterrmg.
SELECT SINGLE kunnr FROM kna1 INTO l_kunnr
WHERE sortl = l_zsupervisor.
SELECT SINGLE adrnr FROM kna1 INTO l_adrnr
WHERE kunnr = l_kunnr.
CHECK sy-subrc IS INITIAL.
SELECT SINGLE smtp_addr FROM adr6 INTO v_email1
WHERE addrnumber = l_adrnr.
DATA: l_reclist LIKE somlreci1 OCCURS 0 WITH HEADER LINE.
DATA: l_objtxt LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA: l_objpack LIKE sopcklsti1 OCCURS 0 WITH HEADER LINE.
DATA: l_doc_chng LIKE sodocchgi1.
DATA: l_objhead LIKE solisti1 OCCURS 0 WITH HEADER LINE.
DATA: l_tab_lines LIKE sy-tabix.
CONSTANTS: k_true TYPE boolean_flg VALUE 'X'.
DATA: l_mail TYPE somlreci1-receiver.
DATA: l_mail1 TYPE somlreci1-receiver.
DATA: k_mail2 TYPE somlreci1-receiver.
DATA: k_mail TYPE somlreci1-receiver.
l_mail = v_email.
l_mail1 = v_email1.
k_mail2 = text-006.
k_mail = text-007.
Creation of the document to be sent
File Name
l_doc_chng-obj_name = 'SENDFILE'.
Mail Subject
l_doc_chng-obj_descr = text-001.
Completing the recipient list
l_reclist-receiver = l_mail.
l_reclist-rec_type = 'U'.
APPEND l_reclist.
l_reclist-receiver = l_mail1.
l_reclist-rec_type = 'U'.
APPEND l_reclist.
l_reclist-receiver = k_mail.
l_reclist-rec_type = 'U'.
APPEND l_reclist.
l_reclist-receiver = k_mail2.
l_reclist-rec_type = 'U'.
APPEND l_reclist.
Mail Contents
l_objtxt = text-002.
APPEND l_objtxt.
CLEAR l_objtxt. " put in a blank line
APPEND l_objtxt.
l_objtxt = text-003.
APPEND l_objtxt.
l_objtxt = text-004 .
APPEND l_objtxt.
Calculate email size in bytes
DESCRIBE TABLE l_objtxt LINES l_tab_lines.
READ TABLE l_objtxt INDEX l_tab_lines.
l_doc_chng-doc_size = ( l_tab_lines - 1 ) * 255 + STRLEN( l_objtxt ).
Creation of the entry for the compressed document
for the email text
CLEAR l_objpack-transf_bin.
l_objpack-head_start = 1.
l_objpack-head_num = 0.
l_objpack-body_start = 1.
l_objpack-body_num = l_tab_lines.
l_objpack-doc_type = 'RAW'.
APPEND l_objpack.
Creation of the document attachment
(Assume that the data in OBJBIN is in BMP format)
DESCRIBE TABLE l_objbin LINES l_tab_lines.
l_objhead = text-001 .
APPEND l_objhead.
CLEAR l_objpack.
**/ Creation of the entry for the compressed/attached document
l_objpack-transf_bin = k_true.
l_objpack-head_start = 1.
l_objpack-head_num = 1.
l_objpack-body_start = 1.
l_objpack-body_num = l_tab_lines.
l_objpack-doc_type = 'PDF'.
l_objpack-obj_name = text-005.
l_objpack-obj_descr = text-001.
l_objpack-doc_size = l_tab_lines * 255.
APPEND l_objpack. "/ .
Sending the document
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1' "/ .
EXPORTING
document_data = l_doc_chng
put_in_outbox = 'X'
TABLES
packing_list = l_objpack
object_header = l_objhead
contents_bin = l_objbin
contents_txt = l_objtxt
receivers = l_reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99.
IF sy-subrc <> 0.
WRITE: / 'unsuccessful', sy-subrc.
ELSE.
WRITE: / 'successful'.
ENDIF.
**/Take_note it is a requirement to do a commit work for the
email to go into transaction SOST.
COMMIT WORK. "/Take_note .
ENDFORM. "PROCESSING
S U B R O U T I N E S *
FORM ALTERNATIVE_ITEM *
A text is printed, if the item is an alternative item. *
FORM alternative_item.
CHECK vbdpa-grpos CN '0'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ALTERNATIVE_ITEM'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "ALTERNATIVE_ITEM
FORM CHECK_REPEAT *
A text is printed, if it is a repeat print for the document. *
FORM check_repeat.
CLEAR repeat.
SELECT * INTO *nast FROM nast WHERE kappl = nast-kappl
AND objky = nast-objky
AND kschl = nast-kschl
AND spras = nast-spras
AND parnr = nast-parnr
AND parvw = nast-parvw
AND nacha BETWEEN '1' AND '4'.
CHECK *nast-vstat = '1'.
repeat = 'X'.
EXIT.
ENDSELECT.
ENDFORM. "CHECK_REPEAT
FORM DELIVERY_DATE *
If the delivery date in the item is different to the header *
date and there are no scheduled quantities, the delivery date *
is printed in the item block. *
FORM delivery_date.
IF vbdka-lfdat = space AND
vbdpa-lfdat NE space AND
vbdpa-etenr_da = space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_DELIVERY_DATE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "DELIVERY_DATE
FORM DIFFERENT_CONSIGNEE *
If the consignee in the item is different to the header con- *
signee, it is printed by this routine. *
FORM different_consignee.
CHECK vbdka-name1_we NE vbdpa-name1_we
OR vbdka-name2_we NE vbdpa-name2_we
OR vbdka-name3_we NE vbdpa-name3_we
OR vbdka-name4_we NE vbdpa-name4_we.
CHECK vbdpa-name1_we NE space
OR vbdpa-name2_we NE space
OR vbdpa-name3_we NE space
OR vbdpa-name4_we NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_CONSIGNEE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "DIFFERENT_CONSIGNEE
FORM DIFFERENT_REFERENCE_NO *
If the reference number in the item is different to the header*
reference number, it is printed by this routine. *
FORM different_reference_no.
CHECK vbdpa-vbeln_vang NE vbdka-vbeln_vang
OR vbdpa-vbtyp_vang NE vbdka-vbtyp_vang.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_REFERENCE_NO'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "DIFFERENT_REFERENCE_NO
FORM DIFFERENT_TERMS *
If the terms in the item are different to the header terms, *
they are printed by this routine. *
FORM different_terms.
DATA: us_vposn LIKE vedpa-vposn.
DATA: us_text(1) TYPE c. "Flag for Noticetext was printed
IF vbdpa-zterm NE vbdka-zterm AND
vbdpa-zterm NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_PAYMENT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
IF vbdpa-inco1 NE space.
IF vbdpa-inco1 NE vbdka-inco1 OR
vbdpa-inco2 NE vbdka-inco2.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_DELIVERY'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDIF.
Print different validity-data for the position
READ TABLE tkomservp WITH KEY vbdpa-posnr.
IF sy-subrc EQ 0.
vedpa = tkomservp.
IF vedpa-vbegdat NE space AND
vedpa-venddat NE space AND
NOT vedpa-vbegdat IS INITIAL AND
NOT vedpa-venddat IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_SERV1'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSEIF vedpa-vbegdat NE space AND
NOT vedpa-vbegdat IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_SERV2'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_SERV3'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDIF.
Notice-rules for the positions.
MOVE vbdpa-posnr TO us_vposn.
CLEAR us_text.
LOOP AT tkomservpn WHERE vposn = us_vposn.
vedpn = tkomservpn.
IF us_text IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_NOTTXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
us_text = charx.
ENDIF.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_TERMS_OF_NOTICE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDLOOP.
IF NOT us_text IS INITIAL.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'EMPTY_LINE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "DIFFERENT_TERMS
FORM END_PRINT *
FORM end_print.
PERFORM get_header_prices.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'PROTECT'.
PERFORM header_price_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'END_VALUES'.
CALL FUNCTION 'CONTROL_FORM'
EXPORTING
command = 'ENDPROTECT'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'SUPPLEMENT_TEXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "END_PRINT
FORM FORM_CLOSE *
End of printing the form *
FORM form_close.
CALL FUNCTION 'CLOSE_FORM'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
retcode = 1.
ENDIF.
SET COUNTRY space.
ENDFORM. "FORM_CLOSE
FORM FORM_OPEN *
Start of printing the form *
--> US_SCREEN Output on screen *
' ' = printer *
'X' = screen *
--> US_COUNTRY County for telecommunication and SET COUNTRY *
FORM form_open USING us_screen us_country.
INCLUDE yzrvadopfo.
INCLUDE RVADOPFO.
ENDFORM. "FORM_OPEN
FORM FORM_TITLE_PRINT *
Printing of the form title depending of the field VBTYP *
FORM form_title_print.
CASE vbdka-vbtyp.
WHEN 'A'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_A'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'B'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_B'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'C'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_C'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'E'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_E'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'F'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_F'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'G'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_F'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'H'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_H'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'K'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_K'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN 'L'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_L'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
WHEN OTHERS.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TITLE_OTHERS'
window = 'TITLE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDCASE.
IF repeat NE space.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'REPEAT'
window = 'REPEAT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "FORM_TITLE_PRINT
FORM GET_DATA *
General provision of data for the form *
FORM get_data.
DATA: us_veda_vbeln LIKE veda-vbeln.
DATA: us_veda_posnr_low LIKE veda-vposn.
CALL FUNCTION 'RV_PRICE_PRINT_REFRESH'
TABLES
tkomv = tkomv.
CLEAR komk.
CLEAR komp.
vbco3-mandt = sy-mandt.
vbco3-spras = nast-spras.
vbco3-vbeln = nast-objky.
vbco3-kunde = nast-parnr.
vbco3-parvw = nast-parvw.
CALL FUNCTION 'RV_DOCUMENT_PRINT_VIEW'
EXPORTING
comwa = vbco3
IMPORTING
kopf = vbdka
TABLES
pos = tvbdpa.
Fetch servicecontract-data and notice-data for head and position.
us_veda_vbeln = vbdka-vbeln.
us_veda_posnr_low = posnr_low.
CALL FUNCTION 'SD_VEDA_GET_PRINT_DATA'
EXPORTING
i_document_number = us_veda_vbeln
i_language = sy-langu
i_posnr_low = us_veda_posnr_low
TABLES
print_data_pos = tkomservp
print_data_head = tkomservh
print_notice_pos = tkomservpn
print_notice_head = tkomservhn.
PERFORM get_controll_data.
PERFORM sender.
PERFORM check_repeat.
PERFORM tvbdpau_create.
ENDFORM. "GET_DATA
FORM GET_ITEM_BILLING_SCHEDULES *
In this routine the billing schedules are fetched from the *
database. *
FORM get_item_billing_schedules.
REFRESH tfpltdr.
CHECK NOT vbdpa-fplnr IS INITIAL.
CALL FUNCTION 'BILLING_SCHED_PRINTVIEW_READ'
EXPORTING
i_fplnr = vbdpa-fplnr
i_language = nast-spras
TABLES
zfpltdr = tfpltdr.
ENDFORM. "GET_ITEM_BILLING_SCHEDULES
*& Form ITEM_BILLING_SCHEDULES_PRINT
This routine prints the billing shedules of a salesdocument *
position. *
FORM item_billing_schedules_print.
DATA: first_line(1) TYPE c.
first_line = charx.
LOOP AT tfpltdr.
fpltdr = tfpltdr.
Output of the following printlines
IF NOT fpltdr-perio IS INITIAL.
periodische Fakturen
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_PERIODIC'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
bei periodischen nur eine Zeile
EXIT.
ELSEIF fpltdr-fareg CA '14'.
prozentuale Teilfakturierung
IF NOT first_line IS INITIAL.
CLEAR first_line.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_PERCENT_HEADER'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_PERCENT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ELSEIF fpltdr-fareg CA '235'.
wertmäßige Teilfakturierung
IF NOT first_line IS INITIAL.
CLEAR first_line.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_VALUE_HEADER'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_BILLING_SCHEDULE_VALUE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ELSEIF fpltdr-fareg CA '3'.
Schlußrechnung
ENDIF.
ENDLOOP.
ENDFORM. "ITEM_BILLING_SCHEDULES_PRINT
*eject
FORM GET_ITEM_CHARACTERISTICS *
In this routine the configuration data item is fetched from *
the database. *
FORM get_item_characteristics.
REFRESH tkomcon.
CHECK NOT vbdpa-cuobj IS INITIAL.
CALL FUNCTION 'CUD0_GET_CONFIGURATION' "#EC EXISTS
EXPORTING
instance = vbdpa-cuobj
language = nast-spras
TABLES
configuration = tkomcon
EXCEPTIONS
OTHERS = 4.
ENDFORM. "GET_ITEM_CHARACTERISTICS
FORM GET_ITEM_PRICES *
In this routine the price data for the item is fetched from *
the database. *
FORM get_item_prices.
CLEAR: komp,
tkomv.
IF komk-knumv NE vbdka-knumv.
CLEAR komk.
komk-mandt = sy-mandt.
komk-kalsm = vbdka-kalsm.
komk-kappl = pr_kappl.
komk-waerk = vbdka-waerk.
komk-knumv = vbdka-knumv.
komk-vbtyp = vbdka-vbtyp.
ENDIF.
komp-kposn = vbdpa-posnr.
CALL FUNCTION 'RV_PRICE_PRINT_ITEM'
EXPORTING
comm_head_i = komk
comm_item_i = komp
language = nast-spras
IMPORTING
comm_head_e = komk
comm_item_e = komp
TABLES
tkomv = tkomv
tkomvd = tkomvd.
ENDFORM. "GET_ITEM_PRICES
FORM GET_HEADER_PRICES *
In this routine the price data for the header is fetched from *
the database. *
FORM get_header_prices.
CALL FUNCTION 'RV_PRICE_PRINT_HEAD'
EXPORTING
comm_head_i = komk
language = nast-spras
IMPORTING
comm_head_e = komk
TABLES
tkomv = tkomv
tkomvd = tkomvd.
ENDFORM. "GET_HEADER_PRICES
*& Form HEADER_DATA_PRINT
Printing of header data like terms, weights .... *
FORM header_data_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_DATA'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. " HEADER_DATA_PRINT
FORM HEADER_PRICE_PRINT *
Printout of the header prices *
FORM header_price_print.
LOOP AT tkomvd.
AT FIRST.
IF komk-supos NE 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_SUM'.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'UNDER_LINE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDAT.
komvd = tkomvd.
IF komvd-koaid = 'D'.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'TAX_LINE'.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'SUM_LINE'.
ENDIF.
ENDLOOP.
DESCRIBE TABLE tkomvd LINES sy-tfill.
IF sy-tfill = 0.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'UNDER_LINE'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDIF.
ENDFORM. "HEADER_PRICE_PRINT
FORM HEADER_TEXT_PRINT *
Printout of the headertexts *
FORM header_text_print.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'HEADER_TEXT'
EXCEPTIONS
element = 1
window = 2.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ENDFORM. "HEADER_TEXT_PRINT
FORM ITEM_CHARACERISTICS_PRINT *
Printout of the item characteristics -> configuration *
FORM item_characteristics_print.
LOOP AT tkomcon.
conf_out = tkomcon.
IF sy-tabix = 1.
CALL FUNCTION 'WRITE_FORM'
EXPORTING
element = 'ITEM_LINE_CONFIGURATION_HEADER'
EXCEPTIONS
OTHERS = 1.
IF sy-subrc NE 0.
PERFORM protocol_update.
ENDIF.
ELSE.
CALL FUNCTION 'WRITE_FORM'
EXPOR -
[solved] How to have line breaks in output of journalctl log
Hello,
How can I have line breaks in the journalctl log output?
At the moment I cannot read most of the log output because it does not fit into my terminal.
See this screenshot: http://i.imgur.com/nUR6Fae.png
Thanks!
Last edited by orschiro (2013-09-20 08:08:04)You can run
journalctl -b --no-pager | less
Edit: If you hit 'h' you get help screen
SUMMARY OF LESS COMMANDS
<snip>
ESC-) RightArrow * Left one half screen width (or N positions).
ESC-( LeftArrow * Right one half screen width (or N positions).
<snip>
It may be possible to configure the way the journal uses the pager so it wraps the lines by default.
Edit 2: Or maybe it can't be configured.
man journalctl wrote:The output is paged through less by default, and long lines are "truncated" to screen width. The hidden part can be viewed by using the left-arrow and right-arrow keys. Paging can be disabled, see --no-pager and section Environment below.
Last edited by karol (2013-09-20 08:02:13) -
SAP Script output extra page is coming
Dear friends
In my sap script output i m getting one extra page with empty main window. Even i have not used NEW-PAGE Command,
No Empty lines and window size also correct. Can anyone solute for this issue.
Regards
Balamurugan NHi,
check those details:
1) In your SAPSCRIPT contains one page or two pages?
2) In the sapscript check did u assign any nextpage as different page?
Regards,
Dhina..
Maybe you are looking for
-
Hello Linc et al., I have been having Yosemite problems similar to those discussed elsewhere (e.g. iMac 27" late 2013 and Yosemite) (albeit with 10.10.1, Mid-2010 MacBook Pro): can't enter Time Machine, although it seems to be backing up; programs in
-
I created an Imovie and shared it with Idvd to burn. I choose a theme and burned the DVD with no troubles. The movie will play in my computer (without showing the theme from Idvd but playing the movie) but will not play in my home DVD player hooked t
-
Changes at i Tunes U???
We have an i Tunes U site that has been up and running for close to two years. We were early adopters iTunesU. everything has been running great from the time we set up until now. Now I am getting... "500 ITunesU.invokeAction(): I/O Exception java.io
-
Urgent!! updating the task won't reflect the values in WLA
Hi, I am trying to upde the task using below code but when i select the task i couldn't find the values in the Worklist Aplication. try IWorkflowServiceClient wfSvcClient = WorkflowServiceClientFactory.getWorkflowServiceClient(WorkflowServiceClientFa
-
CFolder - Modify the Notification email body
Hi All, I have the following requirement. There is a generic Folder - Transmittals that is created in cFolders. Documents can be attached to this folder. The requirement is that when a notification is send out of this folder the name of the documents