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.

Similar Messages

  • Spool List output display 255 chars

    Hi,
    I am execuing the my report in back groung.The oupt list has more than 255 chars.
    could u please let me know how Spool List output display > 255 char when the rpt is run in back ground.
    regards,
    Rayeez.

    Hello,
    Try using the printer formatting as X_65_255.
    Please check this [link|Report is truncating in background; for details.
    BR,
    Suhas

  • SY-PAGNO does not appear when the report is run in background

    Dear all,
    I have one customised program that has page number included in each page. When I run it online, it will display the page number. But, when I run it in background, the page number disappear!!
    The command of WRITE: 'PAGE NUMBER:', SY-PAGNO was done under TOP-OF-PAGE.
    Am I doing it correctly? Please advice. Thank you.

    Dear Seshu,
    This is my complete coding under TOP-OF-PAGE.
          write: /130 'VA DYNAMICS SDN BHD',
                 /122 'Stock Ageing Report as at ', s_budat.
          skip 1.
          write: /270 'Page: ', SY-PAGNO.
          skip 1.
          format intensified on color col_heading .
          write: /01(292) sy-uline.
          write: /01  sy-vline, 'Part No.                  ',
                      sy-vline, 'Mat.Grp. ',
                      sy-vline, 'Description                             ',
                      sy-vline, 'GT 2 Years           ',
                      sy-vline, '1 - 2 Years          ',
                      sy-vline, '6 - 12 Months        ',
                      sy-vline, '3 - 6 Months         ',
                      sy-vline, '3 Months             ',
                      sy-vline, '7 Days               ',
                      sy-vline, 'Quantity      ',
                      sy-vline, 'Value           ',
                      sy-vline, 'Avg.Price',
                      sy-vline, 'ValA',
                      sy-vline, 'Loc. ',
                  292 sy-vline.
          write: /01(292) sy-uline.
    Below is my report declaration:
    REPORT ZTEST_STKAGE_VAD NO STANDARD PAGE HEADING LINE-SIZE 295 LINE-COUNT 65  .
    All this while, I used the same way of displaying SY-PAGNO. No problem at all. Now it give me a problem.
    Regards.

  • Download List output displayed

    Hi Friends,
    I want to donwload the list output displayed from the Report program with the exisitng formatting structure (displayed).
    1)From SAP menu we can click on System –> List –> Save –> Local file to download the file locally.
    2) I want to obtain same functionality as mentioned in point 1 through a button on tool bar.
    I dont want to prepare any internal table locally with the same data that is displayed on the screen, in the same formatting structure and Download, which is similar to a local download functionality.
    Please let me know ur suggestions.
    Regards,
    Lavanya.

    Then you have to  display your  O/p in the ALV   display  ...
    so that you can achive  your requirement  ..Because the ALV has the similar icon for downloading to pc  ..etc
    by Normal reporting  you cannot get this Option  .in the Application tool bar  .  one  is there as you menioned
    From SAP menu we can click on System –> List –> Save –> Local file to download the file locally.
    because   by pacing the  icon in  the Apllication bar it will not   call the  path ..etc.  you have to  do the coding  ...instead of that ALV is  best .
    But  in the ALV   it is there  in the standard  ALV  GRID    with   Downlaod icon , summation,scroldown ,sorting (A/D) ,etc...
    reward  points  if it is usefull ..
    Girish

  • How to initialize the variables in the subvi when the main vi running?

    Hi, friends!
    Now I am working on a project with labview. I make a main vi  including many subvis.
    When the main vi running, I want to reinnitialize the variables in the subvi to zero.
    I know that I can realize that  using the local variable when I enter the subvi,
    but I want to keep the the values when I left the subvi and saw them when I
    click in this subvi again. So, I do not reinitialize the subvi when it runs. But, I
    don not know how to reinitialize the indicators in the subvi when I run the main
    VI in the first instance. I try to use the global variables, but it seems do not work
    well. Would you like to give me some advice? Thanks a lot!

    Hi dec,
          If I understand your question, try using the "First Call?" node in your Sub-VI - to initialize values the first time the VI executes every time the top-level VI is Run.
    If this doesn't work for you, just post again!
    Cheers.
    "Inside every large program is a small program struggling to get out." (attributed to Tony Hoare)

  • If the database is shutdown when the applcation is running what is happened

    I am using coneection pool to connect database. If the database is shutdown when the applcation is running what is happened? and how the database will be reconnected.
    I am using MySQL 3.23.52, Tomcat 4.1.12

    Hi,
    Performance of any n-tier system which takes the advantage of connection pooling will be much higher compared to its non-pooled counterpart.
    You have to be very careful while designing/using a connection pool.if u are using pool obtained from a third party,ur control on this pool will be limited - with a few set/get methods.
    A well designed pool wont create much trouble. if u are creating your own pool, basic steps required are
    1.create 'n' number of connections
    2.whenever user requests for a connection, check the validity of the connection- by sendin a simple select query etc- and if its not stale,give this connection to the caller.
    3.if the connection is stale ie it fails the pretest, close all the connections and create the pool afresh.
    4.connections obtained from the pool will be automatically returned back to the pool whenever the applciation call conn.close().
    from ur application, follow the steps for each connection you use (not necessary for a well designed pool)
    1.call ds.getconnection()
    2.check validity of this connection by sending a simple select query.if it works,everything is fine. otherwise something is wrong with connection(not always).
    3.sql exception may occur during the execution of sql query. this can be due to either
    a.database shut down (network related)
    b.database specific - like wrong query,invalid objects etc
    you have to look at the sql state/vendor code (which can be retrieved from the caught exception). the retrieved code will give you a hint why the error (network or database specific).and you can act accordingly.
    Most of the app servers comes with builtin connection pooling module. and handling stale connection is not a difficult task for the programmer. eg: if you are designing applcations for IBM websphere, you can use StaleConnectionException in your code.if this exception is caught,the whole pool is destroyed and created afresh.
    HTH,
    -asharafkk

  • The last day of the month when the report is run

    Hi,
    I am working on custom outbound idocs for FICO module through INTERFACE Program  the third party sytem needs <b> "The last day of the month when the report is run"</b> so is there any sytem field or standard SAP Sytem Table field which can give me that value.plz let me know ASAP.
    Other wise should i develop  custom logic.

    Hi,
    Try this way.
    Selection-screen
    PARAMETERS: p_bldat LIKE bsis-bldat .
    INITIALIZATION.
      DATA: v_end_date LIKE sy-datum.
      CALL FUNCTION 'LAST_DAY_OF_MONTHS'
        EXPORTING
          day_in            = sy-datum
        IMPORTING
          last_day_of_month = v_end_date
        EXCEPTIONS
          day_in_no_date    = 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.
      p_bldat = v_end_date.
    Thanks,
    Anitha

  • When my ipod connect to computer,windowss want me to format the ipod,and when the process is running suddenly windows said"unable to format this disk"and my ipod can't connect to itunes. anyone can help me?

    when my ipod connect to computer,windowss want me to format the ipod,and when the process is running suddenly windows said"unable to format this disk"and my ipod can't connect to itunes. anyone can help me?

    Check the iPod Hardisk, with DiskDiagnostic as posted here by tt2
    https://discussions.apple.com/message/17776595#17776595
    It wont fix your problem, but help us both, in troubleshooting, and reducing frivolous suggestions.
    If your report says high Realloc or Pending Sector, then it's time to have your hardisk replaced.
    Have a nice day!

  • How to deal with the mouse events when the thread is running

    Hi everybody,
    I have a problem with my program.
    Now I want to present a picture for some time in the Canvas,then automatically clear the screen, but when the user press the mousebutton or keybutton, I want to stop the thread and clear the screen.
    How can I receive the mouse event when the thread is running?
    Thanks,

    I use my code in a GUI applet.
    I try to use the code tag, it's the first time.
                   Image im=sd.getStimulus(obj);
                   if(pos==null){
                        g.drawImage(im, (w-im.getWidth(null))/2,(h-im.getHeight(null))/2,null);
                   }else{
                        g.drawImage(im, pos.x,pos.y,pos.w,pos.h,null);
                   try{
                        sleep(showtime);
    //                    Thread.sleep(showtime);
                   }catch(InterruptedException e){}
                   if(pos==null){
                        g.clearRect((w-im.getWidth(null))/2,(h-im.getHeight(null))/2,im.getWidth(null),im.getHeight(null));
                   }else{
                        g.clearRect(pos.x,pos.y, pos.w, pos.h);
                   }

  • My computer is loud when the fan is running. Does anyone have any suggestions?

    My computer is loud when the fan is running. Does anyone have any suggestions?

    Hello,
    Get Temperature Monitor to see if it's heat related...
    http://www.macupdate.com/info.php/id/12381/temperature-monitor
    iStat Menus...
    http://bjango.com/mac/istatmenus/
    And/or iStat Pro...
    http://www.islayer.com/apps/istatpro/

  • How archive infostructures are filled when the delete program runs(sd_cond)

    I could not find a suitable forum for this, hence posting it here. I need to know how the ZARIX tables get filled in SAP Archiving. As far as I know, they are filled automaticlaly when the delete job runs, but I could not find any code in SD_COND_ARCH_DELETE program.
    My issue is that my delete program did not fill one of the infostructures which was active and this infostructure corresponds to the zarix table. On the other hand, this infostructure got filled manually(verified in zarix also).
    Wondering how this could have happened. Can this be because multiple delete jobs are running creating various sessions. This is mainly with reference to the SD_COND archive object.

    Hi,
    There is a separate program to fill infostructures as when you fill them manually (Transaction SARJ, Environment -> Fill Structure) a new job is triggered. Have a look at the job that ran when you filled your infostructure manually and analyse the program that ran.
    There should not be any problem in filling the infostructures due to several archiving sessions running at the same time. If you face the same issue again, see if any of the archiving jobs (write, store, delete) failed for any reason. If all the jobs finished successfully but an infostructure didn't get filled then have a look for any OSS note related to this issue. If you can't find anything, raise an SAP message as the infostructures have to get filled automatically as otherwise there will be no access to the archived data.
    Hope this helps.

  • 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.
    Thanks

    Hi,
    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

  • Measurement output keeps drifting, even when the input channel are shorted out.

    Dear Technical Engineer,
    Greetings!
    Currently, we are conducting a voltage measuring experiment with your DAQ card "NI PCIe-6353". The voltage we are concerning is a slow variable ranging from 0-20mV.
    However, we met some problems operating your device.
    1.When the input channel is vacant (no connection to any voltage output), the measurement curve displayed in the test panel (built in your driver) keeps drifting (from some point to -10V, then slowly upwards to +10V, then downwards...), but not stays at 0V.
    2.The moment we connect the input channel to a DC stabilized power supply (2V), the measurement curve displays a quick step, but not step to 2V. Then, it continues to drift downwards.
    3.When we short out the input channel (for example, connect “33 A1” with “32 A1 GND”), the measurement output still keeps drifting, but not displays 0. 
    Thus, we wonder if some settings should be regulated, or if there is something wrong with our operations, or there is an additional grounding option that we missed, or the device just breaks down. Could you please give us your valuable suggestions?
    If you need any more informations, please do not hesitate to contact us (email:[email protected]). Thanks for your time and attention! We are looking forward to your kind reply.
    Best,
    Xianke

    Hi Xianke,
    It sounds like you may have your measurement configured in differential mode. If so, then you should read 0V when you short pin 66 AI1- to pin 33 AI1. Do you see this same behavior on other channels?
    It looks like the default input configuration is differential, so you can also leave your wiring as it is, and change to RSE.
    Trevor B.
    PSE
    National Instruments

  • Does the iPhone display turn on when the iPhone is asleep anan alarm sounds

    My iPhone was asleep when its alarm sounded. It was in airplane mode (I didn't want someone calling me during the night). When the alarm sounded, I heard the alarm sound and the phone vibrate, but the display itself was still off; I had to press the on/off/sleep button to see it.
    Is that as expected?

    It's weird -- I set an alarm, put the phone to sleep, and this time the display did turn on when the alarm sounded. Hmm...

  • How To Display Message Dialog when the Database is Empty

    Hello everybody...Im writing a mini app which uses swing GUI and JDBC. the program is a mini contacts book which adds data to the database thru the textfields and retrives the data to the textfield.now what i want to do is when the menu "show record" is clicked and then there is no data in the database, it should display "no records found" because the database is empty. how do i do that?I need urgent help thanks...

    Scrolling of results can be done in 2 ways.
    if ur result set are small, read them in one go and display as PREV / NEXT button is pressed,
    Or if ur result set is very large, maintain internal counters, and navigate with them.
    When u are at first / last entry, better dissable those button actions.
    I hope this will help you.
    Regards
    BS

Maybe you are looking for