Discoverer desktop excel export truncates to 255 chars
Hi,
I am using both the desktop and web version of Discoverer (10g). I noticed that if i export a file using desktop, then data in every cell is truncated to 255 chars (which is the excel limit). However, the same does not happen if I export using web version. Any suggestions on what i can do so that even the desktop export will not limit the chars to 255? I guess there is some way, since the web version is able to it. Please let me know!
Thanks.
A
I am experiencing the same issue. has anyone got a solution to this issue? i dont really want to truncate the string if possible
Similar Messages
-
Spool list output truncated after 255 char
Hi,
I'm using ALV list(FM: Reuse_alv_list_display) in my report. When it is run in background, the output is sent to spool. The problem is the list is truncated after 255 characters.
Is there any way to display more than 255 characters in spool? So that it can be downloaded to a spreadsheet from spool.
ThanksHi,
in the report-statement you can define the line-size of your list. I expect, you haven set the line-size!
Try this one:
REPORT Zxxxxx line-size 300.
Normaly the program searches the the layout that fits to your selected printer (done by FM 'RSPO_LIST_LAYOUT_FITS').
Regards,
Martin -
Forms 5 - system.last_query truncated to 255 char
I'm trying to display the contents of :system.last_query.
But the variable is only holding 255 characters. It should hold more. Ideas? Here is my code:
(the output of message() should be a long where clause. what I get is just a few characters. add that to the contents of vSel and I get 255 characters exactly).
declare
vSel varchar2(2000);
vWhere varchar2(2000);
begin
vSel := substr(:system.last_query
,1
,(instr(:system.last_query,'WHERE')-1));
vWhere := substr(:system.last_query
,instr(:system.last_query,'WHERE'));
message (vWhere);pause;
end;Sure,
I had a similar situation last year..... What you need to do is "chop" up the String(Last_query) into bits using the substr and instr function. And then piece them back together...
Eg.
Begin = 255, Middle= 256,... and so on.
A bit tediuos but should do the trick...
Gracias' omego.
N -
How to display more than 255 chars in background job with ALV Grid ????
Hi All,
I am using ALV grid with OO.
I have used call screen for ALV grid display. I have to display more than 255 characters in width. While running it, I can see the list perfectly.
But in background mode, the list is truncated after 255 chars.
Can anybody help how to send complete list(width more than 255 chars) to spool.
Thanks and Regards,
NehaHi SAP fan,
<b>YES you can run the ALV report in background mode.
To run the report in background do F9 instead of F8, then give immediate and save.
Now goto Sm35 goto job overview and view the job listed
Choose the job and press the spool button. It will show the list created on the next page. When u clcik the list u can see the ALV output.
To see this the job should be in the finished status.
How to define Periodic Jobs
1.Execute transaction SM36
2.Define Job name, Job class, Target server
3.Click on 'START CONDITION' button
4.Click on 'Date/Time' button
5.Enter Scheduled start DATE & TIME. Check mark 'Periodic Job' field. Click on 'Period values' button and select 'Hourly' or 'Dialy' or 'Weekly' or 'Monthly' or Other period and SAVE. Go back to main screen.
6.Click on 'STEPS' button and enter Program name and Variant under box 'ABAP Program'. Click on 'Print Specification' button and enter Printer name under 'Output device' and SAVE
7.Click on SAVE button until you get message on bottom of the screen that describes 'Job XYZ saved with status: Scheduled'.
8.Click on 'Job overview' button or execute SM37 transaction.
9.Select the appropriate 'Job name', 'User name', 'Job Status' & Schedule date under 'Job start condition' and click on 'Execute' button or press F8.
10.You will now see all your scheduled JOBS.
<b>Case: 2</b>
You can Run in Background but make sure it is alv list, not alv Grid FM. if you are uisng alv list not problem , but if you are using alv grid then you can code like this..
if sy-batch = ' '.
call 'REUSE_ALV_GRID_DISPLAY'.
else.
call 'REUSE_ALV_LIST_DISPLAY'.
endif.
if you are using OO alv then write this code..
CALL METHOD cl_gui_alv_grid=>offline
RECEIVING e_offline = off.
IF off IS INITIAL.
CREATE OBJECT g_custom_container
EXPORTING container_name = g_container.
ENDIF.
<b>Case: 3</b>
if you are using OO ALV.
Just before creating the custom container check for the following condition.
Batch or Web Reporting
IF cl_gui_alv_grid=>offline( ) IS INITIAL.
CREATE OBJECT o_custcontainer
EXPORTING
container_name = lc_custcontrol
EXCEPTIONS
cntl_error = 1
cntl_system_error = 2
create_error = 3
lifetime_error = 4
lifetime_dynpro_dynpro_link = 5
OTHERS = 6
ENDIF.
You can see the output in Spool in transaction SP01.</b>
Good Luck and thanks
AK -
Email attachment rows greater than 255 char get truncated
Hi
I am trying to code in 4.6C to email excel attachment with rows greater than 255, and the rows are being truncated using function module SO_NEW_DOCUMENT_ATT_SEND_API1.
I have searched the forum and can not find an actual solution to this on a 4.6c system.
Firstly is it possible to send an excel attachment with rows that have rows greater than 255, and secondly if yes have anyone seen any sample code which does this?
Many thanks
DanielHai! Check this coding out
Here the internal table l_tab_attach is temporary table which has a line size more than 255 chars.
Data: begin of l_tab_attach occurs 0,
line(300), "give what ever char length u want as a output
end of l_tab_attach
*concatenate all the header column and the its corresponding entries ie rows in this table l_tab_attach.
peform send_email table t_message
l_tab_attach
'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,
w_new_obj_id TYPE sofolenti1-object_id,
t_objhead TYPE STANDARD TABLE OF solisti1 WITH HEADER LINE.
ld_mtitle = eml_subj.
ld_format = 'XLS'.
ld_attdescription = p_attdescription.
ld_attfilename = att_nam.
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 l_tab_attach INDEX w_cnt.
w_doc_data-doc_size =
<b>( w_cnt - 1 ) * 255 + STRLEN( L_TAB_ATTACH-LINE ).</b>"this is important for lenght exceeding more that 255 char
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 l_tab_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.
REFRESH t_receivers.
LOOP AT mailto.
Add the recipients email address
CLEAR t_receivers.
t_receivers-receiver = mailto+3(48).
t_receivers-rec_type = 'U'.
t_receivers-com_type = 'INT'.
t_receivers-notif_del = 'X'.
t_receivers-notif_ndel = 'X'.
APPEND t_receivers.
ENDLOOP.
CLEAR t_objhead.
REFRESH t_objhead.
t_objhead = att_nam.
APPEND t_objhead.
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 = l_tab_message
receivers = t_receivers
object_header = t_objhead
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. " SEND_FILE_AS_EMAIL_ATTACHMENT
<b>Dont forget to give points if useful</b> -
Oracle Discoverer Desktop truncate at least 10.000 rows
Hi All,
I want to export to excel file from Oracle Discoverer Desktop. If the file contains more than 10.000 rows, It truncates the output and only shows the first 10.000 rows.
How can I resolve this problem?. I changed that Limit in Oracle Discoverer Viewer, but I don't know where I can do this in Desktop.
Best Regards,
Mariano.-In Desktop, go to the Tools menu, and select Options...
The second tab is for the Query Governor, and you can uncheck (or change) the "Limit Retrieved Data To:" item. This works in Desktop 10.1.2.48.18. -
hi all,
Good morning.
My requirement is to send a report as an excel attatchment to the respective managers mail box. For this I am using the function module SO_DOCUMENT_SEND_API1 as follows.
call function 'SO_DOCUMENT_SEND_API1'
exporting
document_data =
put_in_outbox =
sender_address =
sender_address_type =
commit_work =
tables
packing_list =
object_header =
contents_bin =
contents_txt =
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.
Here the problem is contents_bin is of type SOLISTI1 which takes max 255 characters, As my report columns occupies more than 400 characters, I am unable to get all the column values in excel attachement.
Can anyone please help me to get all the column values in the excel attachment.
Thanks in Advance.Hi,
Please check the following extract of a sample program I had executed.It deals with how to handle more that 255 chars in excel att in FM SO_DOCUMENT_SEND_API1
Hope this helps....
CONSTANTS: con_cret TYPE x VALUE '0D', "OK for non Unicode
con_tab TYPE X VALUE '09'. "OK for non Unicode
data : Begin of wa_output ,
BUFFER(1000) TYPE C, " data to be written into xls format
End of wa_output.
data : gt_output LIKE wa_output OCCURS 0 WITH HEADER LINE.
data : FIELDNAME_OFFSET TYPE I.
Attachement contents
DATA: BEGIN OF wa_att_cont.
INCLUDE STRUCTURE solisti1.
DATA: END OF wa_att_cont.
DATA: lt_att_cont LIKE wa_att_cont OCCURS 0.
data : begin of zdfies occurs 0.
include structure dfies.
data : end of zdfies.
data : begin of it_field occurs 0,
fldname(40) type c,
end of it_field.
data : yfilname like RLGRAP-FILENAME value 'C:\Documents and
Settings\'.
data : ok_code TYPE sy-ucomm,
save_ok TYPE sy-ucomm.
data : flag type i.
********************************Variables*****************************
DATA: lv_count TYPE i, " count
lv_forwarder LIKE soud-usrnam, " Forwarder.
lv_lines TYPE i. " no of lines
********************************Structures****************************
DATA: w_doc_data LIKE sodocchgi1,
w_sent_all(1) TYPE c,
ld_sender_address LIKE soextreci1-receiver,
ld_sender_address_type LIKE soextreci1-adr_typ.
******Structure for Folder ID
DATA: BEGIN OF wa_folder_id.
INCLUDE STRUCTURE soodk.
DATA: END OF wa_folder_id.
Folder Contents, change attributes
DATA: BEGIN OF wa_object_fl_change.
INCLUDE STRUCTURE sofm1.
DATA: END OF wa_object_fl_change.
******Object definition, change attributes
DATA: BEGIN OF wa_object_hd_change.
INCLUDE STRUCTURE sood1.
DATA: END OF wa_object_hd_change.
******Object ID
DATA: BEGIN OF wa_object_id.
INCLUDE STRUCTURE soodk.
DATA: END OF wa_object_id.
******Object Defintion.
DATA: BEGIN OF wa_sood.
INCLUDE STRUCTURE sood.
DATA: END OF wa_sood.
******User Definition
DATA: BEGIN OF wa_soud.
INCLUDE STRUCTURE soud.
DATA: END OF wa_soud.
******Sent to all flag.
DATA: BEGIN OF wa_sonv.
INCLUDE STRUCTURE sonv.
DATA: END OF wa_sonv.
******Mail contents
DATA: BEGIN OF wa_objcont.
INCLUDE STRUCTURE solisti1.
DATA: END OF wa_objcont.
******Mail header.
DATA: BEGIN OF wa_objhead.
INCLUDE STRUCTURE soli.
DATA: END OF wa_objhead.
******Para A
DATA: BEGIN OF wa_objpara.
INCLUDE STRUCTURE soparai1.
DATA: END OF wa_objpara.
******Para B
DATA: BEGIN OF wa_objparb.
INCLUDE STRUCTURE soparbi1.
DATA: END OF wa_objparb.
******Receivers list
DATA: BEGIN OF wa_receivers.
INCLUDE STRUCTURE somlreci1.
DATA: END OF wa_receivers.
Pack list
DATA: BEGIN OF wa_packlist.
INCLUDE STRUCTURE sopcklsti1.
DATA: END OF wa_packlist.
DATA: BEGIN OF wa_att_head.
INCLUDE STRUCTURE soli.
DATA: END OF wa_att_head.
********************internal tables******************************
DATA: lt_objcont LIKE wa_objcont OCCURS 0, "mail contents
lt_objhead LIKE wa_objhead OCCURS 0, "mail header
lt_objpara LIKE wa_objpara OCCURS 0, "Paragraph A
lt_objparb LIKE wa_objparb OCCURS 0, "Paragraph B
lt_receivers LIKE wa_receivers OCCURS 0," receiver list
lt_packlist LIKE wa_packlist OCCURS 0,"Pack list
lt_att_head LIKE wa_att_head OCCURS 0."Attachment Header
**************************Constants***********************************
CONSTANTS: lc_kreuz LIKE sonv-flag VALUE 'X', "Outbox flag,
lc_colon(1) TYPE c VALUE ':',
lc_raw(3) TYPE c VALUE 'RAW',
lc_f(1) TYPE c VALUE 'F',
lc_u(1) TYPE c VALUE 'U'.
DATA: w_cnt TYPE i.
data : wa_edition like t_edition.
DATA : i_strlen TYPE i,
i_off TYPE i ,
i_len TYPE i VALUE 254,
i_totlen TYPE i,
lv_fill_space TYPE i,
lv_split_times TYPE i,
lv_len TYPE i.
**>> Populate the attachment contents.*
LOOP AT gt_output INTO wa_output.
i_strlen = strlen( wa_output ) .
IF i_strlen LE 254.
CONCATENATE con_cret wa_output-buffer
INTO wa_output-buffer.
APPEND wa_output-buffer TO lt_att_cont.
ELSE. " i.e the data is more than 255 characters
DO 4 TIMES.
i_totlen = i_off + i_len .
IF i_totlen = 254.
wa_att_cont = wa_output+i_off(i_len).
CONCATENATE con_cret wa_att_cont
INTO wa_att_cont.
APPEND wa_att_cont TO lt_att_cont.
ELSE.
wa_att_cont = wa_output+i_off(i_len). "splitting more than 255
APPEND wa_att_cont TO lt_att_cont.
ENDIF.
IF i_totlen GE i_strlen.
CLEAR : i_off .
EXIT.
ELSE.
i_off = i_off + 254.
ENDIF.
ENDDO.
ENDIF.
CLEAR : wa_output.
ENDLOOP. -
How to transfer data more than 255 char from excel sheet to internal table.
Hello Experts,
I have a requirement where i have a text field in the excel sheet of more than 255 char and need to be updated in the text element. To do that i need to transfer the excel sheet data to an internal table where one of the field is more than 255 char.
in the standard function module it works only upto 255 char. Can you help me if we have some other way to get more than 255 char in the internal table from excel sheet.
Thanks in Advance.
BR,
RaJ.Using .xls, it is not possible transfer data more than 255 characters from excel sheet. However if the excel sheet is saved as Comma Delimited format or Tab Delimited format, then using GUI_DOWNLOAD function module data more than 255 characters can be transferred.
File name should be : .csv (Comma Delimited format) or .txt (Tab Delimited format)
File Type would still remain 'ASC' while calling function module GUI_DOWNLOAD
Also In the internal table declare the field type as String or LCHAR.
Eg:
TYPES: begin of ty_file,
col_a TYPE string,
end of ty_file.
DATA: i_file type standard table
of ty_file
with header line
CALL FUNCTION 'GUI_UPLOAD'
EXPORTING
FILENAME = 'C:\test.csv'
TABLES
DATA_TAB = i_file -
Hi.. I am using the FM "SO_NEW_DOCUMENT_ATT_SEND_API1" for sending a outlook mail with excel sheet as an attachment.
The records having length upto 255 chars are coming properly in diff rows(which means the carriage return is considered).
But when records have more than 255 chars, then the chars exceeding 255 length are coming in a single row of excel sheet which means the carraige returns are not considered.
Hope my issue is explained clearly....request every one to provide the solution as early as possible.
Regards
NandaHi Nanda,
build your XLS internal table X as usual (more then 255 char). Then format the table
X to a new one Y with line size 255. (You can do your own routine or use the FM SWA_STRING_FROM_TABL and SWA_STRING_TO_TABLE in sequence; sorry but I'm on 4.6C and didn't find a FM in order to format directly the internal table from line size XXXX to the desired line size).
sample code:
t_att_tab with line size 4000 containing the excell data with carriage return and so on
objbin with line size 255 used in FM SO_NEW_DOCUMENT_ATT_SEND_API1
data: d_string type string.
call function 'SWA_STRING_FROM_TABLE'
exporting
character_table = t_att_tab
NUMBER_OF_CHARACTERS =
line_size = 4000
KEEP_TRAILING_SPACES = ' '
CHECK_TABLE_TYPE = ' '
importing
character_string = d_string
exceptions
no_flat_charlike_structure = 1
others = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function 'SWA_STRING_TO_TABLE'
exporting
character_string = d_string
APPEND = ' '
line_size = 255
CHECK_TABLE_TYPE = ' '
importing
character_table = objbin
TOTAL_LENGTH =
LINE_SIZE_USED =
LINES_FILLED =
LAST_LINE_LENGTH =
exceptions
no_flat_charlike_structure = 1
others = 2
if sy-subrc <> 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
It works!!!
Paolo -
Default Excel for Discoverer Desktop
I have searched through the forum but never really found an answer for changing the defalut excel for Discoverer Desktop. We are using 10.2.2.45.45c. When exporting to excel it defaults to Mircrosolft Excel 5.0/95 Workbook. We need it to default to Excel 2003 or later this year to Mircosoft Excel 2013.
Is there a registry setting somewhere I can add ?
We have a several excel files that are produced by command line and this is starting to cause us some grief.The administrator is a client-tool, installed from the bi-tools cd. The default url for viewer/plus looks like http://<server>:<port, default 7778>/discoverer/plus or /viewer. When you don't run in applications mode (for Oracle eBS) then you can use db-accounts to logon to Discoverer, in the Administrator logon with the EUL-owner, go to manage->privileges and give certain db-accounts the privilige to query/create workbooks and manage access to one or more business areas.
Michael -
USING DISCOVERER DESKTOP CAN'T EXPORT AND GET ERROR ORA-00000
we use a win 2000 server to export discoverer reports by command-line methods.In the past ,everything is ok. But from last week , we found some reports always keep in export phase and can't export anything, also with ora-00000 error.
there are 2 things should be mentioned:
1. in the past , these reports can export without any error
2. we can export the same reports normally on another server(but we don't want to change server for some reason)
I know Oracle suggest we update to discoverer 10g, but it can't tell me why another client can export normally
so where is the cause?
Discoverer Desktop version - 4.1.46.08.00
EBS version - 11.5.9Hi
Presumably you have tried rebooting?
If you have windows updates set to automatic it is possible that one of the recently applied updates has done this.
Best wishes
Michael -
Discoverer Desktop 10.1 and Excel
I have a report that is creating an output of 589,000 rows. I have both Excel 2003 and 2007 loaded to my desktop. Unfortunaltey, when I export to Excel, my output file has only 65536 rows, which of course is the Excel 2003 limitation. Excel 2007 has 1,000,000 row limitation. Is there a way to force Desktop to Export to a Excel 2007 file, which would have my entire 589,000 rows in one worksheet.
Thanks
Edited by: user6267603 on Feb 24, 2009 10:46 AMHi,
I think it only separates into multiple sheets when exporting from plus, not desktop.
I don't think that Excel 2007 is properly supported, so don't believe there would be no way to do the forced approach that you mention. If anyone knows otherwise, please do tell! This thread has some useful stuff Exporting Oracle 10g reports into Excel 2007 .
Like Troy the way i've gotten around this is to export the output into a different file format, such as csv or probably more reliably, tab separated. Click on file then export to get more export file format options.
Once exported open the file into Excel by changing the file type to all files and find the file. Excel will know that the file format is not an Excel one, and import it by giving you some options. Selected delimited as the method of opening rather than fixed width. In the next step select the tab or comma as the delimiter depending on if you've exported in csv or tab delimited. Just click next and ignore the step about skipping columns and formatting (unless you want to specifically format any of the columns, which you can do after import). Then click on finish and bingo, one huge file imported into Excel 2007.
Hope this is of use. Sorry for the basic step-by-step instructions, but not everyone knows how to do that.
Regards,
Lloyd
Edited by: Lloyd T on 24-Feb-2009 13:50
Edited by: Lloyd T on 24-Feb-2009 13:52 -
SOS !!! Export from Discoverer to Excel problem
Hi everyone,
My reports, exported from Discoverer to Excel look quite different from what Discoverer format is. The date in Excel is shifted, column names are missing and report is broken into several tabs.
Any idea why it is happening?
Thanks lot,
SergeiWhen the users I support export to Excel they like to use the Export To Excel button in the menu. After they do that, they get a window asking if they want to enable or disable macros. I have them click Enable macros to get the same format as they see in Discoverer Plus.
If you get several tabs instead of one tab(and only one exists), I usually need to resave the workbook becuase it got corrupted (in my case anyway). If you want more control over how the workbook gets exported you can go to File--> Export... and they have some options on how the workbook gets exported.
I hope this helps. -
Export from Discoverer to Excel more than 65K rows
Hi
I need to export data from discoverer to excel, in some cases it is more than 65K rows, does any body know if the file can be split in multiple files o worksheets in Excel?
Any help will be appreciate
Thanks
VladimirRuss
The short answer is I didn't know, as in any instance where my end users have wanted to extract large amounts of data they have done it from one sheet, I expected that Discoverer would just create the extra sheets for both but I wanted to know for sure, so I did a test.
I created a Disco workbook with two worksheets in it, the first one I called Monthly and it had 119,409 rows in it, the second I called Weekly and it had 299,775.
The first time I did the export I did it by hitting the Excel icon on the toolbar, it therefore only extracted the first worksheet (Monthly), when I opened the ensuing Excel file it had two worksheets in it, one called Monthly, the other called Monthly_1 and as expected, between the two sheets the had exactly the same number of fields as in the original disco sheet.
I then redid the extract going through the menu and chossing extract entire workbook, Discoverer then re-extracted the sheets. In the Excel file this time I had the same two monthly sheets as before and this time I also had weekly sheets, five of them. So I ended up with an Excel file with seven sheets containing all of the original data.
Cheers
Melanie -
Spool List output display 255 char when the rpt is run in Background
Hi Friends,
I tried executing a program in Background.. The report output has more than 64 columns ( more than 255 char ) ..
Iam using "REUSE_ALV_GRID_DISPLAY" for displaying the list.
My Problem:
1. The spool list is truncated after 255 characters when i run in background.
2. Th output in Spool List is coming in 2 rows ... not very clear ... becoz of that the grid lines are not getting displayed.
3. I ve not used any Standard - line size for dislaying ..
4. In foreground i am able to display all the 64 columns... Y not in Background......
5. My Printer setting is ..X_255 .... only ...
Requirement:
1. What should i do to increase the spool list display to more than 255 characters
2. Or how to save the background run reports output to an excel sheet as how we 'll take the from the foreground.
Expecting your answers,
Thanks in Advance...
Cheers,
R.Kripa .........
Enjoy ABAPing ..........
new upcoming Abaper ....Hello Kripa,
You need to perform two actions.
1. set an appropriate format for the printer you are using. As explained from the previous messages you go to: SPAD -> output devives (type the printer you are using) -> from the menu ..-> goto -> device type -> formats. In there create a new format like Z_65_650
or Z_65_xxxx where xxxx could be up to 1065. This is the length of your report.
When you give your report in background, do not forget to choose the new format you created.
2. After the spool request is created, you take its number and use it ar a parameter in the following report.
Please copy and paste it in a new program, maybe called ZRSPOSHOWSPOOLLIST.
It should work then.
roxani
Display spool list > 255 columns
This is a SAP utility report to allow display of
spool request lists with line size more than 255 characters in
releases 4.6B and 4.6C (4.6D kernel must be used)
REPORT ZRSPOSHOWLIST LINE-SIZE 80.
PARAMETERS: RQIDENT LIKE TSP01-RQIDENT,
FIRSTL TYPE I DEFAULT 0,
LASTL TYPE I DEFAULT 0.
global data from LSPOXTOP
DATA: RC(10) TYPE C,
ERRMSG(100) TYPE C,
STATUS LIKE SY-SUBRC,
DSN_TYPE(8) TYPE C.
DATA: BEGIN OF DATA_SET_LINE,
DATA_LENGTH(5),
PRECOL(1),
DATA_LINE(1000),
DATA_LINE(5000), "MODAB
END OF DATA_SET_LINE,
DATA_SET_LENGTH(5) TYPE C.
TABLES: TSP01, TST05, TSPOPTIONS.
DATA: TEMSE_NAME LIKE TST01-DNAME,
TEMSE_CLIENT LIKE TST01-DCLIENT,
TEMSE_HANDLE LIKE RSTSTYPE-HANDLE,
TEMSE_PART LIKE TST01-DPART,
TEMSE_OBJTYP LIKE TST01-DTYPE,
TEMSE_RECTYP LIKE RSTSTYPE-RECTYP,
TEMSE_CHARCO LIKE TST01-DCHARCOD.
DATA: IS_OTF.
global data from LSPOCTOP
DATA: BEGIN OF SPOC
, escape
, prtctrl
, FIRST_BYTES(4) " collection of the first bytes of the
" escape sequences, which I am searching for.
, PRTCTRL_START_LENGTH TYPE I
, PRTCTRL_TOTAL_LENGTH TYPE I
, PRTCTRL_START(10)
, SYMBOL_LOW_START(10)
, SYMBOL_HGH_START(10)
, SYMBOL_START_LENGTH TYPE I
, ICON_START(10)
, ICON_START_LENGTH TYPE I
, ICON_SEL TYPE I VALUE 1
, FRAME_START(10)
, FRAME_START_LENGTH TYPE I
, END OF SPOC.
FIELD-SYMBOLS: <SPOC_PRTCTRL> TYPE C
, <SPOC_FRAME> TYPE C
, <SPOC_ICON> TYPE C
, <SPOC_SYMBOL_LOW> TYPE C
, <SPOC_SYMBOL_HGH> TYPE C
copied from RSPO_DISPLAY_ABAP_SPOOLJOB
DATA: BUFFER LIKE DATA_SET_LINE OCCURS 1000.
TABLES: TSP02L.
SELECT SINGLE * FROM TSP01 WHERE RQIDENT = RQIDENT.
IF SY-SUBRC <> 0.
WRITE: / 'Spool request does not exist:'(001), RQIDENT.
EXIT.
ENDIF.
CALL FUNCTION 'RSPO_CHECK_JOB_PERMISSION'
EXPORTING
ACCESS = 'DISP'
SPOOLREQ = TSP01
EXCEPTIONS
NO_PERMISSION = 1
OTHERS = 2.
IF SY-SUBRC <> 0.
WRITE: / 'No authorization to display'(002).
EXIT.
ENDIF.
PERFORM READ_DATA TABLES BUFFER
USING TSP01 FIRSTL LASTL.
IF SY-SUBRC <> 0.
WRITE: / 'Error reading spoolo request'(003).
EXIT.
ENDIF.
IF IS_OTF = 'X'.
WRITE: / 'This spool request is not an ABAP list'(004).
EXIT.
ENDIF.
PERFORM DISPLAY_DATA TABLES BUFFER USING TSP01-RQPAPER TSP01-RQIDENT.
FORM GET_SPOOL_LINE.
DO.
IF TEMSE_RECTYP+1(1) = 'Y'.
CALL 'C_RSTS_READ'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'BUFF' FIELD DATA_SET_LINE
ID 'BUFFLG' FIELD 1006
ID 'BUFFLG' FIELD 5006 "MODAB
ID 'ALLINE' FIELD 'X'
ID 'BINARY' FIELD ' '
ID 'SHOWLG' FIELD 'X'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
ELSE.
CALL 'C_RSTS_READ'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'BUFF' FIELD DATA_SET_LINE+1
ID 'BUFFLG' FIELD 1005
ID 'BUFFLG' FIELD 5005 "MODAB
ID 'ALLINE' FIELD 'X'
ID 'BINARY' FIELD ' '
ID 'SHOWLG' FIELD 'X'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
DATA_SET_LINE(5) = DATA_SET_LINE+1(5).
DATA_SET_LINE-PRECOL = ' '.
ADD 1 TO DATA_SET_LINE-DATA_LENGTH.
ENDIF.
STATUS = SY-SUBRC.
IF STATUS <> 6. " EOF, error condition, or got data
EXIT.
ENDIF.
end of this part, try to open next part
ADD 1 TO TEMSE_PART.
CALL 'C_RSTS_CLOSE'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
IF STATUS = 0.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
AUTHORITY = 'SP01'
CLIENT = TEMSE_CLIENT "hjl
NAME = TEMSE_NAME
PART = TEMSE_PART
IMPORTING
CHARCO = TEMSE_CHARCO
CREATER =
CREDATE =
DELDATE =
MAX_CREDATE =
MAX_DELDATE =
NON_UNIQ =
NOOF_PARTS =
RECTYP = TEMSE_RECTYP
SIZE =
STOTYP =
type =
OBJTYPE = TEMSE_OBJTYP
EXCEPTIONS
FB_ERROR = 1
FB_RSTS_OTHER = 2
NO_OBJECT = 3
NO_PERMISSION = 4
OTHERS = 5.
STATUS = SY-SUBRC.
ENDIF.
IF STATUS = 0.
CALL 'C_RSTS_OPEN_READ'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'CLIENT' FIELD TEMSE_CLIENT "hjl
ID 'NAME' FIELD TEMSE_NAME
ID 'PART' FIELD TEMSE_PART
ID 'TYPE' FIELD TEMSE_OBJTYP
ID 'CONV' FIELD ' '
ID 'ALLINE' FIELD 'X'
ID 'BINARY' FIELD ' '
ID 'RECTYP' FIELD TEMSE_RECTYP
ID 'CHARCO' FIELD TEMSE_CHARCO
ID 'PROM' FIELD 'I'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
ENDIF.
ENDDO.
IF STATUS = 4.
STATUS = 12. "EOF
ENDIF.
IF STATUS = 8.
STATUS = 40. "Line too long
ENDIF.
DATA_SET_LENGTH = DATA_SET_LINE-DATA_LENGTH.
ENDFORM.
FORM READ_DATA TABLES BUFFER
USING TSP01 LIKE TSP01 VALUE(FIRST) TYPE I
VALUE(LAST) TYPE I.
DATA: LINES TYPE I.
REFRESH BUFFER.
CLEAR IS_OTF.
TEMSE_CLIENT = TSP01-RQCLIENT.
TEMSE_NAME = TSP01-RQO1NAME.
TEMSE_PART = 1.
CALL FUNCTION 'RSTS_GET_ATTRIBUTES'
EXPORTING
AUTHORITY = 'SP01'
CLIENT = TEMSE_CLIENT
NAME = TEMSE_NAME
PART = TEMSE_PART
IMPORTING
CHARCO = TEMSE_CHARCO
CREATER =
CREDATE =
DELDATE =
MAX_CREDATE =
MAX_DELDATE =
NON_UNIQ =
NOOF_PARTS =
RECTYP = TEMSE_RECTYP
SIZE =
STOTYP =
type =
OBJTYPE = TEMSE_OBJTYP
EXCEPTIONS
FB_ERROR = 1
FB_RSTS_OTHER = 2
NO_OBJECT = 3
NO_PERMISSION = 4
OTHERS = 5.
IF SY-SUBRC = 0.
IF TEMSE_OBJTYP(3) = 'OTF'.
IS_OTF = 'X'.
ENDIF.
ELSE.
EXIT.
ENDIF.
CLEAR TEMSE_HANDLE.
CALL 'C_RSTS_OPEN_READ'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'CLIENT' FIELD TEMSE_CLIENT "hjl
ID 'NAME' FIELD TEMSE_NAME
ID 'PART' FIELD TEMSE_PART
ID 'TYPE' FIELD TEMSE_OBJTYP
ID 'CONV' FIELD ' '
ID 'ALLINE' FIELD 'X'
ID 'BINARY' FIELD ' '
ID 'RECTYP' FIELD TEMSE_RECTYP
ID 'CHARCO' FIELD TEMSE_CHARCO
ID 'PROM' FIELD 'I'
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
IF STATUS = 0.
DO.
PERFORM GET_SPOOL_LINE.
IF STATUS <> 0 AND STATUS <> 40 AND STATUS <> 12.
PERFORM CLOSE_JOB.
EXIT.
ENDIF.
IF STATUS <> 12. " 12 = End
IF NOT ( DATA_SET_LENGTH IS INITIAL ).
DATA_SET_LINE-DATA_LENGTH = DATA_SET_LENGTH - 1.
ENDIF.
ADD 1 TO LINES.
IF LINES >= FIRST.
APPEND DATA_SET_LINE TO BUFFER.
ENDIF.
IF ( NOT LAST IS INITIAL ) AND ( LINES >= LAST ).
EXIT.
ENDIF.
ELSE.
IF LINES = 0.
PERFORM CLOSE_JOB.
EXIT.
ENDIF.
IF LINES < FIRST .
PERFORM CLOSE_JOB.
EXIT.
ENDIF.
EXIT.
ENDIF.
ENDDO.
PERFORM CLOSE_JOB.
ENDIF.
ENDFORM.
FORM CLOSE_JOB *
FORM CLOSE_JOB.
IF STATUS <> 0 AND STATUS <> 12.
CALL 'C_RSTS_CLOSE'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
MESSAGE E112(PO) WITH STATUS RC ERRMSG RAISING READ_ERROR.
ENDIF.
CALL 'C_RSTS_CLOSE'
ID 'HANDLE' FIELD TEMSE_HANDLE
ID 'RC' FIELD RC
ID 'ERRMSG' FIELD ERRMSG.
STATUS = SY-SUBRC.
IF STATUS <> 0.
MESSAGE E112(PO) WITH STATUS RC ERRMSG RAISING READ_ERROR.
ENDIF.
ENDFORM.
FORM DISPLAY_DATA TABLES BUFFER USING RQPAPER LIKE TSP01-RQPAPER
RQID LIKE TSP01-RQIDENT.
DATA: LINE_LENGTH TYPE I, GCOL TYPE I, GLINES TYPE I,
LINE_LENGTH2 LIKE RSTSTYPE-LINELENGTH,
V, V2.
CALL FUNCTION 'RSPO_SPOOLDATA_WRITE_INIT'.
PERFORM SPOOLDATA_WRITE_INIT. "MODAB
select single * from tspoptions where spoption = 'REALWIDTH'.
if sy-subrc = 0.
V = 'X'.
endif.
select single * from tspoptions where spoption = 'REALHEIGHT'.
if sy-subrc = 0.
V2 = 'X'.
endif.
IF NOT V IS INITIAL OR NOT V2 IS INITIAL.
GCOL = 0.
GLINES = 0.
SELECT SINGLE * FROM TSP02L WHERE PJIDENT = RQID
AND PJNUMMER = 0.
IF SY-SUBRC = 0.
GCOL = TSP02L-COLUMNS.
GLINES = TSP02L-LINES.
ELSE.
CALL FUNCTION 'RSPO_GET_SIZE_OF_LAYOUT'
EXPORTING
LAYOUT = RQPAPER
IMPORTING
ANSWER =
COLUMNS = GCOL
LINES = GLINES
PFORMAT =
ENDIF.
ENDIF.
IF GCOL < 80 OR V IS INITIAL.
GCOL = 255.
ENDIF.
IF GLINES < 5 OR V2 IS INITIAL.
GLINES = 0.
ENDIF.
IF GCOL >= 1024. "MODAB
GCOL = 1023.
ENDIF.
NEW-PAGE NO-HEADING NO-TITLE LINE-SIZE GCOL
LINE-COUNT GLINES. " make a wide list
SET BLANK LINES ON.
LOOP AT BUFFER.
DATA_SET_LINE = BUFFER.
IF DATA_SET_LINE-PRECOL = 'P'.
IF DATA_SET_LINE(1) = ' '. " Echter Vorschub ?"
NEW-PAGE.
ENDIF.
CONTINUE.
ENDIF.
Zeilenlange berechnen, falls unbekannt.
IF DATA_SET_LINE-DATA_LENGTH IS INITIAL.
LINE_LENGTH = STRLEN( DATA_SET_LINE-DATA_LINE ).
ELSE.
LINE_LENGTH = DATA_SET_LINE-DATA_LENGTH.
ENDIF.
IF LINE_LENGTH > 0.
LINE_LENGTH2 = LINE_LENGTH.
PERFORM SPOOLDATA_WRITE USING DATA_SET_LINE-DATA_LINE "MODAB
LINE_LENGTH2
1.
ELSE.
" Leerzeile
SKIP.
ENDIF.
ENDLOOP.
ENDFORM.
copied from RSPO_SPOOLDATA_WRITE
FORM SPOOLDATA_WRITE USING VALUE(SPOOL_DATA)
VALUE(DATA_LENGTH) LIKE RSTSTYPE-LINELENGTH
VALUE(START_POS) LIKE SY-COLNO.
function globals
DATA: LPOS LIKE SY-COLNO
, REST_LEN TYPE I
, AREA_LEN TYPE I
, NEXT_HOT TYPE I " offset of next special character
, COLS TYPE I " columns used by special character
, BYTES TYPE I " bytes used by special character
, HOT2
, HOT3
, HOT4
, HOT5
, HOT6
, HOT7
, BEGIN OF ESCAPE_TRICK
, X1(1) TYPE X
, END OF ESCAPE_TRICK
, THE_PRTCTRL(5) TYPE C
Because of a problem within the ABAP listprocessing, I shall
never output the same icon side by side with the same color
and without a gap.
As I don't know the data, I will use two different variables
alternatively.
, ICON_ID1 LIKE ICONS-L4
, ICON_ID2 LIKE ICONS-L4.
FIELD-SYMBOLS: <LDATA>
, <PLAIN_TEXT>
, <PRTCTRL>
, <HOT_PRTCTRL>
, <HOT_FRAME>
, <HOT_ICON>
, <HOT_SYMBOL>
IF START_POS < 2.
write at / ' ' no-gap.
NEW-LINE.
LPOS = 1.
ELSE.
LPOS = START_POS.
ENDIF.
REST_LEN = STRLEN( SPOOL_DATA ).
DESCRIBE FIELD SPOOL_DATA LENGTH AREA_LEN.
IF DATA_LENGTH = 0.
" fine.
ELSEIF DATA_LENGTH <= AREA_LEN.
REST_LEN = DATA_LENGTH.
ELSE.
WRITE: / 'Fehler beim Decodieren der Listendaten'(005).
STOP.
ENDIF.
CHECK REST_LEN > 0.
ASSIGN SPOOL_DATA(REST_LEN) TO <LDATA>.
WHILE <LDATA> CA SPOC-FIRST_BYTES.
NEXT_HOT = SY-FDPOS.
IF NEXT_HOT > 0.
ASSIGN <LDATA>(NEXT_HOT) TO <PLAIN_TEXT>.
MODAB
PERFORM WRITE_BIGFIELD USING <PLAIN_TEXT>
NEXT_HOT
LPOS.
WRITE AT LPOS <PLAIN_TEXT> NO-GAP.
ADD NEXT_HOT TO LPOS.
SUBTRACT NEXT_HOT FROM REST_LEN.
ASSIGN <LDATA>+NEXT_HOT(REST_LEN) TO <LDATA>.
ENDIF.
IF REST_LEN >= SPOC-PRTCTRL_START_LENGTH.
ASSIGN <LDATA>(SPOC-PRTCTRL_START_LENGTH) TO <HOT_PRTCTRL>.
ELSE.
ASSIGN 'too_short' TO <HOT_PRTCTRL>.
ENDIF.
IF REST_LEN >= SPOC-FRAME_START_LENGTH.
ASSIGN <LDATA>(SPOC-FRAME_START_LENGTH) TO <HOT_FRAME>.
ELSE.
ASSIGN 'too_short' TO <HOT_FRAME>.
ENDIF.
IF REST_LEN >= SPOC-ICON_START_LENGTH.
ASSIGN <LDATA>(SPOC-ICON_START_LENGTH) TO <HOT_ICON>.
ELSE.
ASSIGN 'too_short' TO <HOT_ICON>.
ENDIF.
IF REST_LEN >= SPOC-SYMBOL_START_LENGTH.
ASSIGN <LDATA>(SPOC-SYMBOL_START_LENGTH) TO <HOT_SYMBOL>.
ELSE.
ASSIGN 'too_short' TO <HOT_SYMBOL>.
ENDIF.
IF REST_LEN > 1.
HOT2 = <LDATA>+1(1).
IF REST_LEN > 2.
HOT3 = <LDATA>+2(1).
IF REST_LEN > 3.
HOT4 = <LDATA>+3(1).
ELSE.
HOT4 = '?'.
ENDIF.
ELSE.
HOT3 = '?'.
ENDIF.
ELSE.
HOT2 = '?'.
ENDIF.
IF <HOT_FRAME> = <SPOC_FRAME>.
COLS = 1. " in most cases.
BYTES = 2. " in most cases.
CASE HOT2.
WHEN '0'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '1'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '2'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '3'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '4'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '5'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '6'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '7'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '8'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN '9'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN ':'. WRITE AT LPOS HOT2 AS LINE NO-GAP.
WHEN ';'. " box_drawings_light_left
WRITE AT LPOS '4' AS LINE NO-GAP.
WHEN '<'. " box_drawings_light_up
WRITE AT LPOS '5' AS LINE NO-GAP.
WHEN '='. " box_drawings_light_right
WRITE AT LPOS '4' AS LINE NO-GAP.
WHEN '>'. " box_drawings_light_down
WRITE AT LPOS '5' AS LINE NO-GAP.
WHEN '?'. " drawings_checkbox_off
WRITE AT LPOS ' ' AS CHECKBOX INPUT OFF NO-GAP.
WHEN '@'. " drawings_checkbox_on
WRITE AT LPOS 'X' AS CHECKBOX INPUT OFF NO-GAP.
WHEN OTHERS.
BYTES = 0.
ENDCASE.
ENDIF.
IF <HOT_SYMBOL> = <SPOC_SYMBOL_LOW>.
ESCAPE_TRICK = HOT3.
SUBTRACT 32 FROM ESCAPE_TRICK-X1.
IF HOT4 = SPACE.
WRITE AT LPOS(2) ESCAPE_TRICK AS SYMBOL NO-GAP.
COLS = 2.
BYTES = 4.
ELSE.
WRITE AT LPOS(1) ESCAPE_TRICK AS SYMBOL NO-GAP.
BYTES = 3.
ENDIF.
ENDIF.
IF <HOT_SYMBOL> = <SPOC_SYMBOL_HGH>.
ESCAPE_TRICK = HOT3.
ADD 32 TO ESCAPE_TRICK-X1.
IF HOT4 = SPACE.
WRITE AT LPOS(2) ESCAPE_TRICK AS SYMBOL NO-GAP.
COLS = 2.
BYTES = 4.
ELSE.
WRITE AT LPOS(1) ESCAPE_TRICK AS SYMBOL NO-GAP.
BYTES = 3.
ENDIF.
ENDIF.
IF <HOT_ICON> = <SPOC_ICON>.
IF SPOC-ICON_SEL >< 1.
SPOC-ICON_SEL = 1.
ICON_ID1 = '@00@'.
ICON_ID1+1(1) = HOT3.
ICON_ID1+2(1) = HOT4.
ELSE.
SPOC-ICON_SEL = 2.
ICON_ID2 = '@00@'.
ICON_ID2+1(1) = HOT3.
ICON_ID2+2(1) = HOT4.
ENDIF.
IF REST_LEN > 4.
HOT5 = <LDATA>+4(1).
IF REST_LEN > 5.
HOT6 = <LDATA>+5(1).
IF REST_LEN > 6.
HOT7 = <LDATA>+6(1).
ELSE.
HOT7 = '?'.
ENDIF.
ELSE.
HOT6 = '?'.
ENDIF.
ELSE.
HOT5 = '?'.
ENDIF.
IF HOT5 = SPACE.
IF HOT6 = SPACE.
IF HOT7 = SPACE.
IF SPOC-ICON_SEL = 1.
WRITE AT LPOS(4) ICON_ID1 AS ICON.
write at lpos icon_id1 as icon no-gap.
ELSE.
WRITE AT LPOS(4) ICON_ID2 AS ICON.
write at lpos icon_id2 as icon no-gap.
ENDIF.
COLS = 4.
BYTES = 7.
ELSE.
IF SPOC-ICON_SEL = 1.
WRITE AT LPOS(3) ICON_ID1 AS ICON.
write at lpos icon_id1 as icon no-gap.
ELSE.
WRITE AT LPOS(3) ICON_ID2 AS ICON.
write at lpos icon_id2 as icon no-gap.
ENDIF.
COLS = 3.
BYTES = 6.
ENDIF.
ELSE.
IF SPOC-ICON_SEL = 1.
WRITE AT LPOS(2) ICON_ID1 AS ICON.
write at lpos icon_id1 as icon no-gap.
ELSE.
WRITE AT LPOS(2) ICON_ID2 AS ICON.
write at lpos icon_id2 as icon no-gap.
ENDIF.
COLS = 2.
BYTES = 5.
ENDIF.
ELSE.
"rite at lpos(1) icon_id as icon.
WRITE AT LPOS(1) '#' NO-GAP. " Not enough space for any icon.
COLS = 1.
BYTES = 4.
ENDIF.
ENDIF.
IF <HOT_PRTCTRL> = <SPOC_PRTCTRL>.
COLS = 0. " in most cases.
BYTES = 6. " in most cases.
IF REST_LEN >= SPOC-PRTCTRL_TOTAL_LENGTH.
THE_PRTCTRL = <LDATA>+SPOC-PRTCTRL_START_LENGTH(5).
IF THE_PRTCTRL = 'SABLD'.
FORMAT INTENSIFIED ON.
"no 3.0 'SAULN'.
"no 3.0 FORMAT UNDERSCORED ON.
ELSEIF THE_PRTCTRL = 'SAOFF'.
FORMAT INTENSIFIED OFF.
"no 3.0 FORMAT UNDERSCORED OFF.
ELSEIF THE_PRTCTRL(3) = 'COL'.
CASE THE_PRTCTRL+3(1).
WHEN '0'.
FORMAT COLOR OFF.
WHEN '1'.
FORMAT COLOR 1.
WHEN '2'.
FORMAT COLOR 2.
WHEN '3'.
FORMAT COLOR 3.
WHEN '4'.
FORMAT COLOR 4.
WHEN '5'.
FORMAT COLOR 5.
WHEN '6'.
FORMAT COLOR 6.
WHEN '7'.
FORMAT COLOR 7.
ENDCASE.
CASE THE_PRTCTRL+4(1).
WHEN 'N'.
FORMAT INTENSIFIED OFF INVERSE OFF.
WHEN 'H'.
FORMAT INTENSIFIED ON INVERSE OFF.
WHEN 'V'.
FORMAT INTENSIFIED ON INVERSE ON.
ENDCASE.
ENDIF. "printcontrol
ELSE. "??
ENDIF.
ENDIF.
IF BYTES = 0.
BYTES = 1.
WRITE AT LPOS(1) '#'.
COLS = 1.
ENDIF.
ADD COLS TO LPOS.
SUBTRACT BYTES FROM REST_LEN.
IF REST_LEN > 0.
ASSIGN <LDATA>+BYTES(REST_LEN) TO <LDATA>.
ELSE.
EXIT.
ENDIF.
ENDWHILE.
MODAB
IF REST_LEN > 0.
ASSIGN <LDATA>(REST_LEN) TO <PLAIN_TEXT>.
PERFORM WRITE_BIGFIELD USING <PLAIN_TEXT>
REST_LEN
LPOS.
ENDIF.
ENDFORM.
FORM WRITE_BIGFIELD USING VALUE(FIELD) TYPE C
VALUE(LEN)
VALUE(POS).
FIELD-SYMBOLS <P>.
DATA: CHUNK TYPE I.
WHILE LEN > 0.
IF LEN > 255.
CHUNK = 255.
ELSE.
CHUNK = LEN.
ENDIF.
WRITE AT POS FIELD(CHUNK) NO-GAP.
ADD CHUNK TO POS.
LEN = LEN - CHUNK.
IF LEN > 0.
FIELD = FIELD+CHUNK.
ENDIF.
ENDWHILE.
ENDFORM.
FORM SPOOLDATA_WRITE_INIT.
DATA: BEGIN OF ESCAPE_TRICK
, X1(1) TYPE X
, END OF ESCAPE_TRICK
FIELD-SYMBOLS: <LDATA>
, <PLAIN_TEXT>
, <PRTCTRL>
ESCAPE_TRICK-X1 = '1C'.
SPOC-PRTCTRL_START = ESCAPE_TRICK.
SPOC-PRTCTRL_START_LENGTH = 1.
SPOC-PRTCTRL_TOTAL_LENGTH = SPOC-PRTCTRL_START_LENGTH + 5.
ASSIGN SPOC-PRTCTRL_START(SPOC-PRTCTRL_START_LENGTH) TO <SPOC_PRTCTRL>.
ESCAPE_TRICK-X1 = '1B'.
SPOC-FRAME_START = ESCAPE_TRICK.
SPOC-FRAME_START_LENGTH = 1.
ASSIGN SPOC-FRAME_START(SPOC-FRAME_START_LENGTH) TO <SPOC_FRAME>.
ESCAPE_TRICK-X1 = '1B'.
SPOC-ICON_START = ESCAPE_TRICK.
SPOC-ICON_START+1 = ','.
SPOC-ICON_START_LENGTH = 2.
ASSIGN SPOC-ICON_START(SPOC-ICON_START_LENGTH) TO <SPOC_ICON>.
ESCAPE_TRICK-X1 = '1B'.
SPOC-SYMBOL_LOW_START = ESCAPE_TRICK.
SPOC-SYMBOL_LOW_START+1 = '('.
SPOC-SYMBOL_HGH_START = ESCAPE_TRICK.
SPOC-SYMBOL_HGH_START+1 = ')'.
SPOC-SYMBOL_START_LENGTH = 2.
ASSIGN SPOC-SYMBOL_LOW_START(SPOC-SYMBOL_START_LENGTH)
TO <SPOC_SYMBOL_LOW>.
ASSIGN SPOC-SYMBOL_HGH_START(SPOC-SYMBOL_START_LENGTH)
TO <SPOC_SYMBOL_HGH>.
SPOC-FIRST_BYTES+0(1) = SPOC-PRTCTRL_START(1).
SPOC-FIRST_BYTES+1(1) = SPOC-FRAME_START(1).
SPOC-FIRST_BYTES+2(1) = SPOC-ICON_START(1).
SPOC-FIRST_BYTES+3(1) = SPOC-SYMBOL_LOW_START(1).
ENDFORM.
Maybe you are looking for
-
Troubleshoot and Setup FiOS TV Programming with VZ In-Home Agent
VZ In-Home Agent is a tool that helps you setup and troubleshoot your FiOS TV programming. This tool is simple, easy-to-use and has information about various features of your FiOS TV programming along with quick fixes for most of the common problems.
-
HT4623 I don't have a update button n the general settings, how can I update my iPad thanks
Hi there I'm trying to update my apps and it's saying I need ios5 and then I'm trying to up date it but my iPad hasn't got a update soft wear button in the general settings I can't do anything on it until it's up dateD but haven't got a clue what to
-
Help PLEASE When I sync my iCal strange things are now happening. The iCal as it appears on my Mac Book Pro is as I want it (all info is up to date and correct). When I sync my phone using iTunes (actually pluged into the lap top) the information on
-
Linux(GNOME) window focus\z-order problem
Hi, we are having issues with an application we are developing, when you login we create a JWindow "splash screen" which is just a picture, if there there is an error whilst the splash is displayed, and error box(JDialog) appears displaying the error
-
Hi SAP Gurus We have been having an issue with vacation updating properly after time has been ran. when this person was hired I updated the record accordingly with the proper vacation, vacation date on IT0041. Once time was ran, the effective and end